From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from elaine.keithp.com (home.keithp.com [63.227.221.253]) by sourceware.org (Postfix) with ESMTPS id B4A80384BC17; Thu, 10 Dec 2020 02:47:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B4A80384BC17 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id 067863F2E356; Wed, 9 Dec 2020 18:47:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from elaine.keithp.com ([127.0.0.1]) by localhost (elaine.keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id upYaeNoQNX2g; Wed, 9 Dec 2020 18:47:01 -0800 (PST) Received: from keithp.com (koto.keithp.com [10.0.0.2]) by elaine.keithp.com (Postfix) with ESMTPSA id B21B73F2E353; Wed, 9 Dec 2020 18:47:01 -0800 (PST) Received: by keithp.com (Postfix, from userid 1000) id 572011582188; Wed, 9 Dec 2020 18:47:01 -0800 (PST) From: Keith Packard To: libstdc++@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org, Keith Packard Subject: [PATCH 2/2] Regenerate libstdc++-v3 autoconf files Date: Wed, 9 Dec 2020 18:46:57 -0800 Message-Id: <20201210024657.3395687-3-keithp@keithp.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210024657.3395687-1-keithp@keithp.com> References: <20201209101700.GS2309743@redhat.com> <20201210024657.3395687-1-keithp@keithp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 02:47:05 -0000 These are the changes to autoconf files for the stdio_pure patch Signed-off-by: Keith Packard --- 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 . */ #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