Commits

Lenard Lindstrom committed f016741

resolve several macro redefines (GCC warnings)

Comments (0)

Files changed (3)

 */
 
 #include <Python.h>
+#if defined(HAVE_SNPRINTF)  /* also defined in SDL_ttf (SDL.h) */
+#undef HAVE_SNPRINTF        /* remove GCC macro redefine warning */
+#endif
 #include <SDL_ttf.h>
 
 
  */
 #include <png.h>
 #include <jpeglib.h>
+/* Remove GCC macro redefine warnings. */
+#if defined(HAVE_STDDEF_H)  /* also defined in pygame.h (python.h) */
+#undef HAVE_STDDEF_H
+#endif
+#if defined(HAVE_STDLIB_H)  /* also defined in pygame.h (SDL.h) */
+#undef HAVE_STDLIB_H
+#endif
 #include "pygame.h"
 #include "pygamedocs.h"
 #include "pgopengl.h"
  ** is a dereferenced NULL pointer that is easier to diagnose
  ** than it could be :]
  **/
+#if defined(HAVE_SNPRINTF)  /* defined in python.h (pyerrors.h) and SDL.h (SDL_config.h) */
+#undef HAVE_SNPRINTF        /* remove GCC redefine warning */
+#endif
+
 #include <Python.h>
 
+#if defined(HAVE_SNPRINTF)
+#undef HAVE_SNPRINTF
+#endif
+
 #ifdef MS_WIN32 /*Python gives us MS_WIN32, SDL needs just WIN32*/
 #ifndef WIN32
 #define WIN32