public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* RFC: remove <sys/sysmacros.h> from <sys/types.h>
@ 2015-11-13 14:21 Zack Weinberg
  2015-11-13 14:29 ` Zack Weinberg
                   ` (4 more replies)
  0 siblings, 5 replies; 30+ messages in thread
From: Zack Weinberg @ 2015-11-13 14:21 UTC (permalink / raw)
  To: GNU C Library

sys/sysmacros.h defines three macros - major, minor, makedev - that
are likely to collide with user symbols.  That would be fine, since
it's off by itself, but sys/types.h includes sys/sysmacros.h under
__USE_BSD, which means anyone who defines _BSD_SOURCE or _GNU_SOURCE
and includes sys/types.h gets the macros.  Moreover, under _GNU_SOURCE
stdlib.h includes sys/types.h, and g++ defines _GNU_SOURCE by default
(this is agreed to be suboptimal, but apparently libstdc++'s headers
need it).  This all adds up to what might not technically be a
conformance violation but sure *looks* like it from the end-user
perspective.

At least two bug reports have been filed on this behavior:
https://sourceware.org/bugzilla/show_bug.cgi?id=19239 and
https://bugzilla.redhat.com/show_bug.cgi?id=130601 .

These macros are potentially relevant to anything that wants to take
apart an st_dev value in detail, but I have not personally encountered
a piece of software that needs them in many years.  Since sys/types.h
does not provide these macros on SysV-derived systems, I would expect
that portable software that needs them is prepared to include
sys/sysmacros.h itself.

Therefore, I propose we remove the inclusion of sys/sysmacros.h from
sys/types.h.  It's risky enough that I think it's worth doing a distro
rebuild with that change to find out what, if anything, breaks - who
do I talk to to make that happen?

zw

^ permalink raw reply	[flat|nested] 30+ messages in thread
* Re: RFC: remove <sys/sysmacros.h> from <sys/types.h>
@ 2017-10-21 12:10 Andreas K. Huettel
  0 siblings, 0 replies; 30+ messages in thread
From: Andreas K. Huettel @ 2017-10-21 12:10 UTC (permalink / raw)
  To: GLIBC Devel

[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]

Zac Weinberg wrote on Fri, 13 Nov 2015:
https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
>
> Therefore, I propose we remove the inclusion of sys/sysmacros.h from
> sys/types.h.  It's risky enough that I think it's worth doing a distro
> rebuild with that change to find out what, if anything, breaks - who
> do I talk to to make that happen?

Are there any specific plans still to make this happen? 
As far as I can see the include is still in master.

FYI, 

Mike Frysinger wrote on Tue, 29 Dec 2015:
> i'm just going to drop it in Gentoo and let people fix the build failures
> -mike

^ this was reverted by our QA team less than a day later because of 
introducing Gentoo-wide user visible breakage. We kept the patch in later 
glibc versions though, in particular Gentoo testing 2.24 and 2.25.

Now that we want to stabilize 2.25, we're down to 18 (known) build failures 
within our stable package set. 

-- 
Andreas K. Hüttel
dilfridge@gentoo.org
Gentoo Linux developer (council, perl, libreoffice)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2017-10-21 12:10 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-13 14:21 RFC: remove <sys/sysmacros.h> from <sys/types.h> Zack Weinberg
2015-11-13 14:29 ` Zack Weinberg
2015-11-13 14:45 ` Dmitry V. Levin
2015-11-13 15:59   ` Paul Eggert
2015-11-13 23:43 ` Roland McGrath
2015-11-14  9:18   ` Andreas Schwab
2015-11-14 20:41     ` Zack Weinberg
2015-11-14 21:59       ` Rich Felker
2015-11-14 22:19         ` Andreas Schwab
2015-11-21  0:19           ` Roland McGrath
2015-11-21  0:56             ` Zack Weinberg
2015-11-14 20:19 ` Carlos O'Donell
2015-11-19  4:13 ` RFC: deprecate sys/sysmacros.h inclusion from sys/types.h Zack Weinberg
2015-12-07 14:03   ` Zack Weinberg
2015-12-21 20:31     ` Zack Weinberg
2016-01-11 15:16       ` Zack Weinberg
2016-01-11 15:27         ` Carlos O'Donell
2016-01-11 18:02           ` Zack Weinberg
2016-01-11 20:50             ` Carlos O'Donell
2015-12-29 20:42   ` Mike Frysinger
2015-12-29 21:56     ` Zack Weinberg
2015-12-29 22:45       ` Mike Frysinger
2016-02-19 20:56         ` Mike Frysinger
2016-04-20 17:37   ` Mike Frysinger
2016-04-20 17:58     ` Zack Weinberg
2016-04-20 18:11       ` Mike Frysinger
2016-04-21 19:31   ` Roland McGrath
2016-04-21 21:00     ` Zack Weinberg
2016-04-21 21:11       ` Roland McGrath
2017-10-21 12:10 RFC: remove <sys/sysmacros.h> from <sys/types.h> Andreas K. Huettel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).