]> granicus.if.org Git - neomutt/commitdiff
use basic getopt from unistd.h
authorRichard Russon <rich@flatcap.org>
Mon, 1 May 2017 01:47:23 +0000 (02:47 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 2 May 2017 16:34:43 +0000 (17:34 +0100)
getopt() is defined in <unistd.h>
<getopt.h> would only be needed if we used getopt_long()

configure.ac
doc/makedoc.c
dotlock.c
main.c
pgppubring.c

index bfa8fccdca5406a689320318d22eeeed970cc444..c277e21df2bde4b0dfd575e9f6490c35b2082840 100644 (file)
@@ -458,8 +458,6 @@ AC_CHECK_DECLS([sys_siglist],[],[],[#include <signal.h>
 
 AC_REPLACE_FUNCS([wcscasecmp strcasestr])
 
-AC_CHECK_HEADERS(getopt.h)
-
 dnl Set the atime of files
 AC_CHECK_FUNCS(futimens)
 
index 34a55407bd33021662265f70de3d12eb098e6311..09e01cf2b10bb564cd0b48afe64562029cb4f30b 100644 (file)
@@ -36,9 +36,6 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
-#endif
 
 #ifndef HAVE_STRERROR
 #define strerror(x) ((x) > 0 && (x) < sys_nerr) ? sys_errlist[(x)] : 0
index 76705fb4c7bdee418e4c93853890b71f6ceda594..12a6f58235ab1fc13223a6aefb6a7154af130750 100644 (file)
--- a/dotlock.c
+++ b/dotlock.c
@@ -37,9 +37,6 @@
 #include <time.h>
 #include <unistd.h>
 #include "dotlock.h"
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
-#endif
 #ifndef _POSIX_PATH_MAX
 #include <limits.h>
 #endif
diff --git a/main.c b/main.c
index 36bc8e7290c4af11f1754e6b47604ce3e9c15a9e..23eff35203c2f4e6d10509edcef5260b6647e45b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -52,9 +52,6 @@
 #endif
 
 
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
-#endif
 #ifdef HAVE_STRINGPREP_H
 #include <stringprep.h>
 #elif defined(HAVE_IDN_STRINGPREP_H)
index a6c902a358a091fc22af8d37f6c826b674766939..81d3a24c991f721ec803b31af2e6e4743c0bb4ad 100644 (file)
@@ -42,9 +42,6 @@
 #include "pgplib.h"
 #include "pgppacket.h"
 #include "sha1.h"
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
-#endif
 
 extern char *optarg;
 extern int optind;