Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#8731 closed Bugs (fixed)

__GLIBC_HAVE_LONG_LONG define has been dropped from glibc in 2.17

Reported by: pmachata@… Owned by: John Maddock
Milestone: To Be Determined Component: config
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

Boost uses this define to decide whether it can import ::uint64_t into the boost namespace. In glibc 2.17, that define has been dropped, support for long long is always assumed, and uint64_t is always defined. It is possible to use the macro GLIBC_PREREQ (defined I think since 2.2) to test glibc version.

Change History (5)

comment:1 by pmachata@…, 9 years ago

Since Trac won't let me attach the patch (it finds URLs in there and thinks it's spam; captcha shows, but it doesn't upload anyway for some reason), please get it there: http://pmachata.fedorapeople.org/boost-1.53.0-__GLIBC_HAVE_LONG_LONG.patch

comment:2 by viboes, 9 years ago

Component: Noneconfig
Owner: set to John Maddock

comment:3 by John Maddock, 9 years ago

Resolution: fixed
Status: newclosed

(In [84950]) Patch for recent versions of glibc which always assume int64_t support. Fixes #8731.

comment:4 by anonymous, 9 years ago

Your patch didn't work for me - gcc-4.7 Mingw choked on the use of __GLIBC_PREREQ, changed to check for version numbers the old way.

comment:5 by anonymous, 8 years ago

The patch in https://svn.boost.org/trac/boost/changeset/84950 will break when (if) glibc issues version 3.0.

The following patch is preferred way to spell "glibc-2.17 or above":

-#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG))
+#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) \
+                                    || defined(__GLIBC_HAVE_LONG_LONG) \
+                                    || __GLIBC_PREREQ(2, 17))
Note: See TracTickets for help on using tickets.