summaryrefslogtreecommitdiffstats
path: root/cipher/rndlinux.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-12-10 20:20:47 +0100
committerWerner Koch <wk@gnupg.org>1998-12-10 20:20:47 +0100
commitaf6e96e4f918169508acd8a710309cf617eff3c1 (patch)
treebe313d86fcf1e63ae95686216e149e3aac770749 /cipher/rndlinux.c
parentSee ChangeLog: Wed Dec 9 13:41:06 CET 1998 Werner Koch (diff)
downloadgnupg2-af6e96e4f918169508acd8a710309cf617eff3c1.tar.xz
gnupg2-af6e96e4f918169508acd8a710309cf617eff3c1.zip
See ChangeLog: Thu Dec 10 20:15:36 CET 1998 Werner Koch
Diffstat (limited to 'cipher/rndlinux.c')
-rw-r--r--cipher/rndlinux.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/cipher/rndlinux.c b/cipher/rndlinux.c
index 69af64f5d..3d0ac1b58 100644
--- a/cipher/rndlinux.c
+++ b/cipher/rndlinux.c
@@ -27,15 +27,9 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef HAVE_GETHRTIME
- #include <sys/times.h>
-#endif
#ifdef HAVE_GETTIMEOFDAY
#include <sys/times.h>
#endif
-#ifdef HAVE_GETRUSAGE
- #include <sys/resource.h>
-#endif
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
@@ -61,38 +55,6 @@ static void tty_printf(const char *fmt, ... )
#endif
-static void
-fast_poll( void (*add)(const void*, size_t, int) )
-{
- #if HAVE_GETHRTIME
- { hrtime_t tv;
- tv = gethrtime();
- (*add)( &tv, sizeof(tv), 1 );
- }
- #elif HAVE_GETTIMEOFDAY
- { struct timeval tv;
- if( gettimeofday( &tv, NULL ) )
- BUG();
- (*add)( &tv.tv_sec, sizeof(tv.tv_sec), 1 );
- (*add)( &tv.tv_usec, sizeof(tv.tv_usec), 1 );
- }
- #else /* use times */
- { struct tms buf;
- times( &buf );
- (*add)( &buf, sizeof buf, 1 );
- }
- #endif
- #ifdef HAVE_GETRUSAGE
- { struct rusage buf;
- if( getrusage( RUSAGE_SELF, &buf ) )
- BUG();
- (*add)( &buf, sizeof buf, 1 );
- memset( &buf, 0, sizeof buf );
- }
- #endif
-}
-
-
/****************
* Used to open the Linux and xBSD /dev/random devices
@@ -192,7 +154,6 @@ static struct {
void *func;
} func_table[] = {
{ 40, 1, gather_random },
- { 41, 1, fast_poll },
};