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 Tue 04 Mar 2014 01:15:53 Carlos O'Donell wrote:
> 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?
> >>> 
> >>> --- 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.

i'm not sure about removing them from the source tree considering they're part 
of POSIX ... although the latest issue has marked them as obsolete (which 
means they're in progress of being removed).
	http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stropts.h.html

so i guess if it's slated for death and no one cares, let's delete the 
headers.  we should also remove the ability to link new applications against 
the symbols that already exist in glibc.  and make it easy so that new ports 
won't even include them.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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