This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [2.24 PATCH 3/3] Deprecate inclusion of <sys/sysmacros.h> by <sys/types.h>
- From: Zack Weinberg <zackw at panix dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 3 Aug 2016 16:06:16 -0400
- Subject: Re: [2.24 PATCH 3/3] Deprecate inclusion of <sys/sysmacros.h> by <sys/types.h>
- Authentication-results: sourceware.org; auth=none
- References: <cover.1469994984.git.zackw@panix.com> <ec1857e5b77170d2493001fd1afe64a5e0a2748d.1469994984.git.zackw@panix.com> <cc4771bb-ba7a-7a6c-ef72-58780c081282@redhat.com> <71ede440-4ace-161f-1848-4475fba05d0f@panix.com> <7577c368-2850-c573-72d0-d65966d3bdc8@redhat.com>
On Wed, Aug 3, 2016 at 11:12 AM, Carlos O'Donell <carlos@redhat.com> wrote:
> On 08/02/2016 11:21 AM, Zack Weinberg wrote:
>> On 08/01/2016 05:07 PM, Carlos O'Donell wrote:
>>> On 07/31/2016 04:09 PM, Zack Weinberg wrote:
>>>> The macros defined by <sys/sysmacros.h> are not part of POSIX nor XSI, and
>>>> their names frequently collide with user code; see for instance glibc bug
>>>> 19239 and Red Hat bug 130601. <stdlib.h> includes <sys/types.h> under
>>>> _GNU_SOURCE, and C++ code presently cannot avoid being compiled under
>>>> _GNU_SOURCE, exacerbating the problem.
>>>>
>>>> ChangeLog:
>>>> * NEWS: Inclusion of <sys/sysmacros.h> by <sys/types.h> is deprecated.
>>>> * misc/sys/sysmacros.h: If __SYSMACROS_DEPRECATED_INCLUSION is defined,
>>>> define major, minor, and makedev to issue deprecation warnings on use.
>>>> If __SYSMACROS_DEPRECATED_INCLUSION is *not* defined, suppress
>>>> previously-activated deprecation warnings for these macros and prevent
>>>> subsequent inclusions of this header from having any effect.
>>>> * posix/sys/types.h: Define __SYSMACROS_DEPRECATED_INCLUSION before
>>>> including <sys/sysmacros.h>, and undefine it again afterward.
>>>
>>> This deprecation looks good.
>>>
>>> However, as noted we'll commit this in 2.25.
>>>
>>> I will do it for you.
>>
>> I think I have working commit access now. Do you still intend to land
>> these patches yourself, or do you want me to do it? Was my explanation
>> for the gnu_dev_* symbols adequate?
>
> Please commit the patches yourself as a first test of your new commit
> access.
I have committed these to master:
dbab6577c6684c62bd2521c1c29dc25c3cac966f Deprecate inclusion of
<sys/sysmacros.h> by <sys/types.h>
63eb8df85a17f7f966d4daa4cf44c8e956636a86 Minimize sysdeps code
involved in defining major/minor/makedev.
cab4d74b01320670f57dcf356ff89256f4d2fc12 Add utility macros for clang
detection, and deprecation with messages.
zw