From 172dbd2b94199731c1bbd2f789e55535188ade5c Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 30 Sep 2018 23:47:39 +0200 Subject: Use _WIN32 instead of WIN32 The former is guaranteed to be set for any compiler targeting win32, the latter is implementation dependent (but works for gcc) See also http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system --- src/io/resource.cpp | 4 ++-- src/io/sys.cpp | 4 ++-- src/io/uristream.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/io') diff --git a/src/io/resource.cpp b/src/io/resource.cpp index 72cf3c2f9..fd110492e 100644 --- a/src/io/resource.cpp +++ b/src/io/resource.cpp @@ -20,7 +20,7 @@ #include "config.h" #endif -#ifdef WIN32 +#ifdef _WIN32 #include // for SHGetSpecialFolderLocation #endif @@ -378,7 +378,7 @@ char *profile_path(const char *filename) prefdir = g_strdup(userenv); } -#ifdef WIN32 +#ifdef _WIN32 // prefer c:\Documents and Settings\UserName\Application Data\ to c:\Documents and Settings\userName\; // TODO: CSIDL_APPDATA is C:\Users\UserName\AppData\Roaming these days // should we migrate to AppData\Local? Then we can simply use the portable g_get_user_config_dir() diff --git a/src/io/sys.cpp b/src/io/sys.cpp index c56119fb0..af6e964b7 100644 --- a/src/io/sys.cpp +++ b/src/io/sys.cpp @@ -16,7 +16,7 @@ #endif #include -#ifdef WIN32 +#ifdef _WIN32 #include #include #endif @@ -78,7 +78,7 @@ FILE *Inkscape::IO::fopen_utf8name( char const *utf8name, char const *mode ) Glib::ustring how( mode ); if ( how.find("w") != Glib::ustring::npos ) { -#ifdef WIN32 +#ifdef _WIN32 setmode(fileno(stdout), O_BINARY); #endif return stdout; diff --git a/src/io/uristream.cpp b/src/io/uristream.cpp index 0b38dbc84..ff4cca74d 100644 --- a/src/io/uristream.cpp +++ b/src/io/uristream.cpp @@ -49,7 +49,7 @@ static FILE *fopen_utf8name( char const *utf8name, int mode ) return nullptr; } -#ifndef WIN32 +#ifndef _WIN32 gchar *filename = g_filename_from_utf8( utf8name, -1, nullptr, nullptr, nullptr ); if ( filename ) { if (mode == FILE_READ) -- cgit v1.2.3