Feature #12271
closed"name" member of "struct option" should be const
100%
Description
In getopt.h
we define struct option
, which has a char *name
member. On other platforms (e.g., modern Linux distributions, Mac OS X), this is actually const char *name
. We should make our definition const
as well, for better compatibility.
Updated by Jonathan Perkin almost 4 years ago
I tested this in a bulk build.
Baseline: https://us-east.manta.joyent.com/pkgsrc/public/reports/upstream-bulktest/20200207.1853/meta/report.html
Patched: https://us-east.manta.joyent.com/pkgsrc/public/reports/upstream-bulktest/20200208.2201/meta/report.html
Executive summary is no regressions caused by the change, but it did fix one build (devel/kyua).
Updated by Andy Fiddaman almost 4 years ago
hadfl has done a full OmniOS build with this fix in place, including all of the extra packages. No regressions.
Updated by Michal Nowak almost 4 years ago
I'll see if I can rebuild OpenIndiana-specific components.
Updated by Michal Nowak almost 4 years ago
Michal Nowak wrote:
I'll see if I can rebuild OpenIndiana-specific components.
I rebuilt a bunch of OI-specific components without a problem.
Updated by Brian Bennett almost 4 years ago
In addition to testing provided by Joyent, OmniOS, and OpenIndiana, I built/installed/booted this build, where I discovered several utilities that also needed to be updated (also included in this patch).
Updated by Electric Monk almost 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit b69c34dad3717624ff6b4f32b71014ee05b6a678
commit b69c34dad3717624ff6b4f32b71014ee05b6a678 Author: Brian Bennett <brian.bennett@joyent.com> Date: 2020-03-04T00:23:38.000Z 12271 "name" member of "struct option" should be const Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>