1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

w32: Almost everywhere include winsock2.h before windows.h.

--

This is required by newer mingw toolchain versions which demand that
winsock2.h is included before windows.h.  Now, due to the use of
socket definitions in pth.h we need to include winsock2.h also in
pth.h, now pth.h is often included after an include of windows.h and
thus the compiler spits out a warning.  To avoid that we include
winsock2.h at all places the compiler complains about.
This commit is contained in:
Werner Koch 2013-04-23 18:06:46 +02:00
parent a557a74615
commit 40ca0022a7
20 changed files with 436 additions and 380 deletions

View file

@ -21,7 +21,10 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
#ifdef _WIN32
#ifdef _WIN32
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# endif
# include <windows.h>
# ifndef VER_PLATFORM_WIN32_WINDOWS
# define VER_PLATFORM_WIN32_WINDOWS 1
@ -121,7 +124,7 @@ generate_photo_id(PKT_public_key *pk,const char *photo_name)
continue;
}
len=iobuf_get_filelength(file, &overflow);
if(len>6144 || overflow)
{