Ignore:
Timestamp:
Oct 13, 2008, 10:26:02 PM (12 years ago)
Author:
charles
Message:

first batch of portability changes based on spry's winport:
(1) added tr_getcwd(), a simple portability wrapper for getcwd()
(2) cli: show the help page if no command-line arguments are provided
(3) daemon: use tr_wait() intead of sleep()
(4) daemon: SIGQUIT, SIGPIPE, SIGHUP aren't defined on windows
(5) libtransmission: a couple of small cleanups to bencode.c, list.c, web.c
(6) libtransmission: win32 portability fixes to platform.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r6861 r6892  
    1919#elif defined( WIN32 )
    2020 #include <windows.h>
    21  #include <shlobj.h> /* for CSIDL_APPDATA, CSIDL_PROFILE */
     21 #include <shlobj.h> /* for CSIDL_APPDATA, CSIDL_MYDOCUMENTS */
    2222#else
    2323 #ifdef SYS_DARWIN
     
    3939#include <sys/stat.h>
    4040#include <sys/types.h>
     41#ifdef WIN32
     42#include <libgen.h>
     43#endif
    4144#include <dirent.h>
    4245#include <fcntl.h>
     
    268271        {
    269272#ifdef WIN32
    270             SHGetFolderPath( NULL, CSIDL_PROFILE, NULL, 0, home );
     273            SHGetFolderPath( NULL, CSIDL_MYDOCUMENTS, NULL, 0, home );
    271274#elif defined( __BEOS__ ) || defined( __AMIGAOS4__ )
    272275            home = tr_strdup( "" );
     
    421424}
    422425
    423 #ifdef SYS_DARWIN
     426#if defined(SYS_DARWIN) || defined(WIN32)
    424427 #define RESUME_SUBDIR  "Resume"
    425428 #define TORRENT_SUBDIR "Torrents"
Note: See TracChangeset for help on using the changeset viewer.