diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2010-01-24 16:25:34 -0800 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2010-01-24 16:25:34 -0800 |
| commit | 95e6215b6f1d31eebdb1ddeb4c13007c5af30c23 (patch) | |
| tree | 5dbce6408bb350b242e5c4dd592da103ed6cfb86 /com32/lib | |
| parent | 8f189531a58aef0655cd04a620931da3a0157eaa (diff) | |
| parent | 1da816e5101d61edc8a01e3c76a1b89933a8b863 (diff) | |
| download | syslinux-95e6215b6f1d31eebdb1ddeb4c13007c5af30c23.tar.gz | |
Merge branch 'master' into fsc
Conflicts:
com32/lib/MCONFIG
com32/lib/readdir.c
Diffstat (limited to 'com32/lib')
| -rw-r--r-- | com32/lib/MCONFIG | 5 | ||||
| -rw-r--r-- | com32/lib/chdir.c | 4 | ||||
| -rw-r--r-- | com32/lib/closedir.c | 1 | ||||
| -rw-r--r-- | com32/lib/fdopendir.c | 2 | ||||
| -rw-r--r-- | com32/lib/libgcc/__moddi3.c | 2 | ||||
| -rw-r--r-- | com32/lib/opendir.c | 1 | ||||
| -rw-r--r-- | com32/lib/readdir.c | 3 | ||||
| -rw-r--r-- | com32/lib/strcasecmp.c | 3 | ||||
| -rw-r--r-- | com32/lib/strcmp.c | 3 | ||||
| -rw-r--r-- | com32/lib/strncasecmp.c | 3 | ||||
| -rw-r--r-- | com32/lib/strncmp.c | 3 | ||||
| -rw-r--r-- | com32/lib/sys/argv.c | 2 | ||||
| -rw-r--r-- | com32/lib/sys/colortable.c | 2 | ||||
| -rw-r--r-- | com32/lib/sys/libansi.c | 34 | ||||
| -rw-r--r-- | com32/lib/sys/vesaserial_write.c | 2 | ||||
| -rw-r--r-- | com32/lib/syslinux/getadv.c | 2 | ||||
| -rw-r--r-- | com32/lib/zlib/crc32.c | 2 |
17 files changed, 49 insertions, 25 deletions
diff --git a/com32/lib/MCONFIG b/com32/lib/MCONFIG index 7e092df3..44278bd1 100644 --- a/com32/lib/MCONFIG +++ b/com32/lib/MCONFIG @@ -33,8 +33,9 @@ LIBFLAGS = -DDYNAMIC_CRC_TABLE -DPNG_NO_CONSOLE_IO \ REQFLAGS = $(GCCOPT) -g -mregparm=3 -DREGPARM=3 -D__COM32__ \ -nostdinc -iwithprefix include -I. -I./sys -I../include -OPTFLAGS = -Os -march=i386 -ffast-math -fomit-frame-pointer -WARNFLAGS = -W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline +OPTFLAGS = -Os -march=i386 -falign-functions=0 -falign-jumps=0 \ + -falign-labels=0 -ffast-math -fomit-frame-pointer +WARNFLAGS = $(GCCWARN) -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline CFLAGS = $(OPTFLAGS) $(REQFLAGS) $(WARNFLAGS) $(LIBFLAGS) LDFLAGS = -m elf32_i386 diff --git a/com32/lib/chdir.c b/com32/lib/chdir.c index 6f92d668..6a365f3b 100644 --- a/com32/lib/chdir.c +++ b/com32/lib/chdir.c @@ -8,6 +8,10 @@ int chdir(const char *path) { + /* Actually implement something here... */ + + (void)path; + errno = ENOSYS; return -1; } diff --git a/com32/lib/closedir.c b/com32/lib/closedir.c index b3f55642..f4de67ae 100644 --- a/com32/lib/closedir.c +++ b/com32/lib/closedir.c @@ -10,6 +10,7 @@ #include <string.h> #include <unistd.h> #include <fcntl.h> +#include <stdlib.h> int closedir(DIR * dir) { diff --git a/com32/lib/fdopendir.c b/com32/lib/fdopendir.c index 5fe11617..4fc31388 100644 --- a/com32/lib/fdopendir.c +++ b/com32/lib/fdopendir.c @@ -8,6 +8,8 @@ DIR *fdopendir(int __fd) { + (void)__fd; + errno = ENOSYS; return NULL; } diff --git a/com32/lib/libgcc/__moddi3.c b/com32/lib/libgcc/__moddi3.c index ac8d3af7..4fc55884 100644 --- a/com32/lib/libgcc/__moddi3.c +++ b/com32/lib/libgcc/__moddi3.c @@ -21,7 +21,7 @@ int64_t __moddi3(int64_t num, int64_t den) minus ^= 1; } - (void)__udivmoddi4(num, den, &v); + (void)__udivmoddi4(num, den, (uint64_t *)&v); if (minus) v = -v; diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c index 6f91032b..c5e9aa05 100644 --- a/com32/lib/opendir.c +++ b/com32/lib/opendir.c @@ -10,6 +10,7 @@ #include <string.h> #include <unistd.h> #include <fcntl.h> +#include <stdlib.h> DIR *opendir(const char *pathname) { diff --git a/com32/lib/readdir.c b/com32/lib/readdir.c index 07ca3955..d59ad3a2 100644 --- a/com32/lib/readdir.c +++ b/com32/lib/readdir.c @@ -10,6 +10,7 @@ #include <string.h> #include <unistd.h> #include <fcntl.h> +#include <stdlib.h> struct dirent *readdir(DIR * dir) { @@ -21,6 +22,6 @@ struct dirent *readdir(DIR * dir) regs.esi.l = (uint32_t)dir; __com32.cs_intcall(0x22, ®s, ®s); newde = (struct dirent *)(regs.eax.l); - + return newde; } diff --git a/com32/lib/strcasecmp.c b/com32/lib/strcasecmp.c index 849c21fd..30949a09 100644 --- a/com32/lib/strcasecmp.c +++ b/com32/lib/strcasecmp.c @@ -7,7 +7,8 @@ int strcasecmp(const char *s1, const char *s2) { - const unsigned char *c1 = s1, *c2 = s2; + const unsigned char *c1 = (const unsigned char *)s1; + const unsigned char *c2 = (const unsigned char *)s2; unsigned char ch; int d = 0; diff --git a/com32/lib/strcmp.c b/com32/lib/strcmp.c index 77bb2b41..47a4aad8 100644 --- a/com32/lib/strcmp.c +++ b/com32/lib/strcmp.c @@ -6,7 +6,8 @@ int strcmp(const char *s1, const char *s2) { - const unsigned char *c1 = s1, *c2 = s2; + const unsigned char *c1 = (const unsigned char *)s1; + const unsigned char *c2 = (const unsigned char *)s2; unsigned char ch; int d = 0; diff --git a/com32/lib/strncasecmp.c b/com32/lib/strncasecmp.c index 8b8b967a..2caac0a5 100644 --- a/com32/lib/strncasecmp.c +++ b/com32/lib/strncasecmp.c @@ -7,7 +7,8 @@ int strncasecmp(const char *s1, const char *s2, size_t n) { - const unsigned char *c1 = s1, *c2 = s2; + const unsigned char *c1 = (const unsigned char *)s1; + const unsigned char *c2 = (const unsigned char *)s2; unsigned char ch; int d = 0; diff --git a/com32/lib/strncmp.c b/com32/lib/strncmp.c index f2f2f022..e41b9e36 100644 --- a/com32/lib/strncmp.c +++ b/com32/lib/strncmp.c @@ -6,7 +6,8 @@ int strncmp(const char *s1, const char *s2, size_t n) { - const unsigned char *c1 = s1, *c2 = s2; + const unsigned char *c1 = (const unsigned char *)s1; + const unsigned char *c2 = (const unsigned char *)s2; unsigned char ch; int d = 0; diff --git a/com32/lib/sys/argv.c b/com32/lib/sys/argv.c index b325f26d..8e9aabdb 100644 --- a/com32/lib/sys/argv.c +++ b/com32/lib/sys/argv.c @@ -75,7 +75,7 @@ int __parse_argv(char ***argv, const char *str) } /* Now create argv */ - arg = ALIGN_UP_FOR(q, char *); + arg = (char **)ALIGN_UP_FOR(q, char *); *argv = arg; *arg++ = argv0; /* argv[0] */ diff --git a/com32/lib/sys/colortable.c b/com32/lib/sys/colortable.c index df6d9782..ab1c4246 100644 --- a/com32/lib/sys/colortable.c +++ b/com32/lib/sys/colortable.c @@ -4,6 +4,6 @@ static struct color_table default_color_table[] = { {"default", "0", 0xffffffff, 0x00000000, SHADOW_NORMAL} }; -struct color_table *console_color_table = &default_color_table; +struct color_table *console_color_table = default_color_table; int console_color_table_size = (sizeof default_color_table / sizeof(struct color_table)); diff --git a/com32/lib/sys/libansi.c b/com32/lib/sys/libansi.c index 5bc0026e..a011cb87 100644 --- a/com32/lib/sys/libansi.c +++ b/com32/lib/sys/libansi.c @@ -46,18 +46,21 @@ void display_cursor(bool status) } } -void clear_end_of_line() { +void clear_end_of_line(void) +{ fputs(CSI "0K", stdout); } -void move_cursor_left(int count) { +void move_cursor_left(int count) +{ char buffer[10]; memset(buffer,0,sizeof(buffer)); sprintf(buffer,CSI "%dD",count); fputs(buffer, stdout); } -void move_cursor_right(int count) { +void move_cursor_right(int count) +{ char buffer[10]; memset(buffer,0,sizeof(buffer)); sprintf(buffer, CSI "%dC", count); @@ -71,38 +74,45 @@ void set_cursor_blink(bool status) { fputs("\033[0m",stdout); } -void clear_line() { +void clear_line(void) +{ fputs(CSI "2K", stdout); } -void clear_beginning_of_line() { +void clear_beginning_of_line(void) +{ fputs(CSI "1K", stdout); } -void move_cursor_to_column(int count) { +void move_cursor_to_column(int count) +{ char buffer[10]; memset(buffer,0,sizeof(buffer)); sprintf(buffer, CSI "%dG", count); fputs(buffer, stdout); } -void move_cursor_to_next_line() { +void move_cursor_to_next_line(void) +{ fputs("\033e", stdout); } -void disable_utf8() { +void disable_utf8(void) +{ fputs("\033%@", stdout); } -void set_g1_special_char(){ +void set_g1_special_char(void){ fputs("\033)0", stdout); } -void set_us_g0_charset() { +void set_us_g0_charset(void) +{ fputs("\033(B\1#0", stdout); } -void clear_entire_screen() { +void clear_entire_screen(void) +{ fputs(CSI "2J", stdout); } @@ -186,7 +196,7 @@ void cls(void) cprint_vga2ansi('0', '0'); } -void reset_colors() +void reset_colors(void) { csprint(CSI "1D", 0x07); } diff --git a/com32/lib/sys/vesaserial_write.c b/com32/lib/sys/vesaserial_write.c index 47527c3a..775ca19e 100644 --- a/com32/lib/sys/vesaserial_write.c +++ b/com32/lib/sys/vesaserial_write.c @@ -38,7 +38,7 @@ #include <console.h> #include "file.h" -extern int __vesacon_open(void); +extern int __vesacon_open(struct file_info *); extern int __vesacon_close(struct file_info *); extern ssize_t __vesacon_write(struct file_info *, const void *, size_t); extern ssize_t __xserial_write(struct file_info *, const void *, size_t); diff --git a/com32/lib/syslinux/getadv.c b/com32/lib/syslinux/getadv.c index 456084b0..5578313e 100644 --- a/com32/lib/syslinux/getadv.c +++ b/com32/lib/syslinux/getadv.c @@ -39,7 +39,7 @@ const void *syslinux_getadv(int tag, size_t * size) { const uint8_t *p; - size_t left, len; + size_t left; p = syslinux_adv_ptr(); left = syslinux_adv_size(); diff --git a/com32/lib/zlib/crc32.c b/com32/lib/zlib/crc32.c index 447f138e..67e6f31e 100644 --- a/com32/lib/zlib/crc32.c +++ b/com32/lib/zlib/crc32.c @@ -100,7 +100,7 @@ local void make_crc_table() /* make exclusive-or pattern from polynomial (0xedb88320UL) */ poly = 0UL; - for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++) + for (n = 0; n < (int)(sizeof(p)/sizeof(unsigned char)); n++) poly |= 1UL << (31 - p[n]); /* generate a crc for every 8-bit value */ |
