From 157ebaf9021f2ea722dc60c691d10d3d97b00893 Mon Sep 17 00:00:00 2001 From: stpohle Date: Tue, 8 Aug 2006 19:49:39 +0000 Subject: [PATCH] windows: fixed mingw problem with vsnprintf --- configure.in | 19 ++++++++++++++++--- include/sysfunc.h | 10 +++++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 457cda8..f26ee0c 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,6 @@ AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(bomberclone, 0.11.7p1) AM_CONFIG_HEADER(config.h) - AC_EXEEXT AC_OBJEXT @@ -19,6 +18,10 @@ AC_HEADER_STDC AC_C_INLINE +AC_FUNC_VPRINTF +AC_CHECK_FUNCS(vsnprintf) +dnl AC_LIB_RPATH + dnl Checks for programs. @@ -67,13 +70,23 @@ esac dnl Debug ************************************ AC_ARG_ENABLE(debug, [ --disable-debug Disable Debuging ]) if test x$enable_debug = xno ; then - CFLAGS="$CFLAGS -Wall" + CFLAGS="$CFLAGS" else - CFLAGS="$CFLAGS -Wall -ggdb -O0" + CFLAGS="$CFLAGS -ggdb -O0" LDFLAGS="$LDFLAGS -ggdb" AC_MSG_WARN(Enable Debuging) fi +dnl All Warning are Errors ************************ +AC_ARG_ENABLE(werror, [ --disable-werror Disable Warning as Error Treatment ]) +if test x$enable_werror = xno ; then + CFLAGS="$CFLAGS -Wall" + AC_MSG_WARN(Disable Warning as Error Treatment) +else + CFLAGS="$CFLAGS -Wall -Werror" +fi + + dnl SDL_image library ***************************** AC_CHECK_LIB(SDL_image, IMG_LoadPNG_RW, , AC_MSG_ERROR([ *** Unable to find SDL_image libary with PNG support diff --git a/include/sysfunc.h b/include/sysfunc.h index f93da8d..145b093 100644 --- a/include/sysfunc.h +++ b/include/sysfunc.h @@ -1,4 +1,4 @@ -/* $Id: sysfunc.h,v 1.7 2005/08/07 17:46:20 stpohle Exp $ */ +/* $Id: sysfunc.h,v 1.8 2006/08/08 19:49:39 stpohle Exp $ */ /* include some system near functions */ #ifndef _SYSFUNC_H_ @@ -54,6 +54,14 @@ extern _direntry *s_dirfilter (_direntry *dirstart, signed char dirflags); #endif #endif +/* + * somehow this works.. + * something missing in the stdarg.h file? + */ +#ifndef HAVE_VSNPRINTF + #define vsnprintf _vsnprintf +#endif + extern inline void s_calctimesync (); extern void rect_clipping (SDL_Rect *src, SDL_Rect *dest, SDL_Rect *window, SDL_Rect *csrc, SDL_Rect *cdest); extern void charlist_fillarraypointer (_charlist *list, int c);