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: 931479 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-93383-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="iiGtPvWy"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41928C4J4cz9s19 for ; Tue, 19 Jun 2018 19:04:11 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from:date; q=dns; s= default; b=Cd2hh+8EeDFKEdoRGiRiiJnIM3btrKcwkuPbsiFu3vTqg1dLOCF5u euUoij2yFgA9npRgZkLFolJelf+CLjQeq1eGL8ccttIk04KQhEubMa/4IEXrGOAz feDgc2Z3DMLhu1ne29rN3FSKID+bRj/JMgZ+xrDbKcSYU/LD1GiHwU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from:date; s=default; bh=Y L2GbnE77sr2C0s43/otJtczHFo=; b=iiGtPvWyTLJrCHaEc0nnp71gDU3sOXkaj z+bPB64o21ntM1K425WkaKpKez8OIhW4H04NH2fq9UkUZCQ/X1UTkAkhj8oWRipo ECOo9BmENB/4wriqeVCLKg6/bvvRPSsEm2hOr0H+KolBhyoYlL9lam7uKH238AE0 v+Ox4gqbwg= 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);