Opened 4 years ago

Closed 4 years ago

Last modified 3 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:


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.

Attachments (0)

Change History (5)

comment:1 Changed 4 years ago by pmachata@…

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:

comment:2 Changed 4 years ago by viboes

Component: Noneconfig
Owner: set to John Maddock

comment:3 Changed 4 years ago by John Maddock

Resolution: fixed
Status: newclosed

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

comment:4 Changed 4 years ago by anonymous

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 Changed 3 years ago by anonymous

The patch in 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))

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain John Maddock.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.