1
0
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:
NIIBE Yutaka 2021-12-17 13:28:42 +09:00
parent 61ac580a20
commit e08225030d
7 changed files with 21 additions and 2 deletions

View File

@ -34,7 +34,9 @@
#ifndef __MINGW32__
# include <dlfcn.h>
#else
# include <windows.h>
# include <errhandlingapi.h>
# include <handleapi.h>
# include <libloaderapi.h>
# include "utf8conv.h"
# include "mischelp.h"
# define RTLD_LAZY 0

View File

@ -65,6 +65,8 @@
#include "sysutils.h"
#include "exechelp.h"
#include <windows.h>
/* Define to 1 do enable debugging. */
#define DEBUG_W32_SPAWN 0

View File

@ -42,6 +42,10 @@
#include "i18n.h"
#include "gettime.h"
#ifdef HAVE_W32_SYSTEM
#include <windows.h>
#endif
#ifdef HAVE_UNSIGNED_TIME_T
# define IS_INVALID_TIME_T(a) ((a) == (time_t)(-1))
#else

View File

@ -55,6 +55,10 @@
#include "stringhelp.h"
#include "utf8conv.h"
#ifdef HAVE_W32_SYSTEM
#include <windows.h>
#endif
#ifndef MB_LEN_MAX
#define MB_LEN_MAX 16
#endif

View File

@ -806,6 +806,7 @@ if test "$have_w32_system" = yes; then
if test "$have_w32ce_system" = yes; then
AC_DEFINE(HAVE_W32CE_SYSTEM,1,[Defined if we run on WindowsCE])
fi
AC_CHECK_HEADERS([winsock2.h])
fi
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_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
AC_SEARCH_LIBS([inet_addr], [nsl])

View File

@ -45,6 +45,10 @@
#include "../../common/exechelp.h"
#include "../../common/sysutils.h"
#ifdef HAVE_W32_SYSTEM
#include <windows.h>
#endif
#include "private.h"
#include "ffi.h"
#include "ffi-private.h"

View File

@ -35,6 +35,9 @@
#include "../common/status.h"
#include "../common/exechelp.h"
#ifdef HAVE_W32_SYSTEM
#include <windows.h>
#endif
/* Constants to identify the commands and options. */
enum cmd_and_opt_values