|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62331 - in trunk: boost/config/compiler boost/regex boost/regex/v4 libs/regex/test/c_compiler_checks
From: john_at_[hidden]
Date: 2010-05-30 13:24:46
Author: johnmaddock
Date: 2010-05-30 13:24:45 EDT (Sun, 30 May 2010)
New Revision: 62331
URL: http://svn.boost.org/trac/boost/changeset/62331
Log:
Change regex to make use of new Boost.Config macros.
Text files modified:
trunk/boost/config/compiler/common_edg.hpp | 4 +++-
trunk/boost/regex/config.hpp | 15 +++++++++------
trunk/boost/regex/v4/instances.hpp | 8 ++++++--
trunk/libs/regex/test/c_compiler_checks/posix_api_check.c | 2 +-
4 files changed, 19 insertions(+), 10 deletions(-)
Modified: trunk/boost/config/compiler/common_edg.hpp
==============================================================================
--- trunk/boost/config/compiler/common_edg.hpp (original)
+++ trunk/boost/config/compiler/common_edg.hpp 2010-05-30 13:24:45 EDT (Sun, 30 May 2010)
@@ -59,10 +59,12 @@
//
// See above for BOOST_NO_LONG_LONG
//
+#if (__EDG_VERSION__ < 310)
+# define BOOST_NO_EXTERN_TEMPLATE
+#endif
#if (__EDG_VERSION__ <= 310) || !defined(BOOST_STRICT_CONFIG)
// No support for initializer lists
# define BOOST_NO_INITIALIZER_LISTS
-# define BOOST_NO_EXTERN_TEMPLATE
#endif
#define BOOST_NO_AUTO_DECLARATIONS
Modified: trunk/boost/regex/config.hpp
==============================================================================
--- trunk/boost/regex/config.hpp (original)
+++ trunk/boost/regex/config.hpp 2010-05-30 13:24:45 EDT (Sun, 30 May 2010)
@@ -186,16 +186,19 @@
*
****************************************************************************/
-#if defined(BOOST_HAS_DECLSPEC) && (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)
+#ifndef BOOST_SYMBOL_EXPORT
+# define BOOST_SYMBOL_EXPORT
+# define BOOST_SYMBOL_IMPORT
+#endif
+
+#if (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)
# if defined(BOOST_REGEX_SOURCE)
-# define BOOST_REGEX_DECL __declspec(dllexport)
+# define BOOST_REGEX_DECL BOOST_SYMBOL_EXPORT
# define BOOST_REGEX_BUILD_DLL
# else
-# define BOOST_REGEX_DECL __declspec(dllimport)
+# define BOOST_REGEX_DECL BOOST_SYMBOL_IMPORT
# endif
-#endif
-
-#ifndef BOOST_REGEX_DECL
+#else
# define BOOST_REGEX_DECL
#endif
Modified: trunk/boost/regex/v4/instances.hpp
==============================================================================
--- trunk/boost/regex/v4/instances.hpp (original)
+++ trunk/boost/regex/v4/instances.hpp 2010-05-30 13:24:45 EDT (Sun, 30 May 2010)
@@ -118,10 +118,14 @@
#undef BOOST_REGEX_TEMPLATE_DECL
-#elif (defined(__GNUC__) && (__GNUC__ >= 3))
+#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_EXTERN_TEMPLATE)
# ifndef BOOST_REGEX_INSTANTIATE
-# define template __extension__ extern template
+# ifdef __GNUC__
+# define template __extension__ extern template
+# else
+# define template extern template
+# endif
# endif
#if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_REGEX_ICU_INSTANCES)
Modified: trunk/libs/regex/test/c_compiler_checks/posix_api_check.c
==============================================================================
--- trunk/libs/regex/test/c_compiler_checks/posix_api_check.c (original)
+++ trunk/libs/regex/test/c_compiler_checks/posix_api_check.c 2010-05-30 13:24:45 EDT (Sun, 30 May 2010)
@@ -54,7 +54,7 @@
regfreeA(&re);
return result;
}
- assert(matches[0].rm_so == matches[0].rm_eo == 1);
+ assert((matches[0].rm_so == matches[0].rm_eo) && (matches[0].rm_eo == 1));
regfreeA(&re);
printf("no errors found\n");
return 0;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk