gdb/ 2008-08-09 Pedro Alves * buildsym.c (start_subfile): Cast sentinel NULL to void*. * cp-name-parser.y: Include "config.h". * posix-hdep.c [__GO32__]: Include time.h. * xml-tdesc.c (fetch_xml_from_file): Cast sentinel NULL to void*. * gdb_select.h: Include sys/types.h if available. readline/ 2008-08-09 Pedro Alves * signals.c (rl_set_sighandler): Guard access to SIGWINCH. * wcwidth.c [__GO32__]: Include wctype.h before wchar.h. bfd/ 2008-08-09 Pedro Alves * archive.c (_bfd_archive_bsd_update_armap_timestamp): Cast stat st_mtime to long before comparison. --- bfd/archive.c | 2 +- gdb/buildsym.c | 2 +- gdb/cp-name-parser.y | 1 + gdb/gdb_select.h | 4 ++++ gdb/posix-hdep.c | 6 ++++++ gdb/xml-tdesc.c | 2 +- readline/signals.c | 4 ++++ readline/support/wcwidth.c | 5 +++++ 8 files changed, 23 insertions(+), 3 deletions(-) Index: src/gdb/buildsym.c =================================================================== --- src.orig/gdb/buildsym.c 2008-08-09 20:55:28.000000000 +0100 +++ src/gdb/buildsym.c 2008-08-09 22:27:04.000000000 +0100 @@ -547,7 +547,7 @@ start_subfile (char *name, char *dirname && !IS_ABSOLUTE_PATH (subfile->name) && subfile->dirname != NULL) subfile_name = concat (subfile->dirname, SLASH_STRING, - subfile->name, NULL); + subfile->name, (void*) NULL); else subfile_name = subfile->name; Index: src/gdb/cp-name-parser.y =================================================================== --- src.orig/gdb/cp-name-parser.y 2008-08-09 20:55:32.000000000 +0100 +++ src/gdb/cp-name-parser.y 2008-08-09 22:27:04.000000000 +0100 @@ -36,6 +36,7 @@ Boston, MA 02110-1301, USA. */ #include #include +#include "config.h" #include "safe-ctype.h" #include "libiberty.h" #include "demangle.h" Index: src/gdb/posix-hdep.c =================================================================== --- src.orig/gdb/posix-hdep.c 2008-08-09 20:55:39.000000000 +0100 +++ src/gdb/posix-hdep.c 2008-08-09 22:27:04.000000000 +0100 @@ -24,6 +24,12 @@ #include "gdb_select.h" +#ifdef __GO32__ +/* DJGPP defines the fd_set type in sys/types.h, but `select' goes + here. */ +# include +#endif + /* The strerror() function can return NULL for errno values that are out of range. Provide a "safe" version that always returns a printable string. */ Index: src/gdb/xml-tdesc.c =================================================================== --- src.orig/gdb/xml-tdesc.c 2008-08-09 20:55:45.000000000 +0100 +++ src/gdb/xml-tdesc.c 2008-08-09 22:27:04.000000000 +0100 @@ -443,7 +443,7 @@ fetch_xml_from_file (const char *filenam if (dirname && *dirname) { - char *fullname = concat (dirname, "/", filename, NULL); + char *fullname = concat (dirname, "/", filename, (void*) NULL); if (fullname == NULL) nomem (0); file = fopen (fullname, FOPEN_RT); Index: src/gdb/gdb_select.h =================================================================== --- src.orig/gdb/gdb_select.h 2008-08-09 20:55:36.000000000 +0100 +++ src/gdb/gdb_select.h 2008-08-09 22:27:04.000000000 +0100 @@ -24,6 +24,10 @@ #include #endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif + #ifdef USE_WIN32API #include #endif Index: src/readline/signals.c =================================================================== --- src.orig/readline/signals.c 2008-08-09 20:55:52.000000000 +0100 +++ src/readline/signals.c 2008-08-09 22:27:04.000000000 +0100 @@ -251,7 +251,11 @@ rl_set_sighandler (sig, handler, ohandle struct sigaction act; act.sa_handler = handler; +#if defined (SIGWINCH) act.sa_flags = (sig == SIGWINCH) ? SA_RESTART : 0; +#else + act.sa_flags = 0; +#endif sigemptyset (&act.sa_mask); sigemptyset (&ohandler->sa_mask); sigaction (sig, &act, &old_handler); Index: src/readline/support/wcwidth.c =================================================================== --- src.orig/readline/support/wcwidth.c 2008-08-09 20:55:59.000000000 +0100 +++ src/readline/support/wcwidth.c 2008-08-09 22:27:04.000000000 +0100 @@ -6,6 +6,11 @@ * Markus Kuhn -- 2001-09-08 -- public domain */ +#ifdef __GO32__ +/* DJGPP needs to include this before including wchar.h. */ +# include +#endif + #include struct interval { Index: src/bfd/archive.c =================================================================== --- src.orig/bfd/archive.c 2008-08-09 20:56:09.000000000 +0100 +++ src/bfd/archive.c 2008-08-09 22:27:04.000000000 +0100 @@ -2311,7 +2311,7 @@ _bfd_archive_bsd_update_armap_timestamp /* Can't read mod time for some reason. */ return TRUE; } - if (archstat.st_mtime <= bfd_ardata (arch)->armap_timestamp) + if (((long) archstat.st_mtime) <= bfd_ardata (arch)->armap_timestamp) /* OK by the linker's rules. */ return TRUE;