From: Keith Packard <keithp@keithp.com>
To: libstdc++@gcc.gnu.org
Cc: gcc-patches@gcc.gnu.org, Keith Packard <keithp@keithp.com>
Subject: [PATCH 2/2] Regenerate libstdc++-v3 autoconf files
Date: Wed, 9 Dec 2020 18:46:57 -0800 [thread overview]
Message-ID: <20201210024657.3395687-3-keithp@keithp.com> (raw)
In-Reply-To: <20201210024657.3395687-1-keithp@keithp.com>
These are the changes to autoconf files for the stdio_pure patch
Signed-off-by: Keith Packard <keithp@keithp.com>
---
libstdc++-v3/config.h.in | 3 +++
libstdc++-v3/configure | 17 ++++++++++++-----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 72faabfb2c1..c0c166715cb 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 std::__basic_file<> to stdio APIs. */
+#undef _GLIBCXX_USE_STDIO_PURE
+
/* 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..36c61a77d07 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -16376,7 +16376,7 @@ $as_echo_n "checking for underlying I/O to use... " >&6; }
if test "${enable_cstdio+set}" = set; then :
enableval=$enable_cstdio;
case "$enableval" in
- stdio) ;;
+ stdio|stdio_posix|stdio_pure) ;;
*) as_fn_error $? "Unknown argument to enable/disable cstdio" "$LINENO" 5 ;;
esac
@@ -16386,16 +16386,23 @@ fi
- # Now that libio has been removed, you can have any color you want as long
- # as it's black. This is one big no-op until other packages are added, but
- # showing the framework never hurts.
+ # The only available I/O model is based on stdio, via basic_file_stdio.
+ # The default "stdio" is actually "stdio + POSIX" because it uses fdopen(3)
+ # to get a file descriptor and then uses read(3) and write(3) with it.
+ # The "stdio_pure" model doesn't use fdopen and only uses FILE* for I/O.
case ${enable_cstdio} in
- stdio)
+ stdio*)
CSTDIO_H=config/io/c_io_stdio.h
BASIC_FILE_H=config/io/basic_file_stdio.h
BASIC_FILE_CC=config/io/basic_file_stdio.cc
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: stdio" >&5
$as_echo "stdio" >&6; }
+
+ if test "x$enable_cstdio" = "xstdio_pure" ; then
+
+$as_echo "#define _GLIBCXX_USE_STDIO_PURE 1" >>confdefs.h
+
+ fi
;;
esac
--
2.29.2
next prev parent reply other threads:[~2020-12-10 2:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 18:39 [PATCH 0/2] Support libc with stdio-only I/O in libstdc++ Keith Packard
2020-12-07 18:39 ` [PATCH 1/2] libstdc++: Add --enable-pure-stdio-libstdcxx option Keith Packard
2020-12-07 18:55 ` Jonathan Wakely
2020-12-07 20:36 ` Keith Packard
2020-12-09 10:17 ` Jonathan Wakely
2020-12-09 16:32 ` Keith Packard
2020-12-09 16:52 ` Jonathan Wakely
2020-12-10 2:46 ` [PATCH 0/2] Support libc with stdio-only I/O in libstdc++ Keith Packard
2020-12-10 2:46 ` [PATCH 1/2] libstdc++: Add --enable-stdio=stdio_pure option [v2] Keith Packard
2020-12-10 20:23 ` Jonathan Wakely
2020-12-10 20:56 ` Keith Packard
2020-12-15 18:43 ` Jonathan Wakely
2020-12-10 2:46 ` Keith Packard [this message]
2020-12-07 18:39 ` [PATCH 2/2] Regenerate libstdc++-v3 autoconf files Keith Packard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201210024657.3395687-3-keithp@keithp.com \
--to=keithp@keithp.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).