index 648800414e3255c55786613350b44818f9cc3438..0b38404ed3b8a8277b791b75f90eb44e340a8c2c 100644 (file)
extern int opterr;
extern int optopt;
-#ifdef HAVE_INT_OPTRESET
+#endif /* HAVE_GETOPT_H */
+
+/*
+ * Some platforms have optreset but not <getopt.h>. Cygwin, however,
+ * doesn't like this either.
+ */
+#if defined(HAVE_INT_OPTRESET) && !defined(__CYGWIN__)
extern int optreset;
#endif
-#endif /* HAVE_GETOPT_H */
-
#ifndef HAVE_GETOPT
extern int getopt(int nargc, char *const * nargv, const char *ostr);
#endif