20 // Includes all system headers required to use the openNURBS toolkit.
25 #if !defined(OPENNURBS_SYSTEM_INC_) 26 #define OPENNURBS_SYSTEM_INC_ 31 #define OPENNURBS_PUBLIC_RELEASE 36 #if defined(OPENNURBS_EXPORTS) 39 #if !defined(ON_DLL_EXPORTS) 40 #define ON_DLL_EXPORTS 42 #if !defined(ON_COMPILING_OPENNURBS) 43 #define ON_COMPILING_OPENNURBS 47 #if defined(OPENNURBS_IMPORTS) 50 #if !defined(ON_DLL_IMPORTS) 51 #define ON_DLL_IMPORTS 56 #define ON_COMPILER_MSC 59 #define ON_COMPILER_MSC1300 67 #define ON_COMPILER_MSC1400 72 #define ON_COMPILER_MSC1600 81 #if defined(ON_COMPILING_OPENNURBS) 82 #pragma warning(disable:4100) // C4100: 'identifier' : unreferenced formal parameter 85 #if !defined(_CRT_SECURE_NO_DEPRECATE) 86 #define _CRT_SECURE_NO_DEPRECATE 100 #if defined(__GNUG_) || defined(__GNUG__) || defined(__GNUC_) || defined(__GNUC__) || defined(_GNU_SOURCE) || defined(__GNU_SOURCE) 102 #if !defined(ON_COMPILER_GNU) 103 #define ON_COMPILER_GNU 105 #if !defined(_GNU_SOURCE) 111 #if defined(_GNU_SOURCE) && defined(__APPLE__) 113 #if !defined(ON_COMPILER_XCODE) 114 #define ON_COMPILER_XCODE 118 #if defined(__BORLANDC__) 120 #define ON_COMPILER_BORLAND 128 #if !defined(ON_NO_WINDOWS) 133 // Begin Windows system includes -
135 #if defined(_WIN32) || defined(WIN32) || defined(_WIN64) || defined(WIN64) 137 #if defined(_M_X64) && defined(WIN32) && defined(WIN64) 140 #if defined(_INC_WINDOWS) 147 #error do not define WIN32 for x64 builds 160 #if defined(ON_COMPILER_MSC1600) 168 #if !defined(_WINDOWS_) 170 #define WIN32_LEAN_AND_MEAN 174 #if defined(_M_X64) && defined(WIN32) && defined(WIN64) 187 #if !defined(ON_OS_WINDOWS) 188 #define ON_OS_WINDOWS 191 #if defined(ON_OS_WINDOWS) && !defined(NOGDI) 193 #define ON_OS_WINDOWS_GDI 196 #if defined(_MSC_VER) 203 #define ON_MSC_CDECL __cdecl 222 #if defined(ON_COMPILER_XCODE) 223 #include <malloc/malloc.h> 236 #if defined(ON_COMPILER_IRIX) 240 #if !defined(ON_COMPILER_BORLAND) 244 #if defined(ON_OS_WINDOWS) 246 #include <sys/stat.h> 255 #if defined(ON_COMPILER_GNU) 256 #include <sys/types.h> 257 #include <sys/stat.h> 260 #if defined(ON_COMPILER_XCODE) 261 #include <uuid/uuid.h> 267 #if defined (cplusplus) || defined(_cplusplus) || defined(__cplusplus) 270 #if !defined(ON_CPLUSPLUS) 278 #if !defined(ON_MSC_CDECL) 282 #if !defined(ON_OS_WINDOWS) && !defined(_GNU_SOURCE) && !defined(ON_COMPILER_XCODE) 298 #if !defined(_WCHAR_T_DEFINED) 306 #if !defined(_WCHAR_T) 307 typedef unsigned short wchar_t;
310 #define _WCHAR_T_DEFINED 325 #if defined(_M_X64) || defined(_WIN64) || defined(__LP64__) 327 #define ON_SIZEOF_POINTER 8 328 #define ON_64BIT_POINTER 330 #define ON_MAX_SIZE_T 0xFFFFFFFFFFFFFFFF 333 #define ON_SIZEOF_POINTER 4 334 #define ON_32BIT_POINTER 336 #define ON_MAX_SIZE_T 0xFFFFFFFF 340 typedef char ON__INT8;
343 typedef unsigned char ON__UINT8;
346 typedef short ON__INT16;
349 typedef unsigned short ON__UINT16;
352 typedef int ON__INT32;
355 typedef unsigned int ON__UINT32;
357 #if defined(ON_COMPILER_MSC) 362 typedef __int64 ON__INT64;
365 typedef unsigned __int64 ON__UINT64;
367 #elif defined(ON_COMPILER_GNU) 372 typedef long long ON__INT64;
375 typedef unsigned long long ON__UINT64;
379 #error Verify that long long is a 64 bit integer with your compiler! 382 typedef long long ON__INT64;
385 typedef unsigned long long ON__UINT64;
391 typedef int ON_BOOL32;
394 #if 8 == ON_SIZEOF_POINTER 396 #if defined(ON_COMPILER_GNU) 397 typedef long long ON__INT_PTR;
398 typedef unsigned long long ON__UINT_PTR;
400 typedef __int64 ON__INT_PTR;
401 typedef unsigned __int64 ON__UINT_PTR;
404 #elif 4 == ON_SIZEOF_POINTER 406 typedef int ON__INT_PTR;
407 typedef unsigned int ON__UINT_PTR;
410 #error Update OpenNURBS to work with new pointer size. 431 #if defined(ON_OS_WINDOWS) && defined(ON_COMPILER_MSC) 433 #if defined(_M_X64) || defined(_M_IX86) 434 #if !defined(ON_LITTLE_ENDIAN) 435 #define ON_LITTLE_ENDIAN 441 #if defined(ON_COMPILER_XCODE) 444 #if (defined(__ppc__) || defined(__ppc64__)) 445 #define ON_BIG_ENDIAN 446 #elif (defined (__i386__) || defined( __x86_64__ )) 447 #define ON_LITTLE_ENDIAN 453 #if defined(ON_LITTLE_ENDIAN) && defined(ON_BIG_ENDIAN) 454 #error At most one of ON_LITTLE_ENDIAN and ON_BIG_ENDIAN can be defined. 461 int on_vsnprintf(
char *buffer,
size_t count,
const char *format, va_list argptr );
463 int on_vsnwprintf(
wchar_t *buffer,
size_t count,
const wchar_t *format, va_list argptr );