Changeset 6903


Ignore:
Timestamp:
Oct 14, 2008, 5:57:44 PM (13 years ago)
Author:
charles
Message:

(libT) a few more win32 portability changes from Spry

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.h

    r6897 r6903  
    3636 #include <StorageDefs.h>
    3737 #define MAX_PATH_LENGTH  B_FILE_NAME_LENGTH
     38#elif defined(WIN32)
     39 #include <windows.h>
     40 #define MAX_PATH_LENGTH  MAX_PATH
    3841#else
    3942 #define MAX_PATH_LENGTH  1024
  • trunk/libtransmission/torrent-ctor.c

    r6898 r6903  
    220220    struct optional_args * args = &ctor->optionalArgs[mode];
    221221
     222    tr_free( args->downloadDir );
     223    args->downloadDir = NULL;
    222224    args->isSet_downloadDir = 0;
    223     tr_free( args->downloadDir );
    224225
    225226    if( directory )
  • trunk/libtransmission/utils.c

    r6897 r6903  
    190190{
    191191    FILE * fp = tr_getLog( );
    192 
     192#ifdef WIN32
     193    if( fp || IsDebuggerPresent( ) )
     194#else
    193195    if( fp )
     196#endif
    194197    {
    195198        va_list           args;
     
    206209        va_end( args );
    207210        evbuffer_add_printf( buf, " (%s:%d)\n", base, line );
     211#ifdef WIN32
     212        OutputDebugString( EVBUFFER_DATA( buf );
     213        if(fp)
     214#endif
    208215        (void) fwrite( EVBUFFER_DATA( buf ), 1, EVBUFFER_LENGTH( buf ), fp );
    209216
Note: See TracChangeset for help on using the changeset viewer.