diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 66c71ab27..53c0587b0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ arch/ogl/gr.c, arch/ogl/ogl.c, include/gr.h: Removed 'new' from prototypes; Decl include/maths.h, include/texmap.h, include/ui.h, main/object.c, maths/fixc.c, maths/tables.c, texmap/ntmap.c, ui/dialog.c, ui/icon.c: Moved ui_draw_frame(), ui_draw_shad(), draw_tmap_flat(), math tables externs to headers - patches by Kp 3d/clipper.c, 3d/draw.c, editor/meddraw.c, include/3d.h, main/automap.c, main/render.c: in g3s_codes renamed or,and to uor,uand - patch by Kp main/object.h: use struct type explicitly - patch by Kp +include/error.h: Renamed __format to __attribute_gcc_format due to possible C++ conflict; allow arguments - patch by Kp 20121031 diff --git a/include/error.h b/include/error.h index 9affd81cd..ef3cdfa44 100644 --- a/include/error.h +++ b/include/error.h @@ -24,10 +24,10 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifdef __GNUC__ #define __noreturn __attribute__ ((noreturn)) -#define __format __attribute__ ((format (printf, 1, 2))) +#define __attribute_gcc_format(X) __attribute__ ((format X)) #else #define __noreturn -#define __format +#define __attribute_gcc_format(X) #endif void warn_printf(char *s); @@ -37,7 +37,7 @@ void Warning(char *fmt,...); //print out warning message to user void set_warn_func(void (*f)(char *s));//specifies the function to call with warning messages void clear_warn_func(void (*f)(char *s));//say this function no longer valid void _Assert(int expr,char *expr_text,char *filename,int linenum); //assert func -void Error(const char *fmt,...) __noreturn __format; //exit with error code=1, print message +void Error(const char *fmt,...) __noreturn __attribute_gcc_format((printf, 1, 2)); //exit with error code=1, print message void Assert(int expr); void Int3(); #ifndef NDEBUG //macros for debugging