00001 /* vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:cindent: 00002 */ 00003 /* 00004 * Copyright (C) 2005 Dell Inc. 00005 * by Michael Brown <Michael_E_Brown@dell.com> 00006 * Licensed under the Open Software License version 2.1 00007 * 00008 * Alternatively, you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published 00010 * by the Free Software Foundation; either version 2 of the License, 00011 * or (at your option) any later version. 00012 00013 * This program is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 */ 00018 00019 00020 #ifndef LIBSMBIOS_COMPAT_HPP_INCLUDED 00021 #define LIBSMBIOS_COMPAT_HPP_INCLUDED 00022 00023 #include "smbios/config.hpp" 00024 #include "smbios/config/auto_link.hpp" 00025 00026 /* 00027 * CHANGES TO THIS FILE CAUSE A WHOLE-PROJECT REBUILD! 00028 * Keep changes here to a minimum! 00029 */ 00030 00031 #if defined(LIBSMBIOS_HAS_DECLSPEC) && defined(LIBSMBIOS_ALL_DYN_LINK) 00032 # if defined(LIBSMBIOS_SOURCE) || defined(LIBSMBIOS_SOURCE) 00033 # define DLL_SPEC __declspec(dllexport) 00034 # else 00035 # define DLL_SPEC __declspec(dllimport) 00036 # endif /* SMBIOS_EXPORTS */ 00037 #endif 00038 00039 #ifndef DLL_SPEC 00040 # define DLL_SPEC 00041 #endif 00042 00043 00044 #ifdef LIBSMBIOS_PLATFORM_WIN32 00045 # define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ 00046 # include <windows.h> 00047 /* Windows is lame. */ 00048 # define _snprintf snprintf 00049 00050 #endif /* LIBSMBIOS_PLATFORM_WIN32 */ 00051 #endif /* COMPAT_HPP */