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.
diff --git a/lib/getopt.c b/lib/getopt.c
index 329e939..c784fb6 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -969,6 +969,8 @@
}
}
+#ifdef REALLY_NEED_PLAIN_GETOPT
+
int
getopt (argc, argv, optstring)
int argc;
@@ -981,6 +983,8 @@
0);
}
+#endif /* REALLY_NEED_PLAIN_GETOPT */
+
#endif /* Not ELIDE_CODE. */
#ifdef TEST