aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_compat.c')
-rw-r--r--src/microhttpd/mhd_compat.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/microhttpd/mhd_compat.c b/src/microhttpd/mhd_compat.c
index 4911a1c6..c0a6e362 100644
--- a/src/microhttpd/mhd_compat.c
+++ b/src/microhttpd/mhd_compat.c
@@ -46,26 +46,6 @@ static_dummy_func(void)
46} 46}
47 47
48#if defined(_WIN32) && !defined(__CYGWIN__) 48#if defined(_WIN32) && !defined(__CYGWIN__)
49/**
50 * Static variable used by pseudo random number generator
51 */
52static int32_t rnd_val = 0;
53
54/**
55 * Generate 31-bit pseudo random number.
56 * Function initialize itself at first call to current time.
57 * @return 31-bit pseudo random number.
58 */
59int MHD_W32_random_(void)
60{
61 if (0 == rnd_val)
62 rnd_val = (int32_t)time(NULL);
63 /* stolen from winsup\cygwin\random.cc */
64 rnd_val = (16807 * (rnd_val % 127773) - 2836 * (rnd_val / 127773))
65 & 0x7fffffff;
66 return (int)rnd_val;
67}
68
69 49
70#ifndef HAVE_SNPRINTF 50#ifndef HAVE_SNPRINTF
71/* Emulate snprintf function on W32 */ 51/* Emulate snprintf function on W32 */