From patchwork Tue Jun 19 09:01:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 27919 Received: (qmail 16374 invoked by alias); 19 Jun 2018 09:03:55 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 14678 invoked by uid 89); 19 Jun 2018 09:02:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=H*r:4.89, HContent-Transfer-Encoding:8bit X-HELO: albireo.enyo.de To: libc-alpha@sourceware.org Subject: [PATCH] Assume that _IO_MTSAFE_IO is always defined in libio/stdfiles.c MIME-Version: 1.0 Message-Id: From: Florian Weimer Date: Tue, 19 Jun 2018 11:01:52 +0200 2018-06-19 Florian Weimer * libio/stdfiles.c (DEF_STDFILE): Assume that _IO_MTSAFE_IO is always defined. diff --git a/libio/stdfiles.c b/libio/stdfiles.c index 8d96f0b65c..18e1172ad0 100644 --- a/libio/stdfiles.c +++ b/libio/stdfiles.c @@ -33,22 +33,13 @@ #include "libioP.h" -#ifdef _IO_MTSAFE_IO -# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \ +#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \ static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \ static struct _IO_wide_data _IO_wide_data_##FD \ = { ._wide_vtable = &_IO_wfile_jumps }; \ struct _IO_FILE_plus NAME \ = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \ &_IO_file_jumps}; -#else -# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \ - static struct _IO_wide_data _IO_wide_data_##FD \ - = { ._wide_vtable = &_IO_wfile_jumps }; \ - struct _IO_FILE_plus NAME \ - = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \ - &_IO_file_jumps}; -#endif DEF_STDFILE(_IO_2_1_stdin_, 0, 0, _IO_NO_WRITES); DEF_STDFILE(_IO_2_1_stdout_, 1, &_IO_2_1_stdin_, _IO_NO_READS);