aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2014-02-20 07:07:30 +0000
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2014-02-20 07:07:30 +0000
commit795f26da23c2b9b38493bd8799a83e0e8fe93f80 (patch)
tree085507856fcbfefc2f48bcfc47a8f2c7cc03cd35
parent9fa6946adf02b03567e4a8500c9611b6860d5748 (diff)
downloadlibmicrohttpd-795f26da23c2b9b38493bd8799a83e0e8fe93f80.tar.gz
libmicrohttpd-795f26da23c2b9b38493bd8799a83e0e8fe93f80.zip
w32functions cleanups and makefile fixes for W32
-rw-r--r--src/include/platform_interface.h2
-rw-r--r--src/include/w32functions.h3
-rw-r--r--src/microhttpd/Makefile.am18
-rw-r--r--src/platform/Makefile.am3
-rw-r--r--src/platform/w32functions.c2
5 files changed, 14 insertions, 14 deletions
diff --git a/src/include/platform_interface.h b/src/include/platform_interface.h
index 22f78166..4b016039 100644
--- a/src/include/platform_interface.h
+++ b/src/include/platform_interface.h
@@ -136,7 +136,7 @@
136#if !defined(_WIN32) || defined(__CYGWIN__) 136#if !defined(_WIN32) || defined(__CYGWIN__)
137#define MHD_random_() random() 137#define MHD_random_() random()
138#else 138#else
139#define MHD_random_() MHD_W32_random() 139#define MHD_random_() MHD_W32_random_()
140#endif 140#endif
141 141
142#endif // MHD_PLATFORM_INTERFACE_H 142#endif // MHD_PLATFORM_INTERFACE_H
diff --git a/src/include/w32functions.h b/src/include/w32functions.h
index 7a25803b..b416f9f0 100644
--- a/src/include/w32functions.h
+++ b/src/include/w32functions.h
@@ -182,8 +182,7 @@ int MHD_W32_pair_of_sockets_(SOCKET sockets_pair[2]);
182 * Function initialize itself at first call to current time. 182 * Function initialize itself at first call to current time.
183 * @return 31-bit pseudo random number. 183 * @return 31-bit pseudo random number.
184 */ 184 */
185_MHD_EXTERN int MHD_W32_random(void); /* must be exported for "make check" tests */ 185int MHD_W32_random_(void);
186 /* TODO: exclude from exports */
187 186
188#ifdef __cplusplus 187#ifdef __cplusplus
189} 188}
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
index 65ced4c4..a2082a83 100644
--- a/src/microhttpd/Makefile.am
+++ b/src/microhttpd/Makefile.am
@@ -5,6 +5,10 @@ AM_CPPFLAGS = \
5AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \ 5AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \
6 @LIBGCRYPT_CFLAGS@ 6 @LIBGCRYPT_CFLAGS@
7 7
8if HAVE_W32
9MHD_W32_LIB = $(top_builddir)/src/platform/libmicrohttpd_w32.la
10endif
11
8lib_LTLIBRARIES = \ 12lib_LTLIBRARIES = \
9 libmicrohttpd.la 13 libmicrohttpd.la
10 14
@@ -22,12 +26,8 @@ libmicrohttpd_la_CPPFLAGS = \
22libmicrohttpd_la_LDFLAGS = \ 26libmicrohttpd_la_LDFLAGS = \
23 $(MHD_LIB_LDFLAGS) \ 27 $(MHD_LIB_LDFLAGS) \
24 -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@ 28 -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@
25libmicrohttpd_la_LIBADD = 29libmicrohttpd_la_LIBADD = \
26 30 $(MHD_W32_LIB)
27if HAVE_W32
28libmicrohttpd_la_LIBADD += \
29 $(top_builddir)/src/platform/libmicrohttpd_w32.la
30endif
31 31
32if USE_COVERAGE 32if USE_COVERAGE
33 AM_CFLAGS += --coverage 33 AM_CFLAGS += --coverage
@@ -83,7 +83,8 @@ test_daemon_LDADD = \
83test_postprocessor_SOURCES = \ 83test_postprocessor_SOURCES = \
84 test_postprocessor.c 84 test_postprocessor.c
85test_postprocessor_LDADD = \ 85test_postprocessor_LDADD = \
86 $(top_builddir)/src/microhttpd/libmicrohttpd.la 86 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
87 $(MHD_W32_LIB)
87 88
88test_postprocessor_amp_SOURCES = \ 89test_postprocessor_amp_SOURCES = \
89 test_postprocessor_amp.c 90 test_postprocessor_amp.c
@@ -93,4 +94,5 @@ test_postprocessor_amp_LDADD = \
93test_postprocessor_large_SOURCES = \ 94test_postprocessor_large_SOURCES = \
94 test_postprocessor_large.c 95 test_postprocessor_large.c
95test_postprocessor_large_LDADD = \ 96test_postprocessor_large_LDADD = \
96 $(top_builddir)/src/microhttpd/libmicrohttpd.la 97 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
98 $(MHD_W32_LIB)
diff --git a/src/platform/Makefile.am b/src/platform/Makefile.am
index c79e4fc2..5877f2d8 100644
--- a/src/platform/Makefile.am
+++ b/src/platform/Makefile.am
@@ -1,6 +1,5 @@
1AM_CPPFLAGS = \ 1AM_CPPFLAGS = \
2 -I$(top_srcdir)/src/include \ 2 -I$(top_srcdir)/src/include
3 -I$(top_srcdir)/src/microhttpd
4 3
5AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \ 4AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \
6 @LIBGCRYPT_CFLAGS@ 5 @LIBGCRYPT_CFLAGS@
diff --git a/src/platform/w32functions.c b/src/platform/w32functions.c
index 3c25e2b2..96b0bd00 100644
--- a/src/platform/w32functions.c
+++ b/src/platform/w32functions.c
@@ -630,7 +630,7 @@ static int32_t rnd_val = 0;
630 * Function initialize itself at first call to current time. 630 * Function initialize itself at first call to current time.
631 * @return 31-bit pseudo random number. 631 * @return 31-bit pseudo random number.
632 */ 632 */
633int MHD_W32_random(void) 633int MHD_W32_random_(void)
634{ 634{
635 if (0 == rnd_val) 635 if (0 == rnd_val)
636 rnd_val = (int32_t)time(NULL); 636 rnd_val = (int32_t)time(NULL);