-
- Downloads
libstdc++: Add autoconf checks for mkdir, chmod, chdir, and getcwd
The filesystem code was using these functions without checking for their existence, assuming that any UNIX-like libc with <unistd.h> would always provide them. That's not true for some newlib targets like arm-eabi. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for mkdir, chmod, chdir, and getcwd. * config.h.in: Regenerate. * configure: Regenerate. * src/c++17/fs_ops.cc (create_dir): Use USE_MKDIR macro. (fs::current_path): Use USE_GETCWD and USE_CHDIR macros. (fs::permissions): Use USE_CHMOD macro. * src/filesystem/ops-common.h [FILESYSTEM_IS_WINDOWS] (chmod, mkdir, getcwd, chdir): Define new macros. [FILESYSTEM_IS_WINDOWS] (chmod, mkdir, getcwd, chdir): Use new macros. * src/filesystem/ops.cc (create_dir): Use USE_MKDIR macro. (fs::current_path): Use USE_GETCWD and USE_CHDIR macros. (fs::permissions): Use USE_CHMOD macro.
Showing
- libstdc++-v3/acinclude.m4 60 additions, 0 deletionslibstdc++-v3/acinclude.m4
- libstdc++-v3/config.h.in 12 additions, 0 deletionslibstdc++-v3/config.h.in
- libstdc++-v3/configure 252 additions, 0 deletionslibstdc++-v3/configure
- libstdc++-v3/src/c++17/fs_ops.cc 8 additions, 4 deletionslibstdc++-v3/src/c++17/fs_ops.cc
- libstdc++-v3/src/filesystem/ops-common.h 16 additions, 2 deletionslibstdc++-v3/src/filesystem/ops-common.h
- libstdc++-v3/src/filesystem/ops.cc 7 additions, 3 deletionslibstdc++-v3/src/filesystem/ops.cc
Loading
Please register or sign in to comment