mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Changed a lot of __MINGW32__ to _WIN32. This should help a bit in
building with native Windows compilers. On request by Brian Gladman.
This commit is contained in:
parent
ee923fb897
commit
da4bf59349
42 changed files with 415 additions and 393 deletions
|
@ -1,5 +1,8 @@
|
|||
2003-07-30 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* photoid.c, passphrase.c, g10.c, exec.c: Replaced some
|
||||
__MINGW32__ by _WIN32.
|
||||
|
||||
* g10.c (main): Disable use-agent if passphrase-fd is given
|
||||
later. Suggested by Kurt Garloff.
|
||||
|
||||
|
|
10
g10/exec.c
10
g10/exec.c
|
@ -1,5 +1,5 @@
|
|||
/* exec.c - generic call-a-program code
|
||||
* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
|
@ -59,7 +59,7 @@ int set_exec_path(const char *path,int method) { return G10ERR_GENERAL; }
|
|||
char *mkdtemp(char *template);
|
||||
#endif
|
||||
|
||||
#if defined (__MINGW32__)
|
||||
#if defined (_WIN32)
|
||||
/* This is a nicer system() for windows that waits for programs to
|
||||
return before returning control to the caller. I hate helpful
|
||||
computers. */
|
||||
|
@ -139,7 +139,7 @@ static int make_tempdir(struct exec_info *info)
|
|||
|
||||
if(tmp==NULL)
|
||||
{
|
||||
#if defined (__MINGW32__)
|
||||
#if defined (_WIN32)
|
||||
tmp=m_alloc(256);
|
||||
if(GetTempPath(256,tmp)==0)
|
||||
strcpy(tmp,"c:\\windows\\temp");
|
||||
|
@ -176,7 +176,7 @@ static int make_tempdir(struct exec_info *info)
|
|||
|
||||
sprintf(info->tempdir,"%s" DIRSEP_S "gpg-XXXXXX",tmp);
|
||||
|
||||
#if defined (__MINGW32__)
|
||||
#if defined (_WIN32)
|
||||
m_free(tmp);
|
||||
#endif
|
||||
|
||||
|
@ -502,7 +502,7 @@ int exec_read(struct exec_info *info)
|
|||
if(DBG_EXTPROG)
|
||||
log_debug("system() command is %s\n",info->command);
|
||||
|
||||
#if defined (__MINGW32__)
|
||||
#if defined (_WIN32)
|
||||
info->progreturn=win_system(info->command);
|
||||
#else
|
||||
info->progreturn=system(info->command);
|
||||
|
|
|
@ -1120,7 +1120,7 @@ main( int argc, char **argv )
|
|||
opt.keyserver_options.include_subkeys=1;
|
||||
opt.keyserver_options.include_revoked=1;
|
||||
opt.mangle_dos_filenames = 1;
|
||||
#if defined (__MINGW32__)
|
||||
#if defined (_WIN32)
|
||||
set_homedir ( read_w32_registry_string( NULL,
|
||||
"Software\\GNU\\GnuPG", "HomeDir" ));
|
||||
#else
|
||||
|
@ -1425,7 +1425,7 @@ main( int argc, char **argv )
|
|||
break;
|
||||
case oLoadExtension:
|
||||
#ifndef __riscos__
|
||||
#if defined(USE_DYNAMIC_LINKING) || defined(__MINGW32__)
|
||||
#if defined(USE_DYNAMIC_LINKING) || defined(_WIN32)
|
||||
if(check_permissions(pargs.r.ret_str,2))
|
||||
log_info(_("cipher extension \"%s\" not loaded due to "
|
||||
"unsafe permissions\n"),pargs.r.ret_str);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
#if defined (__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined (_WIN32) || defined (__CYGWIN32__)
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
@ -100,7 +100,7 @@ static char *fd_passwd = NULL;
|
|||
static char *next_pw = NULL;
|
||||
static char *last_pw = NULL;
|
||||
|
||||
#if defined (__MINGW32__)
|
||||
#if defined (_WIN32)
|
||||
static int read_fd = 0;
|
||||
static int write_fd = 0;
|
||||
#endif
|
||||
|
@ -189,7 +189,7 @@ read_passphrase_from_fd( int fd )
|
|||
static int
|
||||
writen ( int fd, const void *buf, size_t nbytes )
|
||||
{
|
||||
#if defined (__MINGW32__)
|
||||
#if defined (_WIN32)
|
||||
DWORD nwritten, nleft = nbytes;
|
||||
|
||||
while (nleft > 0) {
|
||||
|
@ -232,7 +232,7 @@ writen ( int fd, const void *buf, size_t nbytes )
|
|||
static int
|
||||
readn ( int fd, void *buf, size_t buflen, size_t *ret_nread )
|
||||
{
|
||||
#if defined (__MINGW32__)
|
||||
#if defined (_WIN32)
|
||||
DWORD nread, nleft = buflen;
|
||||
|
||||
while (nleft > 0) {
|
||||
|
@ -326,7 +326,7 @@ readline (int fd, char *buf, size_t buflen)
|
|||
|
||||
#if !defined (__riscos__)
|
||||
|
||||
#if !defined (__MINGW32__)
|
||||
#if !defined (_WIN32)
|
||||
/* For the new Assuan protocol we may have to send options */
|
||||
static int
|
||||
agent_send_option (int fd, const char *name, const char *value)
|
||||
|
@ -431,7 +431,7 @@ agent_send_all_options (int fd)
|
|||
#endif
|
||||
return rc;
|
||||
}
|
||||
#endif /*!__MINGW32__*/
|
||||
#endif /*!_WIN32*/
|
||||
|
||||
|
||||
/*
|
||||
|
@ -442,7 +442,7 @@ agent_send_all_options (int fd)
|
|||
static int
|
||||
agent_open (int *ret_prot)
|
||||
{
|
||||
#if defined (__MINGW32__)
|
||||
#if defined (_WIN32)
|
||||
int fd;
|
||||
char *infostr, *p;
|
||||
HANDLE h;
|
||||
|
@ -587,7 +587,7 @@ agent_open (int *ret_prot)
|
|||
static void
|
||||
agent_close ( int fd )
|
||||
{
|
||||
#if defined (__MINGW32__)
|
||||
#if defined (_WIN32)
|
||||
HANDLE h = OpenEvent(EVENT_ALL_ACCESS, FALSE, "gpg_agent");
|
||||
ResetEvent(h);
|
||||
#else
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef __MINGW32__
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
||||
# ifndef VER_PLATFORM_WIN32_WINDOWS
|
||||
# define VER_PLATFORM_WIN32_WINDOWS 1
|
||||
|
@ -223,7 +223,7 @@ char *image_type_to_string(byte type,int style)
|
|||
#if !defined(FIXED_PHOTO_VIEWER) && !defined(DISABLE_PHOTO_VIEWER)
|
||||
static const char *get_default_photo_command(void)
|
||||
{
|
||||
#if defined(__MINGW32__)
|
||||
#if defined(_WIN32)
|
||||
OSVERSIONINFO osvi;
|
||||
|
||||
memset(&osvi,0,sizeof(osvi));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue