Actions
Bug #6136
opensysmacros.h unnecessarily pollutes the namespace
Start date:
2015-08-18
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
sysmacros.h contains all sort of questionable content. The following macros can be safely removed.
- major - provided by the DDI/libc
- minor - provided by the DDI/libc
- makedev - provided by the DDI/libc
- bmajor - unused
- emajor - unused
- eminor - unused
A comment in sysmacros.h states:
/* * WARNING: The device number macros defined here should not be used by device * drivers or user software. Device drivers should use the device functions * defined in the DDI/DKI interface (see also ddi.h). Application software * should make use of the library routines available in makedev(3). A set of * new device macros are provided to operate on the expanded device number * format supported in SVR4. Macro versions of the DDI device functions are * provided for use by kernel proper routines only. Macro routines bmajor(), * major(), minor(), emajor(), eminor(), and makedev() will be removed or * their definitions changed at the next major release following SVR4. */
So, having these macros for kernel proper use only causes us to:
- keep code that's been slated for removal for a long time
- get either the functions or macros based on which headers are included (and if both are included the order determines what we end up using)
Related issues
Updated by Josef Sipek almost 7 years ago
- Subject changed from sysmacros.h unnecessarily polutes the namespace to sysmacros.h unnecessarily pollutes the namespace
Updated by Josef Sipek over 6 years ago
- Related to Bug #6469: sendmail shouldn't use major/minor added
Actions