commit 795f26da23c2b9b38493bd8799a83e0e8fe93f80
parent 9fa6946adf02b03567e4a8500c9611b6860d5748
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Thu, 20 Feb 2014 07:07:30 +0000
w32functions cleanups and makefile fixes for W32
Diffstat:
5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/include/platform_interface.h b/src/include/platform_interface.h
@@ -136,7 +136,7 @@
#if !defined(_WIN32) || defined(__CYGWIN__)
#define MHD_random_() random()
#else
-#define MHD_random_() MHD_W32_random()
+#define MHD_random_() MHD_W32_random_()
#endif
#endif // MHD_PLATFORM_INTERFACE_H
diff --git a/src/include/w32functions.h b/src/include/w32functions.h
@@ -182,8 +182,7 @@ int MHD_W32_pair_of_sockets_(SOCKET sockets_pair[2]);
* Function initialize itself at first call to current time.
* @return 31-bit pseudo random number.
*/
-_MHD_EXTERN int MHD_W32_random(void); /* must be exported for "make check" tests */
- /* TODO: exclude from exports */
+int MHD_W32_random_(void);
#ifdef __cplusplus
}
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
@@ -5,6 +5,10 @@ AM_CPPFLAGS = \
AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \
@LIBGCRYPT_CFLAGS@
+if HAVE_W32
+MHD_W32_LIB = $(top_builddir)/src/platform/libmicrohttpd_w32.la
+endif
+
lib_LTLIBRARIES = \
libmicrohttpd.la
@@ -22,12 +26,8 @@ libmicrohttpd_la_CPPFLAGS = \
libmicrohttpd_la_LDFLAGS = \
$(MHD_LIB_LDFLAGS) \
-version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@
-libmicrohttpd_la_LIBADD =
-
-if HAVE_W32
-libmicrohttpd_la_LIBADD += \
- $(top_builddir)/src/platform/libmicrohttpd_w32.la
-endif
+libmicrohttpd_la_LIBADD = \
+ $(MHD_W32_LIB)
if USE_COVERAGE
AM_CFLAGS += --coverage
@@ -83,7 +83,8 @@ test_daemon_LDADD = \
test_postprocessor_SOURCES = \
test_postprocessor.c
test_postprocessor_LDADD = \
- $(top_builddir)/src/microhttpd/libmicrohttpd.la
+ $(top_builddir)/src/microhttpd/libmicrohttpd.la \
+ $(MHD_W32_LIB)
test_postprocessor_amp_SOURCES = \
test_postprocessor_amp.c
@@ -93,4 +94,5 @@ test_postprocessor_amp_LDADD = \
test_postprocessor_large_SOURCES = \
test_postprocessor_large.c
test_postprocessor_large_LDADD = \
- $(top_builddir)/src/microhttpd/libmicrohttpd.la
+ $(top_builddir)/src/microhttpd/libmicrohttpd.la \
+ $(MHD_W32_LIB)
diff --git a/src/platform/Makefile.am b/src/platform/Makefile.am
@@ -1,6 +1,5 @@
AM_CPPFLAGS = \
- -I$(top_srcdir)/src/include \
- -I$(top_srcdir)/src/microhttpd
+ -I$(top_srcdir)/src/include
AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \
@LIBGCRYPT_CFLAGS@
diff --git a/src/platform/w32functions.c b/src/platform/w32functions.c
@@ -630,7 +630,7 @@ static int32_t rnd_val = 0;
* Function initialize itself at first call to current time.
* @return 31-bit pseudo random number.
*/
-int MHD_W32_random(void)
+int MHD_W32_random_(void)
{
if (0 == rnd_val)
rnd_val = (int32_t)time(NULL);