소스 검색

Disable MicroSofts `I dont like C` warning in the upload example

bel 10 년 전
부모
커밋
750ec3a7c7
1개의 변경된 파일8개의 추가작업 그리고 6개의 파일을 삭제
  1. 8 6
      examples/upload/upload.c

+ 8 - 6
examples/upload/upload.c

@@ -3,11 +3,8 @@
  * This file is a part of civetweb project, http://github.com/bel2125/civetweb
  */
 
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <stdlib.h>
 #ifdef _WIN32
+#define _CRT_SECURE_NO_WARNINGS
 #include <windows.h>
 #include <io.h>
 #define strtoll strtol
@@ -15,7 +12,12 @@ typedef __int64 int64_t;
 #else
 #include <inttypes.h>
 #include <unistd.h>
-#endif // !_WIN32
+#endif /* !_WIN32 */
+
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <stdlib.h>
 
 #include "civetweb.h"
 
@@ -58,7 +60,7 @@ static int begin_request_handler(struct mg_connection *conn)
                   (int) strlen(html_form), html_form);
     }
 
-    // Mark request as processed
+    /* Mark request as processed */
     return 1;
 }