Changeset 13701

Show
Ignore:
Timestamp:
02/05/08 18:24:28 (5 months ago)
Author:
mloskot
Message:

Replaced min/max defined in jsonc/bits.h with MIN/MAX macros from cpl_port.h. Now, the GeoJSON driver compiles using GCC 4.3 (Debian Sid).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/ogr/ogrsf_frmts/geojson/jsonc/json_tokener.c

    r12647 r13701  
    2424#include "json_tokener.h" 
    2525 
     26#include <cpl_port.h> /* MIN and MAX macros */ 
    2627 
    2728#if !HAVE_STRNCASECMP && defined(_MSC_VER) 
     
    107108  if(str) { 
    108109    size_t len = strlen(str); 
    109     size_t nn = min(len,n); 
     110    size_t nn = MIN(len,n); 
    110111    char* s = (char*)malloc(sizeof(char) * (nn + 1)); 
    111112 
     
    231232      printbuf_memappend(tok->pb, &c, 1); 
    232233      if(strncasecmp(json_null_str, tok->pb->buf, 
    233                      min(tok->st_pos+1, strlen(json_null_str))) == 0) { 
     234                     MIN(tok->st_pos+1, strlen(json_null_str))) == 0) { 
    234235        if(tok->st_pos == strlen(json_null_str)) { 
    235236          current = NULL; 
     
    352353      printbuf_memappend(tok->pb, &c, 1); 
    353354      if(strncasecmp(json_true_str, tok->pb->buf, 
    354                      min(tok->st_pos+1, strlen(json_true_str))) == 0) { 
     355                     MIN(tok->st_pos+1, strlen(json_true_str))) == 0) { 
    355356        if(tok->st_pos == strlen(json_true_str)) { 
    356357          current = json_object_new_boolean(1); 
     
    360361        } 
    361362      } else if(strncasecmp(json_false_str, tok->pb->buf, 
    362                             min(tok->st_pos+1, strlen(json_false_str))) == 0) { 
     363                            MIN(tok->st_pos+1, strlen(json_false_str))) == 0) { 
    363364        if(tok->st_pos == strlen(json_false_str)) { 
    364365          current = json_object_new_boolean(0);