gzip: new GZIP_BIG_MEM option
[oweals/busybox.git] / util-linux / getopt.c
index 10e1dc49b0b9558cb892bd86fd51a5e3f5ff91da..c45edf8ca0b39b67e5c280d5e06472566d008300 100644 (file)
@@ -25,7 +25,7 @@
  *   Added NLS support (partly written by Arkadiusz Mickiewicz
  *     <misiek@misiek.eu.org>)
  * Ported to Busybox - Alfred M. Szmidt <ams@trillian.itslinux.org>
- *  Removed --version/-V and --help/-h in
+ *  Removed --version/-V and --help/-h
  *  Removed parse_error(), using bb_error_msg() from Busybox instead
  *  Replaced our_malloc with xmalloc and our_realloc with xrealloc
  *
@@ -34,9 +34,8 @@
 //usage:#define getopt_trivial_usage
 //usage:       "[OPTIONS]"
 //usage:#define getopt_full_usage "\n\n"
-//usage:       "Options:"
 //usage:       IF_LONG_OPTS(
-//usage:     "\n       -a,--alternative                Allow long options starting with single -"
+//usage:       "       -a,--alternative                Allow long options starting with single -"
 //usage:     "\n       -l,--longoptions=longopts       Long options to be recognized"
 //usage:     "\n       -n,--name=progname              The name under which errors are reported"
 //usage:     "\n       -o,--options=optstring          Short options to be recognized"
@@ -47,7 +46,7 @@
 //usage:     "\n       -u,--unquoted                   Don't quote the output"
 //usage:       )
 //usage:       IF_NOT_LONG_OPTS(
-//usage:     "\n       -a              Allow long options starting with single -"
+//usage:       "       -a              Allow long options starting with single -"
 //usage:     "\n       -l longopts     Long options to be recognized"
 //usage:     "\n       -n progname     The name under which errors are reported"
 //usage:     "\n       -o optstring    Short options to be recognized"
@@ -79,7 +78,9 @@
 //usage:       " esac\n"
 //usage:       "done\n"
 
-#include <getopt.h>
+#if ENABLE_FEATURE_GETOPT_LONG
+# include <getopt.h>
+#endif
 #include "libbb.h"
 
 /* NON_OPT is the code that is returned when a non-option is found in '+'