Ignore:
Timestamp:
Jun 22, 2010, 12:12:52 AM (12 years ago)
Author:
charles
Message:

(trunk) more win32 fixes from rb07 in #3311

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r10800 r10816  
    16591659}
    16601660
     1661static void
     1662tr_setenv( const char * name, const char * value, tr_bool override )
     1663{
     1664#ifdef WIN32
     1665    putenv( tr_strdup_printf( "%s=%s", name, value ) ); /* leaks memory... */
     1666#else
     1667    setenv( name, value, override );
     1668#endif
     1669}
    16611670
    16621671static void
     
    16741683#endif
    16751684
    1676         setenv( "TR_APP_VERSION", SHORT_VERSION_STRING, 1 );
     1685        tr_setenv( "TR_APP_VERSION", SHORT_VERSION_STRING, 1 );
    16771686
    16781687        tr_snprintf( buf, sizeof( buf ), "%d", tr_torrentId( tor ) );
    1679         setenv( "TR_TORRENT_ID", buf, 1 );
    1680         setenv( "TR_TORRENT_NAME", tr_torrentName( tor ), 1 );
    1681         setenv( "TR_TORRENT_DIR", tor->currentDir, 1 );
    1682         setenv( "TR_TORRENT_HASH", tor->info.hashString, 1 );
     1688        tr_setenv( "TR_TORRENT_ID", buf, 1 );
     1689        tr_setenv( "TR_TORRENT_NAME", tr_torrentName( tor ), 1 );
     1690        tr_setenv( "TR_TORRENT_DIR", tor->currentDir, 1 );
     1691        tr_setenv( "TR_TORRENT_HASH", tor->info.hashString, 1 );
    16831692        tr_strlcpy( buf, ctime( &now ), sizeof( buf ) );
    16841693        *strchr( buf,'\n' ) = '\0';
    1685         setenv( "TR_TIME_LOCALTIME", buf, 1 );
     1694        tr_setenv( "TR_TIME_LOCALTIME", buf, 1 );
    16861695        tr_torinf( tor, "Calling script \"%s\"", script );
    16871696        system( script );
Note: See TracChangeset for help on using the changeset viewer.