1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

* exec.c [__CYGWIN32__]: Keep cygwin separate from Mingw32;

we don't need it here as it behaves more like a Posix system.
* passphrase.c (agent_get_passphrase): Ditto.
* tdbio.c (MY_O_BINARY): Need binary mode with Cygwin.

* g10.c, gpgv.c (main) [__CYGWIN32__]: Don't get the homedir from
the registry.
This commit is contained in:
Werner Koch 2002-10-21 16:31:38 +00:00
parent 265b60b089
commit 16e53ae196
6 changed files with 27 additions and 17 deletions

View File

@ -1,3 +1,13 @@
2002-10-21 Werner Koch <wk@gnupg.org>
* exec.c [__CYGWIN32__]: Keep cygwin separate from Mingw32;
we don't need it here as it behaves more like a Posix system.
* passphrase.c (agent_get_passphrase): Ditto.
* tdbio.c (MY_O_BINARY): Need binary mode with Cygwin.
* g10.c, gpgv.c (main) [__CYGWIN32__]: Don't get the homedir from
the registry.
2002-10-17 Werner Koch <wk@gnupg.org> 2002-10-17 Werner Koch <wk@gnupg.org>
* pkclist.c (do_edit_ownertrust): Show all user IDs. This should * pkclist.c (do_edit_ownertrust): Show all user IDs. This should

View File

@ -59,7 +59,7 @@ int set_exec_path(const char *path,int method) { return G10ERR_GENERAL; }
char *mkdtemp(char *template); char *mkdtemp(char *template);
#endif #endif
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
/* This is a nicer system() for windows that waits for programs to /* This is a nicer system() for windows that waits for programs to
return before returning control to the caller. I hate helpful return before returning control to the caller. I hate helpful
computers. */ computers. */
@ -136,7 +136,7 @@ static int make_tempdir(struct exec_info *info)
if(tmp==NULL) if(tmp==NULL)
{ {
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
tmp=m_alloc(256); tmp=m_alloc(256);
if(GetTempPath(256,tmp)==0) if(GetTempPath(256,tmp)==0)
strcpy(tmp,"c:\\windows\\temp"); strcpy(tmp,"c:\\windows\\temp");
@ -173,7 +173,7 @@ static int make_tempdir(struct exec_info *info)
sprintf(info->tempdir,"%s" DIRSEP_S "gpg-XXXXXX",tmp); sprintf(info->tempdir,"%s" DIRSEP_S "gpg-XXXXXX",tmp);
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
m_free(tmp); m_free(tmp);
#endif #endif
@ -499,7 +499,7 @@ int exec_read(struct exec_info *info)
if(DBG_EXTPROG) if(DBG_EXTPROG)
log_debug("system() command is %s\n",info->command); log_debug("system() command is %s\n",info->command);
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
info->progreturn=win_system(info->command); info->progreturn=win_system(info->command);
#else #else
info->progreturn=system(info->command); info->progreturn=system(info->command);

View File

@ -1102,7 +1102,7 @@ main( int argc, char **argv )
EXPORT_INCLUDE_NON_RFC|EXPORT_INCLUDE_ATTRIBUTES; EXPORT_INCLUDE_NON_RFC|EXPORT_INCLUDE_ATTRIBUTES;
opt.keyserver_options.include_subkeys=1; opt.keyserver_options.include_subkeys=1;
opt.keyserver_options.include_revoked=1; opt.keyserver_options.include_revoked=1;
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
set_homedir ( read_w32_registry_string( NULL, set_homedir ( read_w32_registry_string( NULL,
"Software\\GNU\\GnuPG", "HomeDir" )); "Software\\GNU\\GnuPG", "HomeDir" ));
#else #else

View File

@ -164,7 +164,7 @@ main( int argc, char **argv )
opt.always_trust = 1; opt.always_trust = 1;
opt.batch = 1; opt.batch = 1;
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
set_homedir (read_w32_registry_string( NULL, "Software\\GNU\\GnuPG", "HomeDir" )); set_homedir (read_w32_registry_string( NULL, "Software\\GNU\\GnuPG", "HomeDir" ));
#else #else
set_homedir (getenv("GNUPGHOME")); set_homedir (getenv("GNUPGHOME"));

View File

@ -97,7 +97,7 @@ static char *fd_passwd = NULL;
static char *next_pw = NULL; static char *next_pw = NULL;
static char *last_pw = NULL; static char *last_pw = NULL;
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
static int read_fd = 0; static int read_fd = 0;
static int write_fd = 0; static int write_fd = 0;
#endif #endif
@ -176,7 +176,7 @@ read_passphrase_from_fd( int fd )
static int static int
writen ( int fd, const void *buf, size_t nbytes ) writen ( int fd, const void *buf, size_t nbytes )
{ {
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
DWORD nwritten, nleft = nbytes; DWORD nwritten, nleft = nbytes;
while (nleft > 0) { while (nleft > 0) {
@ -219,7 +219,7 @@ writen ( int fd, const void *buf, size_t nbytes )
static int static int
readn ( int fd, void *buf, size_t buflen, size_t *ret_nread ) readn ( int fd, void *buf, size_t buflen, size_t *ret_nread )
{ {
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
DWORD nread, nleft = buflen; DWORD nread, nleft = buflen;
while (nleft > 0) { while (nleft > 0) {
@ -313,7 +313,7 @@ readline (int fd, char *buf, size_t buflen)
#if !defined (__riscos__) #if !defined (__riscos__)
#if !defined (__MINGW32__) && !defined (__CYGWIN32__) #if !defined (__MINGW32__)
/* For the new Assuan protocol we may have to send options */ /* For the new Assuan protocol we may have to send options */
static int static int
agent_send_option (int fd, const char *name, const char *value) agent_send_option (int fd, const char *name, const char *value)
@ -418,7 +418,7 @@ agent_send_all_options (int fd)
#endif #endif
return rc; return rc;
} }
#endif /*!__MINGW32__ && !__CYGWIN32__*/ #endif /*!__MINGW32__*/
/* /*
@ -429,7 +429,7 @@ agent_send_all_options (int fd)
static int static int
agent_open (int *ret_prot) agent_open (int *ret_prot)
{ {
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
int fd; int fd;
char *infostr, *p; char *infostr, *p;
HANDLE h; HANDLE h;
@ -574,7 +574,7 @@ agent_open (int *ret_prot)
static void static void
agent_close ( int fd ) agent_close ( int fd )
{ {
#if defined (__MINGW32__) || defined (__CYGWIN32__) #if defined (__MINGW32__)
HANDLE h = OpenEvent(EVENT_ALL_ACCESS, FALSE, "gpg_agent"); HANDLE h = OpenEvent(EVENT_ALL_ACCESS, FALSE, "gpg_agent");
ResetEvent(h); ResetEvent(h);
#else #else

View File

@ -39,11 +39,11 @@
#include "trustdb.h" #include "trustdb.h"
#include "tdbio.h" #include "tdbio.h"
#if defined(HAVE_DOSISH_SYSTEM) && !defined(__CYGWIN32__) #if defined(HAVE_DOSISH_SYSTEM)
#define ftruncate chsize #define ftruncate chsize
#endif #endif
#ifdef HAVE_DOSISH_SYSTEM #if defined(HAVE_DOSISH_SYSTEM) || defined(__CYGWIN__)
#define MY_O_BINARY O_BINARY #define MY_O_BINARY O_BINARY
#else #else
#define MY_O_BINARY 0 #define MY_O_BINARY 0