/*****************************************************************************\ * Copyright (c) 2004 Mark Aylett * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, sublicense, and/or sell copies of the Software, and to permit * * persons to whom the Software is furnished to do so, subject to the * * following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * * USE OR OTHER DEALINGS IN THE SOFTWARE. * \*****************************************************************************/ /** * \file mar_storage_c.h * \brief Definitions of the storage class macros. */ #ifndef INCLUDED_MAR_STORAGE_C #define INCLUDED_MAR_STORAGE_C /** * \brief The extern storage class definition. */ #if defined(__cplusplus) #define MAR_EXTERN extern "C" #else /* !__cplusplus */ #define MAR_EXTERN extern #endif /* !__cplusplus */ #if !defined(WIN32) /** * \brief The export storage class definition. */ #define MAR_EXPORT MAR_EXTERN /** * \brief The import storage class definition. */ #define MAR_IMPORT MAR_EXTERN #else /* WIN32 */ #define MAR_EXPORT MAR_EXTERN __declspec(dllexport) #define MAR_IMPORT MAR_EXTERN __declspec(dllimport) #endif /* WIN32 */ #if defined(MAR_SHARED) #if !defined(MAR_BUILD) #define MAR_API MAR_IMPORT #else /* MAR_BUILD */ /** * \brief The api storage class definition. */ #define MAR_API MAR_EXPORT #endif /* MAR_BUILD */ #elif defined (MAR_STATIC) #define MAR_API MAR_EXTERN #else /* !MAR_SHARED && !MAR_STATIC */ #error Please define either MAR_SHARED or MAR_STATIC #endif /* !MAR_SHARED && !MAR_STATIC */ #endif /* INCLUDED_MAR_STORAGE_C */