-
- Downloads
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.
Showing
- libstdc++-v3/config.h.in 3 additions, 0 deletionslibstdc++-v3/config.h.in
- libstdc++-v3/configure 11 additions, 0 deletionslibstdc++-v3/configure
- libstdc++-v3/configure.ac 1 addition, 0 deletionslibstdc++-v3/configure.ac
- libstdc++-v3/src/c++17/fs_ops.cc 5 additions, 26 deletionslibstdc++-v3/src/c++17/fs_ops.cc
- libstdc++-v3/src/filesystem/ops-common.h 40 additions, 0 deletionslibstdc++-v3/src/filesystem/ops-common.h
- libstdc++-v3/src/filesystem/ops.cc 5 additions, 27 deletionslibstdc++-v3/src/filesystem/ops.cc
- libstdc++-v3/testsuite/27_io/filesystem/operations/temp_directory_path.cc 7 additions, 0 deletions...tsuite/27_io/filesystem/operations/temp_directory_path.cc
- libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc 8 additions, 1 deletion...experimental/filesystem/operations/temp_directory_path.cc
Loading
Please register or sign in to comment