Boost logo

Boost :

From: Lars Gullik Bjønnes (larsbj_at_[hidden])
Date: 2003-03-11 03:37:30


Who should I send this to, to make someone have a look at it?


attached mail follows:



The following patch fixes some compilation problems when
BOOST_NO_WREGEX is defined (as we do in LyX). These concern OpenBSD
(first hunk: when BOOST_NO_WREGEX is defined we end up including
<wchar>) and something I found when trying to compile with lyxstring
(no need to define compare_string(wstring,wchar_t*)).

Note that the patch is made agaist the LyX sources, not the boost
tree.
If you want a patch that is directly applyable to boost please contact
me and I will create one.

Index: boost/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/ChangeLog,v
retrieving revision 1.33
diff -u -p -r1.33 ChangeLog
--- boost/ChangeLog 3 Mar 2003 15:53:39 -0000 1.33
+++ boost/ChangeLog 7 Mar 2003 17:20:09 -0000
@@ -1,3 +1,11 @@
+2003-03-07 Jean-Marc Lasgouttes <lasgouttes_at_[hidden]>
+
+ * boost/regex/v3/regex_match.hpp (string_compare): do not declare
+ a version for wstring is BOOST_NO_WREGEX is defined.
+
+ * boost/regex/config.hpp: do not try to include <cwchar> and
+ <cwctype> when BOOST_NO_WREGEX is defined.
+
 2003-03-03 Lars Gullik Bjxnnes <larsbj_at_[hidden]>
 
         * update boost to version pre-1.30.0
Index: boost/boost/regex/config.hpp
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/boost/regex/config.hpp,v
retrieving revision 1.4
diff -u -p -r1.4 config.hpp
--- boost/boost/regex/config.hpp 3 Mar 2003 15:53:46 -0000 1.4
+++ boost/boost/regex/config.hpp 7 Mar 2003 17:20:09 -0000
@@ -125,8 +125,10 @@
 // If there isn't good enough wide character support then there will
 // be no wide character regular expressions:
 //
-#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING)) && !defined(BOOST_NO_WREGEX)
-# define BOOST_NO_WREGEX
+#if defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING)
+# ifndef BOOST_NO_WREGEX
+# define BOOST_NO_WREGEX
+# endif
 #else
 # if defined(__sgi) && defined(__SGI_STL_PORT)
       // STLPort on IRIX is misconfigured: <cwctype> does not compile
Index: boost/boost/regex/v3/regex_match.hpp
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/boost/regex/v3/regex_match.hpp,v
retrieving revision 1.1
diff -u -p -r1.1 regex_match.hpp
--- boost/boost/regex/v3/regex_match.hpp 3 Mar 2003 15:53:46 -0000 1.1
+++ boost/boost/regex/v3/regex_match.hpp 7 Mar 2003 17:20:09 -0000
@@ -56,8 +56,10 @@ inline int string_compare(const std::bas
 { return s.compare(p); }
 inline int string_compare(const std::string& s, const char* p)
 { return std::strcmp(s.c_str(), p); }
+# ifndef BOOST_NO_WREGEX
 inline int string_compare(const std::wstring& s, const wchar_t* p)
 { return std::wcscmp(s.c_str(), p); }
+# endif
 # define STR_COMP(s,p) string_compare(s,p)
 #endif

-- 
	Lgb
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

-- 
	Lgb

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk