From patchwork Mon Oct 15 20:49:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 148896 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4252560lji; Mon, 15 Oct 2018 13:51:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV60LgnHIhS15PLY8RjKtOsDFZCy6mmLtd2fNMk5MYgMPUBPO58Le8LSeZNU7vlZFX0YnG96H X-Received: by 2002:a65:4145:: with SMTP id x5-v6mr17384605pgp.309.1539636717197; Mon, 15 Oct 2018 13:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539636717; cv=none; d=google.com; s=arc-20160816; b=k4pvQPASpRRSOsL1IbsSnID47sgBfiAg1Q/LD4d9V+1MwlQw2RvW5qaPodZx93mIX9 aooPkeOLyNT0LMZ03zJP7Xe0PGmFRBsfbByHDBz9/6wDJCDXmzvJycYXNtpTRtvlvaXV sClgw6S9qSzXtxu55NxPqawjxX2qGX9yPkXoNHnk1KYqBTTiVJ2iOTflV3s46KMTsxmb W6kius3LoIGCVexswo4uQpeDrq47L1hZSjxgWpOilvZYTfp77HZUG0K62bJmnSAS5gg4 GpjbEO3lgCWD4uOoZlvGguVRichIv8IprG5FeeVYEE8fZDHbyRJvTPwx8VNHmsgrqlgf kesg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=DACdLqZoqNeefqkLkB1HflqBbHm23apiGQa3wAqT74I=; b=U84ermO7zSo6TeOGAyNGsPLvwhKKeZZWv+C9sPdWe73EobC7BtVBEaJCG7SMfCK3/D yDsdOhLSz5gHC2O04is8eEst9P9HeWMYhcZxoWE0Kfb2WjLfe7EFnw6bCjDEuvLWjfgk L/i+oiLdUO1okqZ94V0XXICbTLn9dm5TheQMy31DIot3m/6qyj50gsBVkDSyuzyBQxbB jowLhSzi5XZURlc8lYcFsS1iTm1e4NiEAqit82IlGeZHPfxTgOfa1CrYfOvf6kbjEIha WCjm5+KPO77gKh3iQOlIb55LjgH4sct/OWBUo5FpozXDdLIX9x3gSnXIaq7vyKMC92Zp 4Lng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=BMQOWIWP; dkim=pass header.i=@linaro.org header.s=google header.b="gHn/EghH"; spf=pass (google.com: domain of libc-alpha-return-96446-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-96446-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o12-v6si12519618pfd.102.2018.10.15.13.51.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 13:51:57 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-96446-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=BMQOWIWP; dkim=pass header.i=@linaro.org header.s=google header.b="gHn/EghH"; spf=pass (google.com: domain of libc-alpha-return-96446-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-96446-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=D2tbJIe2+Fk0WvGK3bX6+D2CK/Pg0QZ VzSDPUGQmFPhC1ILyIoSsxm64m/Dgx1gT1Zk2bK1V4YGngmo+ZhJwAaDe1d6dUXS prNKVzUOK3RBJD0pYx/4Gf+NxvmLvFjW7kfGHDdpUhEQkD8GvbpSLUOS42EEFalq CCmDIOwBbHwY= 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:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=opgoxuAV7y6dAUR3RyzMANw4kGw=; b=BMQOW IWPy2Qx5loILqe/F+NHHgb3/rn9ZUjTaGJyB065U8vsa0WsermZzaABrqKrbI9Yd i4gdBbxl9ahYPIZhSg1BsIhD63KWUNLtfQjNApl8d5zqQI9eqzXmlA1pJKc/Ki5N ZXh0G0f30dmSmeZ6+kh02Bic8mlfKEfPIS0dn4= Received: (qmail 16556 invoked by alias); 15 Oct 2018 20:50:25 -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 16156 invoked by uid 89); 15 Oct 2018 20:50:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=BSD, bsd X-HELO: mail-qt1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DACdLqZoqNeefqkLkB1HflqBbHm23apiGQa3wAqT74I=; b=gHn/EghHxoet++wTuXmxNXSqXo75dV2AqvvX6nv1o+VAjgiCElIKo8+SI71zBiJcID kSFogStBSU+ByZg5GjYFs8ov1L9DgeNjM8QQSGW+JxtrYxAa8N0kuwVen7NO9MLHn/Sk VUVuq62Aq4EW86yCN/KJW5XaMC4feKqrHf9HA= Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: hpa@zytor.com Subject: [PATCH 11/12] termios: Add powerpc termios-misc Date: Mon, 15 Oct 2018 17:49:55 -0300 Message-Id: <20181015204956.25558-11-adhemerval.zanella@linaro.org> In-Reply-To: <20181015204956.25558-1-adhemerval.zanella@linaro.org> References: <20181015204956.25558-1-adhemerval.zanella@linaro.org> PowerPC termios.h header contains additional BSD terminal mode definitions (sgttyb, tchars, ltchars, and associated TIOCPKT_* symbolic constants). This patch moves all powerpc termios specific definition to its own header. No semantic change is expected, checked on a build against a powerpc64le-linux-gnu build. * sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h: New file. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_MISC] (struct sgtty, struct tchars, struct ltchars, TIOCPKT_DATA, TIOCPKT_FLUSHREAD, TIOCPKT_FLUSHWRITE, TIOCPKT_STOP, TIOCPKT_START, TIOCPKT_NOSTOP, TIOCPKT_DOSTOP, _VINTR, _VQUIT, _VERASE, _VKILL, _VEOF, _VMIN, _VEOL, _VTIME, _VEOL2, _VSWTC): Move to termios-misc.h. * sysdeps/unix/sysv/linux/powerpc/Makefile [$subdir == misc] (sysdep_headers): Add termios-misc.h. --- sysdeps/unix/sysv/linux/powerpc/Makefile | 2 +- .../sysv/linux/powerpc/bits/termios-misc.h | 72 +++++++++++++++++++ .../unix/sysv/linux/powerpc/bits/termios.h | 50 +------------ 3 files changed, 74 insertions(+), 50 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h -- 2.17.1 diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile index 19ac59d862..7712428e10 100644 --- a/sysdeps/unix/sysv/linux/powerpc/Makefile +++ b/sysdeps/unix/sysv/linux/powerpc/Makefile @@ -23,7 +23,7 @@ LDFLAGS-tst-tlsmod2.so += -Wl,--no-tls-get-addr-optimize endif ifeq ($(subdir),misc) -sysdep_headers += bits/ppc.h +sysdep_headers += bits/ppc.h bits/termios-misc.h sysdep_routines += get_timebase_freq tests += test-gettimebasefreq tests += test-powerpc-linux-sysconf diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h new file mode 100644 index 0000000000..2e7fc2f7ae --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h @@ -0,0 +1,72 @@ +/* termios baud platform specific definitions. Linux/powerpc version. + Copyright (C) 2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + +#ifdef __USE_MISC + +struct sgttyb { + char sg_ispeed; + char sg_ospeed; + char sg_erase; + char sg_kill; + short sg_flags; +}; + +struct tchars { + char t_intrc; + char t_quitc; + char t_startc; + char t_stopc; + char t_eofc; + char t_brkc; +}; + +struct ltchars { + char t_suspc; + char t_dsuspc; + char t_rprntc; + char t_flushc; + char t_werasc; + char t_lnextc; +}; + +/* Used for packet mode */ +#define TIOCPKT_DATA 0 +#define TIOCPKT_FLUSHREAD 1 +#define TIOCPKT_FLUSHWRITE 2 +#define TIOCPKT_STOP 4 +#define TIOCPKT_START 8 +#define TIOCPKT_NOSTOP 16 +#define TIOCPKT_DOSTOP 32 + +/* c_cc characters */ +#define _VINTR 0 +#define _VQUIT 1 +#define _VERASE 2 +#define _VKILL 3 +#define _VEOF 4 +#define _VMIN 5 +#define _VEOL 6 +#define _VTIME 7 +#define _VEOL2 8 +#define _VSWTC 9 + +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h index 885bf952bd..4f00b4fe0c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h @@ -67,58 +67,10 @@ typedef unsigned int tcflag_t; #include -#ifdef __USE_MISC - -struct sgttyb { - char sg_ispeed; - char sg_ospeed; - char sg_erase; - char sg_kill; - short sg_flags; -}; - -struct tchars { - char t_intrc; - char t_quitc; - char t_startc; - char t_stopc; - char t_eofc; - char t_brkc; -}; - -struct ltchars { - char t_suspc; - char t_dsuspc; - char t_rprntc; - char t_flushc; - char t_werasc; - char t_lnextc; -}; - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -/* c_cc characters */ -#define _VINTR 0 -#define _VQUIT 1 -#define _VERASE 2 -#define _VKILL 3 -#define _VEOF 4 -#define _VMIN 5 -#define _VEOL 6 -#define _VTIME 7 -#define _VEOL2 8 -#define _VSWTC 9 +#include #ifdef __USE_MISC /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ # define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ #endif -#endif /* __USE_MISC */