summaryrefslogtreecommitdiff
path: root/src/mkfifo.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-03-26 14:22:51 +0000
committerJim Meyering <jim@meyering.net>1999-03-26 14:22:51 +0000
commitf42367c3e7f266dce685aed7a6629d13ba5a324c (patch)
treed3afe8acc5effc50e33eee1d571e763180f219cf /src/mkfifo.c
parent0aa9923d96b671490bc0a44e99c1e9cae526681e (diff)
downloadcoreutils-f42367c3e7f266dce685aed7a6629d13ba5a324c.tar.xz
No longer include long-options.h.
Include version-etc.h instead. (PROGRAM_NAME, AUTHORS): Define. [long_options]: Add entries for --help and --version. Remove parse_long_options call. (main) [getopt switch]: Add a case for each of --help and --version.
Diffstat (limited to 'src/mkfifo.c')
-rw-r--r--src/mkfifo.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mkfifo.c b/src/mkfifo.c
index 09c05e372..f933e7750 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -30,8 +30,13 @@
#include "system.h"
#include "closeout.h"
#include "error.h"
-#include "long-options.h"
#include "modechange.h"
+#include "version-etc.h"
+
+/* The official name of this program (e.g., no `g' prefix). */
+#define PROGRAM_NAME "mkfifo"
+
+#define AUTHORS "David MacKenzie"
/* The name this program was run with. */
char *program_name;
@@ -39,6 +44,8 @@ char *program_name;
static struct option const longopts[] =
{
{"mode", required_argument, NULL, 'm'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
@@ -80,9 +87,6 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, "mkfifo", GNU_PACKAGE, VERSION,
- "David MacKenzie", usage);
-
symbolic_mode = NULL;
#ifndef S_ISFIFO
@@ -97,6 +101,8 @@ main (int argc, char **argv)
case 'm':
symbolic_mode = optarg;
break;
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
usage (1);
}