1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

windoze version works again

This commit is contained in:
Werner Koch 1998-10-06 12:10:02 +00:00
parent 6f73ec963a
commit f04db56311
27 changed files with 803 additions and 409 deletions

View file

@ -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.

View file

@ -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

View file

@ -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();