From: Jacob Potter Date: Sun, 14 Dec 2008 05:54:52 +0000 (-0500) Subject: some changes for gcc4 X-Git-Url: http://git.joshuawise.com/netwatch.git/commitdiff_plain/8ba7e5b28a7f23ebf2423df41379516c8cbac6b5?ds=inline;hp=-c some changes for gcc4 --- 8ba7e5b28a7f23ebf2423df41379516c8cbac6b5 diff --git a/lwip/src/include/arch/cc.h b/lwip/src/include/arch/cc.h index 7878080..62df7c4 100644 --- a/lwip/src/include/arch/cc.h +++ b/lwip/src/include/arch/cc.h @@ -14,7 +14,7 @@ typedef int16_t s16_t; typedef int32_t s32_t; typedef uint32_t mem_ptr_t; -#define PACK_STRUCT_FIELD(x) x __attribute__((packed)) +#define PACK_STRUCT_FIELD(x) x #define PACK_STRUCT_STRUCT __attribute__((packed)) #define PACK_STRUCT_BEGIN #define PACK_STRUCT_END diff --git a/net/http/fs.c b/net/http/fs.c index cb7a226..0bf11cb 100644 --- a/net/http/fs.c +++ b/net/http/fs.c @@ -42,7 +42,7 @@ void handle_regs(struct fs_file *file) { - static unsigned char buf[2048]; + static char buf[2048]; sprintf(buf, "Registers" @@ -72,8 +72,8 @@ void handle_regs(struct fs_file *file) void handle_backtrace(struct fs_file *file) { - static unsigned char buf[2048]; - static unsigned char buf2[64]; + static char buf[2048]; + static char buf2[64]; int i = 10; unsigned long *pebp, *peip; unsigned long ebp; diff --git a/net/http/fs.h b/net/http/fs.h index 1f7d434..fd7e6e2 100644 --- a/net/http/fs.h +++ b/net/http/fs.h @@ -33,7 +33,7 @@ #define __FS_H__ struct fs_file { - const unsigned char *data; + const char *data; int len; }; diff --git a/net/http/fsdata.c b/net/http/fsdata.c index 70337a8..066f058 100644 --- a/net/http/fsdata.c +++ b/net/http/fsdata.c @@ -1,9 +1,9 @@ -static const unsigned char data_404_html[] = +static const char data_404_html[] = "404 Not Found" "

404 Not Found

This is probably not the machine you're looking for...

" ""; -static const unsigned char data_index_html[] = +static const char data_index_html[] = "NetWatch" "

NetWatch

" "
" diff --git a/net/http/fsdata.h b/net/http/fsdata.h index a6c5262..f4f3974 100644 --- a/net/http/fsdata.h +++ b/net/http/fsdata.h @@ -34,8 +34,8 @@ struct fsdata_file { const struct fsdata_file *next; - const unsigned char *name; - const unsigned char *data; + const char *name; + const char *data; const int len; }; diff --git a/net/http/httpd.c b/net/http/httpd.c index 3ecea93..ed08b0c 100644 --- a/net/http/httpd.c +++ b/net/http/httpd.c @@ -44,7 +44,7 @@ struct http_state { u32_t left; - const unsigned char *file; + const char *file; u8_t retries; };