aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2018-05-21 18:18:35 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2018-05-21 18:18:35 +0100
commitb02923592a55b52d796656c5b4f34a964a2604a9 (patch)
tree7bdd183950fb53880788391cae759a291b699c35 /libstdc++-v3/configure
parent8b6d2d3bbf13d0d48128f381d1092d4c36d356c2 (diff)
downloadgcc-b02923592a55b52d796656c5b4f34a964a2604a9.zip
gcc-b02923592a55b52d796656c5b4f34a964a2604a9.tar.gz
gcc-b02923592a55b52d796656c5b4f34a964a2604a9.tar.bz2
Add support for opening file streams from wide character strings
C++17 added new overloads to <fstream> class templates to support opening files from wide character strings "on systems where filesystem::path::value_type is not char". This patch adds those overloads conditional on _wfopen being available, and enables them for pre-C++17 modes as well. Add support for opening file streams from wide character strings. * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN] (__basic_file<char>::open(const wchar_t*, ios_base::openmode)): Define new overload. * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN] (__basic_file<char>::open(const wchar_t*, ios_base::openmode)): Declare new overload. * configure.ac: Check for _wfopen. * crossconfig.m4: Likewise. * configure: Regenerate. * config.h.in: Regenerate. * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN] (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)): Define new overload. * include/std/fstream [_GLIBCXX_HAVE__WFOPEN] (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)): Declare new overload. [_GLIBCXX_HAVE__WFOPEN] (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode)) (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode)) (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode)) (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode)) (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode)) (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define new overloads. * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New. * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New. * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New. * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New. * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New. * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New. * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New. From-SVN: r260479
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure22
1 files changed, 22 insertions, 0 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index c9dbaa1..f3522ee 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -28130,6 +28130,17 @@ _ACEOF
fi
done
+ for ac_func in _wfopen
+do :
+ ac_fn_c_check_func "$LINENO" "_wfopen" "ac_cv_func__wfopen"
+if test "x$ac_cv_func__wfopen" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE__WFOPEN 1
+_ACEOF
+
+fi
+done
+
# For iconv support.
@@ -66125,6 +66136,17 @@ _ACEOF
fi
done
+ for ac_func in _wfopen
+do :
+ ac_fn_c_check_func "$LINENO" "_wfopen" "ac_cv_func__wfopen"
+if test "x$ac_cv_func__wfopen" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE__WFOPEN 1
+_ACEOF
+
+fi
+done
+
;;
*-netbsd*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'