[2.24 PATCH 3/3] Deprecate inclusion of <sys/sysmacros.h> by <sys/types.h>
Zack Weinberg
zackw@panix.com
Wed Aug 3 20:06:00 GMT 2016
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
More information about the Libc-alpha
mailing list