summaryrefslogtreecommitdiffstats
path: root/3rd_party/libsrp6a-sha512
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 /3rd_party/libsrp6a-sha512
parentba829e6f1a62bdad7866572d1e2cff1836ced742 (diff)
downloadlibimobiledevice-bcced6c4f6a79e09ed3961632b2faf81fe873137.tar.gz
libimobiledevice-bcced6c4f6a79e09ed3961632b2faf81fe873137.tar.bz2
Fix attempts to detect Windows using _WIN32
Diffstat (limited to '3rd_party/libsrp6a-sha512')
-rw-r--r--3rd_party/libsrp6a-sha512/cstr.h2
-rw-r--r--3rd_party/libsrp6a-sha512/t_defines.h4
-rw-r--r--3rd_party/libsrp6a-sha512/t_misc.c12
-rw-r--r--3rd_party/libsrp6a-sha512/t_truerand.c8
4 files changed, 13 insertions, 13 deletions
diff --git a/3rd_party/libsrp6a-sha512/cstr.h b/3rd_party/libsrp6a-sha512/cstr.h
index ae7d71a..29afea7 100644
--- a/3rd_party/libsrp6a-sha512/cstr.h
+++ b/3rd_party/libsrp6a-sha512/cstr.h
@@ -38,7 +38,7 @@
#define _MSVC15DEXPORT
#define _MSVC20EXPORT
#define _DLLAPI
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(WINDOWS) || defined(_WIN32)
#define _CDECL _cdecl
#else
#define _CDECL
diff --git a/3rd_party/libsrp6a-sha512/t_defines.h b/3rd_party/libsrp6a-sha512/t_defines.h
index 447263f..a2a5fe5 100644
--- a/3rd_party/libsrp6a-sha512/t_defines.h
+++ b/3rd_party/libsrp6a-sha512/t_defines.h
@@ -65,7 +65,7 @@
#define _MSVC15DEXPORT
#define _MSVC20EXPORT
#define _DLLAPI
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(WINDOWS) || defined(_WIN32)
#define _CDECL _cdecl
#else
#define _CDECL
@@ -122,7 +122,7 @@ char *strchr(), *strrchr(), *strtok();
#define USE_SGTTY
#endif
-#ifdef WIN32
+#ifdef _WIN32
#define USE_FTIME 1
#define USE_RENAME 1
#define NO_FCHMOD 1
diff --git a/3rd_party/libsrp6a-sha512/t_misc.c b/3rd_party/libsrp6a-sha512/t_misc.c
index 3a2cda1..abd8e55 100644
--- a/3rd_party/libsrp6a-sha512/t_misc.c
+++ b/3rd_party/libsrp6a-sha512/t_misc.c
@@ -38,7 +38,7 @@
#include <sys/stat.h>
#include <fcntl.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <process.h>
#include <io.h>
#endif
@@ -207,7 +207,7 @@ t_initrand()
#if defined(OPENSSL) /* OpenSSL has nifty win32 entropy-gathering code */
#if OPENSSL_VERSION_NUMBER >= 0x00905100
r = RAND_status();
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(WINDOWS) || defined(_WIN32)
if(r) /* Don't do the Unix-y stuff on Windows if possible */
return;
#else
@@ -220,7 +220,7 @@ t_initrand()
if(r > 0) {
yarrow_add_entropy(entropy, r, &g_rng);
memset(entropy, 0, sizeof(entropy));
-# if defined(WINDOWS) || defined(WIN32)
+# if defined(WINDOWS) || defined(_WIN32)
/* Don't do the Unix-y stuff on Windows if possible */
yarrow_ready(&g_rng);
return;
@@ -228,13 +228,13 @@ t_initrand()
}
#endif
-#if !defined(WINDOWS) && !defined(WIN32)
+#if !defined(WINDOWS) && !defined(_WIN32)
i = open("/dev/urandom", O_RDONLY);
if(i > 0) {
r += read(i, preseed.devrand, sizeof(preseed.devrand));
close(i);
}
-#endif /* !WINDOWS && !WIN32 */
+#endif /* !WINDOWS && !_WIN32 */
/* Resort to truerand only if desperate for some Real entropy */
if(r == 0)
@@ -250,7 +250,7 @@ t_initrand()
preseed.subsec = t.tv_usec;
#endif
preseed.pid = getpid();
-#ifndef WIN32
+#ifndef _WIN32
preseed.ppid = getppid();
#endif
t_envhash(preseed.envh);
diff --git a/3rd_party/libsrp6a-sha512/t_truerand.c b/3rd_party/libsrp6a-sha512/t_truerand.c
index f995ed7..cd27d0d 100644
--- a/3rd_party/libsrp6a-sha512/t_truerand.c
+++ b/3rd_party/libsrp6a-sha512/t_truerand.c
@@ -54,7 +54,7 @@
#include "t_defines.h"
-#ifdef WIN32
+#ifdef _WIN32
# ifdef CRYPTOLIB
@@ -69,7 +69,7 @@ raw_truerand()
return truerand();
}
-# else /* !CRYPTOLIB && WIN32 */
+# else /* !CRYPTOLIB && _WIN32 */
#include <windows.h>
#include <wtypes.h>
@@ -128,7 +128,7 @@ raw_truerand() {
# endif /* CRYPTOLIB */
-#else /* !WIN32 */
+#else /* !_WIN32 */
#include <signal.h>
#include <setjmp.h>
@@ -238,4 +238,4 @@ raw_n_truerand(int n)
return v % n;
}
-#endif /* !CRYPTOLIB || !WIN32 */
+#endif /* !CRYPTOLIB || !_WIN32 */