aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-08-28 23:49:03 +0000
committerDavid Shaw <[email protected]>2003-08-28 23:49:03 +0000
commit6eb9d6297f79a73b4d911cdb472af69053e9098a (patch)
tree1a4b32d9530b3d2f372bb792518f9b83518cedc7
parent* util.h: s/__MINGW32__/_WIN32/ to help building on native Windows (diff)
downloadgnupg-6eb9d6297f79a73b4d911cdb472af69053e9098a.tar.gz
gnupg-6eb9d6297f79a73b4d911cdb472af69053e9098a.zip
* idea-stub.c, random.c; s/__MINGW32__/_WIN32/ to help building on native
Windows compilers. Requested by Brian Gladman. From Werner on stable branch.
-rw-r--r--cipher/ChangeLog6
-rw-r--r--cipher/idea-stub.c10
-rw-r--r--cipher/random.c7
3 files changed, 16 insertions, 7 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index fe46b7b4e..5dcf5592f 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-28 David Shaw <[email protected]>
+
+ * idea-stub.c, random.c; s/__MINGW32__/_WIN32/ to help building on
+ native Windows compilers. Requested by Brian Gladman. From
+ Werner on stable branch.
+
2003-08-21 David Shaw <[email protected]>
* random.c (getfnc_gather_random): Don't check NAME_OF_DEV_RANDOM
diff --git a/cipher/idea-stub.c b/cipher/idea-stub.c
index 05581ae90..5731aaa33 100644
--- a/cipher/idea-stub.c
+++ b/cipher/idea-stub.c
@@ -1,5 +1,5 @@
/* idea-stub.c - Dummy module for the deprecated IDEA cipher.
- * Copyright (C) 2002 Free Software Foundation, Inc.
+ * Copyright (C) 2002, 2003 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -41,7 +41,7 @@
#ifdef HAVE_DL_DLOPEN
#include <dlfcn.h>
#endif
-#ifdef __MINGW32__
+#ifdef _WIN32
#include <windows.h>
#endif
#include "util.h"
@@ -52,7 +52,7 @@
#endif
-#ifdef __MINGW32__
+#ifdef _WIN32
#define HAVE_DL_DLOPEN
#define USE_DYNAMIC_LINKING
@@ -101,7 +101,7 @@ dlsym ( void *handle, const char *name )
}
return h;
}
-#endif /*__MINGW32__*/
+#endif /*_WIN32*/
/* We do only support dlopen and the Windows emulation of it. */
#ifndef HAVE_DL_DLOPEN
@@ -117,7 +117,7 @@ load_module (const char *name)
void *handle;
void *sym;
-#ifndef __MINGW32__
+#ifndef _WIN32
/* Make sure we are not setuid. */
if (getuid() != geteuid())
log_bug("trying to load an extension while still setuid\n");
diff --git a/cipher/random.c b/cipher/random.c
index b0e2785b0..baee65c49 100644
--- a/cipher/random.c
+++ b/cipher/random.c
@@ -1,5 +1,6 @@
/* random.c - random number generator
- * Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002,
+ * 2003 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -33,7 +34,9 @@
#include <errno.h>
#include <string.h>
#include <time.h>
+#ifndef _WIN32
#include <sys/time.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -50,7 +53,7 @@
#ifdef HAVE_GETRUSAGE
#include <sys/resource.h>
#endif
-#ifdef __MINGW32__
+#ifdef _WIN32
#include <process.h>
#endif
#include "util.h"