Project

General

Profile

Feature #12271

"name" member of "struct option" should be const

Added by Joshua M. Clulow 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:

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.

History

#1

Updated by Jonathan Perkin about 2 months 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).

#2

Updated by Andy Fiddaman about 2 months ago

hadfl has done a full OmniOS build with this fix in place, including all of the extra packages. No regressions.

#3

Updated by Joshua M. Clulow about 2 months ago

  • Assignee set to Brian Bennett
#4

Updated by Michal Nowak about 2 months ago

I'll see if I can rebuild OpenIndiana-specific components.

#5

Updated by Michal Nowak about 2 months 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.

#6

Updated by Brian Bennett about 1 month 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).

#7

Updated by Electric Monk about 1 month 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>

Also available in: Atom PDF