PortExport.h

00001 /*---------------------------------------------------------------------------*
00002  *  PortExport.h  *
00003  *                                                                           *
00004  *  Copyright 2007 Nuance Communciations, Inc.                               *
00005  *                                                                           *
00006  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
00007  *  you may not use this file except in compliance with the License.         *
00008  *                                                                           *
00009  *  You may obtain a copy of the License at                                  *
00010  *      http://www.apache.org/licenses/LICENSE-2.0                           *
00011  *                                                                           *
00012  *  Unless required by applicable law or agreed to in writing, software      *
00013  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
00014  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 
00015  *  See the License for the specific language governing permissions and      *
00016  *  limitations under the License.                                           *
00017  *                                                                           *
00018  *---------------------------------------------------------------------------*/
00019 
00020 #ifndef __PORT_EXPORT_H
00021 #define __PORT_EXPORT_H
00022 
00023 
00024 
00025 /* (1) Platform specific macro which handles symbol exports & imports.*/
00026 
00027 /* These macros are used if defining DLL import/export in the source file
00028  * rather than through a .def file. */
00029 
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 
00038 #ifdef _WIN32
00039 
00040 #ifndef HAS_INLINE
00041 #define HAS_INLINE
00042 #endif
00043 
00044 #ifdef __cplusplus
00045 
00046 #define PORT_EXPORT_DECL extern "C" __declspec(dllexport)
00047 #define PORT_IMPORT_DECL extern "C" __declspec(dllimport)
00048 
00049 #else /* not __cplusplus */
00050 
00051 #define PORT_EXPORT_DECL __declspec(dllexport)
00052 #define PORT_IMPORT_DECL __declspec(dllimport)
00053 #endif /* __cplusplus */
00054 
00055 #else /* not _WIN32 */
00056 
00057 #ifdef __cplusplus
00058 #define PORT_EXPORT_DECL extern "C"
00059 #define PORT_IMPORT_DECL extern "C"
00060 #else
00061 #define PORT_EXPORT_DECL extern
00062 #define PORT_IMPORT_DECL extern
00063 #endif /* __cplusplus */
00064 
00065 #endif /* _WIN32 */
00066 
00067 #if !defined(PORT_EXPORT_DECL) || !defined(PORT_IMPORT_DECL)
00068 #error Symbol import/export pair not defined.
00069 #endif
00070 
00071 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00072 
00073 /* If using a .def file on win32, use these macros. */
00074 #ifdef __cplusplus
00075 
00079 #define EXTERN extern "C"
00080 #else
00081 
00085 #define EXTERN extern
00086 #endif
00087 
00088 #ifdef __cplusplus
00089 
00093 #define PINLINE inline
00094 #elif defined(_WIN32)
00095 
00099 #define PINLINE _inline
00100 #elif defined(__GNUC__)
00101 
00105 #ifdef __vxworks
00106 #define PINLINE __inline__
00107 #else
00108 #define PINLINE     __inline__ 
00109 #endif
00110 
00111 #elif !defined(PINLINE)
00112 
00116 #define PINLINE
00117 #endif
00118 
00123 #endif 

Generated on Thu May 1 15:37:25 2008 for SREC by  doxygen 1.5.3