mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-22 19:58:29 +01:00
* rndw32.c [__CYGWIN32__]: Don't include winioctl.h - it is not
required anymore. * random.c (read_seed_file,update_random_seed_file): Use binary mode for __CYGWIN__.
This commit is contained in:
parent
9def01f51c
commit
265b60b089
@ -1,3 +1,11 @@
|
|||||||
|
2002-10-21 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* rndw32.c [__CYGWIN32__]: Don't include winioctl.h - it is not
|
||||||
|
required anymore.
|
||||||
|
|
||||||
|
* random.c (read_seed_file,update_random_seed_file): Use binary
|
||||||
|
mode for __CYGWIN__.
|
||||||
|
|
||||||
2002-10-12 Werner Koch <wk@gnupg.org>
|
2002-10-12 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* rndunix.c (my_popen): Make sure that stdin and stderr are
|
* rndunix.c (my_popen): Make sure that stdin and stderr are
|
||||||
|
@ -311,9 +311,9 @@ mix_pool(byte *pool)
|
|||||||
RMD160_CONTEXT md;
|
RMD160_CONTEXT md;
|
||||||
|
|
||||||
rmd160_init( &md );
|
rmd160_init( &md );
|
||||||
#if DIGESTLEN != 20
|
#if DIGESTLEN != 20
|
||||||
#error must have a digest length of 20 for ripe-md-160
|
#error must have a digest length of 20 for ripe-md-160
|
||||||
#endif
|
#endif
|
||||||
/* loop over the pool */
|
/* loop over the pool */
|
||||||
pend = pool + POOLSIZE;
|
pend = pool + POOLSIZE;
|
||||||
memcpy(hashbuf, pend - DIGESTLEN, DIGESTLEN );
|
memcpy(hashbuf, pend - DIGESTLEN, DIGESTLEN );
|
||||||
@ -367,11 +367,11 @@ read_seed_file(void)
|
|||||||
if( !seed_file_name )
|
if( !seed_file_name )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef HAVE_DOSISH_SYSTEM
|
#if defined(HAVE_DOSISH_SYSTEM) || defined(__CYGWIN__)
|
||||||
fd = open( seed_file_name, O_RDONLY | O_BINARY );
|
fd = open( seed_file_name, O_RDONLY | O_BINARY );
|
||||||
#else
|
#else
|
||||||
fd = open( seed_file_name, O_RDONLY );
|
fd = open( seed_file_name, O_RDONLY );
|
||||||
#endif
|
#endif
|
||||||
if( fd == -1 && errno == ENOENT) {
|
if( fd == -1 && errno == ENOENT) {
|
||||||
allow_seed_file_update = 1;
|
allow_seed_file_update = 1;
|
||||||
return 0;
|
return 0;
|
||||||
@ -457,12 +457,12 @@ update_random_seed_file()
|
|||||||
mix_pool(rndpool); rndstats.mixrnd++;
|
mix_pool(rndpool); rndstats.mixrnd++;
|
||||||
mix_pool(keypool); rndstats.mixkey++;
|
mix_pool(keypool); rndstats.mixkey++;
|
||||||
|
|
||||||
#ifdef HAVE_DOSISH_SYSTEM
|
#if defined(HAVE_DOSISH_SYSTEM) || defined(__CYGWIN__)
|
||||||
fd = open( seed_file_name, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY,
|
fd = open( seed_file_name, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY,
|
||||||
S_IRUSR|S_IWUSR );
|
S_IRUSR|S_IWUSR );
|
||||||
#else
|
#else
|
||||||
fd = open( seed_file_name, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR );
|
fd = open( seed_file_name, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR );
|
||||||
#endif
|
#endif
|
||||||
if( fd == -1 ) {
|
if( fd == -1 ) {
|
||||||
log_info(_("can't create `%s': %s\n"), seed_file_name, strerror(errno) );
|
log_info(_("can't create `%s': %s\n"), seed_file_name, strerror(errno) );
|
||||||
return;
|
return;
|
||||||
|
@ -70,9 +70,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#ifdef __CYGWIN32__
|
|
||||||
# include <winioctl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user