aboutsummaryrefslogtreecommitdiff
path: root/gcc/selftest-run-tests.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2020-12-15 17:39:24 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-12-15 17:39:24 +0000
commit75aee072696a711f3e5b3bd1ab1f2b10fef4c7dd (patch)
treeae30db06f9813e22163964052877a38f044a95b9 /gcc/selftest-run-tests.c
parent35317db051b9ce3eff7d4ad6d31de026447314f3 (diff)
downloadgcc-75aee072696a711f3e5b3bd1ab1f2b10fef4c7dd.zip
gcc-75aee072696a711f3e5b3bd1ab1f2b10fef4c7dd.tar.gz
gcc-75aee072696a711f3e5b3bd1ab1f2b10fef4c7dd.tar.bz2
libstdc++: Support libc with stdio-only I/O in libstdc++
The current libstdc++ basic_file_stdio.cc code assumes a POSIX API underneath the stdio implementation provided by the host libc. This means that the host must provide a fairly broad POSIX file API, including read, write, open, close, lseek and ioctl. This patch changes basic_file_stdio.cc to only use basic ANSI-C stdio functions, allowing it to be used with libc implementations like picolibc which may not have a POSIX operating system underneath. This is enabled by a new --enable-cstdio=stdio_pure configure option. Aided-by: Jonathan Wakely <jwakely@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Allow "stdio_pure" option and define _GLIBCXX_USE_PURE_STDIO when it is used. Also add "stdio_posix" option as an alias for "stdio". * config/io/basic_file_stdio.cc [_GLIBCXX_USE_PURE_STDIO]: Only use defined stdio entry points for all I/O operations, without direct calls to underlying POSIX functions. * config.h.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'gcc/selftest-run-tests.c')
0 files changed, 0 insertions, 0 deletions