This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Definition of __USE_MISC?
- From: Michael Kerrisk <mtk dot manpages at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Sebastian Huber <sebastian dot huber at embedded-brains dot de>, libc-alpha <libc-alpha at sourceware dot org>, Michael Kerrisk-manpages <mtk dot manpages at gmail dot com>
- Date: Thu, 2 Nov 2017 08:24:32 +0100
- Subject: Re: Definition of __USE_MISC?
- Authentication-results: sourceware.org; auth=none
- References: <5421ae5a-3e23-bd54-4c8e-79997ae56906@embedded-brains.de> <24683c8c-e21c-7b7f-8525-0cb847b6cd81@redhat.com> <151b036b-eddc-c45f-bf91-05cec3cdc337@embedded-brains.de> <c5942c9f-7ed9-c575-bf4b-ab5dd4fc2b4e@redhat.com> <e825e370-925c-9f57-f499-4e77a38425cf@embedded-brains.de> <0ffd2b8a-851c-f4a8-0e1b-2246f32590e8@redhat.com>
On Mon, Oct 30, 2017 at 2:01 PM, Florian Weimer <fweimer@redhat.com> wrote:
> On 10/26/2017 10:55 AM, Sebastian Huber wrote:
>>
>> On 17/10/17 14:01, Florian Weimer wrote:
>>>>>>
>>>>>>
>>>>>> Would it be possible to change the guard in glibc to __USE_MISC?
>>>>>
>>>>>
>>>>> Yes, it should be a simple change. I was worried about the long long
>>>>> part initially, but we have precedent for using long long under __USE_MISC
>>>>> (strtouq in <stdlib.h>).
>>>>>
>>>>> Patch attached.
>>>>
>>>>
>>>> What are the opinions with respect to this patch? The ffsl() and ffsll()
>>>> are BSD visible in FreeBSD, DragonFlyBSD, some Mac OS X and musl. They are
>>>> not available in OpenBSD and NetBSD.
>>>
>>>
>>> Unless there are objects, I'm going to check this in later this week.
>>
>>
>> I think there were no objections.
>
>
> Thanks for the reminder. I have now pushed the change.
>
>> Which documentation parts need an update? Only the man page in
>>
>>
>> https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man3/ffs.3
>>
>> ?
>
>
> Yes, the GNU manual does not document ffsl/ffsll at all, so no update is
> needed. Will you contact Michael about the change?
No need (but thanks for thinking of it). I've just now updated the FTM
requirements in the man page to say:
ffsl(), ffsll():
Since glibc 2.27:
_DEFAULT_SOURCE
Before glibc 2.27:
_GNU_SOURCE
Cheers,
Michael