summaryrefslogtreecommitdiff
path: root/src/utils/xtotroff/xtotroff.c
diff options
context:
space:
mode:
authorwl <wl>2005-06-23 11:33:00 +0000
committerwl <wl>2005-06-23 11:33:00 +0000
commit6ca33b817111c819a5ce390026a892e964a073ce (patch)
tree4b1497eb6636b50e846714456b4489eb8af82a52 /src/utils/xtotroff/xtotroff.c
parent0ef9b05c12ad681d7d81a4a894a596b64f5ef721 (diff)
downloadgroff-6ca33b817111c819a5ce390026a892e964a073ce.tar.gz
Another round in fixing getopt problems. Hopefully the last one!
This time we use the getopt stuff from gnulib and define a prefix unconditionally so that there are no collisions with any other getopt implementations. This is a slight waste of space in case we already use a GNU getopt implementation, but on the other hand it really simplifies life. * src/include/getopt.h: Use gnulib version. * src/include/getopt_int.h: Use gnulib version. * src/include/groff-getopt.h: Removed. Obsolete now. * src/include/lib.h: Regarding getopt, don't handle any platform specially; just include getopt.h. (__GETOPT_PREFIX): Define (before getopt.h). * src/include/Makefile.sub (HDRS): Updated. * src/libs/libgroff/getopt1.c, src/libs/libgroff/getopt.c: Use gnulib version. * src/libs/libgroff/Makefile.sub (EXTRA_CFLAGS): Set __GETOPT_PREFIX. * src/utils/pfbtops/pfbtops.c, src/utils/xtotroff/xtotroff.c (__GETOPT_PREFIX): Define (before getopt.h).
Diffstat (limited to 'src/utils/xtotroff/xtotroff.c')
-rw-r--r--src/utils/xtotroff/xtotroff.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils/xtotroff/xtotroff.c b/src/utils/xtotroff/xtotroff.c
index e7d1531c..dafff04b 100644
--- a/src/utils/xtotroff/xtotroff.c
+++ b/src/utils/xtotroff/xtotroff.c
@@ -13,10 +13,13 @@
#include <ctype.h>
#include <unistd.h>
#include <stdlib.h>
-#include <getopt.h>
#include <string.h>
#include <fcntl.h>
#include <limits.h>
+
+#define __GETOPT_PREFIX groff_
+#include <getopt.h>
+
#include "XFontName.h"
#include "DviChar.h"