aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-09-05 11:55:01 +0000
committerChristian Grothoff <christian@grothoff.org>2016-09-05 11:55:01 +0000
commitab185489bc22430ddce5a9c7112074361f0a92cb (patch)
treeaf53ccb9b397e31aed7b4653f67356617c0cf684
parenteea55aeb1d68159879e231ebfdb223bd21bdc525 (diff)
downloadlibmicrohttpd-ab185489bc22430ddce5a9c7112074361f0a92cb.tar.gz
libmicrohttpd-ab185489bc22430ddce5a9c7112074361f0a92cb.zip
-dummy function also creates warning, simply only include file on W32
-rw-r--r--src/microhttpd/Makefile.am7
-rw-r--r--src/microhttpd/mhd_compat.c16
2 files changed, 11 insertions, 12 deletions
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
index 13c2fa65..4d0f81ce 100644
--- a/src/microhttpd/Makefile.am
+++ b/src/microhttpd/Makefile.am
@@ -68,8 +68,13 @@ libmicrohttpd_la_SOURCES = \
68 mhd_locks.h mhd_sem.c \ 68 mhd_locks.h mhd_sem.c \
69 mhd_sockets.c mhd_sockets.h \ 69 mhd_sockets.c mhd_sockets.h \
70 mhd_itc.c mhd_itc.h \ 70 mhd_itc.c mhd_itc.h \
71 mhd_compat.c mhd_compat.h \ 71 mhd_compat.h \
72 response.c response.h 72 response.c response.h
73if HAVE_W32
74libmicrohttpd_la_SOURCES += \
75 mhd_compat.c
76endif
77
73libmicrohttpd_la_CPPFLAGS = \ 78libmicrohttpd_la_CPPFLAGS = \
74 $(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) \ 79 $(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) \
75 -DBUILDING_MHD_LIB=1 80 -DBUILDING_MHD_LIB=1
diff --git a/src/microhttpd/mhd_compat.c b/src/microhttpd/mhd_compat.c
index c0a6e362..7380af02 100644
--- a/src/microhttpd/mhd_compat.c
+++ b/src/microhttpd/mhd_compat.c
@@ -35,21 +35,15 @@
35#endif /* _WIN32 && !__CYGWIN__ */ 35#endif /* _WIN32 && !__CYGWIN__ */
36 36
37 37
38/**
39 * Dummy function to silent compiler warning on empty file
40 * @return zero
41 */
42static int
43static_dummy_func(void)
44{
45 return 0;
46}
47
48#if defined(_WIN32) && !defined(__CYGWIN__) 38#if defined(_WIN32) && !defined(__CYGWIN__)
49 39
50#ifndef HAVE_SNPRINTF 40#ifndef HAVE_SNPRINTF
51/* Emulate snprintf function on W32 */ 41/* Emulate snprintf function on W32 */
52int W32_snprintf(char *__restrict s, size_t n, const char *__restrict format, ...) 42int
43W32_snprintf(char *__restrict s,
44 size_t n,
45 const char *__restrict format,
46 ...)
53{ 47{
54 int ret; 48 int ret;
55 va_list args; 49 va_list args;