gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] branch master updated: Headers: better comp


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: Headers: better compatibility with MSVC compiler
Date: Sun, 21 Apr 2019 13:42:27 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new d9506b7d Headers: better compatibility with MSVC compiler
d9506b7d is described below

commit d9506b7d29edd83c707124b1eae62679098fda30
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sun Apr 21 14:40:45 2019 +0300

    Headers: better compatibility with MSVC compiler
---
 src/include/mhd_options.h |  4 ++++
 src/include/microhttpd.h  | 20 +++++++++++---------
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/include/mhd_options.h b/src/include/mhd_options.h
index df45cf9b..47b7ce0e 100644
--- a/src/include/mhd_options.h
+++ b/src/include/mhd_options.h
@@ -83,6 +83,10 @@
 #endif
 
 #if defined(_WIN32) && ! defined(__CYGWIN__)
+/* Declare POSIX-compatible names */
+#define _CRT_DECLARE_NONSTDC_NAMES 1
+/* Do not warn about POSIX name usage */
+#define _CRT_NONSTDC_NO_WARNINGS 1
 #ifndef _WIN32_WINNT
 #define _WIN32_WINNT 0x0501
 #else /* _WIN32_WINNT */
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 7bb0e084..d4d17ebc 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -101,20 +101,22 @@ extern "C"
    on platforms where they do not exist).
    */
 #ifndef MHD_PLATFORM_H
-#include <stdarg.h>
-#include <stdint.h>
-#include <sys/types.h>
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#if !defined(_WIN32) || defined(__CYGWIN__)
+#include <unistd.h>
+#include <sys/time.h>
+#include <sys/socket.h>
+#else  /* _WIN32 && ! __CYGWIN__ */
+/* Declare POSIX-compatible names */
+#define _CRT_DECLARE_NONSTDC_NAMES 1
 #include <ws2tcpip.h>
 #if defined(_MSC_FULL_VER) && !defined (_SSIZE_T_DEFINED)
 #define _SSIZE_T_DEFINED
 typedef intptr_t ssize_t;
 #endif /* !_SSIZE_T_DEFINED */
-#else
-#include <unistd.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#endif
+#endif /* _WIN32 && ! __CYGWIN__ */
+#include <stdarg.h>
+#include <stdint.h>
+#include <sys/types.h>
 #endif
 
 #if defined(__CYGWIN__) && !defined(_SYS_TYPES_FD_SET)

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]