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
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #ifndef _SB_BASE_
00052 #define _SB_BASE_
00053
00054 #ifndef HIDDEN_FROM_DOC
00055
00056 #if defined(_WIN32)
00057 #pragma warning(disable:4251)
00058 #endif
00059
00060 #include <SoVersion.h>
00061 #include <SoDeprecationRules.h>
00062
00063 #include <SbTypes.h>
00064 #include <stdlib.h>
00065 #include <sys/types.h>
00066
00067 #if defined(__sgi)
00068 # include <sgidefs.h>
00069 #endif
00070
00071 #include <stdio.h>
00072
00073 #include <Inventor/non_winsys.h>
00074
00075 #if defined(_AIX)
00076 # include <sys/select.h>
00077 #endif
00078
00079 #endif //HIDDEN_FROM_DOC
00080
00081 #ifndef FALSE
00082
00083 # define FALSE 0
00084
00085 # define TRUE 1
00086 #endif
00087
00095 typedef int SbBool;
00096
00097 typedef void *SbHandle;
00098
00099 #ifndef HIDDEN_FROM_DOC
00100 #define _SBHANDLE_ 1
00101
00102 #include <Inventor/sys/port.h>
00103
00104 #ifdef _WIN32
00105 typedef unsigned int SbThreadId_t;
00106 #else
00107 #include <pthread.h>
00108 typedef pthread_t SbThreadId_t;
00109 #endif
00110
00121 #define SoEXTENDER
00122
00133 #define SoEXTENDER_Documented
00134
00145 #define SoINTERNAL
00146
00150 #if defined(__STDC__) || defined(__ANSI_CPP__) || defined(__hpux) || defined(__osf__) || defined(_WIN32)
00151
00152 # define SO__QUOTE(str) #str
00153 #else
00154
00155 # define SO__QUOTE(str) "str"
00156 #endif
00157
00161 #if defined(__STDC__) || defined(__ANSI_CPP__) || defined (__hpux) || defined(__osf__) || defined(_WIN32)
00162
00163 # define SO__CONCAT(str1, str2) str1##str2
00164 #else
00165
00166 # define SO__CONCAT(str1, str2) str1str2
00167 #endif
00168
00170
00171
00172
00173
00175 #if (defined(__sgi) && (_MIPS_SZPTR == 64)) || \
00176 (MIPS_SZPTR == 64) || \
00177 defined(__osf__) || \
00178 defined(__sparcv9) || \
00179 (defined(__hpux) && defined(__LP64__)) || \
00180 defined(__x86_64__)
00181 # define OIV_PTR_SIZE 64
00182 # define OIV_LONG_SIZE 64
00183 #else
00184 # define OIV_PTR_SIZE 32
00185 # define OIV_LONG_SIZE 32
00186 #endif
00187
00188 #if defined(_WIN32) && (_MSC_VER >=1300)
00189
00190
00191 #ifdef OIV_UNICODE_CHECK
00192 # define SoNONUNICODE \
00193 __declspec(deprecated( "!!! This function is not unicode! IT SHOULD NOT BE USED !!!" ) )
00194 #else
00195 # define SoNONUNICODE
00196 #endif // OIV_UNICODE_CHECK
00197
00198 #else // defined(_WIN32) && (_MSC_VER >=1300)
00199
00200 # define SoNONUNICODE
00201
00202 #endif // defined(_WIN32) && (_MSC_VER >=1300)
00203
00204 #if (defined(__GNUC__) && (__GNUC__ >= 4))
00205 #define SoPRINTFPREFIX(stringIndex, firstToCheck) __attribute__((format(printf, stringIndex, firstToCheck)))
00206 #define SoPRINTF __attribute__((format(printf, 1, 2)))
00207 #else
00208 #define SoPRINTFPREFIX(stringIndex, firstToCheck)
00209 #define SoPRINTF
00210 #endif
00211
00212
00213 #if (defined(_WIN32) && (_MSC_VER < 1400)) || defined (__sgi)
00214
00215 #ifdef DEBUG_PRINTF
00216 static inline void SODEBUGPRINTF(const char *format, ...){
00217 va_list ap;
00218 va_start(ap, format);
00219 vfprintf(stderr,format,ap);
00220 va_end(ap);
00221 }
00222 #else
00223 static inline void SODEBUGPRINTF(...) {}
00224 #endif
00225
00226 #else
00227
00228
00229 #ifdef DEBUG_PRINTF
00230 #define SODEBUGPRINTF(format, ...) fprintf (stderr, format, __VA_ARGS__)
00231 #else
00232 #ifdef _WIN32
00233 #pragma managed(push, off)
00234 #endif
00235 inline static void SODEBUGPRINTF(const char *, ...) {}
00236 #ifdef _WIN32
00237 #pragma managed(pop)
00238 #endif
00239 #endif
00240
00241 #endif // VA_ARGS support
00242
00243 #ifdef _WIN32
00244
00245 #if !defined(InventorBase_EXPORTS)
00246 #ifndef OIV_DISABLE_AUTOLINK
00247 # pragma comment(lib,__INVENTORBASELIB)
00248 #endif
00249 #endif
00250
00251 #endif // _WIN32
00252
00257 #define SO_UNUSED_PARAM(P)
00258
00259 #endif //HIDDEN_FROM_DOC
00260
00261 #endif // _SB_BASE_
00262
00263
00264