aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2011-01-09 00:12:35 -0800
committerPaul Eggert <[email protected]>2011-01-09 00:12:35 -0800
commit4004364e6777a1ed2c3e2c0fdf9fed871b186ac3 (patch)
tree44d96204ce5ebd144662234e6185d542838be9d1 /lib-src
parent613f7bda1d003048ad79e7c4bba744e5057d609e (diff)
Include <unistd.h> unilaterally.
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 cdceff66db..df9f176270 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,5 +1,11 @@
2011-01-09 Paul Eggert <[email protected]>
+ 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 7bf19d1147..6e52b4dfea 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 f06e714c04..2721415adc 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 16baeb266a..b7ebe88cc5 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 e2dc99214d..43648c8abc 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 f300942427..8c6a0ddcb6 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 9eabbd2041..78793f1e9c 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 aca46f121f..bdb5b16049 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 b8e1147d1c..ee4b9a3ba9 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>