aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config.h.in
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-07-30 13:56:14 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-07-30 18:12:39 +0100
commit3dbd4d94bf380f3efa8bba9b203ce7d4c8f47fbb (patch)
tree6819bfe2d940de090ddf612866796f1c485f5773 /libstdc++-v3/config.h.in
parent2065654435e3d97676366f82b939bc9273382dbe (diff)
downloadgcc-3dbd4d94bf380f3efa8bba9b203ce7d4c8f47fbb.zip
gcc-3dbd4d94bf380f3efa8bba9b203ce7d4c8f47fbb.tar.gz
gcc-3dbd4d94bf380f3efa8bba9b203ce7d4c8f47fbb.tar.bz2
libstdc++: Use secure_getenv for filesystem::temp_directory_path() [PR65018]
This adds a configure check for the GNU extension secure_getenv and then uses it for looking up TMPDIR and similar variables. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/65018 * configure.ac: Check for secure_getenv. * config.h.in: Regenerate. * configure: Regenerate. * src/filesystem/ops-common.h (get_temp_directory_from_env): New helper function to obtain path from the environment. * src/c++17/fs_ops.cc (fs::temp_directory_path): Use new helper. * src/filesystem/ops.cc (fs::temp_directory_path): Likewise. * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Print messages if test cannot be run. * testsuite/experimental/filesystem/operations/temp_directory_path.cc: Likewise. Fix incorrect condition. Use "TMP" to work with Windows as well as POSIX.
Diffstat (limited to 'libstdc++-v3/config.h.in')
-rw-r--r--libstdc++-v3/config.h.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index e545488..228a758 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -301,6 +301,9 @@
/* Define if readlink is available in <unistd.h>. */
#undef HAVE_READLINK
+/* Define to 1 if you have the `secure_getenv' function. */
+#undef HAVE_SECURE_GETENV
+
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV