|
Boost-Commit : |
From: john_at_[hidden]
Date: 2007-09-06 13:10:06
Author: johnmaddock
Date: 2007-09-06 13:10:05 EDT (Thu, 06 Sep 2007)
New Revision: 39150
URL: http://svn.boost.org/trac/boost/changeset/39150
Log:
Updated gcc config using STLport's settings so that TR1 functions correctly when Boost is installed in for example /usr/include/
Text files modified:
trunk/boost/tr1/detail/config.hpp | 56 +++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 1 deletions(-)
Modified: trunk/boost/tr1/detail/config.hpp
==============================================================================
--- trunk/boost/tr1/detail/config.hpp (original)
+++ trunk/boost/tr1/detail/config.hpp 2007-09-06 13:10:05 EDT (Thu, 06 Sep 2007)
@@ -3,6 +3,31 @@
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+/*
+ * The gcc include path logic is derived from STLport:
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999-2003
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ */
#ifndef BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
# define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
@@ -24,12 +49,35 @@
# else
# define BOOST_TR1_STD_HEADER(name) <../stlport/name>
# endif
+
# elif defined(__HP_aCC)
+ // HP aCC include path:
# define BOOST_TR1_STD_HEADER(name) <../include_std/name>
+
# elif defined(__DECCXX)
# define BOOST_TR1_STD_HEADER(name) <../cxx/name>
+
# elif defined(__BORLANDC__) && __BORLANDC__ >= 0x570
# define BOOST_TR1_STD_HEADER(name) <../include/dinkumware/name>
+
+# elif defined(__GNUC__) && __GNUC__ >= 3
+# if ( (__GNUC__ == 3 ) && ((__GNUC_MINOR__ == 0) || ((__GNUC_MINOR__ < 3) && defined(__APPLE_CC__))))
+# define BOOST_TR1_STD_HEADER(name) <../g++-v3/name>
+# else
+# if ( ((__GNUC__ == 4 ) || (__GNUC_MINOR__ >= 3)) && defined(__APPLE_CC__))
+# define BOOST_TR1_STD_HEADER(name) <../c++/name>
+ /*
+ * Before version 3.4.0 the 0 patch level was not part of the include path:
+ */
+# elif defined (__GNUC_PATCHLEVEL__) && ((__GNUC_PATCHLEVEL__ > 0) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
+ (__GNUC__ > 3))
+# define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/name>
+# else
+# define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__/name>
+# endif
+# endif
+
# else
# define BOOST_TR1_STD_HEADER(name) <../include/name>
# endif
@@ -50,7 +98,12 @@
//
// Find our actual std lib:
//
-#ifdef BOOST_HAS_INCLUDE_NEXT
+#if defined(BOOST_HAS_INCLUDE_NEXT) && !defined(linux)
+//
+// We don't take this branch on Linux as we may be installed in
+// /usr/include, in which case #include_next won't work as our
+// include path will occur AFTER the regular std lib one :-(
+//
# ifndef BOOST_TR1_NO_RECURSION
# define BOOST_TR1_NO_RECURSION
# define BOOST_TR1_NO_CONFIG_RECURSION
@@ -136,3 +189,4 @@
#endif
+
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