summaryrefslogtreecommitdiff
path: root/lib/getopt.c
diff options
context:
space:
mode:
authorgdt <gdt>2005-08-10 13:20:03 +0000
committergdt <gdt>2005-08-10 13:20:03 +0000
commit0312f0cd92e26d8097145d00dfad4638ed687f02 (patch)
tree0eb8c8b39c1b20cbac4690f85d5b7d4846d78b7e /lib/getopt.c
parent01018ce479cce0af61d3797e5200cc340fe6ec0e (diff)
2005-08-10 Greg Troxel <gdt@fnord.ir.bbn.com>
* getopt.h: Don't declare getopt (rather than getopt_long), since quagga doesn't need it. * getopt.c (getopt): Don't define getopt. Fixes build breakage on NetBSD, and seems likely to work on most platforms since it avoids the entire issue of system getopt declarations and whether they conform to POSIX.2. Note that this change doesn't address system getopt_long declarations, but also doesn't change anything about getopt_long.
Diffstat (limited to 'lib/getopt.c')
-rw-r--r--lib/getopt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/getopt.c b/lib/getopt.c
index 329e9395..c784fb6c 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -969,6 +969,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
}
}
+#ifdef REALLY_NEED_PLAIN_GETOPT
+
int
getopt (argc, argv, optstring)
int argc;
@@ -981,6 +983,8 @@ getopt (argc, argv, optstring)
0);
}
+#endif /* REALLY_NEED_PLAIN_GETOPT */
+
#endif /* Not ELIDE_CODE. */
#ifdef TEST