00001 /*****************************************************************************\ 00002 * Copyright (c) 2004 Mark Aylett <mark@emantic.co.uk> * 00003 * * 00004 * Permission is hereby granted, free of charge, to any person obtaining a * 00005 * copy of this software and associated documentation files (the * 00006 * "Software"), to deal in the Software without restriction, including * 00007 * without limitation the rights to use, copy, modify, merge, publish, * 00008 * distribute, sublicense, and/or sell copies of the Software, and to permit * 00009 * persons to whom the Software is furnished to do so, subject to the * 00010 * following conditions: * 00011 * * 00012 * The above copyright notice and this permission notice shall be included * 00013 * in all copies or substantial portions of the Software. * 00014 * * 00015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 00016 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 00017 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * 00018 * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 00019 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 00020 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * 00021 * USE OR OTHER DEALINGS IN THE SOFTWARE. * 00022 \*****************************************************************************/ 00023 00029 #ifndef INCLUDED_MAR_STORAGE_C 00030 #define INCLUDED_MAR_STORAGE_C 00031 00036 #if defined(__cplusplus) 00037 #define MAR_EXTERN extern "C" 00038 #else /* !__cplusplus */ 00039 #define MAR_EXTERN extern 00040 #endif /* !__cplusplus */ 00041 00042 00043 #if !defined(WIN32) 00044 00049 #define MAR_EXPORT MAR_EXTERN 00050 00055 #define MAR_IMPORT MAR_EXTERN 00056 00057 #else /* WIN32 */ 00058 #define MAR_EXPORT MAR_EXTERN __declspec(dllexport) 00059 #define MAR_IMPORT MAR_EXTERN __declspec(dllimport) 00060 #endif /* WIN32 */ 00061 00062 #if defined(MAR_SHARED) 00063 00064 #if !defined(MAR_BUILD) 00065 #define MAR_API MAR_IMPORT 00066 #else /* MAR_BUILD */ 00067 00072 #define MAR_API MAR_EXPORT 00073 #endif /* MAR_BUILD */ 00074 00075 #elif defined (MAR_STATIC) 00076 #define MAR_API MAR_EXTERN 00077 #else /* !MAR_SHARED && !MAR_STATIC */ 00078 #error Please define either MAR_SHARED or MAR_STATIC 00079 #endif /* !MAR_SHARED && !MAR_STATIC */ 00080 00081 #endif /* INCLUDED_MAR_STORAGE_C */