mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
w32: Prepare for the case gcrypt.h will not include winsock2.h.
* common/dynload.h: Include specific headers only. * common/exechelp-w32.c: Include <windows.h>. * common/gettime.c: Likewise. * common/utf8conv.c: Likewise. * tests/gpgscm/ffi.c: Likewise. * tools/gpgconf.c: Likewise. * configure.ac: Check winsock2.h, removing gl_HEADER_SYS_SOCKET. -- GnuPG-bug-id: 5731 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
61ac580a20
commit
e08225030d
@ -34,7 +34,9 @@
|
|||||||
#ifndef __MINGW32__
|
#ifndef __MINGW32__
|
||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
#else
|
#else
|
||||||
# include <windows.h>
|
# include <errhandlingapi.h>
|
||||||
|
# include <handleapi.h>
|
||||||
|
# include <libloaderapi.h>
|
||||||
# include "utf8conv.h"
|
# include "utf8conv.h"
|
||||||
# include "mischelp.h"
|
# include "mischelp.h"
|
||||||
# define RTLD_LAZY 0
|
# define RTLD_LAZY 0
|
||||||
|
@ -65,6 +65,8 @@
|
|||||||
#include "sysutils.h"
|
#include "sysutils.h"
|
||||||
#include "exechelp.h"
|
#include "exechelp.h"
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
/* Define to 1 do enable debugging. */
|
/* Define to 1 do enable debugging. */
|
||||||
#define DEBUG_W32_SPAWN 0
|
#define DEBUG_W32_SPAWN 0
|
||||||
|
|
||||||
|
@ -42,6 +42,10 @@
|
|||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
#include "gettime.h"
|
#include "gettime.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_W32_SYSTEM
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_UNSIGNED_TIME_T
|
#ifdef HAVE_UNSIGNED_TIME_T
|
||||||
# define IS_INVALID_TIME_T(a) ((a) == (time_t)(-1))
|
# define IS_INVALID_TIME_T(a) ((a) == (time_t)(-1))
|
||||||
#else
|
#else
|
||||||
|
@ -55,6 +55,10 @@
|
|||||||
#include "stringhelp.h"
|
#include "stringhelp.h"
|
||||||
#include "utf8conv.h"
|
#include "utf8conv.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_W32_SYSTEM
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef MB_LEN_MAX
|
#ifndef MB_LEN_MAX
|
||||||
#define MB_LEN_MAX 16
|
#define MB_LEN_MAX 16
|
||||||
#endif
|
#endif
|
||||||
|
@ -806,6 +806,7 @@ if test "$have_w32_system" = yes; then
|
|||||||
if test "$have_w32ce_system" = yes; then
|
if test "$have_w32ce_system" = yes; then
|
||||||
AC_DEFINE(HAVE_W32CE_SYSTEM,1,[Defined if we run on WindowsCE])
|
AC_DEFINE(HAVE_W32CE_SYSTEM,1,[Defined if we run on WindowsCE])
|
||||||
fi
|
fi
|
||||||
|
AC_CHECK_HEADERS([winsock2.h])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
|
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
|
||||||
AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes)
|
AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes)
|
||||||
@ -1385,7 +1386,6 @@ AC_CHECK_DECLS([sys_siglist],[],[],[#include <signal.h>
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
gl_HEADER_SYS_SOCKET
|
|
||||||
gl_TYPE_SOCKLEN_T
|
gl_TYPE_SOCKLEN_T
|
||||||
|
|
||||||
AC_SEARCH_LIBS([inet_addr], [nsl])
|
AC_SEARCH_LIBS([inet_addr], [nsl])
|
||||||
|
@ -45,6 +45,10 @@
|
|||||||
#include "../../common/exechelp.h"
|
#include "../../common/exechelp.h"
|
||||||
#include "../../common/sysutils.h"
|
#include "../../common/sysutils.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_W32_SYSTEM
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
#include "ffi.h"
|
#include "ffi.h"
|
||||||
#include "ffi-private.h"
|
#include "ffi-private.h"
|
||||||
|
@ -35,6 +35,9 @@
|
|||||||
#include "../common/status.h"
|
#include "../common/status.h"
|
||||||
#include "../common/exechelp.h"
|
#include "../common/exechelp.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_W32_SYSTEM
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Constants to identify the commands and options. */
|
/* Constants to identify the commands and options. */
|
||||||
enum cmd_and_opt_values
|
enum cmd_and_opt_values
|
||||||
|
Loading…
x
Reference in New Issue
Block a user