commit 36ac7973809d0dae4eafb438c63a288c349c38f5
parent 8208f31a43bdb5fd079b4124c2a47ef01b5bb5b8
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 7 Aug 2013 06:19:33 +0000
-use more portable rand instead of random
Diffstat:
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/AUTHORS b/AUTHORS
@@ -23,6 +23,7 @@ Colin Caughie <c.caughie@indigovision.com>
David Carvalho <andaris@gmail.com>
David Reiss <dreiss@facebook.com>
Matt Holiday
+Michael Cronenworth <mike@cchtml.com>
Mika Raento <mikie@iki.fi>
Mike Crowe <mac@mcrowe.com>
John Muth <muth@parascale.com>
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,6 @@
+Wed Aug 7 08:17:40 CEST 2013
+ Removing dependency on PlibC. -MC
+
Fri Aug 2 20:55:47 CEST 2013
Fix HTTP 1.1 compliance with respect to not returning
content-length headers for successful "CONNECT" requests.
diff --git a/src/examples/post_example.c b/src/examples/post_example.c
@@ -180,10 +180,10 @@ get_session (struct MHD_Connection *connection)
snprintf (ret->sid,
sizeof (ret->sid),
"%X%X%X%X",
- (unsigned int) random (),
- (unsigned int) random (),
- (unsigned int) random (),
- (unsigned int) random ());
+ (unsigned int) rand (),
+ (unsigned int) rand (),
+ (unsigned int) rand (),
+ (unsigned int) rand ());
ret->rc++;
ret->start = time (NULL);
ret->next = sessions;
@@ -319,7 +319,7 @@ fill_v1_form (const void *cls,
reply = malloc (strlen (form) + strlen (session->value_1) + 1);
if (NULL == reply)
- return NULL;
+ return MHD_NO;
snprintf (reply,
strlen (form) + strlen (session->value_1) + 1,
form,
@@ -715,7 +715,7 @@ main (int argc, char *const *argv)
return 1;
}
/* initialize PRNG */
- srandom ((unsigned int) time (NULL));
+ srand ((unsigned int) time (NULL));
d = MHD_start_daemon (MHD_USE_DEBUG,
atoi (argv[1]),
NULL, NULL,