Changeset 9876


Ignore:
Timestamp:
Jan 4, 2010, 10:28:42 PM (12 years ago)
Author:
charles
Message:

(1.7x libT) backport to 1.7x branch: r9480 #2554 "JSON_int_t won't use "long long int" unless STDC_VERSION is defined"

Location:
branches/1.7x/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7x/libtransmission/JSON_parser.c

    r9359 r9876  
    501501                case JSON_T_INTEGER:
    502502                    arg = &value;
    503                     sscanf(jc->parse_buffer, JSON_PARSER_INTEGER_SSCANF_TOKEN, &value.vu.integer_value);
     503                    value.vu.integer_value = evutil_strtoll( jc->parse_buffer, NULL, 10 );
    504504                    break;
    505505                case JSON_T_STRING:
  • branches/1.7x/libtransmission/JSON_parser.h

    r9359 r9876  
    1919
    2020/* Determine the integer type use to parse non-floating point numbers */
    21 #if __STDC_VERSION__ >= 199901L || HAVE_LONG_LONG == 1
    22 typedef long long JSON_int_t;
    23 #define JSON_PARSER_INTEGER_SSCANF_TOKEN "%lld"
    24 #define JSON_PARSER_INTEGER_SPRINTF_TOKEN "%lld"
    25 #else
    26 typedef long JSON_int_t;
    27 #define JSON_PARSER_INTEGER_SSCANF_TOKEN "%ld"
    28 #define JSON_PARSER_INTEGER_SPRINTF_TOKEN "%ld"
    29 #endif
     21#include <evutil.h>
     22typedef ev_int64_t JSON_int_t;
    3023
    3124
Note: See TracChangeset for help on using the changeset viewer.