This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Define _XOPEN_STREAMS to -1 for Linux.


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]