1 /*
2  * This file is part of libsidplayfp, a SID player engine.
3  *
4  * Copyright 2011-2015 Leandro Nini <drfiemost@users.sourceforge.net>
5  * Copyright 2007-2010 Antti Lankila
6  * Copyright 2000-2001 Simon White
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21  */
22 
23 #ifndef SIDDEFS_H
24 #define SIDDEFS_H
25 
26 /* DLL building support on win32 hosts */
27 #ifndef SID_EXTERN
28 #  ifdef DLL_EXPORT      /* defined by libtool (if required) */
29 #    define SID_EXTERN __declspec(dllexport)
30 #  endif
31 #  ifdef SID_DLL_IMPORT  /* define if linking with this dll */
32 #    define SID_EXTERN __declspec(dllimport)
33 #  endif
34 #  ifndef SID_EXTERN     /* static linking or !_WIN32 */
35 #    if defined(__GNUC__) && (__GNUC__ >= 4)
36 #      define SID_EXTERN __attribute__ ((visibility("default")))
37 #    else
38 #      define SID_EXTERN
39 #    endif
40 #  endif
41 #endif
42 
43 /* Deprecated attributes */
44 #if defined(_MSCVER)
45 #  define SID_DEPRECATED __declspec(deprecated)
46 #elif defined(__GNUC__)
47 #  define SID_DEPRECATED __attribute__ ((deprecated))
48 #else
49 #  define SID_DEPRECATED
50 #endif
51 
52 /* Unused attributes */
53 #if defined(__GNUC__)
54 #  define SID_UNUSED __attribute__ ((unused))
55 #else
56 #  define SID_UNUSED
57 #endif
58 
59 #endif /* SIDDEFS_H */
60