From 36bec1e8d719ff3bc162efe4511891e156765047 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 21 Jan 2003 16:48:45 +0000 Subject: [PATCH] test wstring --- dtool/Config.Irix.pp | 4 ++++ dtool/Config.Linux.pp | 4 ++++ dtool/Config.Win32.pp | 4 ++++ dtool/LocalSetup.pp | 3 +++ dtool/src/dtoolbase/dtoolbase_cc.h | 9 +++++++-- 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dtool/Config.Irix.pp b/dtool/Config.Irix.pp index fbf9e04ea8..08d5a79be4 100644 --- a/dtool/Config.Irix.pp +++ b/dtool/Config.Irix.pp @@ -79,6 +79,10 @@ // umask? #define HAVE_OPEN_MASK 1 +// Does define the typedef wstring? Most do, but for some +// reason, versions of gcc before 3.0 didn't do this. +#define HAVE_WSTRING 1 + // Do we have ? #define HAVE_NEW diff --git a/dtool/Config.Linux.pp b/dtool/Config.Linux.pp index 28f50f1539..3f4e0e0c05 100644 --- a/dtool/Config.Linux.pp +++ b/dtool/Config.Linux.pp @@ -82,6 +82,10 @@ // umask? Versions of gcc prior to 3.2 had this. #define HAVE_OPEN_MASK +// Does define the typedef wstring? Most do, but for some +// reason, versions of gcc before 3.0 didn't do this. +#define HAVE_WSTRING 1 + // Do we have ? #define HAVE_NEW 1 diff --git a/dtool/Config.Win32.pp b/dtool/Config.Win32.pp index 5338eaf92c..d60387622a 100644 --- a/dtool/Config.Win32.pp +++ b/dtool/Config.Win32.pp @@ -82,6 +82,10 @@ // umask? #define HAVE_OPEN_MASK +// Does define the typedef wstring? Most do, but for some +// reason, versions of gcc before 3.0 didn't do this. +#define HAVE_WSTRING 1 + // Do we have ? #define HAVE_NEW 1 diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index cfc4833be6..d9f511a2ee 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -137,6 +137,9 @@ $[cdefine HAVE_NAMESPACE] /* Define if fstream::open() accepts a third parameter for umask. */ $[cdefine HAVE_OPEN_MASK] +/* Define if the header file defines wstring. */ +$[cdefine HAVE_WSTRING] + /* Define if the C++ compiler supports the typename keyword. */ $[cdefine HAVE_TYPENAME] diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index dc307e7955..f12a6e7f20 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -80,10 +80,15 @@ using namespace std; #define TYPENAME #endif +#ifndef HAVE_WSTRING +// Some C++ libraries (gcc 2.95) don't define this. +typedef basic_string wstring; +#endif + #ifndef HAVE_STREAMSIZE -// Some compilers (notably SGI) don't define this for us +// Some C++ libraries (Irix) don't define this. typedef int streamsize; -#endif /* HAVE_STREAMSIZE */ +#endif #ifndef HAVE_IOS_TYPEDEFS typedef int ios_openmode;