--- stlport/STLport-4.5.patch.orig.port	Thu Jul 26 12:20:40 2007
+++ stlport/STLport-4.5.patch	Sat Oct 27 12:50:07 2007
@@ -1,5 +1,5 @@
 *** misc/STLport-4.5/src/common_percent_rules.mak	Sat May 19 05:04:20 2001
---- misc/build/STLport-4.5/src/common_percent_rules.mak	Thu Jul 26 12:13:02 2007
+--- misc/build/STLport-4.5/src/common_percent_rules.mak	Thu Oct 25 20:44:51 2007
 ***************
 *** 1,45 ****
   
@@ -101,7 +101,7 @@
   	$(CXX) $(CXXFLAGS_STLDEBUG_dynamic) $< -E  $@
   
 *** misc/STLport-4.5/src/dll_main.cpp	Sat Aug 25 03:14:19 2001
---- misc/build/STLport-4.5/src/dll_main.cpp	Thu Jul 26 12:13:02 2007
+--- misc/build/STLport-4.5/src/dll_main.cpp	Thu Oct 25 20:44:51 2007
 ***************
 *** 147,152 ****
 --- 147,156 ----
@@ -115,8 +115,8 @@
   template class _STLP_CLASS_DECLSPEC __node_alloc<false,0>;
   template class _STLP_CLASS_DECLSPEC __node_alloc<true,0>;
   template class _STLP_CLASS_DECLSPEC __debug_alloc< __node_alloc<true,0> >;
-*** misc/STLport-4.5/src/gcc-3.0-freebsd.mak	Thu Jul 26 12:15:53 2007
---- misc/build/STLport-4.5/src/gcc-3.0-freebsd.mak	Thu Jul 26 12:13:02 2007
+*** misc/STLport-4.5/src/gcc-3.0-freebsd.mak	Thu Oct 25 21:08:00 2007
+--- misc/build/STLport-4.5/src/gcc-3.0-freebsd.mak	Thu Oct 25 20:44:51 2007
 ***************
 *** 1 ****
 ! dummy
@@ -190,8 +190,8 @@
 ! #	$(CXX) $(CXXFLAGS) -O4 -S -pto $<  -o $@
 ! 
 ! 
-*** misc/STLport-4.5/src/gcc-3.0-macosx.mak	Thu Jul 26 12:15:53 2007
---- misc/build/STLport-4.5/src/gcc-3.0-macosx.mak	Thu Jul 26 12:13:02 2007
+*** misc/STLport-4.5/src/gcc-3.0-macosx.mak	Thu Oct 25 21:08:00 2007
+--- misc/build/STLport-4.5/src/gcc-3.0-macosx.mak	Thu Oct 25 20:44:51 2007
 ***************
 *** 1 ****
 ! dummy
@@ -261,8 +261,8 @@
 ! #	$(CXX) $(CXXFLAGS) -O4 -S -pto $<  -o $@
 ! 
 ! 
-*** misc/STLport-4.5/src/gcc-3.0-mingw.mak	Thu Jul 26 12:15:53 2007
---- misc/build/STLport-4.5/src/gcc-3.0-mingw.mak	Thu Jul 26 12:13:02 2007
+*** misc/STLport-4.5/src/gcc-3.0-mingw.mak	Thu Oct 25 21:08:00 2007
+--- misc/build/STLport-4.5/src/gcc-3.0-mingw.mak	Thu Oct 25 20:44:51 2007
 ***************
 *** 1 ****
 ! dummy
@@ -373,11 +373,76 @@
 ! #	$(CXX) $(CXXFLAGS) -O4 -S -pto $<  -o $@
 ! 
 !  
-*** misc/STLport-4.5/src/gcc-3.0.mak	Thu Jul 26 12:15:53 2007
---- misc/build/STLport-4.5/src/gcc-3.0.mak	Thu Jul 26 12:13:02 2007
+*** misc/STLport-4.5/src/gcc-3.0-openbsd.mak	Thu Oct 25 21:08:00 2007
+--- misc/build/STLport-4.5/src/gcc-3.0-openbsd.mak	Thu Oct 25 20:44:51 2007
 ***************
 *** 1 ****
 ! dummy
+--- 1,59 ----
+! #
+! # Note : this makefile is for gcc-3 !
+! #
+! 
+! #
+! # compiler
+! # take these from the OOo build environment
+! CC*= gcc 
+! CXX*= g++
+! 
+! #
+! # Basename for libraries
+! #
+! LIB_BASENAME = libstlport_gcc
+! 
+! #
+! # guts for common stuff
+! #
+! LINK=ar cr
+! DYN_LINK=${CXX} ${PTHREAD_LIBS} -fPIC -lstdc++ --fexceptions -shared -o
+! 
+! OBJEXT=o
+! DYNEXT=so
+! STEXT=a
+! RM=rm -rf
+! PATH_SEP=/
+! MKDIR=mkdir -p
+! COMP=GCC$(ARCH)
+! INSTALL_STEP = install_unix 
+! 
+! all:  all_dynamic all_static symbolic_links 
+! 
+! include common_macros.mak
+! 
+! WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized
+! 
+! CXXFLAGS_COMMON = ${PTHREAD_CFLAGS} -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -fexceptions -ftemplate-depth-32 -I${STLPORT_DIR} ${WARNING_FLAGS} ${ARCH_FLAGS}
+! CFLAGS_COMMON = ${PTHREAD_CFLAGS} -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -fexceptions -I${STLPORT_DIR} ${WARNING_FLAGS} ${ARCH_FLAGS}
+! 
+! CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -O2 -fPIC
+! CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -O2 -fPIC
+! 
+! CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g -fPIC
+! CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g -fPIC
+! 
+! CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
+! CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
+! 
+! CFLAGS_RELEASE_static = $(CFLAGS_COMMON) -O2 -fPIC
+! CFLAGS_RELEASE_dynamic = $(CFLAGS_COMMON) -O2 -fPIC
+! 
+! CFLAGS_DEBUG_static = $(CFLAGS_COMMON) -g -fPIC
+! CFLAGS_DEBUG_dynamic = $(CFLAGS_COMMON) -g -fPIC
+! 
+! CFLAGS_STLDEBUG_static = $(CFLAGS_DEBUG_static) -D_STLP_DEBUG
+! CFLAGS_STLDEBUG_dynamic = $(CFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
+! 
+! include common_percent_rules.mak
+! include common_rules.mak
+*** misc/STLport-4.5/src/gcc-3.0.mak	Thu Oct 25 21:08:00 2007
+--- misc/build/STLport-4.5/src/gcc-3.0.mak	Thu Oct 25 20:44:51 2007
+***************
+*** 1 ****
+! dummy
 --- 1,69 ----
 ! #
 ! # Note : this makefile is for gcc-3 !
@@ -449,7 +514,7 @@
 ! 
 ! 
 *** misc/STLport-4.5/src/gcc-freebsd.mak	Sun Jul 29 05:36:25 2001
---- misc/build/STLport-4.5/src/gcc-freebsd.mak	Thu Jul 26 12:13:03 2007
+--- misc/build/STLport-4.5/src/gcc-freebsd.mak	Thu Oct 25 20:44:51 2007
 ***************
 *** 5,12 ****
   #
@@ -509,8 +574,61 @@
   
   CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g
   CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g -fPIC
+*** misc/STLport-4.5/src/num_put_float.cpp	Tue Sep  4 19:10:12 2001
+--- misc/build/STLport-4.5/src/num_put_float.cpp	Thu Oct 25 21:07:28 2007
+***************
+*** 47,53 ****
+  #  include <floatingpoint.h>
+  # endif
+  
+! //# if !(defined(_STLP_USE_GLIBC) || defined(__FreeBSD__) || defined(__NetBSD__) || defined (_AIX) || defined(__MVS__) || defined (__OS400__) || defined (__QNXNTO__) || defined (__APPLE__) || defined (__DJGPP))
+  # if defined (__sun) || defined (__digital__) || defined (__sgi)
+  // DEC, SGI & Solaris need this
+  #  include <values.h>
+--- 47,53 ----
+  #  include <floatingpoint.h>
+  # endif
+  
+! //# if !(defined(_STLP_USE_GLIBC) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined (_AIX) || defined(__MVS__) || defined (__OS400__) || defined (__QNXNTO__) || defined (__APPLE__) || defined (__DJGPP))
+  # if defined (__sun) || defined (__digital__) || defined (__sgi)
+  // DEC, SGI & Solaris need this
+  #  include <values.h>
+***************
+*** 220,226 ****
+  // inline bool _Stl_is_neg_inf(double x)    { return isinf(x) < 0; }  
+  inline bool _Stl_is_neg_inf(double x)    { return isinf(x) && x < 0; }
+  #elif defined(__unix) && !defined(__FreeBSD__)  && !defined(__NetBSD__) \
+!       && !defined(__APPLE__)  && !defined(__DJGPP) && !defined(__osf__)
+  inline bool _Stl_is_nan_or_inf(double x) { return IsNANorINF(x); }
+  inline bool _Stl_is_inf(double x)        { return IsNANorINF(x) && IsINF(x); }
+  inline bool _Stl_is_neg_inf(double x)    { return (IsINF(x)) && (x < 0.0); }
+--- 220,226 ----
+  // inline bool _Stl_is_neg_inf(double x)    { return isinf(x) < 0; }  
+  inline bool _Stl_is_neg_inf(double x)    { return isinf(x) && x < 0; }
+  #elif defined(__unix) && !defined(__FreeBSD__)  && !defined(__NetBSD__) \
+!       && !defined(__OpenBSD__) && !defined(__APPLE__)  && !defined(__DJGPP) && !defined(__osf__)
+  inline bool _Stl_is_nan_or_inf(double x) { return IsNANorINF(x); }
+  inline bool _Stl_is_inf(double x)        { return IsNANorINF(x) && IsINF(x); }
+  inline bool _Stl_is_neg_inf(double x)    { return (IsINF(x)) && (x < 0.0); }
+***************
+*** 343,349 ****
+    inline char* _Stl_qfcvtR(long double x, int n, int* pt, int* sign, char* buf)
+      { LOCK_CVT RETURN_CVT(fcvt, x, n, pt, sign, buf) }
+  # endif
+! #elif defined (__unix)  && !defined(__FreeBSD__)  && !defined(__NetBSD__) && !defined(__APPLE__)
+    inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf)
+      { return ecvt_r(x, n, pt, sign, buf); }
+    inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf)
+--- 343,349 ----
+    inline char* _Stl_qfcvtR(long double x, int n, int* pt, int* sign, char* buf)
+      { LOCK_CVT RETURN_CVT(fcvt, x, n, pt, sign, buf) }
+  # endif
+! #elif defined (__unix)  && !defined(__FreeBSD__)  && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__)
+    inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf)
+      { return ecvt_r(x, n, pt, sign, buf); }
+    inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf)
 *** misc/STLport-4.5/stlport/config/stl_gcc.h	Tue Sep  4 19:10:16 2001
---- misc/build/STLport-4.5/stlport/config/stl_gcc.h	Thu Jul 26 12:13:03 2007
+--- misc/build/STLport-4.5/stlport/config/stl_gcc.h	Thu Oct 25 20:44:51 2007
 ***************
 *** 7,13 ****
 --- 7,15 ----
@@ -524,7 +642,7 @@
   # if defined(__FreeBSD__) || defined (__hpux)
   #  define _STLP_NO_WCHAR_T
 ***************
-*** 51,60 ****
+*** 51,61 ****
   #  define _STLP_CLASS_EXPORT_DECLSPEC __attribute__((dllexport))
   #  define _STLP_CALL
   
@@ -535,30 +653,32 @@
   
   # endif
   
---- 53,75 ----
+  #if (defined(__linux__) /* && ! defined (_GNU_SOURCE) */ ) || \
+--- 53,76 ----
   #  define _STLP_CLASS_EXPORT_DECLSPEC __attribute__((dllexport))
   #  define _STLP_CALL
   
 ! #  if !defined (_STLP_NO_OWN_IOSTREAMS)
-! 
-! #    if ( defined (__DLL) || defined (_DLL) || defined (_WINDLL) || defined (_RTLDLL) \
-!      || defined(_AFXDLL) || defined (_STLP_USE_DYNAMIC_LIB) ) \
-!        && ! defined (_STLP_USE_STATIC_LIB)
-! #      undef  _STLP_USE_DECLSPEC
-! #      define _STLP_USE_DECLSPEC 1
-! /*     Using dynamic library in MinGW requires _STLP_NO_CUSTOM_IO */
-! #      define _STLP_NO_CUSTOM_IO
-! #    endif
-! 
-! #    ifndef _STLP_IMPORT_TEMPLATE_KEYWORD
-! #     define _STLP_IMPORT_TEMPLATE_KEYWORD  extern
-! #    endif
-! #    define _STLP_EXPORT_TEMPLATE_KEYWORD
-! 
-! #  endif /* _STLP_OWN_IOSTREAMS */
   
++ #    if ( defined (__DLL) || defined (_DLL) || defined (_WINDLL) || defined (_RTLDLL) \
++      || defined(_AFXDLL) || defined (_STLP_USE_DYNAMIC_LIB) ) \
++        && ! defined (_STLP_USE_STATIC_LIB)
++ #      undef  _STLP_USE_DECLSPEC
++ #      define _STLP_USE_DECLSPEC 1
++ /*     Using dynamic library in MinGW requires _STLP_NO_CUSTOM_IO */
++ #      define _STLP_NO_CUSTOM_IO
++ #    endif
++ 
++ #    ifndef _STLP_IMPORT_TEMPLATE_KEYWORD
++ #     define _STLP_IMPORT_TEMPLATE_KEYWORD  extern
++ #    endif
++ #    define _STLP_EXPORT_TEMPLATE_KEYWORD
++ 
++ #  endif /* _STLP_OWN_IOSTREAMS */
++ 
   # endif
   
+  #if (defined(__linux__) /* && ! defined (_GNU_SOURCE) */ ) || \
 ***************
 *** 75,80 ****
 --- 90,97 ----
@@ -571,40 +691,44 @@
     * members in template classes. Only one source file in an executable or
     * library can declare instances for such data members, otherwise duplicate
 ***************
-*** 97,103 ****
+*** 97,105 ****
   #  define _STLP_NATIVE_CPP_C_HEADER(header) <../g++/##header##>
   #  define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../g++/##header##>
   #  define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../g++/##header##>
-! # endif
+- # endif
   
   
   # if defined(__BEOS__) && defined(__INTEL__)
---- 114,136 ----
+  #  define _STLP_NATIVE_HEADER(header) <../stlport/beos/##header##>
+  #  define _STLP_NATIVE_C_HEADER(header) <../stlport/beos/##header##>
+--- 114,138 ----
   #  define _STLP_NATIVE_CPP_C_HEADER(header) <../g++/##header##>
   #  define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../g++/##header##>
   #  define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../g++/##header##>
-! 
-! # else
-! /* Mac OS X using gcc 3.3 handles all well */
-! #   undef  _STLP_NO_STATIC_TEMPLATE_DATA
-! #   define _STLP_STATIC_TEMPLATE_DATA 1
-! #   define _STLP_WEAK_ATTRIBUTE 1
-! #   undef _STLP_NO_LONG_DOUBLE
-! 
-! #if 0
-!  /* Mac OS X needs all "::" scope references to be "std::" */
-!  #  define _STLP_NO_CSTD_FUNCTION_IMPORTS
-!  #  undef _STLP_VENDOR_GLOBAL_STD
-!  #  undef _STLP_VENDOR_GLOBAL_CSTD
-! #endif
-! 
-! # endif   /* __GNUC__ < 3 */
-! # endif   /* __APPLE__ */
   
++ # else
++ /* Mac OS X using gcc 3.3 handles all well */
++ #   undef  _STLP_NO_STATIC_TEMPLATE_DATA
++ #   define _STLP_STATIC_TEMPLATE_DATA 1
++ #   define _STLP_WEAK_ATTRIBUTE 1
++ #   undef _STLP_NO_LONG_DOUBLE
   
++ #if 0
++  /* Mac OS X needs all "::" scope references to be "std::" */
++  #  define _STLP_NO_CSTD_FUNCTION_IMPORTS
++  #  undef _STLP_VENDOR_GLOBAL_STD
++  #  undef _STLP_VENDOR_GLOBAL_CSTD
++ #endif
++ 
++ # endif   /* __GNUC__ < 3 */
++ # endif   /* __APPLE__ */
++ 
++ 
   # if defined(__BEOS__) && defined(__INTEL__)
+  #  define _STLP_NATIVE_HEADER(header) <../stlport/beos/##header##>
+  #  define _STLP_NATIVE_C_HEADER(header) <../stlport/beos/##header##>
 ***************
-*** 226,233 ****
+*** 226,234 ****
   
   # if (__GNUC__ >= 3)
   
@@ -613,7 +737,8 @@
   
   # elif (__GNUC_MINOR__ < 8)
   
---- 259,303 ----
+  #  define _STLP_NO_OWN_IOSTREAMS 1
+--- 259,304 ----
   
   # if (__GNUC__ >= 3)
   
@@ -622,43 +747,44 @@
 ! #undef i386
 ! #define i386 i386
 ! #endif
-! 
-! #ifdef linux
-! #undef linux
-! #define linux linux
-! #endif
-! 
-! #ifdef mips
-! #undef mips
-! #define mips mips
-! #endif
-! 
-! #ifdef sgi
-! #undef sgi
-! #define sgi sgi
-! #endif
-! 
-! #ifdef sun
-! #undef sun
-! #define sun sun
-! #endif
-! 
-! #ifdef sparc
-! #undef sparc
-! #define sparc sparc
-! #endif
-! 
-! #ifdef powerpc
-! #undef powerpc
-! #define powerpc powerpc
-! #endif
-! 
-! #  define _STLP_NATIVE_INCLUDE_PATH GXX_INCLUDE_PATH
-! #  define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH \
-!           GXX_INCLUDE_PATH/backward
   
++ #ifdef linux
++ #undef linux
++ #define linux linux
++ #endif
++ 
++ #ifdef mips
++ #undef mips
++ #define mips mips
++ #endif
++ 
++ #ifdef sgi
++ #undef sgi
++ #define sgi sgi
++ #endif
++ 
++ #ifdef sun
++ #undef sun
++ #define sun sun
++ #endif
++ 
++ #ifdef sparc
++ #undef sparc
++ #define sparc sparc
++ #endif
++ 
++ #ifdef powerpc
++ #undef powerpc
++ #define powerpc powerpc
++ #endif
++ 
++ #  define _STLP_NATIVE_INCLUDE_PATH GXX_INCLUDE_PATH
++ #  define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH \
++           GXX_INCLUDE_PATH/backward
++ 
   # elif (__GNUC_MINOR__ < 8)
   
+  #  define _STLP_NO_OWN_IOSTREAMS 1
 ***************
 *** 312,317 ****
   #   define _STLP_STATIC_TEMPLATE_DATA 1
@@ -676,7 +802,7 @@
 ! #    define _STLP_VENDOR_GLOBAL_CSTD       1
 ! #endif
 *** misc/STLport-4.5/stlport/cwchar	Sat Jan 27 02:39:42 2001
---- misc/build/STLport-4.5/stlport/cwchar	Thu Jul 26 12:13:03 2007
+--- misc/build/STLport-4.5/stlport/cwchar	Thu Oct 25 20:44:51 2007
 ***************
 *** 21,26 ****
 --- 21,29 ----
@@ -690,7 +816,7 @@
   
   # if (_STLP_OUTERMOST_HEADER_ID == 0x120)
 *** misc/STLport-4.5/stlport/stdexcept	Tue May 22 02:50:21 2001
---- misc/build/STLport-4.5/stlport/stdexcept	Thu Jul 26 12:13:03 2007
+--- misc/build/STLport-4.5/stlport/stdexcept	Thu Oct 25 20:44:51 2007
 ***************
 *** 49,54 ****
 --- 49,61 ----
@@ -708,7 +834,7 @@
   public:
     __Named_exception(const string& __str) 
 *** misc/STLport-4.5/stlport/stl/_bvector.h	Wed May 30 05:45:41 2001
---- misc/build/STLport-4.5/stlport/stl/_bvector.h	Thu Jul 26 12:13:03 2007
+--- misc/build/STLport-4.5/stlport/stl/_bvector.h	Thu Oct 25 20:44:51 2007
 ***************
 *** 34,40 ****
   # include <stl/_vector.h>
@@ -963,7 +1089,7 @@
   #endif /* _STLP_INTERNAL_BVECTOR_H */
   
 *** misc/STLport-4.5/stlport/stl/_complex.h	Fri Jul  6 06:16:17 2001
---- misc/build/STLport-4.5/stlport/stl/_complex.h	Thu Jul 26 12:13:03 2007
+--- misc/build/STLport-4.5/stlport/stl/_complex.h	Thu Oct 25 20:44:51 2007
 ***************
 *** 18,23 ****
 --- 18,27 ----
@@ -977,8 +1103,46 @@
   // This header declares the template class complex, as described in 
   // in the draft C++ standard.  Single-precision complex numbers
   // are complex<float>, double-precision are complex<double>, and
+*** misc/STLport-4.5/stlport/stl/_config.h	Tue Sep  4 19:10:18 2001
+--- misc/build/STLport-4.5/stlport/stl/_config.h	Thu Oct 25 20:45:55 2007
+***************
+*** 162,168 ****
+  # endif
+  
+  /* Operating system recognition (basic) */
+! # if defined (__unix) || defined (__linux__) || defined (__QNX__) || defined (_AIX)  || defined (__NetBSD__)
+  #  define _STLP_UNIX 1
+  #  if defined (__linux__) && ! defined (_STLP_USE_GLIBC)
+  #   define _STLP_USE_GLIBC 1
+--- 162,168 ----
+  # endif
+  
+  /* Operating system recognition (basic) */
+! # if defined (__unix) || defined (__linux__) || defined (__QNX__) || defined (_AIX)  || defined (__NetBSD__) || defined(__OpenBSD__)
+  #  define _STLP_UNIX 1
+  #  if defined (__linux__) && ! defined (_STLP_USE_GLIBC)
+  #   define _STLP_USE_GLIBC 1
+*** misc/STLport-4.5/stlport/stl/_cwchar.h	Tue Sep  4 19:10:18 2001
+--- misc/build/STLport-4.5/stlport/stl/_cwchar.h	Thu Oct 25 21:05:59 2007
+***************
+*** 30,36 ****
+  # if !  defined (_STLP_NO_CWCHAR) && defined  (_STLP_USE_NEW_C_HEADERS)
+  #  include _STLP_NATIVE_CPP_C_HEADER(cwchar)
+  
+! # elif defined (__MRC__) || defined (__SC__) || defined (__BORLANDC__) || defined(__FreeBSD__) || (defined (__GNUC__) && defined (__APPLE__\
+  )) || defined (_STLP_NO_WCHAR_T)
+  
+  #  include _STLP_NATIVE_C_HEADER(stddef.h)
+--- 30,36 ----
+  # if !  defined (_STLP_NO_CWCHAR) && defined  (_STLP_USE_NEW_C_HEADERS)
+  #  include _STLP_NATIVE_CPP_C_HEADER(cwchar)
+  
+! # elif defined (__MRC__) || defined (__SC__) || defined (__BORLANDC__) || defined(__FreeBSD__) || defined (__OpenBSD__) || (defined (__GNUC__) && defined (__APPLE__\
+  )) || defined (_STLP_NO_WCHAR_T)
+  
+  #  include _STLP_NATIVE_C_HEADER(stddef.h)
 *** misc/STLport-4.5/stlport/stl/_ios_base.h	Tue Sep  4 19:10:18 2001
---- misc/build/STLport-4.5/stlport/stl/_ios_base.h	Thu Jul 26 12:13:03 2007
+--- misc/build/STLport-4.5/stlport/stl/_ios_base.h	Thu Oct 25 20:44:51 2007
 ***************
 *** 291,297 ****
   template <class Facet>
@@ -997,7 +1161,7 @@
   
   // ----------------------------------------------------------------------
 *** misc/STLport-4.5/stlport/stl/_rope.h	Mon Aug  6 04:21:25 2001
---- misc/build/STLport-4.5/stlport/stl/_rope.h	Thu Jul 26 12:13:03 2007
+--- misc/build/STLport-4.5/stlport/stl/_rope.h	Thu Oct 25 20:44:51 2007
 ***************
 *** 1470,1476 ****
       rope<_CharT,_Alloc> __remainder_rope;
@@ -1032,8 +1196,27 @@
         }
         if (0 != __remainder) {
   		__result += __remainder_rope;
+*** misc/STLport-4.5/stlport/stl/_stdio_file.h	Mon Mar 19 08:01:09 2001
+--- misc/build/STLport-4.5/stlport/stl/_stdio_file.h	Thu Oct 25 21:06:21 2007
+***************
+*** 154,160 ****
+  
+  # define _STLP_FILE_I_O_IDENTICAL
+  
+! #elif defined (__CYGWIN__) || defined(__FreeBSD__)  || defined(__NetBSD__) || ( defined(__GNUC__) && defined(__APPLE__) )
+  
+  # if 0
+  inline int   _FILE_fd(const FILE& __f) { return __f._file; }
+--- 154,160 ----
+  
+  # define _STLP_FILE_I_O_IDENTICAL
+  
+! #elif defined (__CYGWIN__) || defined(__FreeBSD__)  || defined(__NetBSD__) || defined(__OpenBSD__) || ( defined(__GNUC__) && defined(__APPLE__) )
+  
+  # if 0
+  inline int   _FILE_fd(const FILE& __f) { return __f._file; }
 *** misc/STLport-4.5/stlport/stl/_threads.h	Tue Sep  4 19:10:20 2001
---- misc/build/STLport-4.5/stlport/stl/_threads.h	Thu Jul 26 12:13:03 2007
+--- misc/build/STLport-4.5/stlport/stl/_threads.h	Thu Oct 25 20:44:51 2007
 ***************
 *** 42,49 ****
   #  include <cstdlib>
@@ -1054,7 +1237,7 @@
   # endif
   
 *** misc/STLport-4.5/stlport/stl/_valarray.h	Wed May 30 05:45:42 2001
---- misc/build/STLport-4.5/stlport/stl/_valarray.h	Thu Jul 26 12:15:24 2007
+--- misc/build/STLport-4.5/stlport/stl/_valarray.h	Thu Oct 25 20:44:51 2007
 ***************
 *** 19,24 ****
 --- 19,28 ----
@@ -1068,3 +1251,22 @@
   #ifndef _STLP_CMATH
   #include <cmath>
   #endif
+*** misc/STLport-4.5/stlport/stl/c_locale.h	Thu May 31 05:24:41 2001
+--- misc/build/STLport-4.5/stlport/stl/c_locale.h	Thu Oct 25 21:06:37 2007
+***************
+*** 179,185 ****
+  # define _Locale_PRINT _CTYPE_R
+  # define _Locale_ALPHA _CTYPE_A
+  
+! # elif defined (__NetBSD__)
+   
+  # define _Locale_CNTRL _C
+  # define _Locale_UPPER _U
+--- 179,185 ----
+  # define _Locale_PRINT _CTYPE_R
+  # define _Locale_ALPHA _CTYPE_A
+  
+! # elif defined (__NetBSD__) || defined (__OpenBSD__)
+   
+  # define _Locale_CNTRL _C
+  # define _Locale_UPPER _U
