summaryrefslogtreecommitdiffstats
path: root/3rd_party/libsrp6a-sha512
diff options
context:
space:
mode:
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 @@
38#define _MSVC15DEXPORT 38#define _MSVC15DEXPORT
39#define _MSVC20EXPORT 39#define _MSVC20EXPORT
40#define _DLLAPI 40#define _DLLAPI
41#if defined(WINDOWS) || defined(WIN32) 41#if defined(WINDOWS) || defined(_WIN32)
42#define _CDECL _cdecl 42#define _CDECL _cdecl
43#else 43#else
44#define _CDECL 44#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 @@
65#define _MSVC15DEXPORT 65#define _MSVC15DEXPORT
66#define _MSVC20EXPORT 66#define _MSVC20EXPORT
67#define _DLLAPI 67#define _DLLAPI
68#if defined(WINDOWS) || defined(WIN32) 68#if defined(WINDOWS) || defined(_WIN32)
69#define _CDECL _cdecl 69#define _CDECL _cdecl
70#else 70#else
71#define _CDECL 71#define _CDECL
@@ -122,7 +122,7 @@ char *strchr(), *strrchr(), *strtok();
122#define USE_SGTTY 122#define USE_SGTTY
123#endif 123#endif
124 124
125#ifdef WIN32 125#ifdef _WIN32
126#define USE_FTIME 1 126#define USE_FTIME 1
127#define USE_RENAME 1 127#define USE_RENAME 1
128#define NO_FCHMOD 1 128#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 @@
38#include <sys/stat.h> 38#include <sys/stat.h>
39#include <fcntl.h> 39#include <fcntl.h>
40 40
41#ifdef WIN32 41#ifdef _WIN32
42#include <process.h> 42#include <process.h>
43#include <io.h> 43#include <io.h>
44#endif 44#endif
@@ -207,7 +207,7 @@ t_initrand()
207#if defined(OPENSSL) /* OpenSSL has nifty win32 entropy-gathering code */ 207#if defined(OPENSSL) /* OpenSSL has nifty win32 entropy-gathering code */
208#if OPENSSL_VERSION_NUMBER >= 0x00905100 208#if OPENSSL_VERSION_NUMBER >= 0x00905100
209 r = RAND_status(); 209 r = RAND_status();
210#if defined(WINDOWS) || defined(WIN32) 210#if defined(WINDOWS) || defined(_WIN32)
211 if(r) /* Don't do the Unix-y stuff on Windows if possible */ 211 if(r) /* Don't do the Unix-y stuff on Windows if possible */
212 return; 212 return;
213#else 213#else
@@ -220,7 +220,7 @@ t_initrand()
220 if(r > 0) { 220 if(r > 0) {
221 yarrow_add_entropy(entropy, r, &g_rng); 221 yarrow_add_entropy(entropy, r, &g_rng);
222 memset(entropy, 0, sizeof(entropy)); 222 memset(entropy, 0, sizeof(entropy));
223# if defined(WINDOWS) || defined(WIN32) 223# if defined(WINDOWS) || defined(_WIN32)
224 /* Don't do the Unix-y stuff on Windows if possible */ 224 /* Don't do the Unix-y stuff on Windows if possible */
225 yarrow_ready(&g_rng); 225 yarrow_ready(&g_rng);
226 return; 226 return;
@@ -228,13 +228,13 @@ t_initrand()
228 } 228 }
229#endif 229#endif
230 230
231#if !defined(WINDOWS) && !defined(WIN32) 231#if !defined(WINDOWS) && !defined(_WIN32)
232 i = open("/dev/urandom", O_RDONLY); 232 i = open("/dev/urandom", O_RDONLY);
233 if(i > 0) { 233 if(i > 0) {
234 r += read(i, preseed.devrand, sizeof(preseed.devrand)); 234 r += read(i, preseed.devrand, sizeof(preseed.devrand));
235 close(i); 235 close(i);
236 } 236 }
237#endif /* !WINDOWS && !WIN32 */ 237#endif /* !WINDOWS && !_WIN32 */
238 238
239 /* Resort to truerand only if desperate for some Real entropy */ 239 /* Resort to truerand only if desperate for some Real entropy */
240 if(r == 0) 240 if(r == 0)
@@ -250,7 +250,7 @@ t_initrand()
250 preseed.subsec = t.tv_usec; 250 preseed.subsec = t.tv_usec;
251#endif 251#endif
252 preseed.pid = getpid(); 252 preseed.pid = getpid();
253#ifndef WIN32 253#ifndef _WIN32
254 preseed.ppid = getppid(); 254 preseed.ppid = getppid();
255#endif 255#endif
256 t_envhash(preseed.envh); 256 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 @@
54 54
55#include "t_defines.h" 55#include "t_defines.h"
56 56
57#ifdef WIN32 57#ifdef _WIN32
58 58
59# ifdef CRYPTOLIB 59# ifdef CRYPTOLIB
60 60
@@ -69,7 +69,7 @@ raw_truerand()
69 return truerand(); 69 return truerand();
70} 70}
71 71
72# else /* !CRYPTOLIB && WIN32 */ 72# else /* !CRYPTOLIB && _WIN32 */
73 73
74#include <windows.h> 74#include <windows.h>
75#include <wtypes.h> 75#include <wtypes.h>
@@ -128,7 +128,7 @@ raw_truerand() {
128 128
129# endif /* CRYPTOLIB */ 129# endif /* CRYPTOLIB */
130 130
131#else /* !WIN32 */ 131#else /* !_WIN32 */
132 132
133#include <signal.h> 133#include <signal.h>
134#include <setjmp.h> 134#include <setjmp.h>
@@ -238,4 +238,4 @@ raw_n_truerand(int n)
238 return v % n; 238 return v % n;
239} 239}
240 240
241#endif /* !CRYPTOLIB || !WIN32 */ 241#endif /* !CRYPTOLIB || !_WIN32 */