summaryrefslogtreecommitdiff
path: root/src/who.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/who.c')
-rw-r--r--src/who.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/who.c b/src/who.c
index 88088f313..e5fd094ef 100644
--- a/src/who.c
+++ b/src/who.c
@@ -29,7 +29,6 @@
#include <stdio.h>
#include "error.h"
-#include "long-options.h"
#include "readutmp.h"
#include "system.h"
@@ -81,6 +80,8 @@ static struct option const longopts[] =
{"message", no_argument, NULL, 'T'},
{"mesg", no_argument, NULL, 'T'},
{"writable", no_argument, NULL, 'T'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
@@ -388,9 +389,6 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
while ((optc = getopt_long (argc, argv, "ilmqsuwHT", longopts, &longind))
!= -1)
{
@@ -428,6 +426,10 @@ main (int argc, char **argv)
include_mesg = 1;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
}