This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Define _XOPEN_STREAMS to -1 for Linux.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org
- Date: Tue, 04 Mar 2014 01:15:53 -0500
- Subject: Re: [PATCH] Define _XOPEN_STREAMS to -1 for Linux.
- Authentication-results: sourceware.org; auth=none
- References: <5314BB2A dot 9060203 at redhat dot com> <5314C02F dot 8030300 at linux dot vnet dot ibm dot com> <5314C100 dot 8090606 at linux dot vnet dot ibm dot com>
On 03/03/2014 12:50 PM, Adhemerval Zanella wrote:
> On 03-03-2014 14:47, Adhemerval Zanella wrote:
>> On 03-03-2014 14:26, Carlos O'Donell wrote:
>>> We don't implement STREAMS in glibc and Linux has no mainline
>>> support for them (there used to be a kernel module for this
>>> but it looks long dead).
>>>
>>> Therefore we should define _XOPEN_STREAMS as -1 in posix_opt.h.
>>> Fedora has had this patch for 6 years without merging it upstream.
>>> This is pat of my distribution patch cleanup. The distribution
>>> patch also removed the associated headers, but I do not wish to
>>> do that since it may break programs that unconditionally include
>>> them without checking _XOPEN_STREAMS first. Therefore this patch
>>> sets only _XOPEN_STREAMS to -1 and doesn't remove stropts.h
>>> sys/stropts.h bits/stropts.h bits/xtitypes.h from inclusion.
>>> The syconf implementation in sysdeps/posix/sysconf.c remains
>>> correct with respect to _XOPEN_STREAMS and needs no changes.
>>>
>>> Comments? Any objection to not removing the headers?
>>>
>>> OK to checkin?
>>>
>>> nptl/
>>>
>>> 2014-03-03 Jakub Jelinek <jakub@redhat.com>
>>> Carlos O'Donell <carlos@redhat.com>
>>>
>>> [BZ #16651]
>>> * sysdeps/unix/sysv/linux/bits/posix_opt.h (_XOPEN_STREAM): Define.
>>>
>>> diff --git a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
>>> index 6ca0753..b175ed9 100644
>>> --- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
>>> +++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
>>> @@ -188,4 +188,8 @@
>>> /* Typed memory objects are not available. */
>>> #define _POSIX_TYPED_MEMORY_OBJECTS -1
>>>
>>> +/* There is no STREAMS support in glibc for now and the mainstream Linux kernel
>>> + doesn't have it either. */
>>> +#define _XOPEN_STREAMS -1
>>> +
>>> #endif /* bits/posix_opt.h */
>>>
>> The patch looks ok. Should we add a plan to remove these headers in future releases and even
>> add a comment about it?
>>
> Also maybe emit a compiler warning (#warning) saying the headers are deprecated?
Given that Fedora has had the headers removed for 6 years...
... should I just remove them?
Nothing that relies on them can possibly work.
Cheers,
Carlos.