[PATCH v2] io: Refactor close_range and closefrom

Adhemerval Zanella adhemerval.zanella@linaro.org
Wed Nov 24 12:20:01 GMT 2021



On 24/11/2021 09:03, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>>> diff --git a/sysdeps/mach/hurd/kernel-features.h b/sysdeps/mach/hurd/kernel-features.h
>>> index 7d4eaee0a6..5fd37a6d7b 100644
>>> --- a/sysdeps/mach/hurd/kernel-features.h
>>> +++ b/sysdeps/mach/hurd/kernel-features.h
>>> @@ -19,3 +19,5 @@
>>>  /* This file can define __ASSUME_* macros checked by certain source files.
>>>     Almost none of these are used outside of sysdeps/unix/sysv/linux code.
>>>     But those referring to POSIX-level features like O_* flags can be.  */
>>> +
>>> +#define __ASSUME_CLOSE_RANGE 1
>>
>> It does add it here (I also checked with a build for i688-gnu).
> 
> Hmm, this doesn't match existing practice.  We haven't unified
> implementations in light of such divergence, I think.  If the Hurd
> developers don't object, it should be fine, though..

This was used before, we still have some leftovers from it:

nscd/nscd.c:306:# ifndef __ASSUME_IN_NONBLOCK
resolv/res_send.c:1035:#ifndef __ASSUME_SENDMMSG
resolv/res_send.c:1081:#ifndef __ASSUME_SENDMMSG
resolv/res_send.c:1100:#ifndef __ASSUME_SENDMMSG

You have also cleanup some other assumes from Hurd: dup3 (b48061e1a534a242),
O_CLOEXEC (cef9b65376a04430), and accept4 (e92030239abb4038).


More information about the Libc-alpha mailing list