summaryrefslogtreecommitdiffstats
path: root/common/userpref.c
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/userpref.c
parentba829e6f1a62bdad7866572d1e2cff1836ced742 (diff)
downloadlibimobiledevice-bcced6c4f6a79e09ed3961632b2faf81fe873137.tar.gz
libimobiledevice-bcced6c4f6a79e09ed3961632b2faf81fe873137.tar.bz2
Fix attempts to detect Windows using _WIN32
Diffstat (limited to 'common/userpref.c')
-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 @@
32#ifdef HAVE_SYS_TYPES_H 32#ifdef HAVE_SYS_TYPES_H
33#include <sys/types.h> 33#include <sys/types.h>
34#endif 34#endif
35#ifndef WIN32 35#ifndef _WIN32
36#include <pwd.h> 36#include <pwd.h>
37#endif 37#endif
38#include <unistd.h> 38#include <unistd.h>
@@ -69,7 +69,7 @@
69#include <sys/stat.h> 69#include <sys/stat.h>
70#include <errno.h> 70#include <errno.h>
71 71
72#ifdef WIN32 72#ifdef _WIN32
73#include <shlobj.h> 73#include <shlobj.h>
74#endif 74#endif
75 75
@@ -93,7 +93,7 @@ const ASN1_ARRAY_TYPE pkcs1_asn1_tab[] = {
93}; 93};
94#endif 94#endif
95 95
96#ifdef WIN32 96#ifdef _WIN32
97#define DIR_SEP '\\' 97#define DIR_SEP '\\'
98#define DIR_SEP_S "\\" 98#define DIR_SEP_S "\\"
99#else 99#else
@@ -103,7 +103,7 @@ const ASN1_ARRAY_TYPE pkcs1_asn1_tab[] = {
103 103
104#define USERPREF_CONFIG_EXTENSION ".plist" 104#define USERPREF_CONFIG_EXTENSION ".plist"
105 105
106#ifdef WIN32 106#ifdef _WIN32
107#define USERPREF_CONFIG_DIR "Apple"DIR_SEP_S"Lockdown" 107#define USERPREF_CONFIG_DIR "Apple"DIR_SEP_S"Lockdown"
108#else 108#else
109#define USERPREF_CONFIG_DIR "lockdown" 109#define USERPREF_CONFIG_DIR "lockdown"
@@ -113,7 +113,7 @@ const ASN1_ARRAY_TYPE pkcs1_asn1_tab[] = {
113 113
114static char *__config_dir = NULL; 114static char *__config_dir = NULL;
115 115
116#ifdef WIN32 116#ifdef _WIN32
117static char *userpref_utf16_to_utf8(wchar_t *unistr, long len, long *items_read, long *items_written) 117static char *userpref_utf16_to_utf8(wchar_t *unistr, long len, long *items_read, long *items_written)
118{ 118{
119 if (!unistr || (len <= 0)) return NULL; 119 if (!unistr || (len <= 0)) return NULL;
@@ -155,7 +155,7 @@ const char *userpref_get_config_dir()
155 if (__config_dir) 155 if (__config_dir)
156 return __config_dir; 156 return __config_dir;
157 157
158#ifdef WIN32 158#ifdef _WIN32
159 wchar_t path[MAX_PATH+1]; 159 wchar_t path[MAX_PATH+1];
160 HRESULT hr; 160 HRESULT hr;
161 LPITEMIDLIST pidl = NULL; 161 LPITEMIDLIST pidl = NULL;