Changeset 6894


Ignore:
Timestamp:
Oct 14, 2008, 1:00:15 AM (13 years ago)
Author:
charles
Message:

(libT) more win32 work copied from spry's code:
(1) add #define for {read,write,strncasecmp} -> {_read,_write,_strnicmp}
(2) fix a couple more variadic macros that didn't get fixed in the last commit
(3) use evutil_strtoll() instead of strtoll()

Location:
trunk/libtransmission
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.c

    r6892 r6894  
    9898
    9999    errno = 0;
    100     val = strtoll( begin, &endptr, 10 );
     100    val = evutil_strtoll( begin, &endptr, 10 );
    101101    if( errno || ( endptr != end ) ) /* incomplete parse */
    102102        err = EILSEQ;
  • trunk/libtransmission/handshake.c

    r6795 r6894  
    135135**/
    136136
    137 #define dbgmsg( handshake, fmt... ) tr_deepLog(\
    138         __FILE__, __LINE__, tr_peerIoGetAddrStr( handshake->io ), ## fmt )
     137#define dbgmsg( handshake, ... ) tr_deepLog(\
     138        __FILE__, __LINE__, tr_peerIoGetAddrStr( handshake->io ), __VA_ARGS__ )
    139139
    140140static const char*
  • trunk/libtransmission/inout.c

    r6842 r6894  
    3737#ifdef WIN32
    3838 #define lseek _lseeki64
     39 #define read  _read
     40 #define write _write
    3941#endif
    4042
  • trunk/libtransmission/peer-io.c

    r6795 r6894  
    4040**/
    4141
    42 #define dbgmsg( io, fmt... ) \
    43     tr_deepLog( __FILE__, __LINE__, tr_peerIoGetAddrStr( io ), ## fmt )
     42#define dbgmsg( io, ... ) \
     43    tr_deepLog( __FILE__, __LINE__, tr_peerIoGetAddrStr( io ), __VA_ARGS__ )
    4444
    4545struct tr_bandwidth
  • trunk/libtransmission/peer-mgr.c

    r6882 r6894  
    134134};
    135135
    136 #define tordbg( t, fmt... ) \
    137     tr_deepLog( __FILE__, __LINE__, t->tor->info.name, ## fmt )
    138 
    139 #define dbgmsg( fmt... ) \
    140     tr_deepLog( __FILE__, __LINE__, NULL, ## fmt )
     136#define tordbg( t, ... )
     137    tr_deepLog( __FILE__, __LINE__, t->tor->info.name, __VA_ARGS__ )
     138
     139#define dbgmsg( ... )
     140    tr_deepLog( __FILE__, __LINE__, NULL, __VA_ARGS__ )
    141141
    142142/**
  • trunk/libtransmission/rpc-server.c

    r6893 r6894  
    4141#define MY_REALM "Transmission"
    4242#define TR_N_ELEMENTS( ary ) ( sizeof( ary ) / sizeof( *ary ) )
     43
     44#ifdef WIN32
     45#define strncasecmp _strnicmp
     46#endif
    4347
    4448struct tr_rpc_server
Note: See TracChangeset for help on using the changeset viewer.