Ticket #5722: 5722-02-remove-win32-macro.patch

File 5722-02-remove-win32-macro.patch, 2.7 KB (added by mike.dld, 8 years ago)
  • libtransmission/file-test.c

     
    99
    1010#include <string.h>
    1111
    12 #ifndef WIN32
     12#ifndef _WIN32
    1313 #include <sys/types.h>
    1414 #include <sys/stat.h>
    1515 #include <unistd.h>
     
    2323
    2424#include "libtransmission-test.h"
    2525
    26 #ifndef WIN32
     26#ifndef _WIN32
    2727 #define NATIVE_PATH_SEP "/"
    2828#else
    2929 #define NATIVE_PATH_SEP "\\"
     
    4242static bool
    4343create_symlink (const char * dst_path, const char * src_path, bool dst_is_dir)
    4444{
    45 #ifndef WIN32
     45#ifndef _WIN32
    4646
    4747  (void) dst_is_dir;
    4848
     
    7171static bool
    7272create_hardlink (const char * dst_path, const char * src_path)
    7373{
    74 #ifndef WIN32
     74#ifndef _WIN32
    7575
    7676  return link (src_path, dst_path) != -1;
    7777
     
    109109      char * pathPart;
    110110      const char * slashPos = strchr (p, '/');
    111111
    112 #ifdef WIN32
     112#ifdef _WIN32
    113113
    114114      const char * backslashPos = strchr (p, '\\');
    115115      if (slashPos == NULL || (backslashPos != NULL && backslashPos < slashPos))
     
    579579  check_streq (".", name);
    580580  tr_free (name);
    581581
    582 #ifdef WIN32
     582#ifdef _WIN32
    583583
    584584  name = tr_sys_path_basename ("c:\\a\\b\\c", &err);
    585585  check (name != NULL);
  • libtransmission/file.h

     
    1313#include <inttypes.h>
    1414#include <time.h>
    1515
    16 #ifdef WIN32
     16#ifdef _WIN32
    1717 #include <windows.h>
    1818#endif
    1919
  • libtransmission/platform.c

     
    254254  return home;
    255255}
    256256
    257 #if defined (__APPLE__) || defined (WIN32)
     257#if defined (__APPLE__) || defined (_WIN32)
    258258 #define RESUME_SUBDIR  "Resume"
    259259 #define TORRENT_SUBDIR "Torrents"
    260260#else
  • libtransmission/utils.c

     
    13161316  return ret;
    13171317}
    13181318
    1319 #ifdef WIN32
     1319#ifdef _WIN32
    13201320
    13211321char *
    13221322tr_win32_native_to_utf8 (const wchar_t * text,
  • libtransmission/utils.h

     
    178178 */
    179179char* tr_utf8clean (const char * str, int len) TR_GNUC_MALLOC;
    180180
    181 #ifdef WIN32
     181#ifdef _WIN32
    182182
    183183char    * tr_win32_native_to_utf8    (const wchar_t * text,
    184184                                      int             text_size);