diff options
author | Werner Koch <wk@gnupg.org> | 2014-03-07 09:46:44 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-03-07 14:18:43 +0100 |
commit | cb0dcc340836a64e2d33b27f1be7bc888c084f12 (patch) | |
tree | b3a7c437ee7b2fe2f529697b458d3ea05d873bb0 | |
parent | gl: Avoid warning about shadowing an arg. (diff) | |
download | gnupg2-cb0dcc340836a64e2d33b27f1be7bc888c084f12.tar.xz gnupg2-cb0dcc340836a64e2d33b27f1be7bc888c084f12.zip |
w32: Include winsock2.h to silence warnings.
-rw-r--r-- | agent/preset-passphrase.c | 5 | ||||
-rw-r--r-- | agent/protect.c | 3 | ||||
-rw-r--r-- | common/dns-cert.c | 3 | ||||
-rw-r--r-- | common/estream.c | 3 | ||||
-rw-r--r-- | common/http.c | 3 | ||||
-rw-r--r-- | common/init.c | 7 | ||||
-rw-r--r-- | common/iobuf.c | 3 | ||||
-rw-r--r-- | common/logging.c | 3 | ||||
-rw-r--r-- | common/mischelp.h | 3 | ||||
-rw-r--r-- | common/pka.c | 5 | ||||
-rw-r--r-- | common/srv.c | 5 | ||||
-rw-r--r-- | common/srv.h | 3 | ||||
-rw-r--r-- | common/stringhelp.c | 3 | ||||
-rw-r--r-- | common/sysutils.c | 3 | ||||
-rw-r--r-- | common/ttyio.c | 3 | ||||
-rw-r--r-- | common/w32-reg.c | 3 | ||||
-rw-r--r-- | dirmngr/ks-engine-hkp.c | 3 | ||||
-rw-r--r-- | g10/exec.c | 5 | ||||
-rw-r--r-- | g10/gpg.c | 5 | ||||
-rw-r--r-- | g10/misc.c | 3 | ||||
-rw-r--r-- | g10/photoid.c | 3 |
21 files changed, 70 insertions, 7 deletions
diff --git a/agent/preset-passphrase.c b/agent/preset-passphrase.c index e0cb77ea8..ad8e50047 100644 --- a/agent/preset-passphrase.c +++ b/agent/preset-passphrase.c @@ -38,7 +38,10 @@ #include <fcntl.h> /* for setmode() */ #endif #ifdef HAVE_W32_SYSTEM -#include <windows.h> /* To initialize the sockets. fixme */ +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif +# include <windows.h> /* To initialize the sockets. fixme */ #endif #define JNLIB_NEED_LOG_LOGV diff --git a/agent/protect.c b/agent/protect.c index 749867cc1..3a0021871 100644 --- a/agent/protect.c +++ b/agent/protect.c @@ -29,6 +29,9 @@ #include <unistd.h> #include <sys/stat.h> #ifdef HAVE_W32_SYSTEM +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> #else # include <sys/times.h> diff --git a/common/dns-cert.c b/common/dns-cert.c index 7c1b9c678..179bb1524 100644 --- a/common/dns-cert.c +++ b/common/dns-cert.c @@ -31,6 +31,9 @@ #include <sys/types.h> #ifdef USE_DNS_CERT # ifdef HAVE_W32_SYSTEM +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> # else # include <netinet/in.h> diff --git a/common/estream.c b/common/estream.c index 9c15100f0..be791a802 100644 --- a/common/estream.c +++ b/common/estream.c @@ -79,6 +79,9 @@ #include <stddef.h> #include <assert.h> #ifdef HAVE_W32_SYSTEM +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> #endif #ifdef HAVE_W32CE_SYSTEM diff --git a/common/http.c b/common/http.c index c4e6ca99d..d2f13e498 100644 --- a/common/http.c +++ b/common/http.c @@ -58,6 +58,9 @@ #include <unistd.h> #ifdef HAVE_W32_SYSTEM +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> #else /*!HAVE_W32_SYSTEM*/ # include <sys/types.h> diff --git a/common/init.c b/common/init.c index 8a0b6a8e7..35e623fc2 100644 --- a/common/init.c +++ b/common/init.c @@ -35,10 +35,13 @@ #endif #ifdef HAVE_W32_SYSTEM -#include <windows.h> +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif +# include <windows.h> #endif #ifdef HAVE_NPTH -#include <npth.h> +# include <npth.h> #endif #ifdef HAVE_W32CE_SYSTEM # include <assuan.h> /* For _assuan_w32ce_finish_pipe. */ diff --git a/common/iobuf.c b/common/iobuf.c index 71930208c..d78e5d2e2 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -40,6 +40,9 @@ #include <fcntl.h> #include <unistd.h> #ifdef HAVE_W32_SYSTEM +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> #endif #ifdef __riscos__ diff --git a/common/logging.c b/common/logging.c index 2b5bb2db1..bdc284fef 100644 --- a/common/logging.c +++ b/common/logging.c @@ -41,6 +41,9 @@ #include <sys/types.h> #include <sys/stat.h> #ifdef HAVE_W32_SYSTEM +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> #else /*!HAVE_W32_SYSTEM*/ # include <sys/socket.h> diff --git a/common/mischelp.h b/common/mischelp.h index a8b16356a..dd1f3a620 100644 --- a/common/mischelp.h +++ b/common/mischelp.h @@ -81,6 +81,9 @@ time_t timegm (struct tm *tm); # include <sys/socket.h> # include <sys/un.h> #else +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> #endif diff --git a/common/pka.c b/common/pka.c index 2b4b9ceff..3c45e8bbf 100644 --- a/common/pka.c +++ b/common/pka.c @@ -36,7 +36,10 @@ #ifdef USE_DNS_PKA #include <sys/types.h> #ifdef _WIN32 -#include <windows.h> +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif +# include <windows.h> #else #include <netinet/in.h> #include <arpa/nameser.h> diff --git a/common/srv.c b/common/srv.c index 74afbcb71..380e356bd 100644 --- a/common/srv.c +++ b/common/srv.c @@ -30,7 +30,10 @@ #include <config.h> #include <sys/types.h> #ifdef _WIN32 -#include <windows.h> +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif +# include <windows.h> #else #include <netinet/in.h> #include <arpa/nameser.h> diff --git a/common/srv.h b/common/srv.h index b7d487cef..016d2b1f4 100644 --- a/common/srv.h +++ b/common/srv.h @@ -32,6 +32,9 @@ #ifdef USE_DNS_SRV # ifdef _WIN32 +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> # else # include <netinet/in.h> diff --git a/common/stringhelp.c b/common/stringhelp.c index d51d3e0ce..2d2b412dc 100644 --- a/common/stringhelp.c +++ b/common/stringhelp.c @@ -41,6 +41,9 @@ #include <unistd.h> #include <sys/types.h> #ifdef HAVE_W32_SYSTEM +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> #endif diff --git a/common/sysutils.c b/common/sysutils.c index f0c2ad8a8..0d92741ec 100644 --- a/common/sysutils.c +++ b/common/sysutils.c @@ -57,6 +57,9 @@ # if WINVER < 0x0500 # define WINVER 0x0500 /* Required for AllowSetForegroundWindow. */ # endif +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> #endif #ifdef HAVE_NPTH diff --git a/common/ttyio.c b/common/ttyio.c index a3f63274a..66ca98401 100644 --- a/common/ttyio.c +++ b/common/ttyio.c @@ -53,6 +53,9 @@ #endif #endif #ifdef USE_W32_CONSOLE +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> # ifdef HAVE_TCGETATTR # error mingw32 and termios diff --git a/common/w32-reg.c b/common/w32-reg.c index 428705ce9..250717791 100644 --- a/common/w32-reg.c +++ b/common/w32-reg.c @@ -36,6 +36,9 @@ #include <stdlib.h> #include <string.h> #include <stdarg.h> +#ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +#endif #include <windows.h> #include "libjnlib-config.h" diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c index 8aa891f74..0c131850a 100644 --- a/dirmngr/ks-engine-hkp.c +++ b/dirmngr/ks-engine-hkp.c @@ -25,6 +25,9 @@ #include <string.h> #include <assert.h> #ifdef HAVE_W32_SYSTEM +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> #else /*!HAVE_W32_SYSTEM*/ # include <sys/types.h> diff --git a/g10/exec.c b/g10/exec.c index 0caa43ba4..b0ff2eafe 100644 --- a/g10/exec.c +++ b/g10/exec.c @@ -33,7 +33,10 @@ #include <sys/wait.h> #endif #ifdef HAVE_DOSISH_SYSTEM -#include <windows.h> +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif +# include <windows.h> #endif #include <fcntl.h> #include <unistd.h> @@ -31,7 +31,10 @@ #endif #include <fcntl.h> #ifdef HAVE_W32_SYSTEM -#include <windows.h> +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif +# include <windows.h> #endif #define INCLUDED_BY_MAIN_MODULE 1 diff --git a/g10/misc.c b/g10/misc.c index 9c28e5b46..ba83b1910 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -41,6 +41,9 @@ #ifdef HAVE_W32_SYSTEM #include <time.h> #include <process.h> +#ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +#endif #include <windows.h> #include <shlobj.h> #ifndef CSIDL_APPDATA diff --git a/g10/photoid.c b/g10/photoid.c index 132adca17..829d36c9e 100644 --- a/g10/photoid.c +++ b/g10/photoid.c @@ -22,6 +22,9 @@ #include <stdio.h> #include <string.h> #ifdef _WIN32 +# ifdef HAVE_WINSOCK2_H +# include <winsock2.h> +# endif # include <windows.h> # ifndef VER_PLATFORM_WIN32_WINDOWS # define VER_PLATFORM_WIN32_WINDOWS 1 |