Ticket #8731 (closed Bugs: fixed)

Opened 4 years ago

Last modified 3 years ago

__GLIBC_HAVE_LONG_LONG define has been dropped from glibc in 2.17

Reported by: pmachata@… Owned by: johnmaddock
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.


Change History

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

  • Owner set to johnmaddock
  • Component changed from None to config

comment:3 Changed 4 years ago by johnmaddock

  • Status changed from new to closed
  • Resolution set to fixed

(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))

Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

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

Note: See TracTickets for help on using tickets.