diff --git a/g10/ChangeLog b/g10/ChangeLog index b6665abeb..5ff54e138 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,7 @@ +2001-12-19 Werner Koch + + * g10.c, passphrase.c [CYGWIN32]: Allow this as an alias for MINGW32. + 2001-12-18 David Shaw * g10.c (idea_cipher_warn): Add a flag to show the warning always diff --git a/g10/g10.c b/g10/g10.c index d2865fe70..e2ad269c7 100644 --- a/g10/g10.c +++ b/g10/g10.c @@ -741,11 +741,11 @@ main( int argc, char **argv ) opt.marginals_needed = 3; opt.max_cert_depth = 5; opt.pgp2_workarounds = 1; - #ifdef __MINGW32__ +#if defined (__MINGW32__) || defined (__CYGWIN32__) opt.homedir = read_w32_registry_string( NULL, "Software\\GNU\\GnuPG", "HomeDir" ); - #else +#else opt.homedir = getenv("GNUPGHOME"); - #endif +#endif if( !opt.homedir || !*opt.homedir ) { opt.homedir = GNUPG_HOMEDIR; } diff --git a/g10/passphrase.c b/g10/passphrase.c index a2075dd49..f5aed8cea 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -29,7 +29,7 @@ #include #include #endif -#ifdef __MINGW32__ +#if defined (__MINGW32__) || defined (__CYGWIN32__) # include #endif #include @@ -85,7 +85,7 @@ static char *fd_passwd = NULL; static char *next_pw = NULL; static char *last_pw = NULL; -#ifdef __MINGW32__ +#if defined (__MINGW32__) || defined (__CYGWIN32__) static int read_fd = 0; static int write_fd = 0; #endif @@ -164,7 +164,7 @@ read_passphrase_from_fd( int fd ) static int writen ( int fd, const void *buf, size_t nbytes ) { -#ifdef __MINGW32__ +#if defined (__MINGW32__) || defined (__CYGWIN32__) DWORD nwritten, nleft = nbytes; while (nleft > 0) { @@ -207,7 +207,7 @@ writen ( int fd, const void *buf, size_t nbytes ) static int readn ( int fd, void *buf, size_t buflen, size_t *ret_nread ) { -#ifdef __MINGW32__ +#if defined (__MINGW32__) || defined (__CYGWIN32__) DWORD nread, nleft = buflen; while (nleft > 0) { @@ -266,7 +266,7 @@ readn ( int fd, void *buf, size_t buflen, size_t *ret_nread ) static int agent_open (void) { -#ifdef __MINGW32__ +#if defined (__MINGW32__) || defined (__CYGWIN32__) int fd; char *infostr, *p; HANDLE h; @@ -363,7 +363,7 @@ agent_open (void) static void agent_close ( int fd ) { -#ifdef __MINGW32__ +#if defined (__MINGW32__) || defined (__CYGWIN32__) HANDLE h = OpenEvent(EVENT_ALL_ACCESS, FALSE, "gpg_agent"); ResetEvent(h); #else