From 419956836b86ac3a1cde87ac7c3eb0bd70a28903 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sun, 23 Sep 2001 20:25:21 +0000 Subject: [PATCH] fix check for __GLIBC_PREREQ [SVN r11220] --- include/boost/config/platform/linux.hpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/boost/config/platform/linux.hpp b/include/boost/config/platform/linux.hpp index 1052be9d..e3789b1d 100644 --- a/include/boost/config/platform/linux.hpp +++ b/include/boost/config/platform/linux.hpp @@ -9,6 +9,9 @@ #define BOOST_PLATFORM "linux" +// make sure we have __GLIBC_PREREQ if available at all +#include + // // stdint.h added to glibc 2.1.1 // We can only test for 2.1 though: @@ -17,8 +20,15 @@ #define BOOST_HAS_STDINT_H #endif -#if !defined(__GLIBC__) || !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98)) -#define BOOST_NO_SWPRINTF +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) +// __GLIBC_PREREQ is available since 2.1.2 + + // swprintf added to glibc 2.2.0 +# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98)) +# define BOOST_NO_SWPRINTF +# endif +#else +# define BOOST_NO_SWPRINTF #endif #ifndef __GNUC__ @@ -47,7 +57,3 @@ # endif #endif - - - -