gloox  0.9.9.12
macros.h
1 /*
2  Copyright (c) 2005-2008 by Jakob Schroeter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
13 
14 #ifndef GLOOX_MACROS_H__
15 #define GLOOX_MACROS_H__
16 
17 #if defined( _MSC_VER ) || defined( _WIN32_WCE )
18 # pragma warning( disable:4251 )
19 # pragma warning( disable:4786 )
20 #endif
21 
22 #ifdef _WIN32
23 # if defined( GLOOX_EXPORTS ) || defined( DLL_EXPORT )
24 # define GLOOX_API __declspec( dllexport )
25 # else
26 # if defined( GLOOX_IMPORTS ) || defined( DLL_IMPORT )
27 # define GLOOX_API __declspec( dllimport )
28 # endif
29 # endif
30 #endif
31 
32 #ifndef GLOOX_API
33 # define GLOOX_API
34 #endif
35 
36 
37 #if defined( __GNUC__ ) && ( __GNUC__ - 0 > 3 || ( __GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2 ) )
38 # define GLOOX_DEPRECATED __attribute__ ( (deprecated) )
39 # define GLOOX_DEPRECATED_CTOR explicit GLOOX_DEPRECATED
40 #elif defined( _MSC_VER ) && ( _MSC_VER >= 1300 )
41 # define GLOOX_DEPRECATED __declspec( deprecated )
42 # define GLOOX_DEPRECATED_CTOR explicit GLOOX_DEPRECATED
43 #else
44 # define GLOOX_DEPRECATED
45 # define GLOOX_DEPRECATED_CTOR
46 #endif
47 
48 
49 #endif // GLOOX_MACROS_H__