Fixed build problems with gcc __attribute__.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 13 Jan 2010 07:00:20 +0000
changeset 3648a9d830c05998
parent 3647 c5925cd41955
child 3649 1e74d7984d0b
Fixed build problems with gcc __attribute__.
src/SDL_assert.c
     1.1 --- a/src/SDL_assert.c	Wed Jan 13 06:47:17 2010 +0000
     1.2 +++ b/src/SDL_assert.c	Wed Jan 13 07:00:20 2010 +0000
     1.3 @@ -31,6 +31,7 @@
     1.4  #else  /* fprintf, _exit(), etc. */
     1.5  #include <stdio.h>
     1.6  #include <stdlib.h>
     1.7 +#include <unistd.h>
     1.8  #endif
     1.9  
    1.10  /* We can keep all triggered assertions in a singly-linked list so we can
    1.11 @@ -43,9 +44,13 @@
    1.12  
    1.13  static void 
    1.14  debug_print(const char *fmt, ...)
    1.15 -//#ifdef __GNUC__
    1.16 -//__attribute__((format (printf, 1, 2)))
    1.17 -//#endif
    1.18 +#ifdef __GNUC__
    1.19 +__attribute__((format (printf, 1, 2)))
    1.20 +#endif
    1.21 +;
    1.22 +
    1.23 +static void
    1.24 +debug_print(const char *fmt, ...)
    1.25  {
    1.26  #ifdef _WINDOWS
    1.27      /* Format into a buffer for OutputDebugStringA(). */