summaryrefslogtreecommitdiffstats
path: root/3rd_party/libsrp6a-sha512/t_misc.c
diff options
context:
space:
mode:
Diffstat (limited to '3rd_party/libsrp6a-sha512/t_misc.c')
-rw-r--r--3rd_party/libsrp6a-sha512/t_misc.c12
1 files changed, 6 insertions, 6 deletions
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);