Changeset 4597


Ignore:
Timestamp:
Jan 10, 2008, 6:52:46 PM (14 years ago)
Author:
charles
Message:

mingw portability fixes

Location:
trunk/libtransmission
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/crypto.c

    r4404 r4597  
    1616#include <string.h> /* memcpy */
    1717#include <stdarg.h>
    18 #include <netinet/in.h> /* struct in_addr */
    1918
    2019#include <openssl/bn.h>
  • trunk/libtransmission/peer-mgr-private.h

    r4580 r4597  
    1515
    1616#include <inttypes.h> /* uint16_t */
     17
     18#ifdef WIN32
     19#include <winsock2.h> /* struct in_addr */
     20#else
    1721#include <netinet/in.h> /* struct in_addr */
     22#endif
     23
    1824#include "publish.h" /* tr_publisher_tag */
    1925
  • trunk/libtransmission/peer-mgr.c

    r4586 r4597  
    1818
    1919#include <libgen.h> /* basename */
    20 #include <arpa/inet.h> /* inet_ntoa */
    2120
    2221#include <event.h>
     
    743742        walk += reqCount[s];
    744743    }
    745     assert( ( walk - ret ) == blockCount );
     744    assert( ( walk - ret ) == ( int )blockCount );
    746745    *setmeCount = blockCount;
    747746
  • trunk/libtransmission/peer-mgr.h

    r4556 r4597  
    1515
    1616#include <inttypes.h> /* uint16_t */
     17
     18#ifdef WIN32
     19#include <winsock2.h> /* struct in_addr */
     20#else
    1721#include <netinet/in.h> /* struct in_addr */
     22#endif
    1823
    1924struct in_addr;
  • trunk/libtransmission/peer-msgs.c

    r4582 r4597  
    1717#include <string.h>
    1818#include <libgen.h> /* basename */
    19 
    20 #include <netinet/in.h> /* struct in_addr */
    2119
    2220#include <event.h>
  • trunk/libtransmission/shared.c

    r4431 r4597  
    2323 *****************************************************************************/
    2424
     25#include <errno.h>
    2526#include <string.h>
    2627#include <stdio.h>
  • trunk/libtransmission/tracker.c

    r4539 r4597  
    1717#include <libgen.h> /* basename */
    1818
    19 #include <sys/queue.h> /* evhttp.h needs this */
    2019#include <event.h>
    2120#include <evhttp.h>
  • trunk/libtransmission/trevent.c

    r4404 r4597  
    1818
    1919#include <signal.h>
    20 #include <sys/queue.h> /* for evhttp */
    21 #include <sys/types.h> /* for evhttp */
    2220
    2321#include <event.h>
  • trunk/libtransmission/utils.c

    r4482 r4597  
    9595    gettimeofday( &tv, NULL );
    9696
     97#ifdef WIN32
     98    now_tm = *localtime( &now );
     99#else
    97100    localtime_r( &now, &now_tm );
     101#endif
     102
    98103    strftime( tmp, sizeof(tmp), "%H:%M:%S", &now_tm );
    99104    milliseconds = (int)(tv.tv_usec / 1000);
Note: See TracChangeset for help on using the changeset viewer.