Actions
Bug #8017
closedComply with POSIX.1-2008 and C++11 for the definition of NULL
Start date:
2017-03-31
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
Description
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 over 5 years ago
Jonathan Perkin kindly tested the changes on a rebuild of pkgsrc.
Baseline build:
http://us-east.manta.joyent.com/pkgsrc/public/reports/upstream-bulktest/20170328.0930/meta/report.html
Build with the NULL change:
http://us-east.manta.joyent.com/pkgsrc/public/reports/upstream-bulktest/20170330.1854/meta/report.html
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 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit a3848ed0a29283946b7129498d914f532442a95f
commit a3848ed0a29283946b7129498d914f532442a95f Author: Aurélien Larcher <aurelien.larcher@gmail.com> 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 <tsoome@me.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Dan McDonald <danmcd@omniti.com>
Actions