Opened 4 years ago

Last modified 3 years ago

#528 assigned enhancement

getopt() c-lib function should be replaced with boost::program_options C++ function

Reported by: smann Owned by: UnAssigned
Priority: medium Milestone:
Component: configuration Keywords:
Cc: CVSS Scoring:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 0.0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


Throughout the BIND 10 C++ code, getopt is used (probably because it is portable). But this raises an inconsistency in the command line options since getopt() cannot handle long options (e.g. --user=foo) while the python getopt() function can. Further, boost::program_options provides a fairly abstract mechanism for retrieving key/value pairs from either the command line or a file. See for details.

Change History (4)

comment:1 Changed 4 years ago by jinmei

As far as I know, boost program_options required compiled boost library.
Does it change in a recent version of boost? If not, we should be
more careful before using it.

comment:2 Changed 4 years ago by jelte

hmz, and getopt_long is a gnu extension. Anyone incredibly opposed to use-if-available?

btw, any specific reason this ticket got assigned to me?

comment:3 Changed 4 years ago by jelte

  • Owner changed from jelte to UnAssigned
  • Status changed from new to assigned

I'm not saying I don't want to take on this ticket, but I think it got assigned to me by accident :)

comment:4 Changed 3 years ago by shane

  • Defect Severity set to N/A
  • Sub-Project set to DNS

See also ticket #1256.

Note: See TracTickets for help on using tickets.