diff options
author | Caolán McNamara <cmc@openoffice.org> | 2010-04-22 10:19:37 +0100 |
---|---|---|
committer | Caolán McNamara <cmc@openoffice.org> | 2010-04-22 10:19:37 +0100 |
commit | e21cf359294afc7d569b0b5eb99b504f3ea65e2c (patch) | |
tree | a44b39138ff49e505da8ea23646eec165d1874d0 /tools | |
parent | 0da2c0b33430d0c37e9566487b50f4bd8d7ec063 (diff) |
cmcfixes74: #i110989# make sure preextstl.h will work even if the namespace std hasn't been opened yet
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/preextstl.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/inc/tools/preextstl.h b/tools/inc/tools/preextstl.h index 4d0418d01c57..27aed38686f0 100644 --- a/tools/inc/tools/preextstl.h +++ b/tools/inc/tools/preextstl.h @@ -24,8 +24,11 @@ * 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> @@ -33,12 +36,14 @@ # include <vector> # include <list> # include <map> -# include <algorithm> +//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 -# pragma GCC visibility push(default) +# 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) @@ -56,7 +61,9 @@ # include _STLP_NATIVE_HEADER(vector) # include _STLP_NATIVE_HEADER(list) # include _STLP_NATIVE_HEADER(map) -# pragma GCC visibility pop +# 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 |