00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00029
00030
00031
00032
00033
00034 #ifndef Pegasus_Config_h
00035 #define Pegasus_Config_h
00036
00037 #if defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC)
00038 # include <Pegasus/Common/Platform_WIN32_IX86_MSVC.h>
00039 #elif defined(PEGASUS_PLATFORM_WIN64_IA64_MSVC)
00040 # include <Pegasus/Common/Platform_WIN64_IA64_MSVC.h>
00041 #elif defined(PEGASUS_PLATFORM_WIN64_X86_64_MSVC)
00042 # include <Pegasus/Common/Platform_WIN64_X86_64_MSVC.h>
00043 #elif defined (PEGASUS_PLATFORM_LINUX_IX86_GNU)
00044 # include <Pegasus/Common/Platform_LINUX_IX86_GNU.h>
00045 #elif defined (PEGASUS_PLATFORM_LINUX_XSCALE_GNU)
00046 # include <Pegasus/Common/Platform_LINUX_XSCALE_GNU.h>
00047 #elif defined (PEGASUS_PLATFORM_PASE_ISERIES_IBMCXX)
00048 #include <Pegasus/Common/Platform_PASE_ISERIES_IBMCXX.h>
00049 #elif defined (PEGASUS_PLATFORM_AIX_RS_IBMCXX)
00050 # include <Pegasus/Common/Platform_AIX_RS_IBMCXX.h>
00051 #elif defined (PEGASUS_PLATFORM_HPUX_PARISC_ACC)
00052 # include <Pegasus/Common/Platform_HPUX_PARISC_ACC.h>
00053 #elif defined (PEGASUS_PLATFORM_HPUX_IA64_ACC)
00054 # include <Pegasus/Common/Platform_HPUX_IA64_ACC.h>
00055 #elif defined (PEGASUS_PLATFORM_TRU64_ALPHA_DECCXX)
00056 # include <Pegasus/Common/Platform_TRU64_ALPHA_DECCXX.h>
00057 #elif defined (PEGASUS_PLATFORM_SOLARIS_SPARC_GNU)
00058 # include <Pegasus/Common/Platform_SOLARIS_SPARC_GNU.h>
00059 #elif defined (PEGASUS_PLATFORM_SOLARIS_SPARC_CC)
00060 # include <Pegasus/Common/Platform_SOLARIS_SPARC_CC.h>
00061 #elif defined (PEGASUS_PLATFORM_SOLARIS_SPARC_64_CC)
00062 # include <Pegasus/Common/Platform_SOLARIS_SPARC_CC_64.h>
00063 #elif defined (PEGASUS_PLATFORM_SOLARIS_IX86_CC)
00064 # include <Pegasus/Common/Platform_SOLARIS_IX86_CC.h>
00065 #elif defined (PEGASUS_PLATFORM_SOLARIS_X86_64_CC)
00066 # include <Pegasus/Common/Platform_SOLARIS_X86_64_CC.h>
00067 #elif defined (PEGASUS_PLATFORM_ZOS_ZSERIES_IBM)
00068 # include <Pegasus/Common/Platform_ZOS_ZSERIES_IBM.h>
00069 #elif defined (PEGASUS_PLATFORM_ZOS_ZSERIES64_IBM)
00070 # include <Pegasus/Common/Platform_ZOS_ZSERIES64_IBM.h>
00071 #elif defined (PEGASUS_PLATFORM_LINUX_IA64_GNU)
00072 # include <Pegasus/Common/Platform_LINUX_IA64_GNU.h>
00073 #elif defined (PEGASUS_PLATFORM_LINUX_X86_64_GNU)
00074 # include <Pegasus/Common/Platform_LINUX_X86_64_GNU.h>
00075 #elif defined (PEGASUS_PLATFORM_LINUX_PPC_GNU)
00076 # include <Pegasus/Common/Platform_LINUX_PPC_GNU.h>
00077 #elif defined (PEGASUS_PLATFORM_LINUX_PPC64_GNU)
00078 # include <Pegasus/Common/Platform_LINUX_PPC64_GNU.h>
00079 #elif defined (PEGASUS_PLATFORM_LINUX_SPARCV9_GNU)
00080 # include <Pegasus/Common/Platform_LINUX_SPARCV9_GNU.h>
00081 #elif defined (PEGASUS_PLATFORM_LINUX_SPARC64_GNU)
00082 # include <Pegasus/Common/Platform_LINUX_SPARC64_GNU.h>
00083 #elif defined (PEGASUS_PLATFORM_LINUX_ZSERIES_GNU)
00084 # include <Pegasus/Common/Platform_LINUX_ZSERIES_GNU.h>
00085 #elif defined (PEGASUS_PLATFORM_LINUX_ZSERIES64_GNU)
00086 # include <Pegasus/Common/Platform_LINUX_ZSERIES64_GNU.h>
00087 #elif defined (PEGASUS_PLATFORM_DARWIN_PPC_GNU)
00088 # include <Pegasus/Common/Platform_DARWIN_PPC_GNU.h>
00089 #elif defined (PEGASUS_PLATFORM_DARWIN_IX86_GNU)
00090 # include <Pegasus/Common/Platform_DARWIN_IX86_GNU.h>
00091 #elif defined (PEGASUS_PLATFORM_VMS_ALPHA_DECCXX)
00092 # include <Pegasus/Common/Platform_VMS_ALPHA_DECCXX.h>
00093 #elif defined (PEGASUS_PLATFORM_VMS_IA64_DECCXX)
00094 # include <Pegasus/Common/Platform_VMS_IA64_DECCXX.h>
00095 #elif defined (PEGASUS_PLATFORM_LINUX_XSCALE_GNU)
00096 # include <Pegasus/Common/Platform_LINUX_XSCALE_GNU.h>
00097 #else
00098 # error "<Pegasus/Common/Config.h>: Unsupported Platform"
00099 #endif
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113 #if defined(__GNUC__)
00114 #define GCC_VERSION (__GNUC__ * 10000 \
00115 + __GNUC_MINOR__ * 100 \
00116 + __GNUC_PATCHLEVEL__)
00117
00118
00119
00120
00121
00122
00123 #endif
00124
00125
00126 #ifdef __cplusplus
00127 #include <cstdlib>
00128 #endif
00129
00130 #ifndef PEGASUS_IMPORT
00131 # define PEGASUS_IMPORT
00132 #endif
00133
00134 #ifndef PEGASUS_EXPORT
00135 # define PEGASUS_EXPORT
00136 #endif
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163 #ifndef PEGASUS_HIDDEN_LINKAGE
00164 # define PEGASUS_HIDDEN_LINKAGE
00165 #endif
00166
00167 #ifdef PEGASUS_HAVE_NAMESPACES
00168 #ifdef __cplusplus
00169 # define PEGASUS_NAMESPACE_BEGIN namespace Pegasus {
00170 # define PEGASUS_NAMESPACE_END }
00171 # define PEGASUS_NAMESPACE(X) Pegasus::X
00172
00173 #ifndef PEGASUS_HAVE_NO_STD
00174 # define PEGASUS_STD(X) std::X
00175 # define PEGASUS_USING_STD using namespace std
00176 #else
00177 # define PEGASUS_STD(X) X
00178 # define PEGASUS_USING_STD
00179 #endif
00180 # define PEGASUS_USING_PEGASUS using namespace Pegasus
00181 #else
00182 # define PEGASUS_NAMESPACE_BEGIN
00183 # define PEGASUS_NAMESPACE_END
00184 # define PEGASUS_NAMESPACE(X) X
00185 # define PEGASUS_STD(X) X
00186 # define PEGASUS_USING_STD
00187 # define PEGASUS_USING_PEGASUS
00188 #endif
00189 #else
00190 # define PEGASUS_NAMESPACE_BEGIN
00191 # define PEGASUS_NAMESPACE_END
00192 # define PEGASUS_NAMESPACE(X) X
00193 # define PEGASUS_STD(X) X
00194 # define PEGASUS_USING_STD
00195 # define PEGASUS_USING_PEGASUS
00196 #endif
00197
00198 #ifdef PEGASUS_HAVE_EXPLICIT
00199 #ifdef __cplusplus
00200 # define PEGASUS_EXPLICIT explicit
00201 #else
00202 # define PEGASUS_EXPLICIT
00203 #endif
00204 #else
00205 # define PEGASUS_EXPLICIT
00206 #endif
00207
00208 #ifndef PEGASUS_HAVE_FOR_SCOPE
00209 # define for if (0) ; else for
00210 #endif
00211
00212 #ifdef PEGASUS_HAVE_TEMPLATE_SPECIALIZATION
00213 #ifdef __cplusplus
00214 # define PEGASUS_TEMPLATE_SPECIALIZATION template <>
00215 #else
00216 # define PEGASUS_TEMPLATE_SPECIALIZATION
00217 #endif
00218 #else
00219 # define PEGASUS_TEMPLATE_SPECIALIZATION
00220 #endif
00221
00222 #ifdef PEGASUS_HAVE_IOS_BINARY
00223 #ifdef __cplusplus
00224 #define PEGASUS_IOS_BINARY ,std::ios::binary
00225 #define PEGASUS_OR_IOS_BINARY | std::ios::binary
00226 #else
00227 #define PEGASUS_IOS_BINARY
00228 #define PEGASUS_OR_IOS_BINARY
00229 #endif
00230 #else
00231 #define PEGASUS_IOS_BINARY
00232 #define PEGASUS_OR_IOS_BINARY
00233 #endif
00234
00235 #ifndef PEGASUS_SINT64_LITERAL
00236 #define PEGASUS_SINT64_LITERAL(X) (Sint64 (X##LL))
00237 #endif
00238 #ifndef PEGASUS_UINT64_LITERAL
00239 #define PEGASUS_UINT64_LITERAL(X) (Uint64 (X##ULL))
00240 #endif
00241
00242
00243 #ifndef PEGASUS_64BIT_CONVERSION_WIDTH
00244 #define PEGASUS_64BIT_CONVERSION_WIDTH "ll"
00245 #endif
00246
00247 #ifndef PEGASUS_MAXHOSTNAMELEN
00248 # ifdef _POSIX_HOST_NAME_MAX
00249 # define PEGASUS_MAXHOSTNAMELEN _POSIX_HOST_NAME_MAX
00250 # else
00251 # define PEGASUS_MAXHOSTNAMELEN MAXHOSTNAMELEN
00252 # endif
00253 #endif
00254
00255 #ifdef __cplusplus
00256 PEGASUS_NAMESPACE_BEGIN
00257
00258 typedef bool Boolean;
00259 typedef unsigned char Uint8;
00260 typedef signed char Sint8;
00261 typedef unsigned short Uint16;
00262 typedef signed short Sint16;
00263 typedef unsigned int Uint32;
00264 typedef signed int Sint32;
00265 typedef float Real32;
00266 typedef double Real64;
00267 typedef PEGASUS_UINT64 Uint64;
00268 typedef PEGASUS_SINT64 Sint64;
00269
00270 #define PEG_NOT_FOUND Uint32(-1)
00271
00272 PEGASUS_NAMESPACE_END
00273 #endif
00274
00275 #ifdef PEGASUS_SUPPRESS_UNREACHABLE_STATEMENTS
00276 # define PEGASUS_UNREACHABLE(CODE)
00277 #else
00278 # define PEGASUS_UNREACHABLE(CODE) CODE
00279 #endif
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300 #if defined(__GNUC__) && (__GNUC__ >= 4)
00301 # define PEGASUS_FORMAT(A1, A2) __attribute__((format (printf, A1, A2)))
00302 #else
00303 # define PEGASUS_FORMAT(A1, A2)
00304 #endif
00305
00306
00307 #endif