summaryrefslogtreecommitdiffstats
path: root/cipher
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-10-06 14:10:02 +0200
committerWerner Koch <wk@gnupg.org>1998-10-06 14:10:02 +0200
commitf04db5631158b3856ea11f300d02a03c7e15ede4 (patch)
tree6cd9c2416b65118f4da0aeceb6be2a7f1763e258 /cipher
parent*** empty log message *** (diff)
downloadgnupg2-f04db5631158b3856ea11f300d02a03c7e15ede4.tar.xz
gnupg2-f04db5631158b3856ea11f300d02a03c7e15ede4.zip
windoze version works again
Diffstat (limited to 'cipher')
-rw-r--r--cipher/ChangeLog5
-rw-r--r--cipher/rand-dummy.c12
-rw-r--r--cipher/rand-unix.c4
3 files changed, 16 insertions, 5 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index 251f4df9d..ad6a76a37 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 6 10:06:32 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-unix.c (HAVE_GETTIMEOFDAY): Fixed (was ..GETTIMEOFTIME :-)
+ * rand-dummy.c (HAVE_GETTIMEOFDAY): Ditto.
+
Mon Sep 28 13:23:09 1998 Werner Koch (wk@isil.d.shuttle.de)
* md.c (md_digest): New.
diff --git a/cipher/rand-dummy.c b/cipher/rand-dummy.c
index e2c754ebb..2cb275bdc 100644
--- a/cipher/rand-dummy.c
+++ b/cipher/rand-dummy.c
@@ -30,7 +30,7 @@
#ifdef HAVE_GETHRTIME
#include <sys/times.h>
#endif
-#ifndef HAVE_GETTIMEOFTIME
+#ifdef HAVE_GETTIMEOFDAY
#include <sys/times.h>
#endif
#ifdef HAVE_GETRUSAGE
@@ -38,6 +38,9 @@
#endif
#include <string.h>
#include <unistd.h>
+#ifdef __MINGW32__
+ #include <process.h>
+#endif
#include <fcntl.h>
#include "util.h"
#include "ttyio.h"
@@ -72,7 +75,7 @@ fast_random_poll()
tv = gethrtime();
add_randomness( &tv, sizeof(tv), 1 );
}
- #elif HAVE_GETTIMEOFTIME
+ #elif HAVE_GETTIMEOFDAY
{ struct timeval tv;
if( gettimeofday( &tv, NULL ) )
BUG();
@@ -80,9 +83,12 @@ fast_random_poll()
add_randomness( &tv.tv_usec, sizeof(tv.tv_usec), 1 );
}
#else /* use times */
- { struct tms buf;
+ {
+ #ifndef __MINGW32__
+ struct tms buf;
times( &buf );
add_randomness( &buf, sizeof buf, 1 );
+ #endif
}
#endif
#ifdef HAVE_GETRUSAGE
diff --git a/cipher/rand-unix.c b/cipher/rand-unix.c
index 855b23b8e..33f964d58 100644
--- a/cipher/rand-unix.c
+++ b/cipher/rand-unix.c
@@ -30,7 +30,7 @@
#ifdef HAVE_GETHRTIME
#include <sys/times.h>
#endif
-#ifndef HAVE_GETTIMEOFTIME
+#ifdef HAVE_GETTIMEOFDAY
#include <sys/times.h>
#endif
#ifdef HAVE_GETRUSAGE
@@ -65,7 +65,7 @@ fast_random_poll()
tv = gethrtime();
add_randomness( &tv, sizeof(tv), 1 );
}
- #elif HAVE_GETTIMEOFTIME
+ #elif HAVE_GETTIMEOFDAY
{ struct timeval tv;
if( gettimeofday( &tv, NULL ) )
BUG();