libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit ab185489bc22430ddce5a9c7112074361f0a92cb
parent eea55aeb1d68159879e231ebfdb223bd21bdc525
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon,  5 Sep 2016 11:55:01 +0000

-dummy function also creates warning, simply only include file on W32

Diffstat:
Msrc/microhttpd/Makefile.am | 7++++++-
Msrc/microhttpd/mhd_compat.c | 16+++++-----------
2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am @@ -68,8 +68,13 @@ libmicrohttpd_la_SOURCES = \ mhd_locks.h mhd_sem.c \ mhd_sockets.c mhd_sockets.h \ mhd_itc.c mhd_itc.h \ - mhd_compat.c mhd_compat.h \ + mhd_compat.h \ response.c response.h +if HAVE_W32 +libmicrohttpd_la_SOURCES += \ + mhd_compat.c +endif + libmicrohttpd_la_CPPFLAGS = \ $(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) \ -DBUILDING_MHD_LIB=1 diff --git a/src/microhttpd/mhd_compat.c b/src/microhttpd/mhd_compat.c @@ -35,21 +35,15 @@ #endif /* _WIN32 && !__CYGWIN__ */ -/** - * Dummy function to silent compiler warning on empty file - * @return zero - */ -static int -static_dummy_func(void) -{ - return 0; -} - #if defined(_WIN32) && !defined(__CYGWIN__) #ifndef HAVE_SNPRINTF /* Emulate snprintf function on W32 */ -int W32_snprintf(char *__restrict s, size_t n, const char *__restrict format, ...) +int +W32_snprintf(char *__restrict s, + size_t n, + const char *__restrict format, + ...) { int ret; va_list args;