From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id ED71B386F82E for ; Wed, 22 Apr 2020 10:10:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ED71B386F82E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jRCKu-0001i0-M2; Wed, 22 Apr 2020 10:10:32 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jRCKu-00074y-Io; Wed, 22 Apr 2020 12:10:32 +0200 From: Florian Weimer To: Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH 10/10] dirent: Deprecate getdirentries References: <20200417132209.22065-1-adhemerval.zanella@linaro.org> <20200417132209.22065-10-adhemerval.zanella@linaro.org> Date: Wed, 22 Apr 2020 12:10:32 +0200 In-Reply-To: <20200417132209.22065-10-adhemerval.zanella@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Fri, 17 Apr 2020 10:22:09 -0300") Message-ID: <87ftcvltk7.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-21.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 10:10:35 -0000 * Adhemerval Zanella via Libc-alpha: > diff --git a/NEWS b/NEWS > index 2424fecdc0..58d9db6d00 100644 > --- a/NEWS > +++ b/NEWS > @@ -22,6 +22,9 @@ Deprecated and removed features, and other changes affecting compatibility: > but always fails with ENOSYS. This reflects the removal of the system > call from all architectures, starting with Linux 5.5. > > +* The function getdirentries is now deprecated, applications should use > + either getdents or POSIX readdir instead. getdents64, readdir64 or readdir > diff --git a/dirent/dirent.h b/dirent/dirent.h > index 92d0925047..4ee60471f7 100644 > --- a/dirent/dirent.h > +++ b/dirent/dirent.h > @@ -353,14 +353,15 @@ extern int alphasort64 (const struct dirent64 **__e1, > extern __ssize_t getdirentries (int __fd, char *__restrict __buf, > size_t __nbytes, > __off_t *__restrict __basep) > - __THROW __nonnull ((2, 4)); > + __THROW __nonnull ((2, 4)) __attribute_deprecated__; > # else > # ifdef __REDIRECT > extern __ssize_t __REDIRECT_NTH (getdirentries, > (int __fd, char *__restrict __buf, > size_t __nbytes, > __off64_t *__restrict __basep), > - getdirentries64) __nonnull ((2, 4)); > + getdirentries64) > + __THROW __nonnull ((2, 4)) __attribute_deprecated__; > # else > # define getdirentries getdirentries64 > # endif > @@ -370,7 +371,7 @@ extern __ssize_t __REDIRECT_NTH (getdirentries, > extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, > size_t __nbytes, > __off64_t *__restrict __basep) > - __THROW __nonnull ((2, 4)); > + __THROW __nonnull ((2, 4)) __attribute_deprecated__; > # endif > #endif /* Use misc. */ Please add a message pointing to readdir64 (probably in both cases).