Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_H
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 6 Oct 2009 16:01:18 +0000 (16:01 +0000)
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 6 Oct 2009 16:01:18 +0000 (16:01 +0000)
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30370 f5534014-38df-0310-8fa8-9805f1628bb7

17 files changed:
ConfigureChecks.cmake
Makefile.common
Makefile.nmake
capinfos.c
cmakeconfig.h.in
config.h.win32
configure.in
dumpcap.c
editcap.c
gtk/main.c
mergecap.c
randpkt.c
rawshark.c
text2pcap.c
tshark.c
wsgetopt.c [moved from getopt.c with 99% similarity]
wsgetopt.h [moved from getopt.h with 100% similarity]

index 6e728cef580e0c4d0d0902f149f0c6922d62d832..d1056affa6bf3819c5bd90fa6e85113821ef9587 100644 (file)
@@ -1,5 +1,4 @@
-# todo: result for NEED_... is wrong (inverted), at least\r
-#   in the case of getopt\r
+# todo: result for NEED_... is wrong (inverted)\r
 \r
 #check system for includes\r
 include(CheckIncludeFile)\r
@@ -9,7 +8,7 @@ check_include_file("direct.h"            HAVE_DIRECT_H)
 check_include_file("dirent.h"            HAVE_DIRENT_H)\r
 check_include_file("dlfcn.h"             HAVE_DLFCN_H)\r
 check_include_file("fcntl.h"             HAVE_FCNTL_H)\r
-check_include_file("getopt.h"            NEED_GETOPT_H)\r
+check_include_file("getopt.h"            HAVE_GETOPT_H)\r
 check_include_file("grp.h"               HAVE_GRP_H)\r
 check_include_file("g_ascii_strtoull.h"  NEED_G_ASCII_STRTOULL_H)\r
 check_include_file("inet/aton.h"         NEED_INET_ATON_H)\r
index 39496e7e3b4fba55884280c1c079bf1d37da0e60..b2995d6820af1dd9f94add395f6f67de3d1d9d6f 100644 (file)
@@ -122,7 +122,7 @@ TSHARK_TAP_SRC =    \
 
 # helpers already available on some platforms (and on others not)
 EXTRA_wireshark_SOURCES =      \
-       getopt.c        \
+       wsgetopt.c      \
        inet_ntop.c     \
        inet_pton.c     \
        strerror.c      \
@@ -131,7 +131,7 @@ EXTRA_wireshark_SOURCES =   \
 
 # corresponding headers
 EXTRA_wireshark_INCLUDES =     \
-       getopt.h        \
+       wsgetopt.h      \
        inet_v6defs.h   \
        strerror.h      \
        strptime.h
index a1da5b323a28e7fbaaea947626b701f1e5a98133..7809cae3e293c2a237de65f6f131a73aec2e672f 100644 (file)
@@ -73,7 +73,7 @@ dumpcap_OBJECTS = $(dumpcap_SOURCES:.c=.obj)
 randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
 
 EXTRA_OBJECTS = \
-       getopt.obj      \
+       wsgetopt.obj    \
        inet_ntop.obj   \
        inet_pton.obj   \
        strptime.obj
@@ -244,28 +244,28 @@ $(RESOURCES): image
 
 wiretap\wiretap-$(WTAP_VERSION).lib: image $(ZLIB_DLL) wiretap
 
-wireshark.exe  : $(LIBS_CHECK) config.h svnversion.h $(wireshark_OBJECTS) getopt.obj inet_ntop.obj inet_pton.obj codecs epan gtk image\wireshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
+wireshark.exe  : $(LIBS_CHECK) config.h svnversion.h $(wireshark_OBJECTS) wsgetopt.obj inet_ntop.obj inet_pton.obj codecs epan gtk image\wireshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
        @echo Linking $@
        $(LINK) @<<
-               /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) getopt.obj inet_ntop.obj inet_pton.obj $(GTK_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res
+               /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) wsgetopt.obj inet_ntop.obj inet_pton.obj $(GTK_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res
 <<
 !IF $(MSC_VER_REQUIRED) >= 1400
        mt.exe -nologo -manifest "wireshark.exe.manifest" -outputresource:wireshark.exe;1
 !ENDIF
 
-tshark.exe     : $(LIBS_CHECK) config.h svnversion.h $(tshark_OBJECTS) getopt.obj inet_ntop.obj epan image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
+tshark.exe     : $(LIBS_CHECK) config.h svnversion.h $(tshark_OBJECTS) wsgetopt.obj inet_ntop.obj epan image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
        @echo Linking $@
        $(LINK) @<<
-               /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) getopt.obj inet_ntop.obj image\tshark.res
+               /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) wsgetopt.obj inet_ntop.obj image\tshark.res
 <<
 !IF $(MSC_VER_REQUIRED) >= 1400
        mt.exe -nologo -manifest "tshark.exe.manifest" -outputresource:tshark.exe;1
 !ENDIF
 
-rawshark.exe   : $(LIBS_CHECK) config.h svnversion.h $(rawshark_OBJECTS) getopt.obj inet_ntop.obj epan image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
+rawshark.exe   : $(LIBS_CHECK) config.h svnversion.h $(rawshark_OBJECTS) wsgetopt.obj inet_ntop.obj epan image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
        @echo Linking $@
        $(LINK) @<<
-               /OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(rawshark_LIBS) $(rawshark_OBJECTS) getopt.obj inet_ntop.obj image\rawshark.res
+               /OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(rawshark_LIBS) $(rawshark_OBJECTS) wsgetopt.obj inet_ntop.obj image\rawshark.res
 <<
 !IF $(MSC_VER_REQUIRED) >= 1400
        mt.exe -nologo -manifest "rawshark.exe.manifest" -outputresource:rawshark.exe;1
@@ -273,10 +273,10 @@ rawshark.exe      : $(LIBS_CHECK) config.h svnversion.h $(rawshark_OBJECTS) getopt.ob
 
 # XXX: This makefile does not properly handle doing a 'nmake ... capinfos.exe' directly since some of the .objs
 #      (e.g. epan\plugins.obj) must be built first using epan\Makefile.nmake (which happens for 'nmake ... all').
-capinfos.exe   : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
+capinfos.exe   : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) wsgetopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
        @echo Linking $@
        $(LINK) @<<
-               /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(capinfos_OBJECTS) getopt.obj $(capinfos_LIBS) image\capinfos.res
+               /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(capinfos_OBJECTS) wsgetopt.obj $(capinfos_LIBS) image\capinfos.res
 <<
 !IF $(MSC_VER_REQUIRED) >= 1400
        mt.exe -nologo -manifest "capinfos.exe.manifest" -outputresource:capinfos.exe;1
@@ -284,28 +284,28 @@ capinfos.exe      : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) getopt.obj wsutil\libw
 
 # XXX: This makefile does not properly handle doing a 'nmake ... editcap.exe' directly since some of the .objs
 #      (e.g. epan\plugins.obj) must be built first using epan\Makefile.nmake (which happens for 'nmake ... all').
-editcap.exe    : $(LIBS_CHECK) config.h $(editcap_OBJECTS) getopt.obj strptime.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
+editcap.exe    : $(LIBS_CHECK) config.h $(editcap_OBJECTS) wsgetopt.obj strptime.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
        @echo Linking $@
        $(LINK) @<<
-               /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(editcap_OBJECTS) getopt.obj strptime.obj $(editcap_LIBS) image\editcap.res
+               /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(editcap_OBJECTS) wsgetopt.obj strptime.obj $(editcap_LIBS) image\editcap.res
 <<
 !IF $(MSC_VER_REQUIRED) >= 1400
        mt.exe -nologo -manifest "editcap.exe.manifest" -outputresource:editcap.exe;1
 !ENDIF
 
-mergecap.exe   : $(LIBS_CHECK)  config.h svnversion.h mergecap.obj merge.obj getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
+mergecap.exe   : $(LIBS_CHECK)  config.h svnversion.h mergecap.obj merge.obj wsgetopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
        @echo Linking $@
        $(LINK) @<<
-               /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj merge.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
+               /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj merge.obj wsgetopt.obj $(mergecap_LIBS) image\mergecap.res
 <<
 !IF $(MSC_VER_REQUIRED) >= 1400
        mt.exe -nologo -manifest "mergecap.exe.manifest" -outputresource:mergecap.exe;1
 !ENDIF
 
-text2pcap.exe  : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib strptime.obj image\text2pcap.res
+text2pcap.exe  : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj wsgetopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib strptime.obj image\text2pcap.res
        @echo Linking $@
        $(LINK) @<<
-               /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj $(text2pcap_LIBS) strptime.obj image\text2pcap.res
+               /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj wsgetopt.obj $(text2pcap_LIBS) strptime.obj image\text2pcap.res
 <<
 !IF $(MSC_VER_REQUIRED) >= 1400
        mt.exe -nologo -manifest "text2pcap.exe.manifest" -outputresource:text2pcap.exe;1
@@ -320,19 +320,19 @@ dftest.exe        : $(dftest_OBJECTS) epan
        mt.exe -nologo -manifest "dftest.exe.manifest" -outputresource:dftest.exe;1
 !ENDIF
 
-randpkt.exe    : $(randpkt_OBJECTS) getopt.obj
+randpkt.exe    : $(randpkt_OBJECTS) wsgetopt.obj
        @echo Linking $@
        $(LINK) @<<
-               /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS) getopt.obj
+               /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS) wsgetopt.obj
 <<
 !IF $(MSC_VER_REQUIRED) >= 1400
        mt.exe -nologo -manifest "randpkt.exe.manifest" -outputresource:randpkt.exe;1
 !ENDIF
 
-dumpcap.exe    : $(LIBS_CHECK) config.h svnversion.h $(dumpcap_OBJECTS) getopt.obj inet_ntop.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res
+dumpcap.exe    : $(LIBS_CHECK) config.h svnversion.h $(dumpcap_OBJECTS) wsgetopt.obj inet_ntop.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res
        @echo Linking $@
        $(LINK) @<<
-               /OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dumpcap_LIBS) $(dumpcap_OBJECTS) getopt.obj inet_ntop.obj image\dumpcap.res
+               /OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dumpcap_LIBS) $(dumpcap_OBJECTS) wsgetopt.obj inet_ntop.obj image\dumpcap.res
 <<
 !IF $(MSC_VER_REQUIRED) >= 1400
        mt.exe -nologo -manifest "dumpcap.exe.manifest" -outputresource:dumpcap.exe;1
index 972ff13cc7453f85b8812b79d8e152e974455d09..e562236ac51ca110b5874de6b72cff06034959eb 100644 (file)
 #include "wtap.h"
 #include <wsutil/privileges.h>
 
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 static gboolean cap_file_type = FALSE;      /* Do not report capture type     */
index f3ce7afc9a2c181dc6859631cb664ab58fb86682..14a364aaa552d4d4c24be935c8ffc4812055a04a 100644 (file)
@@ -39,6 +39,9 @@
 /* Define to 1 if you have the <fcntl.h> header file. */
 #cmakedefine HAVE_FCNTL_H 1
 
+/* Define to 1 if you have the <getopt.h> header file. */
+#cmakedefine HAVE_GETOPT_H 1
+
 /* Define to 1 if you have the `chown' function. */
 #cmakedefine HAVE_CHOWN 1
 
 /* Note: always defines  PRI[doxu]64 macros so inttypes.h becomes useless.*/
 #cmakedefine INTTYPES_H_DEFINES_FORMATS 1
 
-/* Define if getopt.h needs to be included */
-#cmakedefine NEED_GETOPT_H 1
-
 /* Define if g_ascii_strtoull.h needs to be included */
 #cmakedefine NEED_G_ASCII_STRTOULL_H 1
 
index 6cc50556c176d3f742c312b137ac5ad548b3da8b..a1714b5c6adeb4397c8d663b897e26cc1b2e83f0 100644 (file)
 
 #define NEED_INET_ATON_H    1
 #define NEED_INET_V6DEFS_H  1
-#define NEED_GETOPT_H       1
 #define NEED_STRPTIME_H     1
 
 #ifndef WIN32
index c7c1f6c90a1659107660d5d5b7f8ab0ea167cef2..5ec0a1dbadd016387132cd13b5fdc7f3137b361a 100644 (file)
@@ -1421,13 +1421,15 @@ AC_PROG_GCC_TRADITIONAL
 
 GETOPT_C=""
 GETOPT_O=""
-AC_CHECK_FUNC(getopt, GETOPT_O="",
-  [GETOPT_O="getopt.o"
-   AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h needs to be included])
-])
+AC_CHECK_FUNC(getopt,
+  [GETOPT_O=""
+   AC_DEFINE(HAVE_GETOPT_H, 1, [Define to 1 if you have the <getopt.h> header file.])
+  ],
+  GETOPT_O="wsgetopt.o"
+)
 if test "$ac_cv_func_getopt" = no ; then
-  GETOPT_C="getopt.c"
-  GETOPT_O="getopt.o"
+  GETOPT_C="wsgetopt.c"
+  GETOPT_O="wsgetopt.o"
 fi
 AC_SUBST(GETOPT_C)
 AC_SUBST(GETOPT_O)
index f9538caff13a0f9c08a2a32bfb9ba75692941c29..99dd98f0d18db73a04f1d9542db00e9a3d4ebfcb 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
 #include <signal.h>
 #include <errno.h>
 
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 #ifdef HAVE_NETDB_H
@@ -2543,7 +2545,6 @@ int
 main(int argc, char *argv[])
 {
   int                  opt;
-  extern char         *optarg;
   gboolean             arg_error = FALSE;
 
 #ifdef _WIN32
index b401066535f960e20e086ca7af8cac1293916de1..5937cbac372002b503d656fb924689004909fb1e 100644 (file)
--- a/editcap.c
+++ b/editcap.c
 
 #include "wtap.h"
 
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 #ifdef _WIN32
@@ -672,8 +674,6 @@ main(int argc, char *argv[])
   wtap *wth;
   int i, j, err;
   gchar *err_info;
-  extern char *optarg;
-  extern int optind;
   int opt;
   char *p;
   unsigned int snaplen = 0;             /* No limit               */
index dfdb3713bcf0463a1aacf8f7f3a92579d2c97b27..e7550ce963ed42cfee2383babf5a6939e65702b8 100644 (file)
 #include "strerror.h"
 #endif
 
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 #ifdef _WIN32 /* Needed for console I/O */
@@ -1816,7 +1818,6 @@ main(int argc, char *argv[])
   char                *init_progfile_dir_error;
   char                *s;
   int                  opt;
-  extern char         *optarg;
   gboolean             arg_error = FALSE;
 
   extern int           splash_register_freq;  /* Found in about_dlg.c */
index 2f493c895ebce091e450d2a7b1d0af2917d0e09e..bf58298ccaa10f059aac1ae2ef839c929105f65e 100644 (file)
 #include <string.h>
 #include "wtap.h"
 
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 #include "svnversion.h"
@@ -140,8 +142,6 @@ static void list_encap_types(void) {
 int
 main(int argc, char *argv[])
 {
-  extern char *optarg;
-  extern int   optind;
   int          opt;
   gboolean     do_append     = FALSE;
   gboolean     verbose       = FALSE;
index 2d92d95ea688b3700f9a8957e91b6b8b8a018017..a018265112fb07fd37cef50a3fa09e9d38ff1146 100644 (file)
--- a/randpkt.c
+++ b/randpkt.c
 #include "config.h"
 #endif
 
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 #ifdef HAVE_UNISTD_H
@@ -500,9 +502,6 @@ main(int argc, char **argv)
        guint8                  buffer[65536];
 
        int                     opt;
-       extern char             *optarg;
-       extern int              optind;
-
        int                     produce_count = 1000; /* number of pkts to produce */
        int                     produce_type = PKT_ETHERNET;
        char                    *produce_filename = NULL;
index 794e2a173a30cd1cf586dba6b1405185ccbf3bcc..247cafbc3cedb9626d57ffdc48da05eef1d71707 100644 (file)
 #include "strerror.h"
 #endif
 
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 #include <glib.h>
@@ -428,7 +430,6 @@ main(int argc, char *argv[])
 {
   char                *init_progfile_dir_error;
   int                  opt, i;
-  extern char         *optarg;
   gboolean             arg_error = FALSE;
 
 #ifdef _WIN32
index b799262c6f7ad4ee0979c0a829408431cf0ee7e8..2b47f9f835857f9258c33c80c479f6bf75233628 100644 (file)
 #include <errno.h>
 #include <assert.h>
 
-#ifdef NEED_GETOPT_H
-# include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 #ifdef NEED_STRPTIME_H
index 3cef9e486c17d4dbcaf083c62a5d679596c7c79b..b925efcab15d595d0c96d0d94f52f3d87a64c9b7 100644 (file)
--- a/tshark.c
+++ b/tshark.c
 #include "strerror.h"
 #endif
 
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 #include <glib.h>
@@ -733,7 +735,6 @@ main(int argc, char *argv[])
 {
   char                *init_progfile_dir_error;
   int                  opt;
-  extern char         *optarg;
   gboolean             arg_error = FALSE;
 
 #ifdef _WIN32
similarity index 99%
rename from getopt.c
rename to wsgetopt.c
index 47c70d047d70aa37450d06794c18f1572beea95b..2fc16c04b1b6a34133d4d44e376e10a160dc2bd5 100644 (file)
--- a/getopt.c
@@ -83,7 +83,7 @@
    GNU application programs can use a third alternative mode in which
    they can distinguish the relative order of options and other arguments.  */
 
-#include "getopt.h"
+#include "wsgetopt.h"
 
 /* For communication from `getopt' to the caller.
    When `getopt' finds an option that takes an argument,
similarity index 100%
rename from getopt.h
rename to wsgetopt.h