Hello, I am trying to use use Boost::Regex on HP 11i with gcc 4.2.2 and I notice that in config/platform/hpux.hpp there is a define to turn off wide-char support unless using aCC and have a1 source eg: #if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE)) # define BOOST_NO_SWPRINTF # define BOOST_NO_CWCTYPE #endif This will never allow gcc to use wregex even if wchar support is available. Is this because there are so few people using Zgcc oin HP-ux or am I missing something? On the assumption that it is related to usage, I have added the following to allow gcc 4 to use wregex: #if defined(__GNUC__) # if (__GNUC__ >3) # undef BOOST_NO_CWCTYPE # endif #endif Is there anything obviously wrong with this? Thanks // Martin
Martin_Thomas@McAfee.com wrote:
I am trying to use use Boost::Regex on HP 11i with gcc 4.2.2 and I notice that in config/platform/hpux.hpp there is a define to turn off wide-char support unless using aCC and have a1 source eg:
#if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE))
# define BOOST_NO_SWPRINTF
# define BOOST_NO_CWCTYPE
#endif
This will never allow gcc to use wregex even if wchar support is available. Is this because there are so few people using Zgcc oin HP-ux or am I missing something? On the assumption that it is related to usage, I have added the following to allow gcc 4 to use wregex:
#if defined(__GNUC__)
# if (__GNUC__ >3)
# undef BOOST_NO_CWCTYPE
# endif
#endif
Is there anything obviously wrong with this?
No it should work OK: as you noticed gcc on HPUX doesn't get tested that much so our config information may well be out of date. HTH, John.
John Maddock wrote:
[...] as you noticed gcc on HPUX doesn't get tested that much [...]
John, this is no longer the case. Two HP-UX platforms are tested with
gcc on a regular basis: HP-UX_pa_risc_gcc and HP-UX_ia64_gcc. On both,
all regex tests pass (I'm not implying that they should be failing
because of this configuration issue).
Thanks,
Boris
----- Original Message -----
From: "John Maddock"
Martin_Thomas@McAfee.com wrote:
I am trying to use use Boost::Regex on HP 11i with gcc 4.2.2 and I notice that in config/platform/hpux.hpp there is a define to turn off wide-char support unless using aCC and have a1 source eg:
#if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE))
# define BOOST_NO_SWPRINTF
# define BOOST_NO_CWCTYPE
#endif
This will never allow gcc to use wregex even if wchar support is available. Is this because there are so few people using Zgcc oin HP-ux or am I missing something? On the assumption that it is related to usage, I have added the following to allow gcc 4 to use wregex:
#if defined(__GNUC__)
# if (__GNUC__ >3)
# undef BOOST_NO_CWCTYPE
# endif
#endif
Is there anything obviously wrong with this?
No it should work OK: as you noticed gcc on HPUX doesn't get tested that much so our config information may well be out of date.
HTH, John.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boris Gubenko wrote:
John Maddock wrote:
[...] as you noticed gcc on HPUX doesn't get tested that much [...]
John, this is no longer the case. Two HP-UX platforms are tested with gcc on a regular basis: HP-UX_pa_risc_gcc and HP-UX_ia64_gcc. On both, all regex tests pass (I'm not implying that they should be failing because of this configuration issue).
Good point! OK I'll catch up with this and fix the config at some point. Thanks, John.
Martin_Thomas@McAfee.com wrote:
This will never allow gcc to use wregex even if wchar support is available. Is this because there are so few people using Zgcc oin HP-ux or am I missing something?
This is because this configuration bug does not affect boost test results -- check out HP-UX_pa_risc_gcc and HP-UX_ia64_gcc at http://beta.boost.org/development/tests/trunk/developer/summary.html -- and nobody complained. Quite a few people use gcc on HP-UX, but, apparently, they do not use wregex.
On the assumption that it is related to usage, I have added the following to allow gcc 4 to use wregex:
[...] #if defined(__GNUC__) # if (__GNUC__ >3)
Thanks for tha patch. Is it documented somewhere that wide character support in gcc is available starting with version 3? Just want to be sure. I did some google'ing and could not find definitive answer. Thanks again, Boris ----- Original Message ----- From: Martin_Thomas@McAfee.com To: boost-users@lists.boost.org Sent: Saturday, January 19, 2008 12:23 AM Subject: [Boost-users] Boost, HP-UX and gcc Hello, I am trying to use use Boost::Regex on HP 11i with gcc 4.2.2 and I notice that in config/platform/hpux.hpp there is a define to turn off wide-char support unless using aCC and have a1 source eg: #if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE)) # define BOOST_NO_SWPRINTF # define BOOST_NO_CWCTYPE #endif This will never allow gcc to use wregex even if wchar support is available. Is this because there are so few people using Zgcc oin HP-ux or am I missing something? On the assumption that it is related to usage, I have added the following to allow gcc 4 to use wregex: #if defined(__GNUC__) # if (__GNUC__ >3) # undef BOOST_NO_CWCTYPE # endif #endif Is there anything obviously wrong with this? Thanks // Martin ------------------------------------------------------------------------------ _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boris, I don't believe I found any documentation, just an empirical observation that somewhere after gcc 3.3.x wchar is available but not knowing when exactly, played safe with requiring gcc > 4.0. Cheers // Martin Martin_Thomas@McAfee.com wrote:
This will never allow gcc to use wregex even if wchar support is available. Is this because there are so few people using Zgcc oin HP-ux or am I missing something?
This is because this configuration bug does not affect boost test results -- check out HP-UX_pa_risc_gcc and HP-UX_ia64_gcc at http://beta.boost.org/development/tests/trunk/developer/summary.html -- and nobody complained. Quite a few people use gcc on HP-UX, but, apparently, they do not use wregex.
On the assumption that it is related to usage, I have added the following to allow gcc 4 to use wregex:
[...] #if defined(__GNUC__) # if (__GNUC__ >3)
Thanks for tha patch. Is it documented somewhere that wide character support in gcc is available starting with version 3? Just want to be sure. I did some google'ing and could not find definitive answer. Thanks again, Boris
Martin_Thomas@McAfee.com wrote:
Boris, I don't believe I found any documentation, just an empirical observation that somewhere after gcc 3.3.x wchar is available but not knowing when exactly, played safe with requiring gcc > 4.0.
I've looked into this some more, and at least on the td176 HP testdrive machine with gcc-4.1.0 wide character support in the std library is *not* enabled :-( You can include <cwchar> but it doesn't import anything into namespace std, and there's also no std::wstring in <string> etc :-( So... I've changed the HPUX config not to unconditionally disable wide character support for gcc, but none the less, it will be disabled by booct/config/stdlib/libstdcpp3.hpp since neither _GLIBCPP_USE_WCHAR_T nor _GLIBCXX_USE_WCHAR_T are defined by gcc's std lib. Regards, John.
John Maddock wrote:
I've looked into this some more, and at least on the td176 HP testdrive machine with gcc-4.1.0 wide character support in the std library is *not* enabled :-(
You can include <cwchar> but it doesn't import anything into namespace std, and there's also no std::wstring in <string> etc :-(
So... I've changed the HPUX config not to unconditionally disable wide character support for gcc, but none the less, it will be disabled by booct/config/stdlib/libstdcpp3.hpp since neither _GLIBCPP_USE_WCHAR_T nor _GLIBCXX_USE_WCHAR_T are defined by gcc's std lib.
Seems reasonable .. gcc-4.2.2 on HP-UX11.11 has both _GLIBCPP_USE_WCHAR_T and _GLIBCXX_USE_WCHAR_T defined in c++config.h so wregex would not be disabled by boost/config/stdlib/libstdcpp3.hpp Cheers // Martin
So... I've changed the HPUX config not to unconditionally disable wide character support for gcc, but none the less, it will be disabled by booct/config/stdlib/libstdcpp3.hpp since neither _GLIBCPP_USE_WCHAR_T nor _GLIBCXX_USE_WCHAR_T are defined by gcc's std lib.
Hi, just noticed this thread. I had to port my company's project (which
uses boost) to hpux a few months back. This may be excessive, but here
are is a copy of the notes I kept from that experience. Some of this,
you might find useful. I don't know what version of HPUX you're working
with. The notes are unedited, except that I removed my use of
profanity:
compilation
error: /home/mlinck/develop/api/tp-sources-trunk/boost_1_33_1/boost/regex/v4/regex_traits_defaults.hpp:87:94: error: missing binary operator before token "0"
* Turned out that this is a bug in HPUX 11.23, fixed in HPUX11.31.
Here's a link to the thread:
http://lists.boost.org/Archives/boost/2006/09/110505.php
* found workaround in same thread above
* that workaround does *not* work. Added code at top of
bad header file: #ifdef hpux #include
participants (4)
-
Boris Gubenko
-
John Maddock
-
Martin_Thomas@McAfee.com
-
Michael Linck