[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36722 - in libmicrohttpd: . src/include w32/common
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36722 - in libmicrohttpd: . src/include w32/common |
Date: |
Thu, 3 Dec 2015 12:53:12 +0100 |
Author: Karlson2k
Date: 2015-12-03 12:53:12 +0100 (Thu, 03 Dec 2015)
New Revision: 36722
Modified:
libmicrohttpd/configure.ac
libmicrohttpd/src/include/platform_interface.h
libmicrohttpd/w32/common/MHD_config.h
Log:
Add support for native snprintf() on W32.
Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac 2015-12-03 11:53:09 UTC (rev 36721)
+++ libmicrohttpd/configure.ac 2015-12-03 11:53:12 UTC (rev 36722)
@@ -450,7 +450,7 @@
AC_DEFINE([[MHD_DONT_USE_PIPES]], [[1]], [Define to use pair of sockets
instead of pipes for signaling])
fi
-AC_CHECK_FUNCS_ONCE([memmem accept4])
+AC_CHECK_FUNCS_ONCE([accept4 memmem snprintf])
AC_MSG_CHECKING([[for gmtime_s]])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
Modified: libmicrohttpd/src/include/platform_interface.h
===================================================================
--- libmicrohttpd/src/include/platform_interface.h 2015-12-03 11:53:09 UTC
(rev 36721)
+++ libmicrohttpd/src/include/platform_interface.h 2015-12-03 11:53:12 UTC
(rev 36722)
@@ -73,11 +73,15 @@
#endif
/* Platform-independent snprintf name */
-#if !defined(_WIN32) || defined(__CYGWIN__)
+#if defined(HAVE_SNPRINTF)
#define MHD_snprintf_ snprintf
-#else
+#else /* ! HAVE_SNPRINTF */
+#if defined(_WIN32)
#define MHD_snprintf_ W32_snprintf
-#endif
+#else /* ! _WIN32*/
+#error Your platform does not support snprintf() and MHD does not know how to
emulate it on your platform.
+#endif /* ! _WIN32*/
+#endif /* ! HAVE_SNPRINTF */
/**
Modified: libmicrohttpd/w32/common/MHD_config.h
===================================================================
--- libmicrohttpd/w32/common/MHD_config.h 2015-12-03 11:53:09 UTC (rev
36721)
+++ libmicrohttpd/w32/common/MHD_config.h 2015-12-03 11:53:12 UTC (rev
36722)
@@ -68,7 +68,12 @@
/* Define to 1 if you have the `gmtime_s' function. */
#define HAVE_GMTIME_S 1
+#if _MSC_VER >= 1900 /* snprintf() supported natively since VS2015 */
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+#endif
+
/* *** Headers information *** */
/* Not really important as not used by code currently */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36722 - in libmicrohttpd: . src/include w32/common,
gnunet <=