From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bumble.larch.relay.mailchannels.net (bumble.larch.relay.mailchannels.net [23.83.213.25]) by sourceware.org (Postfix) with ESMTPS id B237038319C2 for ; Fri, 30 Jun 2023 15:19:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B237038319C2 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4673B5C1A08; Fri, 30 Jun 2023 15:19:13 +0000 (UTC) Received: from pdx1-sub0-mail-a286.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id E2D535C1175; Fri, 30 Jun 2023 15:19:11 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1688138351; a=rsa-sha256; cv=none; b=s05EQhysTkP5ezWDtko0SuRFIwIwFg7yF8zNxNse61h6ONm9XuvLlpDDEt+eQiX7Nluqab ZXVx6PYtUzU9sOqEW+ejhCMCKTN5QW1ka7sVrwbKOG05ipaXApncuZhy5ezw5FlWHbnCyk kLt7utMib3es6vFQhoEWLsUxzhMjhqVoEj34c6DUw/dAoJdiLvyIluPh2VroL59bikxiJ7 u8j774tLWiwRdXD3uNgw9wSu2cwx+2bUN9QNVwlUjdZJwZAqm0SLl+EU22lJpNMp54bRaQ WPkEBWdvODbWompYAwsVCKCOEBvSA5i5+f5je2FwBtgNBojBEKZRYPAL6WKYeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1688138351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=tSt/tkRNfh0TixZJE7MsjBSTH/sl/0qyU1ZYDu4n7eA=; b=H0KV6CRo4qlHJz7GcYNbiR4fvUwcm7Uo6cXnPKR1of4jqW1VdHcaXhLiIlnbGLyIYBSWcc BARXl3Ou0e5cU77CXNPe8jZd0JkV6NaXZGBfRW/mcZt94slTLVrGHTvraw26XWPKao57Kl mHngob7ZnjbqE8CbWiFP0m3zaQXmqHZw0VIxQvjdMu3JzN7SO+kijfwfL88BwqBt9wxH4T XGRFC4NcFEZ7QCJd8ftkyBfbFvPWg+xoR6XRQVM/BuArbNPS3EpF3AWS/KUkcMP3kvap3F pHp6N4hyO9vv75teArWvuak8lbtNoCqml+yrXQhaDYIN/za3J7ZNG4IgvSp61Q== ARC-Authentication-Results: i=1; rspamd-85899d6fcc-dg6c2; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Good X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Grain-Turn: 56f6283b4ea15c03_1688138353143_2753998718 X-MC-Loop-Signature: 1688138353143:3443177390 X-MC-Ingress-Time: 1688138353142 Received: from pdx1-sub0-mail-a286.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.104.253.208 (trex/6.9.1); Fri, 30 Jun 2023 15:19:13 +0000 Received: from [192.168.0.182] (bras-vprn-toroon4834w-lp130-09-174-91-45-44.dsl.bell.ca [174.91.45.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a286.dreamhost.com (Postfix) with ESMTPSA id 4QszW33NS9z7v; Fri, 30 Jun 2023 08:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1688138351; bh=tSt/tkRNfh0TixZJE7MsjBSTH/sl/0qyU1ZYDu4n7eA=; h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding; b=LCMmIXbP696DYSiJZVTrnaWgBTmyG0d4puTpA/4hZVyRDNgswY3y1iuFfqC/8ZS8G a0wQJpiTY/i4soFFKTYfjPpleYd93pdLH67JVUrwklmcr/BK4WPG975AWMocbRejWa 4ZkESRIe+ZmkzYI3qtsobJj7gmQDuPB67jrhPahy9asTOe8MIrdhooERK0T1645/ZT qwf5to9FMIBgK16eH8Q2wg0oTmN+3ERQSFu/PZ22ZsCYRpH7w0rPaAGj3r4Q/2XoBO jVIF2EmVPrPPxQlE03Oy2QdQEny+CU5VgbsOCgG6LWaxbP4ucDFRgsC/hMey94T6o+ 5IQis8QRmt34A== Message-ID: <39e90ca1-034f-6b40-e678-bbf92e63414e@gotplt.org> Date: Fri, 30 Jun 2023 11:19:09 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v3 09/16] posix/bits/unistd.h: Clearly separate declaration from definitions Content-Language: en-US To: =?UTF-8?B?RnLDqWTDqXJpYyBCw6lyYXQ=?= , libc-alpha@sourceware.org References: <20230628084246.778302-1-fberat@redhat.com> <20230628084246.778302-10-fberat@redhat.com> From: Siddhesh Poyarekar In-Reply-To: <20230628084246.778302-10-fberat@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3037.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-06-28 04:42, Frédéric Bérat wrote: > This change is similar to what was done for bits/wchar2.h. > Routines declaration are moved into a dedicated bits/unistd-decl.h file > which is then included into the bits/unistd.h file. > > This will allow to adapt the files so that PLT entries are not created when > _FORTIFY_SOURCE is enabled. > --- Reviewed-by: Siddhesh Poyarekar > include/bits/unistd-decl.h | 1 + > include/unistd.h | 1 + > posix/Makefile | 1 + > posix/bits/unistd-decl.h | 198 +++++++++++++++++++++++++++++++++++++ > posix/bits/unistd.h | 154 +---------------------------- > 5 files changed, 202 insertions(+), 153 deletions(-) > create mode 100644 include/bits/unistd-decl.h > create mode 100644 posix/bits/unistd-decl.h > > diff --git a/include/bits/unistd-decl.h b/include/bits/unistd-decl.h > new file mode 100644 > index 0000000000..7fcbd272ac > --- /dev/null > +++ b/include/bits/unistd-decl.h > @@ -0,0 +1 @@ > +#include > diff --git a/include/unistd.h b/include/unistd.h > index 4345d08d60..b042a485f9 100644 > --- a/include/unistd.h > +++ b/include/unistd.h > @@ -5,6 +5,7 @@ > > # include > # include > +# include > > libc_hidden_proto (_exit, __noreturn__) > # ifndef NO_RTLD_HIDDEN > diff --git a/posix/Makefile b/posix/Makefile > index 5113ee3b74..3d368b91f6 100644 > --- a/posix/Makefile > +++ b/posix/Makefile > @@ -42,6 +42,7 @@ headers := \ > bits/types/idtype_t.h \ > bits/types/struct_sched_param.h \ > bits/typesizes.h \ > + bits/unistd-decl.h \ > bits/unistd.h \ > bits/unistd_ext.h \ > bits/utsname.h \ > diff --git a/posix/bits/unistd-decl.h b/posix/bits/unistd-decl.h > new file mode 100644 > index 0000000000..2d0f7a4456 > --- /dev/null > +++ b/posix/bits/unistd-decl.h > @@ -0,0 +1,198 @@ > +/* Checking routines for unistd functions. Declaration only. > + Copyright (C) 2023 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 _BITS_UNISTD_DECL_H > +#define _BITS_UNISTD_DECL_H 1 > + > +#ifndef _UNISTD_H > +# error "Never include directly; use instead." > +#endif > + > +extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, > + size_t __buflen) > + __wur __attr_access ((__write_only__, 2, 3)); > +extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf, > + size_t __nbytes), read) > + __wur __attr_access ((__write_only__, 2, 3)); > +extern ssize_t __REDIRECT (__read_chk_warn, > + (int __fd, void *__buf, size_t __nbytes, > + size_t __buflen), __read_chk) > + __wur __warnattr ("read called with bigger length than size of " > + "the destination buffer"); > + > +#if defined __USE_UNIX98 || defined __USE_XOPEN2K8 > +extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, > + __off_t __offset, size_t __bufsize) > + __wur __attr_access ((__write_only__, 2, 3)); > +extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, > + __off64_t __offset, size_t __bufsize) > + __wur __attr_access ((__write_only__, 2, 3)); > +extern ssize_t __REDIRECT (__pread_alias, > + (int __fd, void *__buf, size_t __nbytes, > + __off_t __offset), pread) > + __wur __attr_access ((__write_only__, 2, 3)); > +extern ssize_t __REDIRECT (__pread64_alias, > + (int __fd, void *__buf, size_t __nbytes, > + __off64_t __offset), pread64) > + __wur __attr_access ((__write_only__, 2, 3)); > +extern ssize_t __REDIRECT (__pread_chk_warn, > + (int __fd, void *__buf, size_t __nbytes, > + __off_t __offset, size_t __bufsize), __pread_chk) > + __wur __warnattr ("pread called with bigger length than size of " > + "the destination buffer"); > +extern ssize_t __REDIRECT (__pread64_chk_warn, > + (int __fd, void *__buf, size_t __nbytes, > + __off64_t __offset, size_t __bufsize), > + __pread64_chk) > + __wur __warnattr ("pread64 called with bigger length than size of " > + "the destination buffer"); > +#endif > + > +#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K > +extern ssize_t __readlink_chk (const char *__restrict __path, > + char *__restrict __buf, size_t __len, > + size_t __buflen) > + __THROW __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3)); > +extern ssize_t __REDIRECT_NTH (__readlink_alias, > + (const char *__restrict __path, > + char *__restrict __buf, size_t __len), readlink) > + __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3)); > +extern ssize_t __REDIRECT_NTH (__readlink_chk_warn, > + (const char *__restrict __path, > + char *__restrict __buf, size_t __len, > + size_t __buflen), __readlink_chk) > + __nonnull ((1, 2)) __wur __warnattr ("readlink called with bigger length " > + "than size of destination buffer"); > +#endif > + > +#ifdef __USE_ATFILE > +extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path, > + char *__restrict __buf, size_t __len, > + size_t __buflen) > + __THROW __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4)); > +extern ssize_t __REDIRECT_NTH (__readlinkat_alias, > + (int __fd, const char *__restrict __path, > + char *__restrict __buf, size_t __len), > + readlinkat) > + __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4)); > +extern ssize_t __REDIRECT_NTH (__readlinkat_chk_warn, > + (int __fd, const char *__restrict __path, > + char *__restrict __buf, size_t __len, > + size_t __buflen), __readlinkat_chk) > + __nonnull ((2, 3)) __wur __warnattr ("readlinkat called with bigger " > + "length than size of destination " > + "buffer"); > +#endif > + > +extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) > + __THROW __wur; > +extern char *__REDIRECT_NTH (__getcwd_alias, > + (char *__buf, size_t __size), getcwd) __wur; > +extern char *__REDIRECT_NTH (__getcwd_chk_warn, > + (char *__buf, size_t __size, size_t __buflen), > + __getcwd_chk) > + __wur __warnattr ("getcwd caller with bigger length than size of " > + "destination buffer"); > + > +#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED > +extern char *__getwd_chk (char *__buf, size_t buflen) > + __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2)); > +extern char *__REDIRECT_NTH (__getwd_warn, (char *__buf), getwd) > + __nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd " > + "doesn't specify buffer size"); > +#endif > + > +extern size_t __confstr_chk (int __name, char *__buf, size_t __len, > + size_t __buflen) __THROW > + __attr_access ((__write_only__, 2, 3)); > +extern size_t __REDIRECT_NTH (__confstr_alias, (int __name, char *__buf, > + size_t __len), confstr) > + __attr_access ((__write_only__, 2, 3)); > +extern size_t __REDIRECT_NTH (__confstr_chk_warn, > + (int __name, char *__buf, size_t __len, > + size_t __buflen), __confstr_chk) > + __warnattr ("confstr called with bigger length than size of destination " > + "buffer"); > + > + > +extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) > + __THROW __wur __attr_access ((__write_only__, 2, 1)); > +extern int __REDIRECT_NTH (__getgroups_alias, (int __size, __gid_t __list[]), > + getgroups) __wur __attr_access ((__write_only__, 2, 1)); > +extern int __REDIRECT_NTH (__getgroups_chk_warn, > + (int __size, __gid_t __list[], size_t __listlen), > + __getgroups_chk) > + __wur __warnattr ("getgroups called with bigger group count than what " > + "can fit into destination buffer"); > + > + > +extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, > + size_t __nreal) __THROW __nonnull ((2)) > + __attr_access ((__write_only__, 2, 3)); > +extern int __REDIRECT_NTH (__ttyname_r_alias, (int __fd, char *__buf, > + size_t __buflen), ttyname_r) > + __nonnull ((2)); > +extern int __REDIRECT_NTH (__ttyname_r_chk_warn, > + (int __fd, char *__buf, size_t __buflen, > + size_t __nreal), __ttyname_r_chk) > + __nonnull ((2)) __warnattr ("ttyname_r called with bigger buflen than " > + "size of destination buffer"); > + > + > +#ifdef __USE_POSIX199506 > +extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) > + __nonnull ((1)) __attr_access ((__write_only__, 1, 2)); > +extern int __REDIRECT (__getlogin_r_alias, (char *__buf, size_t __buflen), > + getlogin_r) __nonnull ((1)); > +extern int __REDIRECT (__getlogin_r_chk_warn, > + (char *__buf, size_t __buflen, size_t __nreal), > + __getlogin_r_chk) > + __nonnull ((1)) __warnattr ("getlogin_r called with bigger buflen than " > + "size of destination buffer"); > +#endif > + > + > +#if defined __USE_MISC || defined __USE_UNIX98 > +extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) > + __THROW __nonnull ((1)) __attr_access ((__write_only__, 1, 2)); > +extern int __REDIRECT_NTH (__gethostname_alias, (char *__buf, size_t __buflen), > + gethostname) > + __nonnull ((1)) __attr_access ((__write_only__, 1, 2)); > +extern int __REDIRECT_NTH (__gethostname_chk_warn, > + (char *__buf, size_t __buflen, size_t __nreal), > + __gethostname_chk) > + __nonnull ((1)) __warnattr ("gethostname called with bigger buflen than " > + "size of destination buffer"); > +#endif > + > + > +#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_UNIX98) > +extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) > + __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2)); > +extern int __REDIRECT_NTH (__getdomainname_alias, (char *__buf, > + size_t __buflen), > + getdomainname) __nonnull ((1)) > + __wur __attr_access ((__write_only__, 1, 2)); > +extern int __REDIRECT_NTH (__getdomainname_chk_warn, > + (char *__buf, size_t __buflen, size_t __nreal), > + __getdomainname_chk) > + __nonnull ((1)) __wur __warnattr ("getdomainname called with bigger " > + "buflen than size of destination " > + "buffer"); > +#endif > +#endif /* bits/unistd-decl.h. */ > diff --git a/posix/bits/unistd.h b/posix/bits/unistd.h > index 2a0782e6c8..6a381116a9 100644 > --- a/posix/bits/unistd.h > +++ b/posix/bits/unistd.h > @@ -20,17 +20,7 @@ > # error "Never include directly; use instead." > #endif > > -extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, > - size_t __buflen) > - __wur __attr_access ((__write_only__, 2, 3)); > -extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf, > - size_t __nbytes), read) > - __wur __attr_access ((__write_only__, 2, 3)); > -extern ssize_t __REDIRECT (__read_chk_warn, > - (int __fd, void *__buf, size_t __nbytes, > - size_t __buflen), __read_chk) > - __wur __warnattr ("read called with bigger length than size of " > - "the destination buffer"); > +# include > > __fortify_function __wur ssize_t > read (int __fd, void *__buf, size_t __nbytes) > @@ -41,32 +31,6 @@ read (int __fd, void *__buf, size_t __nbytes) > } > > #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 > -extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, > - __off_t __offset, size_t __bufsize) > - __wur __attr_access ((__write_only__, 2, 3)); > -extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, > - __off64_t __offset, size_t __bufsize) > - __wur __attr_access ((__write_only__, 2, 3)); > -extern ssize_t __REDIRECT (__pread_alias, > - (int __fd, void *__buf, size_t __nbytes, > - __off_t __offset), pread) > - __wur __attr_access ((__write_only__, 2, 3)); > -extern ssize_t __REDIRECT (__pread64_alias, > - (int __fd, void *__buf, size_t __nbytes, > - __off64_t __offset), pread64) > - __wur __attr_access ((__write_only__, 2, 3)); > -extern ssize_t __REDIRECT (__pread_chk_warn, > - (int __fd, void *__buf, size_t __nbytes, > - __off_t __offset, size_t __bufsize), __pread_chk) > - __wur __warnattr ("pread called with bigger length than size of " > - "the destination buffer"); > -extern ssize_t __REDIRECT (__pread64_chk_warn, > - (int __fd, void *__buf, size_t __nbytes, > - __off64_t __offset, size_t __bufsize), > - __pread64_chk) > - __wur __warnattr ("pread64 called with bigger length than size of " > - "the destination buffer"); > - > # ifndef __USE_FILE_OFFSET64 > __fortify_function __wur ssize_t > pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) > @@ -97,21 +61,6 @@ pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) > #endif > > #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K > -extern ssize_t __readlink_chk (const char *__restrict __path, > - char *__restrict __buf, size_t __len, > - size_t __buflen) > - __THROW __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3)); > -extern ssize_t __REDIRECT_NTH (__readlink_alias, > - (const char *__restrict __path, > - char *__restrict __buf, size_t __len), readlink) > - __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3)); > -extern ssize_t __REDIRECT_NTH (__readlink_chk_warn, > - (const char *__restrict __path, > - char *__restrict __buf, size_t __len, > - size_t __buflen), __readlink_chk) > - __nonnull ((1, 2)) __wur __warnattr ("readlink called with bigger length " > - "than size of destination buffer"); > - > __fortify_function __nonnull ((1, 2)) __wur ssize_t > __NTH (readlink (const char *__restrict __path, char *__restrict __buf, > size_t __len)) > @@ -123,23 +72,6 @@ __NTH (readlink (const char *__restrict __path, char *__restrict __buf, > #endif > > #ifdef __USE_ATFILE > -extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path, > - char *__restrict __buf, size_t __len, > - size_t __buflen) > - __THROW __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4)); > -extern ssize_t __REDIRECT_NTH (__readlinkat_alias, > - (int __fd, const char *__restrict __path, > - char *__restrict __buf, size_t __len), > - readlinkat) > - __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4)); > -extern ssize_t __REDIRECT_NTH (__readlinkat_chk_warn, > - (int __fd, const char *__restrict __path, > - char *__restrict __buf, size_t __len, > - size_t __buflen), __readlinkat_chk) > - __nonnull ((2, 3)) __wur __warnattr ("readlinkat called with bigger " > - "length than size of destination " > - "buffer"); > - > __fortify_function __nonnull ((2, 3)) __wur ssize_t > __NTH (readlinkat (int __fd, const char *__restrict __path, > char *__restrict __buf, size_t __len)) > @@ -150,16 +82,6 @@ __NTH (readlinkat (int __fd, const char *__restrict __path, > } > #endif > > -extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) > - __THROW __wur; > -extern char *__REDIRECT_NTH (__getcwd_alias, > - (char *__buf, size_t __size), getcwd) __wur; > -extern char *__REDIRECT_NTH (__getcwd_chk_warn, > - (char *__buf, size_t __size, size_t __buflen), > - __getcwd_chk) > - __wur __warnattr ("getcwd caller with bigger length than size of " > - "destination buffer"); > - > __fortify_function __wur char * > __NTH (getcwd (char *__buf, size_t __size)) > { > @@ -169,12 +91,6 @@ __NTH (getcwd (char *__buf, size_t __size)) > } > > #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED > -extern char *__getwd_chk (char *__buf, size_t buflen) > - __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2)); > -extern char *__REDIRECT_NTH (__getwd_warn, (char *__buf), getwd) > - __nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd " > - "doesn't specify buffer size"); > - > __fortify_function __nonnull ((1)) __attribute_deprecated__ __wur char * > __NTH (getwd (char *__buf)) > { > @@ -184,18 +100,6 @@ __NTH (getwd (char *__buf)) > } > #endif > > -extern size_t __confstr_chk (int __name, char *__buf, size_t __len, > - size_t __buflen) __THROW > - __attr_access ((__write_only__, 2, 3)); > -extern size_t __REDIRECT_NTH (__confstr_alias, (int __name, char *__buf, > - size_t __len), confstr) > - __attr_access ((__write_only__, 2, 3)); > -extern size_t __REDIRECT_NTH (__confstr_chk_warn, > - (int __name, char *__buf, size_t __len, > - size_t __buflen), __confstr_chk) > - __warnattr ("confstr called with bigger length than size of destination " > - "buffer"); > - > __fortify_function size_t > __NTH (confstr (int __name, char *__buf, size_t __len)) > { > @@ -205,16 +109,6 @@ __NTH (confstr (int __name, char *__buf, size_t __len)) > } > > > -extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) > - __THROW __wur __attr_access ((__write_only__, 2, 1)); > -extern int __REDIRECT_NTH (__getgroups_alias, (int __size, __gid_t __list[]), > - getgroups) __wur __attr_access ((__write_only__, 2, 1)); > -extern int __REDIRECT_NTH (__getgroups_chk_warn, > - (int __size, __gid_t __list[], size_t __listlen), > - __getgroups_chk) > - __wur __warnattr ("getgroups called with bigger group count than what " > - "can fit into destination buffer"); > - > __fortify_function int > __NTH (getgroups (int __size, __gid_t __list[])) > { > @@ -224,18 +118,6 @@ __NTH (getgroups (int __size, __gid_t __list[])) > } > > > -extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, > - size_t __nreal) __THROW __nonnull ((2)) > - __attr_access ((__write_only__, 2, 3)); > -extern int __REDIRECT_NTH (__ttyname_r_alias, (int __fd, char *__buf, > - size_t __buflen), ttyname_r) > - __nonnull ((2)); > -extern int __REDIRECT_NTH (__ttyname_r_chk_warn, > - (int __fd, char *__buf, size_t __buflen, > - size_t __nreal), __ttyname_r_chk) > - __nonnull ((2)) __warnattr ("ttyname_r called with bigger buflen than " > - "size of destination buffer"); > - > __fortify_function int > __NTH (ttyname_r (int __fd, char *__buf, size_t __buflen)) > { > @@ -246,16 +128,6 @@ __NTH (ttyname_r (int __fd, char *__buf, size_t __buflen)) > > > #ifdef __USE_POSIX199506 > -extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) > - __nonnull ((1)) __attr_access ((__write_only__, 1, 2)); > -extern int __REDIRECT (__getlogin_r_alias, (char *__buf, size_t __buflen), > - getlogin_r) __nonnull ((1)); > -extern int __REDIRECT (__getlogin_r_chk_warn, > - (char *__buf, size_t __buflen, size_t __nreal), > - __getlogin_r_chk) > - __nonnull ((1)) __warnattr ("getlogin_r called with bigger buflen than " > - "size of destination buffer"); > - > __fortify_function int > getlogin_r (char *__buf, size_t __buflen) > { > @@ -267,17 +139,6 @@ getlogin_r (char *__buf, size_t __buflen) > > > #if defined __USE_MISC || defined __USE_UNIX98 > -extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) > - __THROW __nonnull ((1)) __attr_access ((__write_only__, 1, 2)); > -extern int __REDIRECT_NTH (__gethostname_alias, (char *__buf, size_t __buflen), > - gethostname) > - __nonnull ((1)) __attr_access ((__write_only__, 1, 2)); > -extern int __REDIRECT_NTH (__gethostname_chk_warn, > - (char *__buf, size_t __buflen, size_t __nreal), > - __gethostname_chk) > - __nonnull ((1)) __warnattr ("gethostname called with bigger buflen than " > - "size of destination buffer"); > - > __fortify_function int > __NTH (gethostname (char *__buf, size_t __buflen)) > { > @@ -289,19 +150,6 @@ __NTH (gethostname (char *__buf, size_t __buflen)) > > > #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_UNIX98) > -extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) > - __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2)); > -extern int __REDIRECT_NTH (__getdomainname_alias, (char *__buf, > - size_t __buflen), > - getdomainname) __nonnull ((1)) > - __wur __attr_access ((__write_only__, 1, 2)); > -extern int __REDIRECT_NTH (__getdomainname_chk_warn, > - (char *__buf, size_t __buflen, size_t __nreal), > - __getdomainname_chk) > - __nonnull ((1)) __wur __warnattr ("getdomainname called with bigger " > - "buflen than size of destination " > - "buffer"); > - > __fortify_function int > __NTH (getdomainname (char *__buf, size_t __buflen)) > {