Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix definition of BOOST_TEST_PRIxPTR for glibc 2.2-2.17 #392

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion include/boost/test/impl/execution_monitor.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,19 @@ namespace { void _set_se_translator( void* ) {} }
# include <boost/core/demangle.hpp>
#endif

#if !defined(BOOST_MSSTL_VERSION) || (BOOST_MSSTL_VERSION >= 120)
#if (!defined(BOOST_MSSTL_VERSION) || (BOOST_MSSTL_VERSION >= 120)) && (!defined(__GLIBC__) || ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2))))
// glibc 2.2 - 2.17 required __STDC_FORMAT_MACROS to be defined for use of PRIxPTR
# if defined(__GLIBC__) && !((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 18)))
# ifndef __STDC_FORMAT_MACROS
# define __STDC_FORMAT_MACROS 1
# define BOOST_TEST_DEFINED_STDC_FORMAT_MACROS
# endif
# endif
# include <inttypes.h>
# define BOOST_TEST_PRIxPTR PRIxPTR
# ifdef BOOST_TEST_DEFINED_STDC_FORMAT_MACROS
# undef __STDC_FORMAT_MACROS
# endif
#else
# define BOOST_TEST_PRIxPTR "08lx"
#endif
Expand Down