These are the changes to autoconf files for the pure-stdio patch Signed-off-by: Keith Packard <kei...@keithp.com> --- libstdc++-v3/config.h.in | 3 +++ libstdc++-v3/configure | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+)
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in index 72faabfb2c1..76b1c97d2b5 100644 --- a/libstdc++-v3/config.h.in +++ b/libstdc++-v3/config.h.in @@ -1022,6 +1022,9 @@ /* Define if POSIX read/write locks are available in <gthr.h>. */ #undef _GLIBCXX_USE_PTHREAD_RWLOCK_T +/* Define to restrict code to stdio APIs. */ +#undef _GLIBCXX_USE_PURE_STDIO + /* Define if /dev/random and /dev/urandom are available for the random_device of TR1 (Chapter 5.1). */ #undef _GLIBCXX_USE_RANDOM_TR1 diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index d128de2f186..5647c986831 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -929,6 +929,7 @@ enable_extern_template with_python_dir enable_werror enable_vtable_verify +enable_libstdcxx_pure_stdio enable_libstdcxx_time enable_tls enable_rpath @@ -1632,6 +1633,8 @@ Optional Features: enable extern template [default=yes] --enable-werror turns on -Werror [default=no] --enable-vtable-verify enable vtable verify [default=no] + --enable-libstdcxx-pure-stdio + use only stdio APIs [default=] --enable-libstdcxx-time[=KIND] use KIND for check type [default=auto] --enable-tls Use thread-local storage [default=yes] @@ -18807,6 +18810,26 @@ fi + # Check whether --enable-libstdcxx-pure-stdio was given. +if test "${enable_libstdcxx_pure_stdio+set}" = set; then : + enableval=$enable_libstdcxx_pure_stdio; + case "$enableval" in + yes|no) ;; + *) as_fn_error $? "Argument to enable/disable libstdcxx-pure-stdio must be yes or no" "$LINENO" 5 ;; + esac + +else + enable_libstdcxx_pure_stdio= +fi + + + if test $enable_libstdcxx_pure_stdio = yes; then + +$as_echo "#define _GLIBCXX_USE_PURE_STDIO 1" >>confdefs.h + + fi + + # Checks for operating systems support that doesn't require linking. -- 2.29.2