From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Cc: Samuel Thibault <samuel.thibault@gnu.org>,
Sergey Bugaev <bugaevc@gmail.com>
Subject: Re: [PATCH v2] io: Refactor close_range and closefrom
Date: Wed, 24 Nov 2021 10:52:13 +0100 [thread overview]
Message-ID: <87r1b5op82.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20211108172817.2235239-1-adhemerval.zanella@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Mon, 8 Nov 2021 14:28:17 -0300")
* Adhemerval Zanella via Libc-alpha:
> diff --git a/include/unistd.h b/include/unistd.h
> index 7849562c42..927d249380 100644
> --- a/include/unistd.h
> +++ b/include/unistd.h
> @@ -3,6 +3,9 @@
>
> # ifndef _ISOMAC
>
> +# include <stdbool.h>
> +# include <kernel-features.h>
> +
> libc_hidden_proto (_exit, __noreturn__)
> # ifndef NO_RTLD_HIDDEN
> rtld_hidden_proto (_exit, __noreturn__)
> @@ -158,7 +161,14 @@ extern int __brk (void *__addr) attribute_hidden;
> extern int __close (int __fd);
> libc_hidden_proto (__close)
> extern int __libc_close (int __fd);
> +#if __ASSUME_CLOSE_RANGE
> +static inline _Bool __closefrom_fallback (int __lowfd, _Bool dirfd_fallback)
> +{
> + return false;
> +}
> +#else
> extern _Bool __closefrom_fallback (int __lowfd, _Bool) attribute_hidden;
> +#endif
> extern ssize_t __read (int __fd, void *__buf, size_t __nbytes);
> libc_hidden_proto (__read)
> extern ssize_t __write (int __fd, const void *__buf, size_t __n);
#if indentation seems off.
I expect this will break the Hurd build because it does not define
__ASSUME_CLOSE_RANGE in its <kernel-features.h>.
Thanks,
Florian
next prev parent reply other threads:[~2021-11-24 9:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-08 17:28 [PATCH v2] io: Refactor close_range and closefrom Adhemerval Zanella via Libc-alpha
2021-11-23 18:29 ` Adhemerval Zanella via Libc-alpha
2021-11-24 9:52 ` Florian Weimer via Libc-alpha [this message]
2021-11-24 11:36 ` Adhemerval Zanella via Libc-alpha
2021-11-24 12:03 ` Florian Weimer via Libc-alpha
2021-11-24 12:17 ` Samuel Thibault via Libc-alpha
2021-11-24 12:20 ` Adhemerval Zanella via Libc-alpha
2021-11-24 12:43 ` Adhemerval Zanella via Libc-alpha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1b5op82.fsf@oldenburg.str.redhat.com \
--to=libc-alpha@sourceware.org \
--cc=bugaevc@gmail.com \
--cc=fweimer@redhat.com \
--cc=samuel.thibault@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).