--- stlport/STLport-4.5.patch.orig.port	Fri Aug  1 07:34:52 2008
+++ stlport/STLport-4.5.patch	Sun Jan 18 13:55:10 2009
@@ -367,6 +367,69 @@
 +#	$(CXX) $(CXXFLAGS) -O4 -S -pto $<  -o $@
 +
 + 
+--- misc/STLport-4.5/src/gcc-3.0-openbsd.mak	Sun Oct 26 14:46:02 2008
++++ misc/build/STLport-4.5/src/gcc-3.0-openbsd.mak	Sun Oct 26 14:41:02 2008
+@@ -1 +1,59 @@
+-dummy
++#
++# 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 -lestdc++ --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-os2.def	2008-07-18 14:14:27.000000000 +0200
 +++ misc/build/STLport-4.5/src/gcc-3.0-os2.def	2008-07-18 14:14:05.000000000 +0200
 @@ -1 +1,36 @@
@@ -597,8 +660,30 @@
  
  CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g
  CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g -fPIC
---- misc/STLport-4.5/stlport/config/stl_gcc.h	2001-09-04 19:10:16.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/config/stl_gcc.h	2008-07-18 14:14:05.000000000 +0200
+--- 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	Sun Oct 26 14:42:08 2008
+@@ -220,7 +220,8 @@
+ // 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__)
++      && !defined(__APPLE__)  && !defined(__DJGPP) && !defined(__osf__) \
++      && !defined(__OpenBSD__)
+ 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,7 +344,8 @@
+   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__)
++#elif defined (__unix)  && !defined(__FreeBSD__)  && !defined(__NetBSD__) && !defined(__APPLE__) \
++    !defined(__OpenBSD__)
+   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	Sun Oct 26 14:39:55 2008
 @@ -7,7 +7,9 @@
  # define _STLP_USE_GLIBC
  #endif
@@ -618,7 +703,7 @@
 -#   define _STLP_USE_TEMPLATE_EXPORT 1
 -#  endif
 +#  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)
@@ -634,7 +719,7 @@
 +#    define _STLP_EXPORT_TEMPLATE_KEYWORD
 +
 +#  endif /* _STLP_OWN_IOSTREAMS */
- 
++
  # endif
  
 +# if defined(__EMX__)
@@ -665,19 +750,19 @@
   /* Mac OS X needs one and only one source file to initialize all static data
    * members in template classes. Only one source file in an executable or
    * library can declare instances for such data members, otherwise duplicate
-@@ -97,7 +130,23 @@
+@@ -97,9 +130,25 @@
  #  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
-+
+ 
 +# 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
@@ -687,10 +772,12 @@
 +
 +# endif   /* __GNUC__ < 3 */
 +# endif   /* __APPLE__ */
- 
- 
++
++
  # if defined(__BEOS__) && defined(__INTEL__)
-@@ -226,8 +275,45 @@
+ #  define _STLP_NATIVE_HEADER(header) <../stlport/beos/##header##>
+ #  define _STLP_NATIVE_C_HEADER(header) <../stlport/beos/##header##>
+@@ -226,9 +275,46 @@
  
  # if (__GNUC__ >= 3)
  
@@ -701,7 +788,7 @@
 +#undef i386
 +#define i386 i386
 +#endif
-+
+ 
 +#ifdef linux
 +#undef linux
 +#define linux linux
@@ -735,9 +822,10 @@
 +#  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,6 +398,7 @@
  #   define _STLP_STATIC_TEMPLATE_DATA 1
  # endif
@@ -929,8 +1017,17 @@
  // 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	2001-09-04 19:10:18.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_config.h	2008-07-18 14:14:05.000000000 +0200
+--- misc/STLport-4.5/stlport/stl/_config.h	Tue Sep  4 19:10:18 2001
++++ misc/build/STLport-4.5/stlport/stl/_config.h	Sun Oct 26 14:43:12 2008
+@@ -162,7 +162,7 @@
+ # endif
+ 
+ /* Operating system recognition (basic) */
+-# if defined (__unix) || defined (__linux__) || defined (__QNX__) || defined (_AIX)  || defined (__NetBSD__)
++# 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
 @@ -938,7 +938,7 @@
  
  #  define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC
@@ -940,6 +1037,17 @@
  #   define _STLP_STATIC_MEMBER_DECLSPEC
  #  else
  #   define _STLP_STATIC_MEMBER_DECLSPEC _STLP_DECLSPEC
+--- misc/STLport-4.5/stlport/stl/_cwchar.h	Tue Sep  4 19:10:18 2001
++++ misc/build/STLport-4.5/stlport/stl/_cwchar.h	Sun Oct 26 14:43:56 2008
+@@ -30,7 +30,7 @@
+ # 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__\
++# 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/_fstream.h	2001-05-29 01:29:41.000000000 +0200
 +++ misc/build/STLport-4.5/stlport/stl/_fstream.h	2008-07-18 14:14:05.000000000 +0200
 @@ -45,7 +45,7 @@
@@ -1000,14 +1108,15 @@
        }
        if (0 != __remainder) {
  		__result += __remainder_rope;
---- misc/STLport-4.5/stlport/stl/_stdio_file.h	2001-03-19 08:01:09.000000000 +0100
-+++ misc/build/STLport-4.5/stlport/stl/_stdio_file.h	2008-07-18 14:14:05.000000000 +0200
+--- 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	Sun Oct 26 14:44:27 2008
 @@ -154,8 +154,45 @@
  
  # define _STLP_FILE_I_O_IDENTICAL
  
+-#elif defined (__CYGWIN__) || defined(__FreeBSD__)  || defined(__NetBSD__) || ( defined(__GNUC__) && defined(__APPLE__) )
 +#elif defined(__EMX__)
-+
+ 
 +inline int   _FILE_fd(const FILE& __f) { return __f._handle; }
 +inline char* _FILE_I_begin(const FILE& __f) { return (char*) __f._buffer; }
 +inline char* _FILE_I_next(const FILE& __f) { return (char*) __f._ptr; }
@@ -1042,8 +1151,8 @@
 +
 +# undef _STLP_FILE_I_O_IDENTICAL
 +
- #elif defined (__CYGWIN__) || defined(__FreeBSD__)  || defined(__NetBSD__) || ( defined(__GNUC__) && defined(__APPLE__) )
- 
++#elif defined (__CYGWIN__) || defined(__FreeBSD__)  || defined(__NetBSD__) || defined(__OpenBSD__) || ( defined(__GNUC__) && defined(__APPLE__) )
++
 +#include <stdio.h>
  # if 0
  inline int   _FILE_fd(const FILE& __f) { return __f._file; }
@@ -1117,8 +1226,8 @@
  #ifndef _STLP_CMATH
  #include <cmath>
  #endif
---- misc/STLport-4.5/stlport/stl/c_locale.h	2001-05-31 05:24:41.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/c_locale.h	2008-07-18 14:14:05.000000000 +0200
+--- 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	Sun Oct 26 14:45:53 2008
 @@ -167,6 +167,18 @@
  #  define _Locale_ALPHA  (_Locale_UPPER | _Locale_LOWER)
  #  define _Locale_PRINT  (_Locale_ALPHA | _Locale_DIGIT | _Locale_PUNCT | 0200 )
@@ -1138,3 +1247,12 @@
  # elif defined (__FreeBSD__)
  
  # define _Locale_CNTRL _CTYPE_C
+@@ -179,7 +191,7 @@
+ # define _Locale_PRINT _CTYPE_R
+ # define _Locale_ALPHA _CTYPE_A
+ 
+-# elif defined (__NetBSD__)
++# elif defined (__NetBSD__) || defined (__OpenBSD__)
+  
+ # define _Locale_CNTRL _C
+ # define _Locale_UPPER _U
