summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog6
-rw-r--r--lib-src/emacsclient.c4
-rw-r--r--lib-src/etags.c5
-rw-r--r--lib-src/fakemail.c2
-rw-r--r--lib-src/make-docfile.c2
-rw-r--r--lib-src/movemail.c2
-rw-r--r--lib-src/pop.c2
-rw-r--r--lib-src/test-distrib.c3
-rw-r--r--lib-src/update-game-score.c2
9 files changed, 9 insertions, 19 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index cdceff66db4..df9f176270b 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,5 +1,11 @@
2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
+ Include <unistd.h> unilaterally.
+ * emacsclient.c, etags.c, fakemail.c, make-docfile.c, movemail.c:
+ * pop.c, test-distrib.c, update-game-score.c:
+ Include <unistd.h> without worrying about HAVE_UNISTD_H, since
+ unistd.h is always present now, possibly supplied by gnulib.
+
Include <getopt.h> not "getopt.h".
* ebrowse.c, emacsclient.c: Include <getopt.h>, not "getopt.h".
Since getopt.h is no longer in this directory, there's no point
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 7bf19d11473..6e52b4dfeab 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -75,9 +75,7 @@ char *w32_getenv (char *);
#include <ctype.h>
#include <stdio.h>
#include <getopt.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <pwd.h>
#include <sys/stat.h>
diff --git a/lib-src/etags.c b/lib-src/etags.c
index f06e714c041..2721415adc9 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -172,9 +172,8 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
# endif
#endif /* !WINDOWSNT */
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#else
+#include <unistd.h>
+#ifndef HAVE_UNISTD_H
# if defined (HAVE_GETCWD) && !defined (WINDOWSNT)
extern char *getcwd (char *buf, size_t size);
# endif
diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c
index 16baeb266a8..b7ebe88cc5d 100644
--- a/lib-src/fakemail.c
+++ b/lib-src/fakemail.c
@@ -62,9 +62,7 @@ main ()
#include <stdlib.h>
/* This is to declare cuserid. */
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
/* Type definitions */
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index e2dc99214d2..43648c8abc7 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -78,9 +78,7 @@ void fatal (const char *s1, const char *s2) NO_RETURN;
#undef chdir
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
/* Stdio stream for output to the DOC file. */
FILE *outfile;
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index f300942427e..8c6a0ddcb64 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -63,9 +63,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <time.h>
#include <getopt.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
diff --git a/lib-src/pop.c b/lib-src/pop.c
index 9eabbd2041e..78793f1e9c7 100644
--- a/lib-src/pop.c
+++ b/lib-src/pop.c
@@ -68,9 +68,7 @@ extern struct servent *hes_getservbyname (/* char *, char * */);
#include <string.h>
#define index strchr
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef KERBEROS
# ifdef HAVE_KRB5_H
diff --git a/lib-src/test-distrib.c b/lib-src/test-distrib.c
index aca46f121fa..bdb5b160491 100644
--- a/lib-src/test-distrib.c
+++ b/lib-src/test-distrib.c
@@ -22,10 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdio.h>
#include <fcntl.h>
-
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
/* Break string in two parts to avoid buggy C compilers that ignore characters
after nulls in strings. */
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index b8e1147d1c1..ee4b9a3ba99 100644
--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -34,9 +34,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <errno.h>
#ifdef HAVE_STRING_H
#include <string.h>