This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes
Date 2017-09-04.21:50:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504561837.1.0.90902392889.issue31343@psf.upfronthosting.co.za>
In-reply-to
Content
On Fedora 26, GCC is emitting warnings because we are using minor(), major() and makedev() 
from sys/types.h. The macros should be included from sys/sysmacros.h instead:

./Modules/posixmodule.c: In function ‘os_major_impl’:
./Modules/posixmodule.c:8758:13: warning: In the GNU C Library, "major" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "major", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "major", you should undefine it after including <sys/types.h>.
     return major(device);
             ^~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                                                                           
./Modules/posixmodule.c: In function ‘os_minor_impl’:
./Modules/posixmodule.c:8775:13: warning: In the GNU C Library, "minor" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "minor", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "minor", you should undefine it after including <sys/types.h>.
     return minor(device);
             ^~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                                                                           
./Modules/posixmodule.c: In function ‘os_makedev_impl’:
./Modules/posixmodule.c:8793:13: warning: In the GNU C Library, "makedev" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "makedev", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "makedev", you should undefine it after including <sys/types.h>.
     return makedev(major, minor);
             ^~~~~~~~~~~~~~~~~~~~~
History
Date User Action Args
2017-09-04 21:50:37christian.heimessetrecipients: + christian.heimes
2017-09-04 21:50:37christian.heimessetmessageid: <1504561837.1.0.90902392889.issue31343@psf.upfronthosting.co.za>
2017-09-04 21:50:37christian.heimeslinkissue31343 messages
2017-09-04 21:50:36christian.heimescreate