Commit 96c902f2 authored by Stephen Morris's avatar Stephen Morris
Browse files

[trac584] message.cc: use getopt() instead of getopt_long() for Solaris

parent 6750a2bb
......@@ -467,19 +467,14 @@ warnDuplicates(MessageReader& reader) {
/// main file header for the invocation.
int
main(int argc, char** argv) {
main(int argc, char* argv[]) {
const struct option loptions[] = { // Long options
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'v'},
{NULL, 0, NULL, 0 }
};
const char* soptions = "hv"; // Short options
optind = 1; // Ensure we start a new scan
int opt; // Value of the option
while ((opt = getopt_long(argc, argv, soptions, loptions, NULL)) != -1) {
while ((opt = getopt(argc, argv, soptions)) != -1) {
switch (opt) {
case 'h':
usage();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment