diff options
Diffstat (limited to 'openbsd-compat/getopt_long.c')
-rw-r--r-- | openbsd-compat/getopt_long.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/openbsd-compat/getopt_long.c b/openbsd-compat/getopt_long.c index e149fe0ac..6b36d0672 100644 --- a/openbsd-compat/getopt_long.c +++ b/openbsd-compat/getopt_long.c | |||
@@ -49,7 +49,22 @@ | |||
49 | * POSSIBILITY OF SUCH DAMAGE. | 49 | * POSSIBILITY OF SUCH DAMAGE. |
50 | */ | 50 | */ |
51 | 51 | ||
52 | /* OPENBSD ORIGINAL: lib/libc/stdlib/getopt_long.c */ | ||
53 | #include "includes.h" | ||
54 | |||
55 | #if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET) | ||
56 | #include "log.h" | ||
57 | |||
58 | /* | ||
59 | * Some defines to make it easier to keep the code in sync with upstream. | ||
60 | * getopt opterr optind optopt optreset optarg are all in defines.h which is | ||
61 | * pulled in by includes.h. | ||
62 | */ | ||
63 | #define warnx logit | ||
64 | |||
65 | #if 0 | ||
52 | #include <err.h> | 66 | #include <err.h> |
67 | #endif | ||
53 | #include <errno.h> | 68 | #include <errno.h> |
54 | #include <getopt.h> | 69 | #include <getopt.h> |
55 | #include <stdlib.h> | 70 | #include <stdlib.h> |
@@ -484,6 +499,7 @@ getopt(int nargc, char * const *nargv, const char *options) | |||
484 | return (getopt_internal(nargc, nargv, options, NULL, NULL, 0)); | 499 | return (getopt_internal(nargc, nargv, options, NULL, NULL, 0)); |
485 | } | 500 | } |
486 | 501 | ||
502 | #if 0 | ||
487 | /* | 503 | /* |
488 | * getopt_long -- | 504 | * getopt_long -- |
489 | * Parse argc/argv argument vector. | 505 | * Parse argc/argv argument vector. |
@@ -509,3 +525,6 @@ getopt_long_only(int nargc, char * const *nargv, const char *options, | |||
509 | return (getopt_internal(nargc, nargv, options, long_options, idx, | 525 | return (getopt_internal(nargc, nargv, options, long_options, idx, |
510 | FLAG_PERMUTE|FLAG_LONGONLY)); | 526 | FLAG_PERMUTE|FLAG_LONGONLY)); |
511 | } | 527 | } |
528 | #endif | ||
529 | |||
530 | #endif /* !defined(HAVE_GETOPT) || !defined(HAVE_OPTRESET) */ | ||