Mercurial > sdl-ios-xcode
comparison include/begin_code.h @ 1574:0fd72308659e
Default to use the visibility attribute, on gcc (is this okay?)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 22 Mar 2006 04:51:44 +0000 |
parents | 2422ca15ba42 |
children | 4aa7df2476e7 |
comparison
equal
deleted
inserted
replaced
1573:2422ca15ba42 | 1574:0fd72308659e |
---|---|
29 #ifdef _begin_code_h | 29 #ifdef _begin_code_h |
30 #error Nested inclusion of begin_code.h | 30 #error Nested inclusion of begin_code.h |
31 #endif | 31 #endif |
32 #define _begin_code_h | 32 #define _begin_code_h |
33 | 33 |
34 #ifdef __GNUC__ | |
35 #define SDL_GCC_ATTR_VIS_DEFAULT __attribute__((visibility("default"))) | |
36 #endif | |
37 | |
38 /* Some compilers use a special export keyword */ | 34 /* Some compilers use a special export keyword */ |
39 #ifndef DECLSPEC | 35 #ifndef DECLSPEC |
40 # ifdef __BEOS__ | 36 # if defined(__BEOS__) |
41 # if defined(__GNUC__) | 37 # if defined(__GNUC__) |
42 # define DECLSPEC __declspec(dllexport) | 38 # define DECLSPEC __declspec(dllexport) |
43 # else | 39 # else |
44 # define DECLSPEC __declspec(export) | 40 # define DECLSPEC __declspec(export) |
45 # endif | 41 # endif |
46 # else | 42 # elif defined(__WIN32__) |
47 # ifdef __WIN32__ | |
48 # ifdef __BORLANDC__ | 43 # ifdef __BORLANDC__ |
49 # ifdef BUILD_SDL | 44 # ifdef BUILD_SDL |
50 # define DECLSPEC | 45 # define DECLSPEC |
51 # else | 46 # else |
52 # define DECLSPEC __declspec(dllimport) | 47 # define DECLSPEC __declspec(dllimport) |
53 # endif | 48 # endif |
54 # else | 49 # else |
55 # define DECLSPEC __declspec(dllexport) | 50 # define DECLSPEC __declspec(dllexport) |
56 # endif | 51 # endif |
57 # else | 52 # elif defined(__OS2__) |
58 # ifdef __OS2__ | |
59 # ifdef __WATCOMC__ | 53 # ifdef __WATCOMC__ |
60 # ifdef BUILD_SDL | 54 # ifdef BUILD_SDL |
61 # define DECLSPEC __declspec(dllexport) | 55 # define DECLSPEC __declspec(dllexport) |
62 # else | 56 # else |
63 # define DECLSPEC | 57 # define DECLSPEC |
64 # endif | 58 # endif |
65 # else | 59 # else |
66 # define DECLSPEC | 60 # define DECLSPEC |
67 # endif | 61 # endif |
68 # else | 62 # else |
69 # define DECLSPEC | 63 # if defined(__GNUC__) |
70 # endif | 64 # define DECLSPEC __attribute__ ((visibility("default"))) |
71 # endif | 65 # else |
66 # define DECLSPEC | |
67 # endif | |
72 # endif | 68 # endif |
73 #endif | 69 #endif |
74 | 70 |
75 /* By default SDL uses the C calling convention */ | 71 /* By default SDL uses the C calling convention */ |
76 #ifndef SDLCALL | 72 #ifndef SDLCALL |