Переглянути джерело

making examples compile without warnings

Christian Grothoff 13 роки тому
батько
коміт
300f5594b1

+ 2 - 0
doc/examples/hellobrowser.c

@@ -1,7 +1,9 @@
 #include <sys/types.h>
 #include <sys/select.h>
 #include <sys/socket.h>
+#include <string.h>
 #include <microhttpd.h>
+#include <stdio.h>
 
 #define PORT 8888
 

+ 3 - 1
doc/examples/largepost.c

@@ -1,6 +1,9 @@
 #include <sys/types.h>
 #include <sys/select.h>
 #include <sys/socket.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <microhttpd.h>
 
 #define PORT            8888
@@ -178,7 +181,6 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
 
   if (0 == strcmp (method, "GET"))
     {
-      int ret;
       char buffer[1024];
 
       sprintf (buffer, askpage, nr_of_uploading_clients);

+ 1 - 0
doc/examples/logging.c

@@ -2,6 +2,7 @@
 #include <sys/select.h>
 #include <sys/socket.h>
 #include <microhttpd.h>
+#include <stdio.h>
 
 #define PORT 8888
 

+ 1 - 0
doc/examples/responseheaders.c

@@ -6,6 +6,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <string.h>
+#include <stdio.h>
 
 #define PORT 8888
 #define FILENAME "picture.png"

+ 3 - 0
doc/examples/simplepost.c

@@ -2,6 +2,9 @@
 #include <sys/select.h>
 #include <sys/socket.h>
 #include <microhttpd.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
 
 #define PORT            8888
 #define POSTBUFFERSIZE  512

+ 3 - 0
doc/examples/tlsauthentication.c

@@ -2,6 +2,9 @@
 #include <sys/select.h>
 #include <sys/socket.h>
 #include <microhttpd.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
 
 #define PORT 8888