]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Define _GNU_SOURCE for secure_getenv on Cygwin [PR104217]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 25 Jan 2022 10:11:36 +0000 (10:11 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 25 Jan 2022 21:05:16 +0000 (21:05 +0000)
commite20486d508afdf22790a271e90ca76d8df5fa7a5
treea33514c91774a948fb54a939f60b446cfd17d217
parentc8bd4dc8212e43b2f9af08b80df97f90cdb0df4f
libstdc++: Define _GNU_SOURCE for secure_getenv on Cygwin [PR104217]

For GNU/Linux G++ defines _GNU_SOURCE automatically, but not for Cygwin.
This means secure_getenv is not declared by Cygwin's <stdlib.h>, even
though autoconf detected it is present in the library. Define it in the
source files that want to use secure_getenv.

libstdc++-v3/ChangeLog:

PR libstdc++/104217
* src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
* src/filesystem/dir.cc (_GNU_SOURCE): Define.
* src/filesystem/ops.cc (_GNU_SOURCE): Define.
libstdc++-v3/src/c++17/fs_ops.cc
libstdc++-v3/src/filesystem/dir.cc
libstdc++-v3/src/filesystem/ops.cc