libsmbios_c library
compat.h
Go to the documentation of this file.
1 /* vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:cindent:
2  */
3 /*
4  * Copyright (C) 2005 Dell Inc.
5  * by Michael Brown <Michael_E_Brown@dell.com>
6  * Licensed under the Open Software License version 2.1
7  *
8  * Alternatively, you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published
10  * by the Free Software Foundation; either version 2 of the License,
11  * or (at your option) any later version.
12 
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  */
18 
19 
20 #ifndef LIBSMBIOS_C_COMPAT_H_INCLUDED
21 #define LIBSMBIOS_C_COMPAT_H_INCLUDED
22 
23 #ifdef LIBSMBIOS_C_SOURCE
24 #include "libsmbios_c_source.h"
25 #endif
26 
29 
30 /*
31  * CHANGES TO THIS FILE CAUSE A WHOLE-PROJECT REBUILD!
32  * Keep changes here to a minimum!
33 */
34 
35 #if defined(LIBSMBIOS_C_HAS_DECLSPEC) && defined(LIBSMBIOS_C_ALL_DYN_LINK)
36 # if defined(LIBSMBIOS_C_SOURCE)
37 # define LIBSMBIOS_C_DLL_SPEC __declspec(dllexport)
38 # else
39 # define LIBSMBIOS_C_DLL_SPEC __declspec(dllimport)
40 # endif /* SMBIOS_EXPORTS */
41 #endif
42 
43 #if defined(LIBSMBIOS_C_HAS_VISIBILITY_ATTR) && defined(LIBSMBIOS_C_ALL_DYN_LINK)
44 # define LIBSMBIOS_C_DLL_SPEC __attribute__ ((visibility ("default")))
45 #endif
46 
47 #ifndef LIBSMBIOS_C_DLL_SPEC
48 # define LIBSMBIOS_C_DLL_SPEC
49 #endif
50 
51 #ifdef __cplusplus
52 #define EXTERN_C_BEGIN extern "C" {
53 #define EXTERN_C_END }
54 #else
55 #define EXTERN_C_BEGIN
56 #define EXTERN_C_END
57 #endif
58 
59 #ifdef LIBSMBIOS_C_PLATFORM_WIN32
60 # define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
61 # include <windows.h>
62 #endif /* LIBSMBIOS_C_PLATFORM_WIN32 */
63 
64 #endif /* COMPAT_H */