Ticket #8944: tr1-include-next.diff

File tr1-include-next.diff, 1.7 KB (added by Pedro Giffuni <giffunip@…>, 9 years ago)

proof of concept patch

  • boost/tr1/detail/config.hpp

    old new  
    99#include <cstddef>
    1010
    1111#if (defined(__GNUC__) && !(defined(linux) || defined(__linux) || defined(__linux__))) \
     12   || (!defined(__FreeBSD__)) \
    1213   || (!defined(_AIX) && defined(__IBMCPP__)  && (__IBMCPP__ >= 800))
    1314   // Disable use of #include_next on Linux as typically we are installed in a
    1415   // directory that is searched *after* the std lib include path.
  • boost/tr1/detail/config_all.hpp

    old new  
    8585#  elif defined(__GNUC__) && __GNUC__ >= 3
    8686#    if defined(BOOST_TR1_GCC_INCLUDE_PATH)
    8787#      define BOOST_TR1_STD_HEADER(name) <../BOOST_TR1_GCC_INCLUDE_PATH/name>
     88#    elif (defined(__FreeBSD__))
     89#      define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__/name>
    8890#    elif ( (__GNUC__ == 3 ) && ((__GNUC_MINOR__ == 0) || ((__GNUC_MINOR__ < 3) && defined(__APPLE_CC__))))
    8991#      define BOOST_TR1_STD_HEADER(name) <../g++-v3/name>
    9092#    else
     
    107109#    endif
    108110
    109111#      if !defined(BOOST_TR1_DISABLE_INCLUDE_NEXT) && !defined(__ICC) \
    110             && (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__))
     112            && (defined(__FreeBSD__) || defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__))
    111113         // Disable use of #include_next on Linux as typically we are installed in a directory that is searched
    112114         // *after* the std lib include path:
    113115#        define BOOST_TR1_DISABLE_INCLUDE_NEXT