SMBIOS 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_COMPAT_H_INCLUDED
21 #define LIBSMBIOS_COMPAT_H_INCLUDED
22 
23 #include "smbios/config.hpp"
25 
26 /*
27  * CHANGES TO THIS FILE CAUSE A WHOLE-PROJECT REBUILD!
28  * Keep changes here to a minimum!
29 */
30 
31 #if defined(LIBSMBIOS_HAS_DECLSPEC) && defined(LIBSMBIOS_ALL_DYN_LINK)
32 # if defined(LIBSMBIOS_SOURCE) || defined(LIBSMBIOS_SOURCE)
33 # define DLL_SPEC __declspec(dllexport)
34 # else
35 # define DLL_SPEC __declspec(dllimport)
36 # endif /* SMBIOS_EXPORTS */
37 #endif
38 
39 #ifndef DLL_SPEC
40 # define DLL_SPEC
41 #endif
42 
43 
44 #ifdef LIBSMBIOS_PLATFORM_WIN32
45 # define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
46 # include <windows.h>
47 /* Windows is lame. */
48 # define _snprintf snprintf
49 
50 #endif /* LIBSMBIOS_PLATFORM_WIN32 */
51 #endif /* COMPAT_H */