This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13959] New: Request to deprecate namespace-polluting cruft in headers with _GNU_SOURCE
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sat, 07 Apr 2012 02:17:11 +0000
- Subject: [Bug libc/13959] New: Request to deprecate namespace-polluting cruft in headers with _GNU_SOURCE
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13959
Bug #: 13959
Summary: Request to deprecate namespace-polluting cruft in
headers with _GNU_SOURCE
Product: glibc
Version: unspecified
Status: NEW
Severity: enhancement
Priority: P2
Component: libc
AssignedTo: unassigned@sourceware.org
ReportedBy: bugdal@aerifal.cx
CC: drepper.fsp@gmail.com
Classification: Unclassified
When _GNU_SOURCE is defined, a great deal of generally-undesirable cruft is
pulled in either directly or as a result of _GNU_SOURCE being built on other
__USE_xxx macros. A few examples that come to mind:
- sys/types.h includes sys/sysmacros.h, which defines macros with the ugly
names major and minor (lowercase).
- sys/types.h defines BIG_ENDIAN, etc. macros which should be obtained from
endian.h if desired.
- sys/param.h defines MIN and MAX macros. (This is less of an issue since it's
a non-standardized header anyway, but it's still ugly.)
- math.h defines HUGE as an alias for float.h's FLT_MAX.
- lots more...
Most of this cruft should never be used by modern programs, and mainly exists
to begin with as a result of glibc mimicing legacy APIs like SVID. What I'd
like to propose is that glibc document clearly which symbols exposed by the
headers are actually part of the "_GNU_SOURCE API" versus which are merely
cruft, and ideally set a timeline for removing deprecated symbols except when a
legacy feature test macro like _SVID_SOURCE is used to request them.
Note that this bug report/enhancement request is really a matter of glibc's
documentation and future direction policy rather than a request for any
immediate source-level changes.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.