Ticket #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 |
Description
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 http://www.boost.org/doc/libs/1_45_0/doc/html/program_options.html for details.
Change History
comment:2 Changed 2 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?
Note: See
TracTickets for help on using
tickets.

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.