From f00e892d4e1bd5699d4999b6dc8e7a6913930b25 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 2 Jun 2002 05:27:32 +0000 Subject: [PATCH] mingw gcc 3.1 is freaking weird --- include/getopt.h | 8 ++++---- libs/util/dirent.c | 2 +- nq/source/sys_sdl.c | 1 + qw/source/cl_sys_sdl.c | 1 + tools/pak/pakfile.c | 4 ++++ 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/getopt.h b/include/getopt.h index b0147e9d2..cfcc92c0f 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -131,20 +131,20 @@ struct option /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ -extern int getopt (int __argc, char *const *__argv, const char *__shortopts); +extern int getopt (int argc, char *const *argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt -extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, +extern int getopt_long (int argc, char *const *argv, const char *__shortopts, const struct option *__longopts, int *__longind); -extern int getopt_long_only (int __argc, char *const *__argv, +extern int getopt_long_only (int argc, char *const *argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int __argc, char *const *__argv, +extern int _getopt_internal (int argc, char *const *argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); diff --git a/libs/util/dirent.c b/libs/util/dirent.c index f7581007f..1dd2c23a3 100644 --- a/libs/util/dirent.c +++ b/libs/util/dirent.c @@ -27,7 +27,7 @@ static const char rcsid[] = #ifndef S_ISDIR #define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */ -#endif S_ISDIR +#endif//S_ISDIR /* diff --git a/nq/source/sys_sdl.c b/nq/source/sys_sdl.c index 100a6434a..52740c0c1 100644 --- a/nq/source/sys_sdl.c +++ b/nq/source/sys_sdl.c @@ -169,4 +169,5 @@ SDL_main (int c, char **v) Host_Frame (time); oldtime = newtime; } + return 0; // shouldn't be reachable, but mingw gcc 3.1 is being weird } diff --git a/qw/source/cl_sys_sdl.c b/qw/source/cl_sys_sdl.c index 8c7dbcc85..fff141828 100644 --- a/qw/source/cl_sys_sdl.c +++ b/qw/source/cl_sys_sdl.c @@ -155,4 +155,5 @@ SDL_main (int c, char **v) Host_Frame (time); oldtime = newtime; } + return 0; // shouldn't be reachable, but mingw gcc 3.1 is being weird } diff --git a/tools/pak/pakfile.c b/tools/pak/pakfile.c index 2a1f0b08b..7c047187a 100644 --- a/tools/pak/pakfile.c +++ b/tools/pak/pakfile.c @@ -12,6 +12,10 @@ #include "pakfile.h" +#ifdef _WIN32 +void *alloca(size_t size); +#endif + static const char * pack_get_key (void *p, void *unused) {