[committed] libstdc++: Fix filesystem::temp_directory_path [PR101709]
Jonathan Wakely
jwakely@redhat.com
Mon Aug 2 15:35:45 GMT 2021
On 30/07/21 18:13 +0100, Jonathan Wakely wrote:
>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.
This refactoring broke the Windows build. Fixed like so.
Tested powerpc64le-linux and x86_64-w64-mingw32 (cross-compiled and
run under Wine). Committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2741 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20210802/4b3ba9f0/attachment.bin>
More information about the Libstdc++
mailing list