From patchwork Fri Dec 28 01:09:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 154585 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7509360ljp; Thu, 27 Dec 2018 17:10:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN40kOJFYWwdnpdb2XGn+ZZ+rJYGunhsjh5NGxkNXTgtDC/hx70uWFMN8IEqcuWaYvmpLzrB X-Received: by 2002:a65:60c2:: with SMTP id r2mr24818730pgv.393.1545959432517; Thu, 27 Dec 2018 17:10:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545959432; cv=none; d=google.com; s=arc-20160816; b=GZ/DULONFsQntV30tC0XBYmfddh5uYyktYwUsm8K7HFJOmeIcKh1tJ97Eny7+z5tbQ HYd0fj2swgm7ChX01JxURxIZsgdqVRZkOUTLG4I5lkzK92PAKduNhMesYvcxoUPleKdD c6HziViHG3uuX0hzEdvyC5BdTIDC7HuDMTJhtA89GsFavGL+nRin0WRY17ABINsFst9h tuvPe1HIf7JSyHqBPorbkmDB5fsvXt7Q6Wpmq54V20pGUIwtNKf9ZTEBzIxW8hZTwxzQ qv8IouLmvXtpLTUQyBu6LGhjuEjCaCCjzYBcVsjS5KqIv3w/2azFidQhdOTvhYvQAb72 OxpA== 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: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=XmI5DpuNIJheobh6YBPom6nsLX0GsY6et+MfjjKCuK8=; b=itn7fzR9EsubBtejKGtvrxDK6XIdwJ5lu6WSI6bGyrwG2xpUsqlh8SkKaecNi9LeX7 GRAXbO+vW6zLNUlHfK7IBsPgcXuDslpel+7Vk6rEWE6nCWMMf6gvsYzKSYV8Www1KeQh qs5yb3PRMWG8qd5rVooQuuAwh6f/c+3WNX/fitkOr6OA8yW1XobmGxhuxS5zWnPgcNGj P07prupojVRnSY/QTHGjQBC+NDGj1hSU/rlqhHmKQkSxZ0k87hHo017wLIRpIQDkDeUz kEcF955WR61/CrkcGrY576sfZp+jMziwOms9r8FOKnGusw5cdUkIWE/D6aSZEXklXceL bDKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="GwZmcj/f"; dkim=pass header.i=@linaro.org header.s=google header.b=A3hCx9Vh; spf=pass (google.com: domain of libc-alpha-return-98821-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98821-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 h36si17542795pgm.200.2018.12.27.17.10.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Dec 2018 17:10:32 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-98821-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="GwZmcj/f"; dkim=pass header.i=@linaro.org header.s=google header.b=A3hCx9Vh; spf=pass (google.com: domain of libc-alpha-return-98821-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98821-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:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=TyKJTV0/I2aCl3NmlT0w5IwV3GniF+E ai+X8hHcnyUFZo8B7at6iZequF/Y5Yo+tH0Eg/tg4hcEn2qTN0yY8Ei9O0z9srDq DZQXcK9LdUBoxlyS6bpJcWtBOGUcTgFWVGcr00aRbAwU+5Pwq6H66Mju3DiufGH0 krHOsuqTp+ZA= 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:subject:date:message-id:in-reply-to :references; s=default; bh=CUlPH6D5sfBPcPQm922POthO+U0=; b=GwZmc j/fKfDHQ500fYUPIV6y9bIUxPAbs6Atig5R/CTrtxDB/HFrNhMAREb+Cd0rdbP5E PTZRT+B7DkyL+cKYFKgp7tzMrtI5YvACw4KMNNpPM8N0/Zxl6g850sIg213wdQQe QtrKFbQL3bMAN5lw/aB9R7ifqw7wg+8eVO+IGo= Received: (qmail 48517 invoked by alias); 28 Dec 2018 01:10:11 -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 48447 invoked by uid 89); 28 Dec 2018 01:10:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=1986, physically, Hx-spam-relays-external:209.85.160.195, H*RU:209.85.160.195 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:subject:date:message-id:in-reply-to:references; bh=XmI5DpuNIJheobh6YBPom6nsLX0GsY6et+MfjjKCuK8=; b=A3hCx9VhQobzf1nmpAdqrer9t8z1Oao21k2u8c8iN0TqhrPJ02W1VnTNbsDTgZcFdI vGe9D+HsFb5MkhjqVsrcrD2EvF3Qkq0O6IPKwcrIH09oVlfxcg7//VOw8xEEiqNzkpeu nUe2SVrgJQEF+C8m0RK44LJ1u3MnJcpUrwEkg= Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH v2 01/12] termios: Define TIOCSER_TEMT with __USE_MISC (BZ#17783) Date: Thu, 27 Dec 2018 23:09:50 -0200 Message-Id: <20181228011001.22260-2-adhemerval.zanella@linaro.org> In-Reply-To: <20181228011001.22260-1-adhemerval.zanella@linaro.org> References: <20181228011001.22260-1-adhemerval.zanella@linaro.org> This patch defines TIOCSER_TEMT on all architectures using the __USE_MISC guards similar to BZ#17782 fix. Latest Linux UAPI defines TIOCSER_TEMT with the same value for all architectures, so it is safe to use the value as default for all ABIs. Checked on x86_64linux-gnu and build against sparc64-linux-gnu and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/bits/termios.h [__USE_MISC] (TIOCSER_TEMT): Define. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_MISC] (TIOCSER_TEMT): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_MISC] (TEOCSER_TEMT): Likewise. --- sysdeps/unix/sysv/linux/bits/termios.h | 5 +++++ sysdeps/unix/sysv/linux/powerpc/bits/termios.h | 4 +++- sysdeps/unix/sysv/linux/sparc/bits/termios.h | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h index 35efa97576..1e567affc3 100644 --- a/sysdeps/unix/sysv/linux/bits/termios.h +++ b/sysdeps/unix/sysv/linux/bits/termios.h @@ -198,6 +198,11 @@ struct termios # define EXTPROC 0200000 #endif +#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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h index 1362cce551..afe592d5e4 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h @@ -273,7 +273,9 @@ struct ltchars { #define _VEOL2 8 #define _VSWTC 9 +#ifdef __USE_MISC /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ +# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ +#endif #endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h index 4489b6c2fd..ffe8483694 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h @@ -203,9 +203,9 @@ struct termios # define EXTPROC 0x00010000 #endif -# if defined __USE_GNU +#ifdef __USE_MISC /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ +# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ #endif /* tcflow() and TCXONC use these */