Skip to content

Commit

Permalink
Changes to make the code compile under Host and Esp8266 architectures.
Browse files Browse the repository at this point in the history
  • Loading branch information
slav-at-attachix committed Aug 1, 2019
1 parent 03fdcd2 commit 8c7cba8
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions Sming/Components/.patches/multipart-parser.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
diff --git a/multipart_parser.c b/multipart_parser.c
index 981dabb..afbc393 100644
index 981dabb..014f7d0 100644
--- a/multipart_parser.c
+++ b/multipart_parser.c
@@ -1,4 +1,4 @@
@@ -1,13 +1,13 @@
-/* Based on node-formidable by Felix Geisendörfer
+/* Based on node-formidable by Felix Geisendörfer
* Igor Afonov - [email protected] - 2012
* MIT License - http://www.opensource.org/licenses/mit-license.php
*/

#include "multipart_parser.h"

-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
+#ifndef tolower
+ int tolower (int __c);
+#endif

static void multipart_log(const char * format, ...)
{
@@ -43,20 +43,6 @@ do { \
#define LF 10
#define CR 13
Expand Down Expand Up @@ -88,12 +100,22 @@ index 981dabb..afbc393 100644
multipart_log("s_part_data_final_hyphen");
if (c == '-') {
diff --git a/multipart_parser.h b/multipart_parser.h
index 05429d7..f0f82ab 100644
index 05429d7..3b67a3f 100644
--- a/multipart_parser.h
+++ b/multipart_parser.h
@@ -13,12 +13,12 @@ extern "C"
#include <stdlib.h>
#include <ctype.h>
@@ -1,4 +1,4 @@
-/* Based on node-formidable by Felix Geisendörfer
+/* Based on node-formidable by Felix Geisendörfer
* Igor Afonov - [email protected] - 2012
* MIT License - http://www.opensource.org/licenses/mit-license.php
*/
@@ -10,15 +10,14 @@ extern "C"
{
#endif

-#include <stdlib.h>
-#include <ctype.h>
+#include <user_config.h>

-typedef struct multipart_parser multipart_parser;
-typedef struct multipart_parser_settings multipart_parser_settings;
Expand All @@ -108,7 +130,7 @@ index 05429d7..f0f82ab 100644

struct multipart_parser_settings {
multipart_data_cb on_header_field;
@@ -31,15 +31,29 @@ struct multipart_parser_settings {
@@ -31,15 +30,29 @@ struct multipart_parser_settings {
multipart_notify_cb on_body_end;
};

Expand Down

0 comments on commit 8c7cba8

Please sign in to comment.