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_ZSERIES_GNU)
00080 # include <Pegasus/Common/Platform_LINUX_ZSERIES_GNU.h>
00081 #elif defined (PEGASUS_PLATFORM_LINUX_ZSERIES64_GNU)
00082 # include <Pegasus/Common/Platform_LINUX_ZSERIES64_GNU.h>
00083 #elif defined (PEGASUS_PLATFORM_DARWIN_PPC_GNU)
00084 # include <Pegasus/Common/Platform_DARWIN_PPC_GNU.h>
00085 #elif defined (PEGASUS_PLATFORM_DARWIN_IX86_GNU)
00086 # include <Pegasus/Common/Platform_DARWIN_IX86_GNU.h>
00087 #elif defined (PEGASUS_PLATFORM_VMS_ALPHA_DECCXX)
00088 # include <Pegasus/Common/Platform_VMS_ALPHA_DECCXX.h>
00089 #elif defined (PEGASUS_PLATFORM_VMS_IA64_DECCXX)
00090 # include <Pegasus/Common/Platform_VMS_IA64_DECCXX.h>
00091 #elif defined (PEGASUS_PLATFORM_LINUX_XSCALE_GNU)
00092 # include <Pegasus/Common/Platform_LINUX_XSCALE_GNU.h>
00093 #else
00094 # error "<Pegasus/Common/Config.h>: Unsupported Platform"
00095 #endif
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109 #if defined(__GNUC__)
00110 #define GCC_VERSION (__GNUC__ * 10000 \
00111 + __GNUC_MINOR__ * 100 \
00112 + __GNUC_PATCHLEVEL__)
00113
00114
00115
00116
00117
00118
00119 #endif
00120
00121
00122 #ifdef __cplusplus
00123 #include <cstdlib>
00124 #endif
00125
00126 #ifndef PEGASUS_IMPORT
00127 # define PEGASUS_IMPORT
00128 #endif
00129
00130 #ifndef PEGASUS_EXPORT
00131 # define PEGASUS_EXPORT
00132 #endif
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159 #ifndef PEGASUS_HIDDEN_LINKAGE
00160 # define PEGASUS_HIDDEN_LINKAGE
00161 #endif
00162
00163 #ifdef PEGASUS_HAVE_NAMESPACES
00164 #ifdef __cplusplus
00165 # define PEGASUS_NAMESPACE_BEGIN namespace Pegasus {
00166 # define PEGASUS_NAMESPACE_END }
00167 # define PEGASUS_NAMESPACE(X) Pegasus::X
00168
00169 #ifndef PEGASUS_HAVE_NO_STD
00170 # define PEGASUS_STD(X) std::X
00171 # define PEGASUS_USING_STD using namespace std
00172 #else
00173 # define PEGASUS_STD(X) X
00174 # define PEGASUS_USING_STD
00175 #endif
00176 # define PEGASUS_USING_PEGASUS using namespace Pegasus
00177 #else
00178 # define PEGASUS_NAMESPACE_BEGIN
00179 # define PEGASUS_NAMESPACE_END
00180 # define PEGASUS_NAMESPACE(X) X
00181 # define PEGASUS_STD(X) X
00182 # define PEGASUS_USING_STD
00183 # define PEGASUS_USING_PEGASUS
00184 #endif
00185 #else
00186 # define PEGASUS_NAMESPACE_BEGIN
00187 # define PEGASUS_NAMESPACE_END
00188 # define PEGASUS_NAMESPACE(X) X
00189 # define PEGASUS_STD(X) X
00190 # define PEGASUS_USING_STD
00191 # define PEGASUS_USING_PEGASUS
00192 #endif
00193
00194 #ifdef PEGASUS_HAVE_EXPLICIT
00195 #ifdef __cplusplus
00196 # define PEGASUS_EXPLICIT explicit
00197 #else
00198 # define PEGASUS_EXPLICIT
00199 #endif
00200 #else
00201 # define PEGASUS_EXPLICIT
00202 #endif
00203
00204 #ifndef PEGASUS_HAVE_FOR_SCOPE
00205 # define for if (0) ; else for
00206 #endif
00207
00208 #ifdef PEGASUS_HAVE_TEMPLATE_SPECIALIZATION
00209 #ifdef __cplusplus
00210 # define PEGASUS_TEMPLATE_SPECIALIZATION template <>
00211 #else
00212 # define PEGASUS_TEMPLATE_SPECIALIZATION
00213 #endif
00214 #else
00215 # define PEGASUS_TEMPLATE_SPECIALIZATION
00216 #endif
00217
00218 #ifdef PEGASUS_HAVE_IOS_BINARY
00219 #ifdef __cplusplus
00220 #define PEGASUS_IOS_BINARY ,std::ios::binary
00221 #define PEGASUS_OR_IOS_BINARY | std::ios::binary
00222 #else
00223 #define PEGASUS_IOS_BINARY
00224 #define PEGASUS_OR_IOS_BINARY
00225 #endif
00226 #else
00227 #define PEGASUS_IOS_BINARY
00228 #define PEGASUS_OR_IOS_BINARY
00229 #endif
00230
00231 #ifndef PEGASUS_SINT64_LITERAL
00232 #define PEGASUS_SINT64_LITERAL(X) (Sint64 (X##LL))
00233 #endif
00234 #ifndef PEGASUS_UINT64_LITERAL
00235 #define PEGASUS_UINT64_LITERAL(X) (Uint64 (X##ULL))
00236 #endif
00237
00238
00239 #ifndef PEGASUS_64BIT_CONVERSION_WIDTH
00240 #define PEGASUS_64BIT_CONVERSION_WIDTH "ll"
00241 #endif
00242
00243 #ifndef PEGASUS_MAXHOSTNAMELEN
00244 # ifdef _POSIX_HOST_NAME_MAX
00245 # define PEGASUS_MAXHOSTNAMELEN _POSIX_HOST_NAME_MAX
00246 # else
00247 # define PEGASUS_MAXHOSTNAMELEN MAXHOSTNAMELEN
00248 # endif
00249 #endif
00250
00251 #ifdef __cplusplus
00252 PEGASUS_NAMESPACE_BEGIN
00253
00254 typedef bool Boolean;
00255 typedef unsigned char Uint8;
00256 typedef signed char Sint8;
00257 typedef unsigned short Uint16;
00258 typedef signed short Sint16;
00259 typedef unsigned int Uint32;
00260 typedef signed int Sint32;
00261 typedef float Real32;
00262 typedef double Real64;
00263 typedef PEGASUS_UINT64 Uint64;
00264 typedef PEGASUS_SINT64 Sint64;
00265
00266 #define PEG_NOT_FOUND Uint32(-1)
00267
00268 PEGASUS_NAMESPACE_END
00269 #endif
00270
00271 #ifdef PEGASUS_SUPPRESS_UNREACHABLE_STATEMENTS
00272 # define PEGASUS_UNREACHABLE(CODE)
00273 #else
00274 # define PEGASUS_UNREACHABLE(CODE) CODE
00275 #endif
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296 #if defined(__GNUC__) && (__GNUC__ >= 4)
00297 # define PEGASUS_FORMAT(A1, A2) __attribute__((format (printf, A1, A2)))
00298 #else
00299 # define PEGASUS_FORMAT(A1, A2)
00300 #endif
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312 #ifndef PEGASUS_INITIAL_THREADSTACK_SIZE
00313 # define PEGASUS_INITIAL_THREADSTACK_SIZE 256*1024
00314 #endif
00315
00316 #endif