From: ehofman Date: Mon, 1 Dec 2003 18:56:53 +0000 (+0000) Subject: Rename IRIX to irix_string in simgear/compatibility and assign "simgear/compatibility... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fbf018598efa08dae3012220a71b2b5019d5cebb;p=simgear.git Rename IRIX to irix_string in simgear/compatibility and assign "simgear/compatibility/irix_string" to STL_STRING for IRIX --- diff --git a/simgear/compatibility/IRIX b/simgear/compatibility/IRIX deleted file mode 100644 index 1711739d..00000000 --- a/simgear/compatibility/IRIX +++ /dev/null @@ -1,43 +0,0 @@ - -#ifndef __SGI_HXX -#define __SGI_HXX - -#include - -inline bool -operator!=( const std::string& lhs, const char* rhs) -{ - return lhs.compare( rhs ) != 0; -} - -inline bool -operator!=( const char* lhs, const std::string& rhs) -{ - return rhs.compare( lhs ) != 0; -} - -inline bool -operator==( const std::string& lhs, const char* rhs) -{ - return lhs.compare( rhs ) == 0; -} - -inline bool -operator==( const char* lhs, const std::string& rhs) -{ - return rhs.compare( lhs ) == 0; -} - -inline std::string -operator+(const std::string& lhs, const char* rhs) -{ - return lhs + std::string(rhs); -} - -inline std::string -operator+(const char* lhs, const std::string& rhs) -{ - return std::string(lhs) + rhs; -} - -#endif // !__SGI_HXX diff --git a/simgear/compatibility/Makefile.am b/simgear/compatibility/Makefile.am index 7cdc91e4..404ebfc7 100644 --- a/simgear/compatibility/Makefile.am +++ b/simgear/compatibility/Makefile.am @@ -30,4 +30,4 @@ include_HEADERS = \ new \ streambuf \ \ - IRIX + irix_string diff --git a/simgear/compatibility/irix_string b/simgear/compatibility/irix_string new file mode 100644 index 00000000..1b49dd74 --- /dev/null +++ b/simgear/compatibility/irix_string @@ -0,0 +1,47 @@ + +#ifndef __SGI_HXX +#define __SGI_HXX 1 + +#ifdef __cplusplus + +#include + +inline bool +operator!=( const std::string& lhs, const char* rhs) +{ + return lhs.compare( rhs ) != 0; +} + +inline bool +operator!=( const char* lhs, const std::string& rhs) +{ + return rhs.compare( lhs ) != 0; +} + +inline bool +operator==( const std::string& lhs, const char* rhs) +{ + return lhs.compare( rhs ) == 0; +} + +inline bool +operator==( const char* lhs, const std::string& rhs) +{ + return rhs.compare( lhs ) == 0; +} + +inline std::string +operator+(const std::string& lhs, const char* rhs) +{ + return lhs + std::string(rhs); +} + +inline std::string +operator+(const char* lhs, const std::string& rhs) +{ + return std::string(lhs) + rhs; +} + +#endif /* __cplusplus */ + +#endif /* !__SGI_HXX */ diff --git a/simgear/compiler.h b/simgear/compiler.h index d2873230..f80697d5 100644 --- a/simgear/compiler.h +++ b/simgear/compiler.h @@ -290,8 +290,6 @@ #if defined ( sgi ) && !defined( __GNUC__ ) # define SG_HAVE_NATIVE_SGI_COMPILERS -#include - # define SG_EXPLICIT_FUNCTION_TMPL_ARGS # define SG_CLASS_PARTIAL_SPECIALIZATION # define SG_NEED_AUTO_PTR @@ -309,7 +307,7 @@ # define STL_ITERATOR # define STL_FSTREAM # define STL_STDEXCEPT -# define STL_STRING +# define STL_STRING # define STL_STRSTREAM #pragma set woff 1001,1012,1014,1116,1155,1172,1174 diff --git a/simgear/misc/tabbed_values.hxx b/simgear/misc/tabbed_values.hxx index 895e62b8..c66d306b 100644 --- a/simgear/misc/tabbed_values.hxx +++ b/simgear/misc/tabbed_values.hxx @@ -1,10 +1,10 @@ #ifndef SG_TABBED_VALUES_HXX #define SG_TABBED_VALUES_HXX -#include -#include +#include -#include "simgear/compiler.h" +#include +#include STL_STRING SG_USING_STD(vector); SG_USING_STD(string);