summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorGravatar Duncan Ogilvie2024-11-27 12:01:18 +0100
committerGravatar Nikias Bassen2024-11-29 14:36:34 +0100
commitbcced6c4f6a79e09ed3961632b2faf81fe873137 (patch)
tree71bb6a70a3438c68229e4906e6bce14974a9aee8 /common
parentba829e6f1a62bdad7866572d1e2cff1836ced742 (diff)
downloadlibimobiledevice-bcced6c4f6a79e09ed3961632b2faf81fe873137.tar.gz
libimobiledevice-bcced6c4f6a79e09ed3961632b2faf81fe873137.tar.bz2
Fix attempts to detect Windows using _WIN32
Diffstat (limited to 'common')
-rw-r--r--common/userpref.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/userpref.c b/common/userpref.c
index 48bcfcb..9c2c563 100644
--- a/common/userpref.c
+++ b/common/userpref.c
@@ -32,7 +32,7 @@
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifndef WIN32
+#ifndef _WIN32
#include <pwd.h>
#endif
#include <unistd.h>
@@ -69,7 +69,7 @@
#include <sys/stat.h>
#include <errno.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <shlobj.h>
#endif
@@ -93,7 +93,7 @@ const ASN1_ARRAY_TYPE pkcs1_asn1_tab[] = {
};
#endif
-#ifdef WIN32
+#ifdef _WIN32
#define DIR_SEP '\\'
#define DIR_SEP_S "\\"
#else
@@ -103,7 +103,7 @@ const ASN1_ARRAY_TYPE pkcs1_asn1_tab[] = {
#define USERPREF_CONFIG_EXTENSION ".plist"
-#ifdef WIN32
+#ifdef _WIN32
#define USERPREF_CONFIG_DIR "Apple"DIR_SEP_S"Lockdown"
#else
#define USERPREF_CONFIG_DIR "lockdown"
@@ -113,7 +113,7 @@ const ASN1_ARRAY_TYPE pkcs1_asn1_tab[] = {
static char *__config_dir = NULL;
-#ifdef WIN32
+#ifdef _WIN32
static char *userpref_utf16_to_utf8(wchar_t *unistr, long len, long *items_read, long *items_written)
{
if (!unistr || (len <= 0)) return NULL;
@@ -155,7 +155,7 @@ const char *userpref_get_config_dir()
if (__config_dir)
return __config_dir;
-#ifdef WIN32
+#ifdef _WIN32
wchar_t path[MAX_PATH+1];
HRESULT hr;
LPITEMIDLIST pidl = NULL;