Commits

Anonymous committed a6913c9

cmcfixes77: #i113503# system non-stlport cppunit with OOo stlport

Comments (0)

Files changed (57)

basebmp/test/basictest.cxx

 
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
 #include "cppunit/plugin/TestPlugIn.h"
+#include "postextstl.h"
 
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/point/b2ipoint.hxx>

basebmp/test/bmpmasktest.cxx

 
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/range/b2irange.hxx>

basebmp/test/bmptest.cxx

 
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/range/b2irange.hxx>

basebmp/test/cliptest.cxx

 
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/point/b2ipoint.hxx>

basebmp/test/filltest.cxx

 
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/range/b2drange.hxx>

basebmp/test/linetest.cxx

 
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/point/b2ipoint.hxx>

basebmp/test/makefile.mk

 .ENDIF
 .ENDIF
 
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
 CFLAGSCXX += $(CPPUNIT_CFLAGS)
 
 # --- Common ----------------------------------------------------------

basebmp/test/masktest.cxx

 
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/range/b2irange.hxx>

basebmp/test/polytest.cxx

 
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/range/b2irange.hxx>

basegfx/test/basegfx1d.cxx

 #include "precompiled_basegfx.hxx"
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
 #include "cppunit/plugin/TestPlugIn.h"
+#include "postextstl.h"
 
 namespace basegfx1d
 {

basegfx/test/basegfx2d.cxx

 #include "precompiled_basegfx.hxx"
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>

basegfx/test/basegfx3d.cxx

 #include "precompiled_basegfx.hxx"
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 namespace basegfx3d
 {

basegfx/test/basegfxtools.cxx

 #include "precompiled_basegfx.hxx"
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/tools/keystoplerp.hxx>
 #include <basegfx/numeric/ftools.hxx>

basegfx/test/boxclipper.cxx

 #include "precompiled_basegfx.hxx"
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/curve/b2dcubicbezier.hxx>

basegfx/test/clipstate.cxx

 #include "precompiled_basegfx.hxx"
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/tools/b2dclipstate.hxx>
 #include <basegfx/range/b2dpolyrange.hxx>

basegfx/test/genericclipper.cxx

 #include "precompiled_basegfx.hxx"
 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/curve/b2dcubicbezier.hxx>

basegfx/test/makefile.mk

 
 .INCLUDE :  settings.mk
 
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
 CFLAGSCXX += $(CPPUNIT_CFLAGS)
 
 # --- Common ----------------------------------------------------------
    { (exit 1); exit 1; }; }
   fi
 
-    echo "$as_me:$LINENO: checking STL compatibility" >&5
-echo $ECHO_N "checking STL compatibility... $ECHO_C" >&6
-    if test "$WITH_STLPORT" != "no"; then
-	{ { echo "$as_me:$LINENO: error: to use system cppunit you need to use --without-stlport" >&5
-echo "$as_me: error: to use system cppunit you need to use --without-stlport" >&2;}
-   { (exit 1); exit 1; }; }
-    else
-	echo "$as_me:$LINENO: result: OK" >&5
-echo "${ECHO_T}OK" >&6
-    fi
 else
     echo "$as_me:$LINENO: result: internal" >&5
 echo "${ECHO_T}internal" >&6
     # a system-cppunit before the first version using a proper cppunit
     # (and that being 1.12.1) anyway
     PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.1 )
-    AC_MSG_CHECKING([STL compatibility])
-    if test "$WITH_STLPORT" != "no"; then
-	AC_MSG_ERROR([to use system cppunit you need to use --without-stlport])
-    else
-	AC_MSG_RESULT([OK])	
-    fi
 else
     AC_MSG_RESULT([internal])
     SYSTEM_CPPUNIT=NO

mysqlc/source/mysqlc_connection.cxx

 #include "mysqlc_preparedstatement.hxx"
 #include "mysqlc_general.hxx"
 
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <cppconn/driver.h>
 #include <cppconn/connection.h>
 #include <cppconn/statement.h>
 #include <cppconn/metadata.h>
 #include <cppconn/exception.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 #include <com/sun/star/sdbc/ColumnValue.hpp>
 #include <com/sun/star/sdbc/XRow.hpp>

mysqlc/source/mysqlc_connection.hxx

 #include <com/sun/star/sdbc/XWarningsSupplier.hpp>
 #include <com/sun/star/util/XStringSubstitution.hpp>
 
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <cppconn/driver.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 #include <cppuhelper/compbase3.hxx>
 #include <cppuhelper/weakref.hxx>
 #include <rtl/string.hxx>

mysqlc/source/mysqlc_databasemetadata.cxx

 using ::rtl::OUString;
 using mysqlc_sdbc_driver::getStringFromAny;
 
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <cppconn/connection.h>
 #include <cppconn/resultset.h>
 #include <cppconn/metadata.h>
 #include <cppconn/statement.h>
 #include <cppconn/prepared_statement.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 static ext_std::string wild("%");
 

mysqlc/source/mysqlc_databasemetadata.hxx

 #include <cppuhelper/implbase1.hxx>
 #endif
 
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <cppconn/metadata.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 namespace connectivity
 {

mysqlc/source/mysqlc_driver.cxx

 using ::rtl::OUString;
 #include <stdio.h>
 
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <cppconn/exception.h>
-
 #ifdef SYSTEM_MYSQL_CPPCONN
     #include <mysql_driver.h>
 #endif
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 
 /* {{{ MysqlCDriver::MysqlCDriver() -I- */

mysqlc/source/mysqlc_driver.hxx

 #include <com/sun/star/lang/XServiceInfo.hpp>
 
 #include <cppuhelper/compbase2.hxx>
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <cppconn/driver.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 #include <osl/module.h>
 
 namespace connectivity

mysqlc/source/mysqlc_general.hxx

 #include <com/sun/star/uno/XInterface.hpp>
 #include <com/sun/star/sdbc/SQLException.hpp>
 
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <cppconn/exception.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 namespace mysqlc_sdbc_driver
 {

mysqlc/source/mysqlc_preparedstatement.hxx

 #include <com/sun/star/io/XInputStream.hpp>
 #endif
 
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <cppconn/prepared_statement.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 namespace connectivity
 {

mysqlc/source/mysqlc_resultsetmetadata.hxx

 #include <com/sun/star/sdbc/XResultSetMetaData.hpp>
 
 #include <cppuhelper/implbase1.hxx>
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <cppconn/resultset_metadata.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 namespace connectivity
 {

mysqlc/source/mysqlc_statement.hxx

 #include <com/sun/star/sdbc/XWarningsSupplier.hpp>
 #include <com/sun/star/util/XCancellable.hpp>
 
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <cppconn/statement.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 #include <cppuhelper/compbase5.hxx>
 #include <list>
 

o3tl/qa/makefile.mk

 
 .INCLUDE :  settings.mk
 
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
 CFLAGSCXX += $(CPPUNIT_CFLAGS)
 
 .IF "$(L10N_framework)"==""

o3tl/qa/test-cow_wrapper.cxx

 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
 #include "cppunit/plugin/TestPlugIn.h"
+#include "postextstl.h"
 
 #include "cow_wrapper_clients.hxx"
 

o3tl/qa/test-heap_ptr.cxx

  *
  ************************************************************************/
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <o3tl/heap_ptr.hxx>
 

o3tl/qa/test-range.cxx

  *
  ************************************************************************/
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <o3tl/range.hxx>
 #include <vector>

o3tl/qa/test-vector_pool.cxx

 // autogenerated file with codegen.pl
 
+#include "preextstl.h"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
 
 #include <o3tl/vector_pool.hxx>
 

sal/cppunittester/cppunittester.cxx

 #include <cstdlib>
 #include <iostream>
 
+#include "preextstl.h"
 #include "cppunit/CompilerOutputter.h"
 #include "cppunit/TestResult.h"
 #include "cppunit/TestResultCollector.h"
 #include "cppunit/extensions/TestFactoryRegistry.h"
 #include "cppunit/plugin/PlugInManager.h"
 #include "cppunit/portability/Stream.h"
+#include "postextstl.h"
 #include "osl/thread.h"
 #include "rtl/process.h"
 #include "rtl/string.hxx"

sal/cppunittester/makefile.mk

 
 .INCLUDE: settings.mk
 
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
 CFLAGSCXX += $(CPPUNIT_CFLAGS)
 
 OBJFILES = $(APP1OBJS)

sax/qa/cppunit/makefile.mk

 
 .INCLUDE :  settings.mk
 
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
 CFLAGSCXX += $(CPPUNIT_CFLAGS)
 DLLPRE = # no leading "lib" on .so files
 

sax/qa/cppunit/test_converter.cxx

  *
  ************************************************************************/
 
+#include "preextstl.h"
 #include <cppunit/TestAssert.h>
 #include <cppunit/TestFixture.h>
 #include <cppunit/extensions/HelperMacros.h>
 #include <cppunit/plugin/TestPlugIn.h>
+#include "postextstl.h"
 
 #include <rtl/ustrbuf.hxx>
 

sfx2/qa/cppunit/makefile.mk

 
 .INCLUDE :  settings.mk
 
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
 CFLAGSCXX += $(CPPUNIT_CFLAGS)
 DLLPRE = # no leading "lib" on .so files
 

sfx2/qa/cppunit/test_metadatable.cxx

 
 #include "precompiled_sfx2.hxx"
 
+#include "preextstl.h"
 #include <cppunit/TestAssert.h>
 #include <cppunit/TestFixture.h>
 #include <cppunit/extensions/HelperMacros.h>
 #include <cppunit/plugin/TestPlugIn.h>
+#include "postextstl.h"
 
 #include <rtl/ustrbuf.hxx>
 

smoketestoo_native/makefile.mk

 
 CFLAGSCXX += $(CPPUNIT_CFLAGS)
 
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
 SLOFILES = $(SHL1OBJS)
 
 SHL1TARGET = smoketest

smoketestoo_native/smoketest.cxx

 #include "com/sun/star/uno/RuntimeException.hpp"
 #include "com/sun/star/uno/Sequence.hxx"
 #include "com/sun/star/util/URL.hpp"
+#include <preextstl.h>
 #include "cppuhelper/implbase1.hxx"
 #include "cppunit/TestAssert.h"
 #include "cppunit/TestFixture.h"
 #include "cppunit/extensions/HelperMacros.h"
 #include "cppunit/plugin/TestPlugIn.h"
+#include <postextstl.h>
 #include "osl/conditn.hxx"
 #include "osl/diagnose.h"
 #include "rtl/ustring.h"

stlport/prj/d.lst

 ..\%__SRC%\inc\stlport\using\h\* %_DEST%\inc%_EXT%\stl\using\h\*
 ..\%__SRC%\inc\stlport\wrap_std\* %_DEST%\inc%_EXT%\stl\wrap_std\*
 ..\%__SRC%\inc\stlport\wrap_std\h\* %_DEST%\inc%_EXT%\stl\wrap_std\h\*
+..\systemstlguards\*.h %_DEST%\inc%_EXT%\stl\*.h
 ..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so
 ..\%__SRC%\lib\lib*.a %_DEST%\lib%_EXT%\lib*.a
 ..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%\*.lib

stlport/systemstlguards/postextstl.h

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef std_was_redefined_as_stlport
+//  put things back the way they were
+#   define std std_was_redefined_as_stlport
+#   undef _STLP_OUTERMOST_HEADER_ID
+//  force config to be re-read
+#   undef _STLP_NOTHROW_INHERENTLY
+#   undef _STLP_CONFIG_H
+#   include <stddef.h>
+#endif

stlport/systemstlguards/preextstl.h

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+//1. Force inclusion of a std:: using header to ensure the stlport define
+//of std as "stlport"
+#include <algorithm>
+#if defined(ADAPT_EXT_STL)
+//2. Force inclusion of stlport headers to get their stlport:: definitions
+#   include <ostream>
+#   include <istream>
+#   include <fstream>
+#   include <iostream>
+#   include <sstream>
+#   include <vector>
+#   include <deque>
+#   include <set>
+#   include <list>
+#   include <map>
+//3. Now force inclusion of native headers to get their std:: definitions
+#   if defined(std)
+#       define std_was_redefined_as_stlport std
+#       undef std
+#       define _STLP_OUTERMOST_HEADER_ID 0xdeadbeaf
+#       if defined(_GNUC__)
+#           pragma GCC visibility push(default)
+#       endif
+#       include _STLP_NATIVE_HEADER(exception_defines.h)
+#       include _STLP_NATIVE_HEADER(limits)
+#       include _STLP_NATIVE_HEADER(memory)
+#       include _STLP_NATIVE_HEADER(exception)
+#       include _STLP_NATIVE_HEADER(iosfwd)
+#       include _STLP_NATIVE_HEADER(algorithm)
+#       include _STLP_NATIVE_HEADER(string)
+#       include _STLP_NATIVE_HEADER(streambuf)
+#       include _STLP_NATIVE_HEADER(ios)
+#       include _STLP_NATIVE_HEADER(locale)
+#       include _STLP_NATIVE_HEADER(stdexcept)
+#       include _STLP_NATIVE_HEADER(ostream)
+#       include _STLP_NATIVE_HEADER(istream)
+#       include _STLP_NATIVE_HEADER(iostream)
+#       include _STLP_NATIVE_HEADER(sstream)
+#       include _STLP_NATIVE_HEADER(vector)
+#       include _STLP_NATIVE_HEADER(deque)
+#       include _STLP_NATIVE_HEADER(set)
+#       include _STLP_NATIVE_HEADER(list)
+#       include _STLP_NATIVE_HEADER(map)
+#       if defined(_GNUC__)
+#           pragma GCC visibility pop
+#       endif
+#   endif
+#endif
+//ext_std resolves to the std that external c++ libs, e.g. Graphite were built
+//against regardless of whether that is stlport or system stl
+namespace ext_std = std;

test/source/cpp/makefile.mk

 CDEFS += -DOOO_DLLIMPLEMENTATION_TEST
 CFLAGSCXX += $(CPPUNIT_CFLAGS)
 
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
 SLOFILES = \
     $(SLO)/getargument.obj \
     $(SLO)/officeconnection.obj \

test/source/cpp/officeconnection.cxx

 #include "com/sun/star/lang/XMultiServiceFactory.hpp"
 #include "com/sun/star/uno/Reference.hxx"
 #include "cppuhelper/bootstrap.hxx"
+#include <preextstl.h>
 #include "cppunit/TestAssert.h"
+#include <postextstl.h>
 #include "osl/process.h"
 #include "osl/time.h"
 #include "sal/types.h"

tools/inc/tools/postextstl.h

-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifdef std_was_redefined_as_stlport
-//  put things back the way they were
-#   define std std_was_redefined_as_stlport
-#   undef _STLP_OUTERMOST_HEADER_ID
-//  force config to be re-read
-#   undef _STLP_NOTHROW_INHERENTLY
-#   undef _STLP_CONFIG_H
-#   include <stddef.h>
-#endif

tools/inc/tools/preextstl.h

-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-//1. Force inclusion of a std:: using header to ensure the stlport define
-//of std as "stlport"
-#include <algorithm>
-#if defined(ADAPT_EXT_STL)
-//2. Force inclusion of stlport headers to get their stlport:: definitions
-#   include <ostream>
-#   include <istream>
-#   include <fstream>
-#   include <iostream>
-#   include <vector>
-#   include <list>
-#   include <map>
-//3. Now force inclusion of native headers to get their std:: definitions
-#   if defined(std)
-#       define std_was_redefined_as_stlport std
-#       undef std
-#       define _STLP_OUTERMOST_HEADER_ID 0xdeadbeaf
-#       if defined(_GNUC__)
-#           pragma GCC visibility push(default)
-#       endif
-#       include _STLP_NATIVE_HEADER(exception_defines.h)
-#       include _STLP_NATIVE_HEADER(limits)
-#       include _STLP_NATIVE_HEADER(memory)
-#       include _STLP_NATIVE_HEADER(exception)
-#       include _STLP_NATIVE_HEADER(iosfwd)
-#       include _STLP_NATIVE_HEADER(algorithm)
-#       include _STLP_NATIVE_HEADER(string)
-#       include _STLP_NATIVE_HEADER(streambuf)
-#       include _STLP_NATIVE_HEADER(ios)
-#       include _STLP_NATIVE_HEADER(locale)
-#       include _STLP_NATIVE_HEADER(stdexcept)
-#       include _STLP_NATIVE_HEADER(ostream)
-#       include _STLP_NATIVE_HEADER(istream)
-#       include _STLP_NATIVE_HEADER(iostream)
-#       include _STLP_NATIVE_HEADER(vector)
-#       include _STLP_NATIVE_HEADER(list)
-#       include _STLP_NATIVE_HEADER(map)
-#       if defined(_GNUC__)
-#           pragma GCC visibility pop
-#       endif
-#   endif
-#endif
-//ext_std resolves to the std that external c++ libs, e.g. Graphite were built
-//against regardless of whether that is stlport or system stl
-namespace ext_std = std;
 ..\inc\tools\postx.h %_DEST%\inc%_EXT%\tools\postx.h
 ..\inc\tools\prex.h %_DEST%\inc%_EXT%\tools\prex.h
 
-..\inc\tools\postextstl.h %_DEST%\inc%_EXT%\tools\postextstl.h
-..\inc\tools\preextstl.h %_DEST%\inc%_EXT%\tools\preextstl.h
-
 ..\inc\tools\svlibrary.hxx %_DEST%\inc%_EXT%\tools\svlibrary.hxx
 ..\inc\tools\solarmutex.hxx %_DEST%\inc%_EXT%\tools\solarmutex.hxx
 ..\inc\tools\wintypes.hxx %_DEST%\inc%_EXT%\tools\wintypes.hxx

vcl/inc/vcl/graphite_adaptors.hxx

 #include "vcl/dllapi.h"
 
 // Libraries
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <graphite/GrClient.h>
 #include <graphite/Font.h>
 #include <graphite/ITextSource.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 // Module type definitions and forward declarations.
 //

vcl/inc/vcl/graphite_features.hxx

 // Parse a string of features specified as ; separated pairs.
 // e.g.
 // 1001=1&2002=2&fav1=0
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <graphite/GrClient.h>
 #include <graphite/Font.h>
 #include <graphite/GrFeature.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 namespace grutils
 {

vcl/inc/vcl/graphite_layout.hxx

 #include <vector>
 #include <utility>
 // Libraries
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <graphite/GrClient.h>
 #include <graphite/Font.h>
 #include <graphite/GrConstants.h>
 #include <graphite/GrAppData.h>
 #include <graphite/SegmentAux.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 // Platform
 #include <vcl/sallayout.hxx>
 #include <vcl/dllapi.h>

vcl/source/glyphs/graphite_cache.cxx

 #include <tools/debug.hxx>
 #include <vcl/sallayout.hxx>
 
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <graphite/GrClient.h>
 #include <graphite/Segment.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 #include <rtl/ustring.hxx>
 #include <vcl/graphite_layout.hxx>

vcl/source/glyphs/graphite_layout.cxx

 #include <unicode/uscript.h>
 
 // Graphite Libraries (must be after vcl headers on windows)
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <graphite/GrClient.h>
 #include <graphite/Font.h>
 #include <graphite/ITextSource.h>
 #include <graphite/Segment.h>
 #include <graphite/SegmentPainter.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 #include <vcl/graphite_layout.hxx>
 #include <vcl/graphite_features.hxx>

vcl/source/glyphs/graphite_textsrc.hxx

 #include "vcl/dllapi.h"
 
 // Libraries
-#include <tools/preextstl.h>
+#include <preextstl.h>
 #include <graphite/GrClient.h>
 #include <graphite/Font.h>
 #include <graphite/ITextSource.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
 
 // Module type definitions and forward declarations.
 //

vcl/util/makefile2.pmk

 #building with stlport, but graphite was not built with stlport
 .IF "$(USE_SYSTEM_STL)"!="YES"
 .IF "$(SYSTEM_GRAPHITE)"=="YES"
-CDEFS += -DADAPT_EXT_STL
+CFLAGSCXX+=-DADAPT_EXT_STL
 .ENDIF
 .ENDIF