]> git.ipfire.org Git - thirdparty/glibc.git/commit
Ensure C99 and C11 interfaces are available for C++ [BZ #21326]
authorJonathan Wakely <jwakely@redhat.com>
Mon, 9 Oct 2017 13:58:34 +0000 (14:58 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 9 Oct 2017 14:18:11 +0000 (16:18 +0200)
commitd6c064e914cba3277d852c9fa27db53f0059ff8c
treee8ce891a1960979738c5a262475b7487b5881883
parent645ac9aaf89e3311949828546df6334322f48933
Ensure C99 and C11 interfaces are available for C++ [BZ #21326]

This patch ensures that the C99 and C11 features required by C++ are
defined according to the value of the __cplusplus macro, and not just
because G++ always defines _GNU_SOURCE.  This will allow G++ to stop
defining _GNU_SOURCE some day, without causing the C99 and C11
interfaces to disappear for C++ programs.

[BZ #21326]
* include/features.h [__cplusplus >= 201103] (__USE_ISOC99): Define.
[__cplusplus >= 201703] (__USE_ISOCXX17, __USE_ISOC11): Define.
* math/Makefile (test-math-cxx11): New test.
* math/test-math-cxx11.cc: New file.
ChangeLog
include/features.h
math/Makefile
math/test-math-cxx11.cc [new file with mode: 0644]