From: <sp...@us...> - 2009-05-22 15:50:27
|
Revision: 819 http://freeglut.svn.sourceforge.net/freeglut/?rev=819&view=rev Author: spanne Date: 2009-05-22 15:50:24 +0000 (Fri, 22 May 2009) Log Message: ----------- Avoid warnings when the ATEXIT_HACK is used with GCC, making the hack even uglier. Modified Paths: -------------- trunk/freeglut/freeglut/ChangeLog trunk/freeglut/freeglut/include/GL/freeglut_std.h Modified: trunk/freeglut/freeglut/ChangeLog =================================================================== --- trunk/freeglut/freeglut/ChangeLog 2009-05-22 15:20:03 UTC (rev 818) +++ trunk/freeglut/freeglut/ChangeLog 2009-05-22 15:50:24 UTC (rev 819) @@ -1,4 +1,7 @@ 2009-05-22 Sven Panne <sve...@ae...> + * include/GL/freeglut_std.h: Avoid warnings when the ATEXIT_HACK is used + with GCC, making the hack even uglier. + * include/GL/freeglut_std.h,src/freeglut_init.c,src/freeglut_internal.h, src/freeglut_menu.c,src/freeglut_window.c,src/freeglutdll.def: Added the ugly ATEXIT_HACK from GLUT 3.7, making freeglut binary compatible with the Modified: trunk/freeglut/freeglut/include/GL/freeglut_std.h =================================================================== --- trunk/freeglut/freeglut/include/GL/freeglut_std.h 2009-05-22 15:20:03 UTC (rev 818) +++ trunk/freeglut/freeglut/include/GL/freeglut_std.h 2009-05-22 15:50:24 UTC (rev 819) @@ -604,11 +604,16 @@ FGAPI int FGAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)); FGAPI int FGAPIENTRY __glutCreateMenuWithExit(void (* func)(int), void (__cdecl *exitfunc)(int)); #ifndef FREEGLUT_BUILDING_LIB -static void FGAPIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } +#if defined(__GNUC__) +#define FGUNUSED __attribute__((unused)) +#else +#define FGUNUSED +#endif +static void FGAPIENTRY FGUNUSED glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } #define glutInit glutInit_ATEXIT_HACK -static int FGAPIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } +static int FGAPIENTRY FGUNUSED glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } #define glutCreateWindow glutCreateWindow_ATEXIT_HACK -static int FGAPIENTRY glutCreateMenu_ATEXIT_HACK(void (* func)(int)) { return __glutCreateMenuWithExit(func, exit); } +static int FGAPIENTRY FGUNUSED glutCreateMenu_ATEXIT_HACK(void (* func)(int)) { return __glutCreateMenuWithExit(func, exit); } #define glutCreateMenu glutCreateMenu_ATEXIT_HACK #endif #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |