Comply with POSIX.1-2008 and C++11 for the definition of NULL
Currently NULL is only defined in sys/null.h as an integer type (int for 32bit and long for 64bit):
1) While ISO C does not require it, POSIX.1-2008 defines NULL to be cast as void *.
2) While C++98/03 uses an integer type, C++11 onwards defines NULL as a pointer literal.
The definitions should be added accordingly.
Updated by Aurélien Larcher almost 3 years ago
Jonathan Perkin kindly tested the changes on a rebuild of pkgsrc.
Build with the NULL change:
Quote: "They are basically identical except for a couple of transient failures, so it looks good from my point of view."
Updated by Electric Monk over 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit a3848ed0a29283946b7129498d914f532442a95f Author: Aurélien Larcher <firstname.lastname@example.org> Date: 2017-04-25T20:46:34.000Z 8017 Comply with POSIX.1-2008 and C++11 for the definition of NULL Reviewed by: Toomas Soome <email@example.com> Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>