1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2003 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
47 #include <sys/types.h>
50 #if defined(__linux) || defined(WIN32) || defined(__APPLE__)
55 #include "TargetConditionals.h"
58 /*-------------------------------------------------------------------------*/
61 /*! @name Version Defines
66 /*! The printable Version string. Includes the full version with specifiers,
70 #define OSG_VERSION_STRING "2.0.0-pre1"
72 /*! The numeric full version, with two digits per major/minor/release, e.g.
76 #define OSG_VERSION 0x020000
78 /*! The numeric major version number, e.g. 1
81 #define OSG_MAJOR_VERSION 2
83 /*! The numeric minor version number, e.g. 3
86 #define OSG_MINOR_VERSION 0
88 /*! The numeric release version number, e.g. 0
91 #define OSG_RELEASE_VERSION 0
102 /*-------------------------------------------------------------------------*/
106 #include <standards.h>
107 #include <sys/endian.h>
108 // Some systems (notably VRJuggler) screw up the environment, so kludge it
110 # define LITTLE_ENDIAN _LITTLE_ENDIAN
111 # define BIG_ENDIAN _BIG_ENDIAN
112 # define BYTE_ORDER _BYTE_ORDER
114 #elif defined(__hpux)
115 #include <arpa/nameser.h>
118 #include <arpa/nameser_compat.h>
119 #elif defined(__APPLE__)
120 #include <machine/endian.h>
121 #elif defined(__linux)
124 # define LITTLE_ENDIAN __LITTLE_ENDIAN
125 # define BIG_ENDIAN __BIG_ENDIAN
126 # define PDP_ENDIAN __PDP_ENDIAN
127 # define BYTE_ORDER __BYTE_ORDER
129 #elif defined(WIN32) // HACK until I find a better solution
130 #define LITTLE_ENDIAN 1234
131 #define BIG_ENDIAN 4321
132 #define BYTE_ORDER LITTLE_ENDIAN
133 #elif defined(_WIN32_WCE) // HACK until I find a better solution
134 #define LITTLE_ENDIAN 1234
135 #define BIG_ENDIAN 4321
136 #define BYTE_ORDER LITTLE_ENDIAN
138 #error Endian determination : could not guess your plattform
142 /*-------------------------------------------------------------------------*/
146 #ifndef __INTEL_COMPILER
147 #define __INTEL_COMPILER __ICL
151 /*-------------------------------------------------------------------------*/
157 /*! \brief stream->rdbuf get the new buffer as a parameter
158 * \ingroup GrpBaseDefines
161 # define OSG_STREAM_RDBUF_HAS_PARAM
163 /*! \brief stream->isopen is available
164 * \ingroup GrpBaseDefines
167 # define OSG_STREAM_HAS_ISOPEN
169 /*! \brief vsnprintf is available
170 * \ingroup GrpBaseDefines
173 # define OSG_HAS_VSNPRINTF
175 /*! \brief nilbuffer is defined in the stdlib
176 * \ingroup GrpBaseDefines
179 # define OSG_HAS_NILBUF
181 /*! \brief LongLong constants have LL suffix
182 * \ingroup GrpBaseDefines
185 # define OSG_LONGLONG_HAS_LL
187 # define OSG_HAS_POSIXMEMALIGN
189 # define OSG_COMPILER_PART_SPEZ
191 # define OSG_NEED_BOOL_MFIELD_SPEZ
194 # define OSG_HASH_MAP_AS_EXT
196 /*! \brief SGI's stl implementation is available
197 * \ingroup GrpBaseDefines
202 # define OSG_THROW_NOTHING() throw()
204 # define OSG_STDEXCEPTION_NAMESPACE std
206 # if __GNUC__ >= 4 || __GNUC_MINOR__ >=1
207 # define OSG_STDEXTENSION_NAMESPACE __gnu_cxx
208 # define OSG_HAS_SSTREAM
210 # define OSG_STDEXTENSION_NAMESPACE std
213 # define OSG_STL_HAS_HASH_MAP
216 # define OSG_HAS_INPUT_ITERATOR
218 # define OSG_THROW_NOTHING()
219 # if __GNUC_MINOR__ <= 96
220 # define OSG_GCC_NO_IOS_BASE
225 # define OSG_THROW(X)
227 # define OSG_THROW(X) throw(X)
230 # define OSG_THROW(X) throw(X)
234 /*-------------------------------------------------------------------------*/
237 # if defined(__sgi) && !defined(__GNUC__)
239 # if _COMPILER_VERSION < 730
240 # error compiler version < 730 not supported, please upgrade
243 /*! \brief stream->rdbuf get the new buffer as a parameter
244 * \ingroup GrpBaseDefines
247 # define OSG_STREAM_RDBUF_HAS_PARAM
249 /*! \brief stream->isopen is available
250 * \ingroup GrpBaseDefines
253 # define OSG_STREAM_HAS_ISOPEN
255 /*! \brief vsnprintf is available
256 * \ingroup GrpBaseDefines
259 # define OSG_HAS_VSNPRINTF
261 /*! \brief nilbuffer is defined in the stdlib
262 * \ingroup GrpBaseDefines
265 # define OSG_HAS_NILBUF
267 /*! \brief Use SGI internal types to define OpenSG base types
268 * \ingroup GrpBaseDefines
271 # define OSG_SGI_TYPES
273 /*! \brief atan2f function available
274 * \ingroup GrpBaseDefines
277 # define OSG_HAS_ATANF2
279 /*! \brief General float math
280 * \ingroup GrpBaseDefines
283 # define OSG_HAS_FLOATMATH
285 /*! \brief SGI's stl implementation is available
286 * \ingroup GrpBaseDefines
291 # define OSG_STL_HAS_HASH_MAP
294 * \ingroup GrpBaseDefines
299 /*! \brief LongLong constants have LL suffix
300 * \ingroup GrpBaseDefines
303 # define OSG_LONGLONG_HAS_LL
305 # define OSG_COMPILER_PART_SPEZ
307 # define OSG_THROW_NOTHING() THROW_NOTHING()
311 # define OSG_FOUND_OS
313 # define OSG_STDEXCEPTION_NAMESPACE std
315 # endif // defined(__sgi) && !defined(__GNUC__)
320 /*-------------------------------------------------------------------------*/
323 # if defined(__GNUC__) && defined(__linux)
325 /*! \brief streams in std namespace
328 # define OSG_LINUX_TYPES
330 # define OSG_HAS_ATANF2
332 # define OSG_HAS_FLOATMATH
334 /*! \brief Use the math functions from the std:: namespace
335 * \ingroup GrpBaseDefines
336 The std:: namespace has a set of overloaded functions for many
337 math operations, up to and including long double versions.
340 # define OSG_USE_STDMATH
344 # define OSG_USE_PTHREADS
346 # define OSG_LINUX_GCC
348 # define OSG_FOUND_OS
350 # endif // defined(__GNUC__) && defined(__linux)
352 /*-------------------------------------------------------------------------*/
355 # if defined(__GNUC__) && defined(__linux) && defined(__ia64)
357 # define SIZE_T_NEQ_UINT32
358 # define SIZE_T_64BIT
360 # endif // defined(__GNUC__) && defined(__linux) && defined(__ia64)
362 /*-------------------------------------------------------------------------*/
365 # if defined(__INTEL_COMPILER) && defined(__linux)
368 # define __ICL __INTEL_COMPILER
371 # ifndef __INTEL_COMPILER_VERSION
372 # define __INTEL_COMPILER_VERSION __INTEL_COMPILER
375 # define OSG_STREAM_RDBUF_HAS_PARAM
377 # define OSG_STREAM_HAS_IOPEN
379 # define OSG_HAS_NILBUF
381 # define OSG_LINUX_TYPES
383 # define OSG_HAS_ATANF2
385 # define OSG_HAS_FLOATMATH
389 # define OSG_LONGLONG_HAS_LL
391 # define OSG_COMPILER_PART_SPEZ
393 # if __INTEL_COMPILER_VERSION >= 710
394 # define OSG_THROW_NOTHING() throw()
396 # define OSG_THROW_NOTHING()
399 //# define OSG_NO_INT8_PNT
401 # define OSG_USE_PTHREADS
403 # define OSG_LINUX_ICC
405 # define OSG_FOUND_OS
407 // icc >=8.1 uses gnu headers anyway, use gnu defines set above
408 #if __INTEL_COMPILER_VERSION < 810 || ! defined(__GNUC__)
409 # define OSG_STDEXTENSION_NAMESPACE std
410 # define OSG_STDEXCEPTION_NAMESPACE std
413 # define OSG_STL_HAS_HASH_MAP
415 # define OSG_HAS_SSTREAM
417 # define OSG_TMPL_STATIC_MEMBER_NEEDS_HELPER_FCT
419 # if __INTEL_COMPILER_VERSION >= 800
420 # define OSG_USE_HASH_COMPARE
423 # endif // defined(__INTEL_COMPILER) && defined(__linux)
425 /*-------------------------------------------------------------------------*/
428 # if defined(__INTEL_COMPILER) && defined(__linux) && defined(__ia64)
430 # define OSG_NO_INT8_PNT
432 # endif // defined(__GNUC__) && defined(__linux) && defined(__ia64)
434 /*-------------------------------------------------------------------------*/
437 # if defined(__INTEL_COMPILER) && !defined(__linux) && !defined(_WIN32_WCE) && defined(_MSC_VER) && _MSC_VER < 1300
440 # define __ICL __INTEL_COMPILER
443 // Use windows internal types to define OpenSG base types
444 # define OSG_WIN_TYPES
446 // Use windows threads
447 # define OSG_USE_WINTHREADS
450 // general float math
451 # define OSG_HAS_FLOATMATH
456 # define OSG_STREAM_HAS_ISOPEN
458 // it's there, it's just called something else
459 # define OSG_HAS_VSNPRINTF
460 # define vsnprintf _vsnprintf
462 # define OSG_HAS_NILBUF
463 # define OSG_STREAM_RDBUF_HAS_PARAM
465 # define OSG_LONGLONG_HAS_LL
467 # define OSG_COMPILER_PART_SPEZ
469 # define OSG_THROW_NOTHING()
471 # define OSG_WIN32_ICL
473 # define OSG_FOUND_OS
475 # define OSG_TMPL_STATIC_MEMBER_NEEDS_FUNCTION_INSTANTIATION
477 //# define OSG_HAS_VSNPRINTF
479 # endif // defined(__INTEL_COMPILER) && !defined(__linux)
482 # if defined(__INTEL_COMPILER) && !defined(__linux) && defined(_WIN32_WCE)
485 # define __ICL __INTEL_COMPILER
488 // Use windows internal types to define OpenSG base types
489 # define OSG_WIN_TYPES
491 // Use windows threads
492 # define OSG_USE_WINTHREADS
495 // general float math
496 # define OSG_HAS_FLOATMATH
501 # define OSG_GLES 100
505 # define OSG_EMBEDDED
507 # define OSG_GL_ES_VERSION 100
509 # define OSG_STREAM_HAS_ISOPEN
511 //# define OSG_HAS_VSNPRINTF
513 # define OSG_HAS_NILBUF
514 # define OSG_STREAM_RDBUF_HAS_PARAM
516 # define OSG_LONGLONG_HAS_LL
518 # define OSG_COMPILER_PART_SPEZ
520 # define OSG_THROW_NOTHING()
522 # define OSG_WIN32_ICL
524 # define OSG_FOUND_OS
526 # define OSG_TMPL_STATIC_MEMBER_NEEDS_FUNCTION_INSTANTIATION
528 //# define OSG_HAS_VSNPRINTF
530 # endif // defined(__INTEL_COMPILER) && !defined(__linux)
532 /*-------------------------------------------------------------------------*/
535 # if defined(_MSC_VER) && !defined(__ICL) && defined(_WIN32_WCE)
536 # define OSG_WIN_TYPES
537 // Use windows threads
538 # define OSG_USE_WINTHREADS
539 // general float math
540 # define OSG_HAS_FLOATMATH
542 # define OSG_USE_STDMATH
544 # define OSG_STREAM_HAS_ISOPEN
545 //# define OSG_HAS_VSNPRINTF
546 # define OSG_HAS_NILBUF
547 # define OSG_STREAM_RDBUF_HAS_PARAM
549 //# define OSG_MICROSOFT_COMPILER_ALERT
550 //# define OSG_MICROSOFT_COMPILER_HACKS
557 # define OSG_GL_ES_VERSION 100
561 # define OSG_EMBEDDED
563 //# define OSG_HAS_TEMPLATE_RETURNVALUES
565 # define OSG_NEED_EXPLICIT_INST_FOR_STATIC
567 # define OSG_THROW_NOTHING()
569 # define OSG_WIN32_CL
571 # define OSG_FOUND_OS
573 # define OSG_TMPL_STATIC_MEMBER_NEEDS_CLASS_INSTANTIATION
575 # define OSG_STATIC_MEMEBER_NEEDS_COPY_ASIGN_INIT
577 # define OSG_MICROSOFT_DOTNET_COMPILER_HACKS
579 # if _MSC_VER >= 1300 && _MSC_VER < 1310
580 # define OSG_WIN32_CL_NET70 1
584 //# define OSG_NEED_BOOL_MFIELD_SPEZ
588 # if _MSC_VER >= 1400
589 # define OSG_STDEXCEPTION_NAMESPACE std
592 # endif // defined(_MSC_VER) && !defined(__ICL)
594 /*-------------------------------------------------------------------------*/
597 # if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
598 # define OSG_WIN_TYPES
599 // Use windows threads
600 # define OSG_USE_WINTHREADS
601 // general float math
602 # define OSG_HAS_FLOATMATH
604 # define OSG_USE_STDMATH
606 # define OSG_STREAM_HAS_ISOPEN
608 // it's there, it's just called something else
609 # define OSG_HAS_VSNPRINTF
610 // vc 9.0 finally supports vsnprintf!
612 # define vsnprintf _vsnprintf
614 # define OSG_HAS_NILBUF
615 # define OSG_STREAM_RDBUF_HAS_PARAM
617 //# define OSG_MICROSOFT_COMPILER_ALERT
618 //# define OSG_MICROSOFT_COMPILER_HACKS
623 //# define OSG_HAS_TEMPLATE_RETURNVALUES
625 # define OSG_NEED_EXPLICIT_INST_FOR_STATIC
627 # define OSG_THROW_NOTHING()
629 # define OSG_WIN32_CL
631 # define OSG_FOUND_OS
633 # define OSG_TMPL_STATIC_MEMBER_NEEDS_CLASS_INSTANTIATION
635 # if _MSC_VER >= 1910
636 # define OSG_STATIC_MEMEBER_NEEDS_COPY_ASIGN_INIT 1
637 # define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE 1
640 # define OSG_MICROSOFT_DOTNET_COMPILER_HACKS
642 # if _MSC_VER >= 1300 && _MSC_VER < 1310
643 # define OSG_WIN32_CL_NET70 1
647 # define OSG_NEED_BOOL_MFIELD_SPEZ
651 # if _MSC_VER >= 1400
652 # define OSG_STDEXCEPTION_NAMESPACE std
655 # endif // defined(_MSC_VER) && !defined(__ICL)
657 /*-------------------------------------------------------------------------*/
660 # if defined(__APPLE__)
662 # define OSG_LINUX_TYPES
663 # define OSG_NO_CONCEPT_CHECKS
664 # define SIZE_T_NEQ_UINT32
666 #if defined(__x86_64)
671 # include <AvailabilityMacros.h>
672 # if !defined(MAC_OS_X_VERSION_10_5) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
673 # define OSG_GLENUM_NEQ_UINT32
676 # define OSG_USE_PTHREADS
678 # define OSG_DLSYM_NEEDS_UNDERSCORE
680 # define OSG_USE_STDMATH
682 # define OSG_FOUND_OS
684 #if TARGET_OS_IPHONE || TARGET_OS_IPHONE_SIMULATOR
685 # define OSG_APPLE_IOS 1
688 # endif // if defined(__APPLE__)
691 /*-------------------------------------------------------------------------*/
694 # if defined(__hpux) && !defined(__GNUC__)
696 /*! \brief stream->rdbuf get the new buffer as a parameter
697 * \ingroup GrpBaseDefines
700 # define OSG_STREAM_RDBUF_HAS_PARAM
702 /*! \brief stream->isopen is available
703 * \ingroup GrpBaseDefines
706 # define OSG_STREAM_HAS_ISOPEN
708 /*! \brief vsnprintf is available
709 * \ingroup GrpBaseDefines
712 # define OSG_HAS_VSNPRINTF
714 /*! \brief nilbuffer is defined in the stdlib
715 * \ingroup GrpBaseDefines
718 # define OSG_HAS_NILBUF
720 /*! \brief Use SGI internal types to define OpenSG base types
721 * \ingroup GrpBaseDefines
724 # define OSG_HPUX_TYPES
726 /*! \brief atan2f function available
727 * \ingroup GrpBaseDefines
730 # define OSG_HAS_ATANF2
732 /*! \brief General float math
733 * \ingroup GrpBaseDefines
736 # define OSG_HAS_FLOATMATH
738 /*! \brief SGI's stl implementation is available
739 * \ingroup GrpBaseDefines
742 //# define OSG_SGI_STL
745 * \ingroup GrpBaseDefines
750 /*! \brief LongLong constants have LL suffix
751 * \ingroup GrpBaseDefines
754 # define OSG_LONGLONG_HAS_LL
756 # define OSG_COMPILER_PART_SPEZ
758 # define OSG_THROW_NOTHING() __THROWSPEC_NULL
760 # define OSG_USE_PTHREADS
762 # define OSG_HPUX_ACC
764 # define OSG_FOUND_OS
766 // # define OSG_NOGLUTSUBDIR
768 # define OSG_STDEXCEPTION_NAMESPACE std
770 # endif // defined(__hpux) && !defined(__GNUC__)
773 /*-------------------------------------------------------------------------*/
776 # if defined(__sun) && !defined(__GNUC__)
778 /*! \brief stream->rdbuf get the new buffer as a parameter
779 * \ingroup GrpBaseDefines
782 # define OSG_STREAM_RDBUF_HAS_PARAM
784 /*! \brief stream->isopen is available
785 * \ingroup GrpBaseDefines
788 # define OSG_STREAM_HAS_ISOPEN
790 /*! \brief vsnprintf is available
791 * \ingroup GrpBaseDefines
794 # define OSG_HAS_VSNPRINTF
796 /*! \brief nilbuffer is defined in the stdlib
797 * \ingroup GrpBaseDefines
800 # define OSG_HAS_NILBUF
802 /*! \brief Use SGI internal types to define OpenSG base types
803 * \ingroup GrpBaseDefines
806 # define OSG_SUN_TYPES
808 /*! \brief atan2f function available
809 * \ingroup GrpBaseDefines
812 //# define OSG_HAS_ATANF2
814 /*! \brief General float math
815 * \ingroup GrpBaseDefines
818 //# define OSG_HAS_FLOATMATH
820 /*! \brief SGI's stl implementation is available
821 * \ingroup GrpBaseDefines
827 * \ingroup GrpBaseDefines
832 /*! \brief LongLong constants have LL suffix
833 * \ingroup GrpBaseDefines
836 # define OSG_LONGLONG_HAS_LL
838 # define OSG_COMPILER_PART_SPEZ
840 # define OSG_THROW_NOTHING() throw()
842 # define OSG_USE_PTHREADS
846 # define OSG_FOUND_OS
848 # define OSG_STDEXCEPTION_NAMESPACE std
850 # define OSG_NO_INT8_PNT
852 # endif // defined(__sun) && !defined(__GNUC__)
856 # error Could not determine compiler / os combination
860 #include "OSGExportDefines.h"
861 #include "OSGConfigured.h"
864 /* Mixed bag defines... */
866 // STLPORT doesn't support all of std::math
867 #if defined(STLPORT) ||defined(OSG_WITH_STLPORT)
868 #undef OSG_USE_STDMATH
871 # define OSG_USING_STD_NAMESPACE namespace std {} using namespace std;
874 /*! @name Namespace Defines
879 /** \brief Begin the osg namespace
880 * \ingroup GrpBaseDefines
883 #ifdef OSG_USE_OSG2_NAMESPACE
884 # define OSG_BEGIN_NAMESPACE namespace OSG2 {
886 # define OSG_BEGIN_NAMESPACE namespace OSG {
889 /** \brief End the osg namespace
890 * \ingroup GrpBaseDefines
893 # define OSG_END_NAMESPACE }
895 /** \brief Use the osg namespace throughout the following code.
896 * \ingroup GrpBaseDefines
899 #ifdef OSG_USE_OSG2_NAMESPACE
900 # define OSG_USING_NAMESPACE namespace OSG2 {} using namespace OSG2;
902 # define OSG_USING_NAMESPACE namespace OSG {} using namespace OSG;
905 /** \brief Import the osg namespace throughout the following code.
906 * \ingroup GrpBaseDefines
909 #ifdef OSG_USE_OSG2_NAMESPACE
910 # define OSG_IMPORT_NAMESPACE using namespace OSG2
912 # define OSG_IMPORT_NAMESPACE using namespace OSG
915 #ifdef OSG_USE_OSG2_NAMESPACE
916 # define OSG_NAMESPACE_PREFIX "OSG2"
918 # define OSG_NAMESPACE_PREFIX "OSG"
923 #ifdef OSG_USE_OSG2_NAMESPACE
927 #if defined(OSG_DLSYM_NEEDS_UNDERSCORE)
928 #define OSG_DLSYM_UNDERSCORE "_"
930 #define OSG_DLSYM_UNDERSCORE
934 # ifndef OSG_NO_WINDOWD_H_INCLUDE
935 # include <windows.h>
940 #ifndef OSG_WIN_TYPES
941 # define OSG_APIENTRY
944 # define OSG_APIENTRY APIENTRY
945 # elif defined(GLAPIENTRY)
946 # define OSG_APIENTRY GLAPIENTRY
948 # error "Neither APIENTRY nor GLAPIENTRY defined"
953 #define OSG_DEBUG_LOCK_STAT
957 #define OSG_CHECK_ARG(ARG) ARG
959 #define OSG_CHECK_ARG(ARG)
963 #define OSG_DEBUG_CHECK_ARG(ARG) ARG
965 #define OSG_DEBUG_CHECK_ARG(ARG)
968 #ifdef OSG_LONGLONG_HAS_LL
969 #define OSGLL(ARG) ARG##LL
971 #define OSGLL(ARG) ARG
978 #define OSG_ASSERT(expr) assert(expr)
980 //#define OSG_DBG_MEM
981 //#define OSG_DBG_LCK
983 // ToBeChecked Defaults
985 #if !defined(OSG_STDEXCEPTION_NAMESPACE)
986 # define OSG_STDEXCEPTION_NAMESPACE
989 #ifndef OSG_STDEXTENSION_NAMESPACE
990 # define OSG_STDEXTENSION_NAMESPACE std
993 #ifndef DOXYGEN_SHOULD_SKIP_THIS
994 # if !defined(OSG_DOC_LEVEL)
995 # define OSG_DOC_LEVEL 0
999 #define OSG_FLEX_USE_IOSTREAM_INPUT 1
1001 #define OSG_ASPECT_REFCOUNT
1003 //#define OSG_FCPTR_TYPED_STORE
1007 # define OSG_EMBEDDED
1008 # define OSG_INTERNAL_GL_ES
1009 # define OSG_GLES 100
1010 # define OSG_GL_ES_VERSION 100
1014 #define OSG_THREAD_DEBUG_SETASPECTTO
1016 // XXX: Todo: Add build support for this
1017 #if defined(OSG_ICC_GNU_COMPAT)
1019 # undef OSG_USE_HASH_COMPARE
1022 # define OSG_HASH_MAP_AS_EXT
1024 /*! \brief SGI's stl implementation is available
1025 * \ingroup GrpBaseDefines
1027 # ifdef OSG_STDEXTENSION_NAMESPACE
1028 # undef OSG_STDEXTENSION_NAMESPACE
1031 # if __GNUC_MINOR__ >=1 || __GNUC__ >= 4
1032 # define OSG_STDEXTENSION_NAMESPACE __gnu_cxx
1034 # define OSG_STDEXTENSION_NAMESPACE std
1039 #if defined(__sgi) || defined(__linux) || defined(__APPLE__) || \
1040 defined(__sun) || defined(__hpux)
1042 #if defined(__linux) || defined(__hpux) || defined(__APPLE__) || defined(__sun)
1043 # if defined(__GNUC__)
1045 # define OSG_STL_DEFAULT_ALLOCATOR(TP) std::allocator<TP>
1047 # elif defined (__ICL)
1048 # define OSG_STL_DEFAULT_ALLOCATOR(TP) std::allocator<TP>
1049 # elif defined (OSG_HPUX_ACC)
1050 # define OSG_STL_DEFAULT_ALLOCATOR(TP) std::allocator<TP>
1051 # elif defined(OSG_SUN_CC)
1052 # define OSG_STL_DEFAULT_ALLOCATOR(TP) std::allocator<TP>
1054 # define OSG_STL_DEFAULT_ALLOCATOR(TP) std::__STL_DEFAULT_ALLOCATOR(TP)
1057 # define OSG_STL_DEFAULT_ALLOCATOR(TP) std::__STL_DEFAULT_ALLOCATOR(TP)
1061 #define OSG_STL_DEFAULT_ALLOCATOR(TP) std::allocator< TP >
1064 #if (defined(__linux) && defined(__i386__)) || defined(WIN32)
1065 #define OSG_FAST_INT 1
1068 #define OSG_DOUBLEMAGICROUNDEPS (.5-1.4e-11)
1069 #define OSG_DOUBLEMAGIC double(6755399441055744.0)
1074 // OSG_DISABLE_MICROSOFT_SECURE_CXXX
1075 // -D _CRT_SECURE_NO_DEPRECATE
1076 // -D _CRT_SECURE_NO_WARNINGS
1077 // -D _CRT_NONSTDC_NO_DEPRECATE
1078 // -D _SECURE_SCL = 0
1079 // -D _SCL_SECURE_NO_WARNINGS
1080 // -D _SCL_SECURE_NO_DEPRECATE
1082 # if defined(OSG_DISABLE_MICROSOFT_SECURE_CXXX)
1083 # if !defined(_SECURE_SCL) || _SECURE_SCL != 0
1084 # error "mixed up compiler settings, OpenSG libs with OSG_DISABLE_MICROSOFT_SECURE_CXXX on, but _SECURE_SCL not set or not equal 0"
1086 # endif //OSG_DISABLE_MICROSOFT_SECURE_CXXX
1089 // OSG_DISABLE_MS_ITERATOR_DEBUGGING
1090 // -D _HAS_ITERATOR_DEBUGGING = 0
1092 # if defined(OSG_DISABLE_MS_ITERATOR_DEBUGGING)
1093 # if !defined(_HAS_ITERATOR_DEBUGGING) || _HAS_ITERATOR_DEBUGGING != 0
1094 # error "mixed up compiler settings, OpenSG libs with OSG_DISABLE_MS_ITERATOR_DEBUGGING on, but _HAS_ITERATOR_DEBUGGING not set or not equal 0"
1096 # endif // OSG_DISABLE_MS_ITERATOR_DEBUGGING
1100 #endif /* _OSGCONFIG_H_ */