diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2014-02-20 07:07:30 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2014-02-20 07:07:30 +0000 |
commit | 795f26da23c2b9b38493bd8799a83e0e8fe93f80 (patch) | |
tree | 085507856fcbfefc2f48bcfc47a8f2c7cc03cd35 | |
parent | 9fa6946adf02b03567e4a8500c9611b6860d5748 (diff) | |
download | libmicrohttpd-795f26da23c2b9b38493bd8799a83e0e8fe93f80.tar.gz libmicrohttpd-795f26da23c2b9b38493bd8799a83e0e8fe93f80.zip |
w32functions cleanups and makefile fixes for W32
-rw-r--r-- | src/include/platform_interface.h | 2 | ||||
-rw-r--r-- | src/include/w32functions.h | 3 | ||||
-rw-r--r-- | src/microhttpd/Makefile.am | 18 | ||||
-rw-r--r-- | src/platform/Makefile.am | 3 | ||||
-rw-r--r-- | src/platform/w32functions.c | 2 |
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 */ | 185 | int 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 = \ | |||
5 | AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \ | 5 | AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \ |
6 | @LIBGCRYPT_CFLAGS@ | 6 | @LIBGCRYPT_CFLAGS@ |
7 | 7 | ||
8 | if HAVE_W32 | ||
9 | MHD_W32_LIB = $(top_builddir)/src/platform/libmicrohttpd_w32.la | ||
10 | endif | ||
11 | |||
8 | lib_LTLIBRARIES = \ | 12 | lib_LTLIBRARIES = \ |
9 | libmicrohttpd.la | 13 | libmicrohttpd.la |
10 | 14 | ||
@@ -22,12 +26,8 @@ libmicrohttpd_la_CPPFLAGS = \ | |||
22 | libmicrohttpd_la_LDFLAGS = \ | 26 | libmicrohttpd_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@ |
25 | libmicrohttpd_la_LIBADD = | 29 | libmicrohttpd_la_LIBADD = \ |
26 | 30 | $(MHD_W32_LIB) | |
27 | if HAVE_W32 | ||
28 | libmicrohttpd_la_LIBADD += \ | ||
29 | $(top_builddir)/src/platform/libmicrohttpd_w32.la | ||
30 | endif | ||
31 | 31 | ||
32 | if USE_COVERAGE | 32 | if USE_COVERAGE |
33 | AM_CFLAGS += --coverage | 33 | AM_CFLAGS += --coverage |
@@ -83,7 +83,8 @@ test_daemon_LDADD = \ | |||
83 | test_postprocessor_SOURCES = \ | 83 | test_postprocessor_SOURCES = \ |
84 | test_postprocessor.c | 84 | test_postprocessor.c |
85 | test_postprocessor_LDADD = \ | 85 | test_postprocessor_LDADD = \ |
86 | $(top_builddir)/src/microhttpd/libmicrohttpd.la | 86 | $(top_builddir)/src/microhttpd/libmicrohttpd.la \ |
87 | $(MHD_W32_LIB) | ||
87 | 88 | ||
88 | test_postprocessor_amp_SOURCES = \ | 89 | test_postprocessor_amp_SOURCES = \ |
89 | test_postprocessor_amp.c | 90 | test_postprocessor_amp.c |
@@ -93,4 +94,5 @@ test_postprocessor_amp_LDADD = \ | |||
93 | test_postprocessor_large_SOURCES = \ | 94 | test_postprocessor_large_SOURCES = \ |
94 | test_postprocessor_large.c | 95 | test_postprocessor_large.c |
95 | test_postprocessor_large_LDADD = \ | 96 | test_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 @@ | |||
1 | AM_CPPFLAGS = \ | 1 | AM_CPPFLAGS = \ |
2 | -I$(top_srcdir)/src/include \ | 2 | -I$(top_srcdir)/src/include |
3 | -I$(top_srcdir)/src/microhttpd | ||
4 | 3 | ||
5 | AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \ | 4 | AM_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 | */ |
633 | int MHD_W32_random(void) | 633 | int 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); |