Mercurial > sdl-ios-xcode
comparison src/SDL_assert.c @ 3648:a9d830c05998
Fixed build problems with gcc __attribute__.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 13 Jan 2010 07:00:20 +0000 |
parents | c5925cd41955 |
children | cb5b1aedb5a7 |
comparison
equal
deleted
inserted
replaced
3647:c5925cd41955 | 3648:a9d830c05998 |
---|---|
29 #define WIN32_LEAN_AND_MEAN 1 | 29 #define WIN32_LEAN_AND_MEAN 1 |
30 #include <windows.h> | 30 #include <windows.h> |
31 #else /* fprintf, _exit(), etc. */ | 31 #else /* fprintf, _exit(), etc. */ |
32 #include <stdio.h> | 32 #include <stdio.h> |
33 #include <stdlib.h> | 33 #include <stdlib.h> |
34 #include <unistd.h> | |
34 #endif | 35 #endif |
35 | 36 |
36 /* We can keep all triggered assertions in a singly-linked list so we can | 37 /* We can keep all triggered assertions in a singly-linked list so we can |
37 * generate a report later. | 38 * generate a report later. |
38 */ | 39 */ |
41 static SDL_assert_data *triggered_assertions = &assertion_list_terminator; | 42 static SDL_assert_data *triggered_assertions = &assertion_list_terminator; |
42 #endif | 43 #endif |
43 | 44 |
44 static void | 45 static void |
45 debug_print(const char *fmt, ...) | 46 debug_print(const char *fmt, ...) |
46 //#ifdef __GNUC__ | 47 #ifdef __GNUC__ |
47 //__attribute__((format (printf, 1, 2))) | 48 __attribute__((format (printf, 1, 2))) |
48 //#endif | 49 #endif |
50 ; | |
51 | |
52 static void | |
53 debug_print(const char *fmt, ...) | |
49 { | 54 { |
50 #ifdef _WINDOWS | 55 #ifdef _WINDOWS |
51 /* Format into a buffer for OutputDebugStringA(). */ | 56 /* Format into a buffer for OutputDebugStringA(). */ |
52 char buf[1024]; | 57 char buf[1024]; |
53 char *startptr; | 58 char *startptr; |