From patchwork Mon Oct 15 20:49:56 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: 148897 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4252683lji; Mon, 15 Oct 2018 13:52:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV61WtiViAQe7H59Pjxa8uXAavshdw8vmY+KvNHfxpBvAB3hmOhE0XILII+hqYZXgJpx9m91Q X-Received: by 2002:a63:2dc5:: with SMTP id t188-v6mr16940763pgt.362.1539636726108; Mon, 15 Oct 2018 13:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539636726; cv=none; d=google.com; s=arc-20160816; b=TihjzeZmv71HyqKOgdFCp/n8zLhzqs6YSjj/AIwhZb0wwwb6ndlrh7muYTMwf4HTEm NmT+00UYjkQIUqVhPc8wZLostp9HlTaj/x/HcyFk83d/ZK7T+hVhBw658+QTxfrwztmJ LTovKH9aBCVDX7fb+sxNQAINREjkUv1o6ol2W82Gw6vYb3aGqL3isvM4oPqwSI+B66Xz qXBLgoPt7314EVSQCT2arc7ws78JPA9lZcMnsM2CgnrKXN1VqDPHV2i9C0f+B1QUZ2Tw mtl19l9yikOrDIyvBlEyN9OX/uJCRjVE4hEnDjTjpG6tW2XIQG+dNAPqpBSJ2jM/H4c1 CS+g== 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=bGWqBOF8PDAHuEYjjfAzec6zUrPo5HK8yWuZCCLRJT4=; b=x2NbdWFEp2VhOlqhki6v2fEJqPcWMQc657TD10WyLBykF32sCy8Rg2NrWZvmcXYylm Y2O00AbcPfAqfyi/YATJf6+IblDQgacvDC/QWXgWP/W/8rkgnnQvgaDiiv9GTyxlU0UQ WeQo/0bFtnS0ofl2w2U7d2IjjSRz8DsIWpYDwXN792qAgWMb1gdmW9OYhEXD99qEC6Hw d18H12sr621ubaVT5CjR/AsfXg5zCJyBd86918xKNIGUeJJi6LGURE+PpJF/8BRYFAoy feN12gZ7Fl7/TzsOotSGf/s72JAHMOdl3tNGO7GGSklrKUGC/OQ9CDvGEk9TGiReeAgs P4Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="Bwhu4z6/"; dkim=pass header.i=@linaro.org header.s=google header.b="baiHwgP/"; spf=pass (google.com: domain of libc-alpha-return-96447-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-96447-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 i25-v6si12226300pgi.426.2018.10.15.13.52.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 13:52:06 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-96447-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="Bwhu4z6/"; dkim=pass header.i=@linaro.org header.s=google header.b="baiHwgP/"; spf=pass (google.com: domain of libc-alpha-return-96447-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-96447-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=PyM25+tLLPzLZpFWZ8x20ixBEGft4nf +Uu1vmlCyIXl5n2ifUoWE+QrnKM4pxm8XpBaFX8WDMeuH5ykIsaqhlf29tHwNQ4p Og5tWusqIJmXI8Rt1bfWB3MpA8Ae9sgGOkb0Uk2KCqYV6lU583hMnkQNuQuyd8n+ bKMxYvcr4ddQ= 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=i9taM3YU9CVKst8wKLqn+4oPznU=; b=Bwhu4 z6/6Si9JLTGM5JzWs+7K+xCz8RCqi7xS8p8lk0kGmZq3IJcRdFARkZmPICz3lpJ4 sir+UI7ROo/Jt3EWN5Jb8GY1lSaUJMPDeYgl5gyssJ4LRyOsHWxNmCIrV/iSTGFd EMf9hEn44FKR2Nb8HdDwhrSq92UZbw0cPAkKvU= Received: (qmail 16704 invoked by alias); 15 Oct 2018 20:50:26 -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 16551 invoked by uid 89); 15 Oct 2018 20:50:25 -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=295 X-HELO: mail-qt1-f195.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=bGWqBOF8PDAHuEYjjfAzec6zUrPo5HK8yWuZCCLRJT4=; b=baiHwgP/d+eNKDuAct+hp0LM5Ek4BnNZlAI/Ec6PhZpn5/AfeF0C+rBPWMGi+90h0s koTmjrOpDSARYmuEp7smkbeTl41Qwbd/R+/+8PvCTDzNNdllrSgrMklSh6hLXE7Z5vac tx+7mUbCQvMAJDFq6IHoqkjkIO5ozvZhG8pLU= Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: hpa@zytor.com Subject: [PATCH 12/12] termios: Consolidate termios.h Date: Mon, 15 Oct 2018 17:49:56 -0300 Message-Id: <20181015204956.25558-12-adhemerval.zanella@linaro.org> In-Reply-To: <20181015204956.25558-1-adhemerval.zanella@linaro.org> References: <20181015204956.25558-1-adhemerval.zanella@linaro.org> This patch consolidates the Linux termios.h by removing the arch-specific one. No semantic change is expected, checked on a build against x86_64-linux-gnu, alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add bits/termios-misc.h. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Remove file. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/bits/termios-misc.h: New file. * sysdeps/unix/sysv/linux/bits/termios.h: Include termios-misc.h. --- sysdeps/unix/sysv/linux/Makefile | 3 +- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 69 ----------------- sysdeps/unix/sysv/linux/bits/termios-misc.h | 21 +++++ sysdeps/unix/sysv/linux/bits/termios.h | 2 + sysdeps/unix/sysv/linux/mips/bits/termios.h | 74 ------------------ sysdeps/unix/sysv/linux/powerpc/Makefile | 2 +- .../unix/sysv/linux/powerpc/bits/termios.h | 76 ------------------- sysdeps/unix/sysv/linux/sparc/bits/termios.h | 74 ------------------ 8 files changed, 26 insertions(+), 295 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios.h create mode 100644 sysdeps/unix/sysv/linux/bits/termios-misc.h delete mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios.h delete mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios.h delete mode 100644 sysdeps/unix/sysv/linux/sparc/bits/termios.h -- 2.17.1 diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index e3035250c9..08fd74479b 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -46,7 +46,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ bits/msq-pad.h bits/termios-struct.h bits/termios-c_cc.h \ bits/termios-c_iflag.h bits/termios-c_oflag.h \ bits/termios-baud.h bits/termios-c_cflag.h \ - bits/termios-c_lflag.h bits/termios-tcflow.h + bits/termios-c_lflag.h bits/termios-tcflow.h \ + bits/termios-misc.h tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h deleted file mode 100644 index 1824b3d8e7..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ /dev/null @@ -1,69 +0,0 @@ -/* termios type and macro definitions. Linux version. - Copyright (C) 1993-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 - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#include -#include -#include -#include - -/* c_cflag bit meaning */ -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -#endif -#include - -#include -#include - -/* Values for the ACTION argument to `tcflow'. */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -#include diff --git a/sysdeps/unix/sysv/linux/bits/termios-misc.h b/sysdeps/unix/sysv/linux/bits/termios-misc.h new file mode 100644 index 0000000000..83bdec342e --- /dev/null +++ b/sysdeps/unix/sysv/linux/bits/termios-misc.h @@ -0,0 +1,21 @@ +/* termios baud platform specific definitions. Linux/generic 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 diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h index 1d47729945..41a7c53322 100644 --- a/sysdeps/unix/sysv/linux/bits/termios.h +++ b/sysdeps/unix/sysv/linux/bits/termios.h @@ -72,3 +72,5 @@ typedef unsigned int tcflag_t; #define TCIOFLUSH 2 #include + +#include diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h deleted file mode 100644 index 3b015432c0..0000000000 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ /dev/null @@ -1,74 +0,0 @@ -/* termios type and macro definitions. Linux/MIPS version. - Copyright (C) 1993-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 - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#include -#include -#include -#include - -/* c_cflag bit meaning */ -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -#endif -#include - -#include -#include - -#ifdef __USE_MISC -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ -#endif - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 /* Suspend output. */ -#define TCOON 1 /* Restart suspended output. */ -#define TCIOFF 2 /* Send a STOP character. */ -#define TCION 3 /* Send a START character. */ - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 /* Discard data received but not yet read. */ -#define TCOFLUSH 1 /* Discard data written but not yet sent. */ -#define TCIOFLUSH 2 /* Discard all pending data. */ - -#include diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile index 7712428e10..19ac59d862 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 bits/termios-misc.h +sysdep_headers += bits/ppc.h sysdep_routines += get_timebase_freq tests += test-gettimebasefreq tests += test-powerpc-linux-sysconf diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h deleted file mode 100644 index 4f00b4fe0c..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1997-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 - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#include -#include -#include -#include - -/* c_cflag bit meaning */ -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -#endif -#include - -#include -#include - -/* Values for the ACTION argument to `tcflow'. */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -#include - -#include - -#ifdef __USE_MISC -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ -#endif - diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h deleted file mode 100644 index fbf4df4335..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h +++ /dev/null @@ -1,74 +0,0 @@ -/* termios type and macro definitions. Linux/SPARC version. - Copyright (C) 1993-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 - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#include -#include -#include -#include - -/* c_cflag bit meaning */ -#define B0 0x00000000 /* hang up */ -#define B50 0x00000001 -#define B75 0x00000002 -#define B110 0x00000003 -#define B134 0x00000004 -#define B150 0x00000005 -#define B200 0x00000006 -#define B300 0x00000007 -#define B600 0x00000008 -#define B1200 0x00000009 -#define B1800 0x0000000a -#define B2400 0x0000000b -#define B4800 0x0000000c -#define B9600 0x0000000d -#define B19200 0x0000000e -#define B38400 0x0000000f -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -#endif -#include - -#include -#include - -#ifdef __USE_MISC -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ -#endif - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -#include