mirror of
https://github.com/transmission/transmission
synced 2025-03-01 01:05:36 +00:00
(libT) more win32 portability fixes from Spry
This commit is contained in:
parent
e336463253
commit
7ec84486ee
3 changed files with 12 additions and 3 deletions
libtransmission
|
@ -27,6 +27,10 @@
|
|||
|
||||
#include "transmission.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct tr_benc;
|
||||
|
||||
int tr_metainfoParse( const tr_handle * handle,
|
||||
|
@ -41,4 +45,8 @@ void tr_metainfoRemoveSaved( const tr_handle * handle,
|
|||
void tr_metainfoMigrate( tr_handle * handle,
|
||||
tr_info * inf );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -465,9 +465,9 @@ tr_getDefaultConfigDir( void )
|
|||
s = tr_buildPath( getHomeDir( ), "Library",
|
||||
"Application Support", "Transmission", NULL );
|
||||
#elif defined( WIN32 )
|
||||
char configDir[MAX_PATH_LENGTH];
|
||||
GetModuleFileName( GetModuleHandle( NULL ), configDir, sizeof( configDir ) );
|
||||
s = tr_buildPath( basename( configDir ), "Transmission", NULL );
|
||||
char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */
|
||||
SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, appdata );
|
||||
s = tr_buildPath( appdata, "Transmission", NULL );
|
||||
#else
|
||||
if( ( s = getenv( "XDG_CONFIG_HOME" ) ) )
|
||||
s = tr_buildPath( s, "transmission", NULL );
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "transmission.h"
|
||||
#include "list.h"
|
||||
#include "net.h" /* socklen_t */
|
||||
#include "trevent.h"
|
||||
#include "utils.h"
|
||||
#include "web.h"
|
||||
|
|
Loading…
Reference in a new issue