This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/20366] New: Compilation errors in installed headers in strict-compliance modes
- From: "zackw at panix dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 13 Jul 2016 19:06:06 +0000
- Subject: [Bug libc/20366] New: Compilation errors in installed headers in strict-compliance modes
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20366
Bug ID: 20366
Summary: Compilation errors in installed headers in
strict-compliance modes
Product: glibc
Version: 2.24
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: zackw at panix dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Some of glibc's installed headers throw compilation errors if used in
strict standards compliance modes (e.g. -std=c89 with no -D_ANYTHING_SOURCE).
The worst offenders are older networking headers, but there's a pretty broad
variety of bugs. Forthwith a list of everything I've been able to find:
* Use of the "legacy" BSD unsigned integer typedefs (u_intN_t, u_char,
u_int, u_short, u_long) in code not guarded by __USE_MISC
(sys/gmon.h, fts.h, resolv.h, many others)
* Use of foo_t instead of __foo_t, where foo_t is only defined by
<sys/types.h> under __USE_MISC or __USE_XOPEN2K8 or like that.
(sys/quota.h, sys/timerfd.h)
* Unconditional use of 'struct ifreq', 'struct osockaddr', and 'stack_t',
which are only defined under __USE_MISC, and no alternative is available
(net/if_ppp.h, protocols/talkd.h, sys/ucontext.h respectively)
* Use of BYTE_ORDER, BIG_ENDIAN, etc instead of __BYTE_ORDER,
__BIG_ENDIAN, etc. (arpa/nameser_compat.h)
* No-longer-necessary #warnings (sys/ipc.h)
* Missing #includes (rpcsvc/nislib.h, netrose/rose.h)
* Accidentally installed internal-use-only headers (grp-merge.h)
I think it would be appropriate to patch all of these for 2.24.
It might also be appropriate to wholly eliminate uses of the legacy unsigned
integer typedefs in installed headers, even if they don't cause problems, but I
don't think that's 2.24 material.
--
You are receiving this mail because:
You are on the CC list for the bug.