diff options
| author | Paul Eggert | 2011-01-09 00:12:35 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-01-09 00:12:35 -0800 |
| commit | 4004364e6777a1ed2c3e2c0fdf9fed871b186ac3 (patch) | |
| tree | 44d96204ce5ebd144662234e6185d542838be9d1 | |
| parent | 613f7bda1d003048ad79e7c4bba744e5057d609e (diff) | |
| download | emacs-4004364e6777a1ed2c3e2c0fdf9fed871b186ac3.tar.gz emacs-4004364e6777a1ed2c3e2c0fdf9fed871b186ac3.zip | |
Include <unistd.h> unilaterally.
42 files changed, 26 insertions, 104 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 @@ | |||
| 1 | 2011-01-09 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-01-09 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Include <unistd.h> unilaterally. | ||
| 4 | * emacsclient.c, etags.c, fakemail.c, make-docfile.c, movemail.c: | ||
| 5 | * pop.c, test-distrib.c, update-game-score.c: | ||
| 6 | Include <unistd.h> without worrying about HAVE_UNISTD_H, since | ||
| 7 | unistd.h is always present now, possibly supplied by gnulib. | ||
| 8 | |||
| 3 | Include <getopt.h> not "getopt.h". | 9 | Include <getopt.h> not "getopt.h". |
| 4 | * ebrowse.c, emacsclient.c: Include <getopt.h>, not "getopt.h". | 10 | * ebrowse.c, emacsclient.c: Include <getopt.h>, not "getopt.h". |
| 5 | Since getopt.h is no longer in this directory, there's no point | 11 | 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 *); | |||
| 75 | #include <ctype.h> | 75 | #include <ctype.h> |
| 76 | #include <stdio.h> | 76 | #include <stdio.h> |
| 77 | #include <getopt.h> | 77 | #include <getopt.h> |
| 78 | #ifdef HAVE_UNISTD_H | 78 | #include <unistd.h> |
| 79 | # include <unistd.h> | ||
| 80 | #endif | ||
| 81 | 79 | ||
| 82 | #include <pwd.h> | 80 | #include <pwd.h> |
| 83 | #include <sys/stat.h> | 81 | #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"; | |||
| 172 | # endif | 172 | # endif |
| 173 | #endif /* !WINDOWSNT */ | 173 | #endif /* !WINDOWSNT */ |
| 174 | 174 | ||
| 175 | #ifdef HAVE_UNISTD_H | 175 | #include <unistd.h> |
| 176 | # include <unistd.h> | 176 | #ifndef HAVE_UNISTD_H |
| 177 | #else | ||
| 178 | # if defined (HAVE_GETCWD) && !defined (WINDOWSNT) | 177 | # if defined (HAVE_GETCWD) && !defined (WINDOWSNT) |
| 179 | extern char *getcwd (char *buf, size_t size); | 178 | extern char *getcwd (char *buf, size_t size); |
| 180 | # endif | 179 | # 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 () | |||
| 62 | #include <stdlib.h> | 62 | #include <stdlib.h> |
| 63 | 63 | ||
| 64 | /* This is to declare cuserid. */ | 64 | /* This is to declare cuserid. */ |
| 65 | #ifdef HAVE_UNISTD_H | ||
| 66 | #include <unistd.h> | 65 | #include <unistd.h> |
| 67 | #endif | ||
| 68 | 66 | ||
| 69 | /* Type definitions */ | 67 | /* Type definitions */ |
| 70 | 68 | ||
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; | |||
| 78 | #undef chdir | 78 | #undef chdir |
| 79 | #endif | 79 | #endif |
| 80 | 80 | ||
| 81 | #ifdef HAVE_UNISTD_H | ||
| 82 | #include <unistd.h> | 81 | #include <unistd.h> |
| 83 | #endif | ||
| 84 | 82 | ||
| 85 | /* Stdio stream for output to the DOC file. */ | 83 | /* Stdio stream for output to the DOC file. */ |
| 86 | FILE *outfile; | 84 | 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/>. */ | |||
| 63 | #include <time.h> | 63 | #include <time.h> |
| 64 | 64 | ||
| 65 | #include <getopt.h> | 65 | #include <getopt.h> |
| 66 | #ifdef HAVE_UNISTD_H | ||
| 67 | #include <unistd.h> | 66 | #include <unistd.h> |
| 68 | #endif | ||
| 69 | #ifdef HAVE_FCNTL_H | 67 | #ifdef HAVE_FCNTL_H |
| 70 | #include <fcntl.h> | 68 | #include <fcntl.h> |
| 71 | #endif | 69 | #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 * */); | |||
| 68 | #include <string.h> | 68 | #include <string.h> |
| 69 | #define index strchr | 69 | #define index strchr |
| 70 | #endif | 70 | #endif |
| 71 | #ifdef HAVE_UNISTD_H | ||
| 72 | #include <unistd.h> | 71 | #include <unistd.h> |
| 73 | #endif | ||
| 74 | 72 | ||
| 75 | #ifdef KERBEROS | 73 | #ifdef KERBEROS |
| 76 | # ifdef HAVE_KRB5_H | 74 | # 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/>. */ | |||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <fcntl.h> | 24 | #include <fcntl.h> |
| 25 | |||
| 26 | #ifdef HAVE_UNISTD_H | ||
| 27 | #include <unistd.h> | 25 | #include <unistd.h> |
| 28 | #endif | ||
| 29 | 26 | ||
| 30 | /* Break string in two parts to avoid buggy C compilers that ignore characters | 27 | /* Break string in two parts to avoid buggy C compilers that ignore characters |
| 31 | after nulls in strings. */ | 28 | 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/>. */ | |||
| 34 | 34 | ||
| 35 | #include <config.h> | 35 | #include <config.h> |
| 36 | 36 | ||
| 37 | #ifdef HAVE_UNISTD_H | ||
| 38 | #include <unistd.h> | 37 | #include <unistd.h> |
| 39 | #endif | ||
| 40 | #include <errno.h> | 38 | #include <errno.h> |
| 41 | #ifdef HAVE_STRING_H | 39 | #ifdef HAVE_STRING_H |
| 42 | #include <string.h> | 40 | #include <string.h> |
diff --git a/src/ChangeLog b/src/ChangeLog index badd1955c50..7374c4d878d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,15 @@ | |||
| 1 | 2011-01-09 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-01-09 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Include <unistd.h> unilaterally. | ||
| 4 | * alloc.c, atimer.c, buffer.c, callproc.c, dired.c, dispnew.c, doc.c: | ||
| 5 | * doprnt.c, editfns.c, emacs.c, fileio.c, filelock.c, fns.c: | ||
| 6 | * getloadavg.c, getpagesize.h, gmalloc.c, image.c, keyboard.c: | ||
| 7 | * lread.c, process.c, process.h, ralloc.c, regex.c, sysdep.c: | ||
| 8 | * systty.h, term.c, termcap.c, xfns.c, xrdb.c, xselect.c, xsmfns.c: | ||
| 9 | * xterm.c: | ||
| 10 | Include <unistd.h> without worrying about HAVE_UNISTD_H, since | ||
| 11 | unistd.h is always present now, possibly supplied by gnulib. | ||
| 12 | |||
| 3 | * mktime.c: Remove; moving to ../lib. | 13 | * mktime.c: Remove; moving to ../lib. |
| 4 | 14 | ||
| 5 | Use gnulib's mktime module. | 15 | Use gnulib's mktime module. |
diff --git a/src/alloc.c b/src/alloc.c index 089a7766ca4..9a249e679b7 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -59,9 +59,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 59 | #undef GC_MALLOC_CHECK | 59 | #undef GC_MALLOC_CHECK |
| 60 | #endif | 60 | #endif |
| 61 | 61 | ||
| 62 | #ifdef HAVE_UNISTD_H | ||
| 63 | #include <unistd.h> | 62 | #include <unistd.h> |
| 64 | #else | 63 | #ifndef HAVE_UNISTD_H |
| 65 | extern POINTER_TYPE *sbrk (); | 64 | extern POINTER_TYPE *sbrk (); |
| 66 | #endif | 65 | #endif |
| 67 | 66 | ||
diff --git a/src/atimer.c b/src/atimer.c index 6258908e0b2..56625edd9f4 100644 --- a/src/atimer.c +++ b/src/atimer.c | |||
| @@ -26,10 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #include "systime.h" | 26 | #include "systime.h" |
| 27 | #include "blockinput.h" | 27 | #include "blockinput.h" |
| 28 | #include "atimer.h" | 28 | #include "atimer.h" |
| 29 | |||
| 30 | #ifdef HAVE_UNISTD_H | ||
| 31 | #include <unistd.h> | 29 | #include <unistd.h> |
| 32 | #endif | ||
| 33 | 30 | ||
| 34 | #ifdef HAVE_SYS_TIME_H | 31 | #ifdef HAVE_SYS_TIME_H |
| 35 | #include <sys/time.h> | 32 | #include <sys/time.h> |
diff --git a/src/buffer.c b/src/buffer.c index 9766c60da9e..d85475b7155 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -27,10 +27,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 27 | #include <errno.h> | 27 | #include <errno.h> |
| 28 | #include <stdio.h> | 28 | #include <stdio.h> |
| 29 | #include <setjmp.h> | 29 | #include <setjmp.h> |
| 30 | |||
| 31 | #ifdef HAVE_UNISTD_H | ||
| 32 | #include <unistd.h> | 30 | #include <unistd.h> |
| 33 | #endif | ||
| 34 | 31 | ||
| 35 | #include "lisp.h" | 32 | #include "lisp.h" |
| 36 | #include "intervals.h" | 33 | #include "intervals.h" |
diff --git a/src/callproc.c b/src/callproc.c index 59067040fd9..50025410354 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -25,10 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | #include <stdio.h> | 25 | #include <stdio.h> |
| 26 | #include <setjmp.h> | 26 | #include <setjmp.h> |
| 27 | #include <sys/types.h> | 27 | #include <sys/types.h> |
| 28 | |||
| 29 | #ifdef HAVE_UNISTD_H | ||
| 30 | #include <unistd.h> | 28 | #include <unistd.h> |
| 31 | #endif | ||
| 32 | 29 | ||
| 33 | #include <sys/file.h> | 30 | #include <sys/file.h> |
| 34 | #include <fcntl.h> | 31 | #include <fcntl.h> |
diff --git a/src/dired.c b/src/dired.c index d72ea54a518..7f3b59896e7 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -31,10 +31,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 31 | #include <grp.h> | 31 | #include <grp.h> |
| 32 | 32 | ||
| 33 | #include <errno.h> | 33 | #include <errno.h> |
| 34 | |||
| 35 | #ifdef HAVE_UNISTD_H | ||
| 36 | #include <unistd.h> | 34 | #include <unistd.h> |
| 37 | #endif | ||
| 38 | 35 | ||
| 39 | /* The d_nameln member of a struct dirent includes the '\0' character | 36 | /* The d_nameln member of a struct dirent includes the '\0' character |
| 40 | on some systems, but not on others. What's worse, you can't tell | 37 | on some systems, but not on others. What's worse, you can't tell |
diff --git a/src/dispnew.c b/src/dispnew.c index 254ee7a2404..ae13cfc210c 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -23,10 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <ctype.h> | 24 | #include <ctype.h> |
| 25 | #include <setjmp.h> | 25 | #include <setjmp.h> |
| 26 | |||
| 27 | #ifdef HAVE_UNISTD_H | ||
| 28 | #include <unistd.h> | 26 | #include <unistd.h> |
| 29 | #endif | ||
| 30 | 27 | ||
| 31 | #include "lisp.h" | 28 | #include "lisp.h" |
| 32 | #include "termchar.h" | 29 | #include "termchar.h" |
| @@ -26,10 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #include <ctype.h> | 26 | #include <ctype.h> |
| 27 | #include <setjmp.h> | 27 | #include <setjmp.h> |
| 28 | #include <fcntl.h> | 28 | #include <fcntl.h> |
| 29 | |||
| 30 | #ifdef HAVE_UNISTD_H | ||
| 31 | #include <unistd.h> | 29 | #include <unistd.h> |
| 32 | #endif | ||
| 33 | 30 | ||
| 34 | #include "lisp.h" | 31 | #include "lisp.h" |
| 35 | #include "buffer.h" | 32 | #include "buffer.h" |
diff --git a/src/doprnt.c b/src/doprnt.c index 02adc51f1e5..8bfa1c7e11b 100644 --- a/src/doprnt.c +++ b/src/doprnt.c | |||
| @@ -29,9 +29,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | #include <float.h> | 29 | #include <float.h> |
| 30 | #endif | 30 | #endif |
| 31 | 31 | ||
| 32 | #ifdef HAVE_UNISTD_H | ||
| 33 | #include <unistd.h> | 32 | #include <unistd.h> |
| 34 | #endif | ||
| 35 | 33 | ||
| 36 | #include "lisp.h" | 34 | #include "lisp.h" |
| 37 | 35 | ||
diff --git a/src/editfns.c b/src/editfns.c index 4a9e2314a84..19eaf7ca022 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -29,9 +29,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | #include <pwd.h> | 29 | #include <pwd.h> |
| 30 | #endif | 30 | #endif |
| 31 | 31 | ||
| 32 | #ifdef HAVE_UNISTD_H | ||
| 33 | #include <unistd.h> | 32 | #include <unistd.h> |
| 34 | #endif | ||
| 35 | 33 | ||
| 36 | #ifdef HAVE_SYS_UTSNAME_H | 34 | #ifdef HAVE_SYS_UTSNAME_H |
| 37 | #include <sys/utsname.h> | 35 | #include <sys/utsname.h> |
diff --git a/src/emacs.c b/src/emacs.c index 6a04eda9aa2..dca7245f986 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -28,10 +28,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | #include <sys/types.h> | 28 | #include <sys/types.h> |
| 29 | #include <sys/file.h> | 29 | #include <sys/file.h> |
| 30 | #include <setjmp.h> | 30 | #include <setjmp.h> |
| 31 | |||
| 32 | #ifdef HAVE_UNISTD_H | ||
| 33 | #include <unistd.h> | 31 | #include <unistd.h> |
| 34 | #endif | ||
| 35 | 32 | ||
| 36 | #ifdef WINDOWSNT | 33 | #ifdef WINDOWSNT |
| 37 | #include <fcntl.h> | 34 | #include <fcntl.h> |
diff --git a/src/fileio.c b/src/fileio.c index 881dc92acab..26139393784 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -26,10 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #include <sys/types.h> | 26 | #include <sys/types.h> |
| 27 | #include <sys/stat.h> | 27 | #include <sys/stat.h> |
| 28 | #include <setjmp.h> | 28 | #include <setjmp.h> |
| 29 | |||
| 30 | #ifdef HAVE_UNISTD_H | ||
| 31 | #include <unistd.h> | 29 | #include <unistd.h> |
| 32 | #endif | ||
| 33 | 30 | ||
| 34 | #if !defined (S_ISLNK) && defined (S_IFLNK) | 31 | #if !defined (S_ISLNK) && defined (S_IFLNK) |
| 35 | # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) | 32 | # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) |
diff --git a/src/filelock.c b/src/filelock.c index ae0584c447a..9eb1f461cd6 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -32,10 +32,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 32 | 32 | ||
| 33 | #include <sys/file.h> | 33 | #include <sys/file.h> |
| 34 | #include <fcntl.h> | 34 | #include <fcntl.h> |
| 35 | |||
| 36 | #ifdef HAVE_UNISTD_H | ||
| 37 | #include <unistd.h> | 35 | #include <unistd.h> |
| 38 | #endif | ||
| 39 | 36 | ||
| 40 | #ifdef __FreeBSD__ | 37 | #ifdef __FreeBSD__ |
| 41 | #include <sys/sysctl.h> | 38 | #include <sys/sysctl.h> |
| @@ -21,9 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | 23 | ||
| 24 | #ifdef HAVE_UNISTD_H | ||
| 25 | #include <unistd.h> | 24 | #include <unistd.h> |
| 26 | #endif | ||
| 27 | #include <time.h> | 25 | #include <time.h> |
| 28 | #include <setjmp.h> | 26 | #include <setjmp.h> |
| 29 | 27 | ||
diff --git a/src/getloadavg.c b/src/getloadavg.c index 779a0ef804c..3b25e691166 100644 --- a/src/getloadavg.c +++ b/src/getloadavg.c | |||
| @@ -355,10 +355,7 @@ extern int errno; | |||
| 355 | # define LDAV_SYMBOL "avenrun" | 355 | # define LDAV_SYMBOL "avenrun" |
| 356 | # endif | 356 | # endif |
| 357 | 357 | ||
| 358 | # ifdef HAVE_UNISTD_H | 358 | # include <unistd.h> |
| 359 | # include <unistd.h> | ||
| 360 | # endif | ||
| 361 | |||
| 362 | # include <stdio.h> | 359 | # include <stdio.h> |
| 363 | 360 | ||
| 364 | /* LOAD_AVE_TYPE should only get defined if we're going to use the | 361 | /* LOAD_AVE_TYPE should only get defined if we're going to use the |
diff --git a/src/getpagesize.h b/src/getpagesize.h index 2ec51ab3719..b69f0123ddf 100644 --- a/src/getpagesize.h +++ b/src/getpagesize.h | |||
| @@ -19,9 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | #ifndef HAVE_GETPAGESIZE | 20 | #ifndef HAVE_GETPAGESIZE |
| 21 | 21 | ||
| 22 | # ifdef HAVE_UNISTD_H | 22 | # include <unistd.h> |
| 23 | # include <unistd.h> | ||
| 24 | # endif | ||
| 25 | 23 | ||
| 26 | # ifdef _SC_PAGESIZE | 24 | # ifdef _SC_PAGESIZE |
| 27 | # define getpagesize() sysconf(_SC_PAGESIZE) | 25 | # define getpagesize() sysconf(_SC_PAGESIZE) |
diff --git a/src/gmalloc.c b/src/gmalloc.c index 8314798b171..7a5e95c7435 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c | |||
| @@ -72,9 +72,7 @@ Fifth Floor, Boston, MA 02110-1301, USA. | |||
| 72 | #define CHAR_BIT 8 | 72 | #define CHAR_BIT 8 |
| 73 | #endif | 73 | #endif |
| 74 | 74 | ||
| 75 | #ifdef HAVE_UNISTD_H | ||
| 76 | #include <unistd.h> | 75 | #include <unistd.h> |
| 77 | #endif | ||
| 78 | 76 | ||
| 79 | #ifdef USE_PTHREAD | 77 | #ifdef USE_PTHREAD |
| 80 | #include <pthread.h> | 78 | #include <pthread.h> |
diff --git a/src/image.c b/src/image.c index fd1b921056c..bff56b5f961 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -22,10 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <math.h> | 23 | #include <math.h> |
| 24 | #include <ctype.h> | 24 | #include <ctype.h> |
| 25 | |||
| 26 | #ifdef HAVE_UNISTD_H | ||
| 27 | #include <unistd.h> | 25 | #include <unistd.h> |
| 28 | #endif | ||
| 29 | 26 | ||
| 30 | #ifdef HAVE_PNG | 27 | #ifdef HAVE_PNG |
| 31 | #if defined HAVE_LIBPNG_PNG_H | 28 | #if defined HAVE_LIBPNG_PNG_H |
diff --git a/src/keyboard.c b/src/keyboard.c index 7759549fa23..a39b128d014 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -58,10 +58,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 58 | #include "syssignal.h" | 58 | #include "syssignal.h" |
| 59 | 59 | ||
| 60 | #include <sys/types.h> | 60 | #include <sys/types.h> |
| 61 | #ifdef HAVE_UNISTD_H | ||
| 62 | #include <unistd.h> | 61 | #include <unistd.h> |
| 63 | #endif | ||
| 64 | |||
| 65 | #include <fcntl.h> | 62 | #include <fcntl.h> |
| 66 | 63 | ||
| 67 | /* This is to get the definitions of the XK_ symbols. */ | 64 | /* This is to get the definitions of the XK_ symbols. */ |
diff --git a/src/lread.c b/src/lread.c index bc371fc02b0..4c73cc36dcf 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -45,10 +45,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 45 | #include "msdos.h" | 45 | #include "msdos.h" |
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||
| 48 | #ifdef HAVE_UNISTD_H | ||
| 49 | #include <unistd.h> | 48 | #include <unistd.h> |
| 50 | #endif | ||
| 51 | |||
| 52 | #include <math.h> | 49 | #include <math.h> |
| 53 | 50 | ||
| 54 | #ifdef HAVE_SETLOCALE | 51 | #ifdef HAVE_SETLOCALE |
diff --git a/src/process.c b/src/process.c index 6ffcc5b8099..8f9d935e08f 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -32,9 +32,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 32 | #include <inttypes.h> | 32 | #include <inttypes.h> |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | #ifdef HAVE_UNISTD_H | ||
| 36 | #include <unistd.h> | 35 | #include <unistd.h> |
| 37 | #endif | ||
| 38 | #include <fcntl.h> | 36 | #include <fcntl.h> |
| 39 | 37 | ||
| 40 | /* Only MS-DOS does not define `subprocesses'. */ | 38 | /* Only MS-DOS does not define `subprocesses'. */ |
diff --git a/src/process.h b/src/process.h index 0350e95310d..908304f06e7 100644 --- a/src/process.h +++ b/src/process.h | |||
| @@ -20,9 +20,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | #ifdef HAVE_SYS_TYPES_H | 20 | #ifdef HAVE_SYS_TYPES_H |
| 21 | #include <sys/types.h> | 21 | #include <sys/types.h> |
| 22 | #endif | 22 | #endif |
| 23 | #ifdef HAVE_UNISTD_H | 23 | |
| 24 | #include <unistd.h> | 24 | #include <unistd.h> |
| 25 | #endif | ||
| 26 | 25 | ||
| 27 | #ifdef HAVE_GNUTLS | 26 | #ifdef HAVE_GNUTLS |
| 28 | #include "gnutls.h" | 27 | #include "gnutls.h" |
diff --git a/src/ralloc.c b/src/ralloc.c index 5f2b52fcc4b..9b5e3bba582 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -30,9 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #include "lisp.h" /* Needed for VALBITS. */ | 30 | #include "lisp.h" /* Needed for VALBITS. */ |
| 31 | #include "blockinput.h" | 31 | #include "blockinput.h" |
| 32 | 32 | ||
| 33 | #ifdef HAVE_UNISTD_H | ||
| 34 | #include <unistd.h> | 33 | #include <unistd.h> |
| 35 | #endif | ||
| 36 | 34 | ||
| 37 | typedef POINTER_TYPE *POINTER; | 35 | typedef POINTER_TYPE *POINTER; |
| 38 | typedef size_t SIZE; | 36 | typedef size_t SIZE; |
diff --git a/src/regex.c b/src/regex.c index 31f188efa99..4c54a2f863b 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -196,9 +196,7 @@ | |||
| 196 | even if config.h says that we can. */ | 196 | even if config.h says that we can. */ |
| 197 | # undef REL_ALLOC | 197 | # undef REL_ALLOC |
| 198 | 198 | ||
| 199 | # ifdef HAVE_UNISTD_H | 199 | # include <unistd.h> |
| 200 | # include <unistd.h> | ||
| 201 | # endif | ||
| 202 | 200 | ||
| 203 | /* When used in Emacs's lib-src, we need xmalloc and xrealloc. */ | 201 | /* When used in Emacs's lib-src, we need xmalloc and xrealloc. */ |
| 204 | 202 | ||
diff --git a/src/sysdep.c b/src/sysdep.c index ac766058d34..95efd505979 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -30,9 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #ifdef HAVE_LIMITS_H | 30 | #ifdef HAVE_LIMITS_H |
| 31 | #include <limits.h> | 31 | #include <limits.h> |
| 32 | #endif /* HAVE_LIMITS_H */ | 32 | #endif /* HAVE_LIMITS_H */ |
| 33 | #ifdef HAVE_UNISTD_H | ||
| 34 | #include <unistd.h> | 33 | #include <unistd.h> |
| 35 | #endif | ||
| 36 | 34 | ||
| 37 | #include "lisp.h" | 35 | #include "lisp.h" |
| 38 | #include "sysselect.h" | 36 | #include "sysselect.h" |
diff --git a/src/systty.h b/src/systty.h index 59850e7c321..ec858181011 100644 --- a/src/systty.h +++ b/src/systty.h | |||
| @@ -37,9 +37,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 37 | #include <sys/pty.h> | 37 | #include <sys/pty.h> |
| 38 | #endif /* AIX */ | 38 | #endif /* AIX */ |
| 39 | 39 | ||
| 40 | #ifdef HAVE_UNISTD_H | ||
| 41 | #include <unistd.h> | 40 | #include <unistd.h> |
| 42 | #endif | ||
| 43 | 41 | ||
| 44 | 42 | ||
| 45 | /* Special cases - inhibiting the use of certain features. */ | 43 | /* Special cases - inhibiting the use of certain features. */ |
diff --git a/src/term.c b/src/term.c index a684edc5a85..7027ba6b75b 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -25,11 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | #include <ctype.h> | 25 | #include <ctype.h> |
| 26 | #include <errno.h> | 26 | #include <errno.h> |
| 27 | #include <sys/file.h> | 27 | #include <sys/file.h> |
| 28 | |||
| 29 | #ifdef HAVE_UNISTD_H | ||
| 30 | #include <unistd.h> | 28 | #include <unistd.h> |
| 31 | #endif | ||
| 32 | |||
| 33 | #include <signal.h> | 29 | #include <signal.h> |
| 34 | #include <stdarg.h> | 30 | #include <stdarg.h> |
| 35 | #include <setjmp.h> | 31 | #include <setjmp.h> |
diff --git a/src/termcap.c b/src/termcap.c index 4ad0cee6264..39ad08a66d3 100644 --- a/src/termcap.c +++ b/src/termcap.c | |||
| @@ -22,9 +22,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 22 | #include <setjmp.h> | 22 | #include <setjmp.h> |
| 23 | #include <sys/file.h> | 23 | #include <sys/file.h> |
| 24 | #include <fcntl.h> | 24 | #include <fcntl.h> |
| 25 | #ifdef HAVE_UNISTD_H | ||
| 26 | #include <unistd.h> | 25 | #include <unistd.h> |
| 27 | #endif | ||
| 28 | 26 | ||
| 29 | #include "lisp.h" | 27 | #include "lisp.h" |
| 30 | 28 | ||
diff --git a/src/xfns.c b/src/xfns.c index 32e390e1e1e..0ca5fdfe8c0 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -24,10 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 24 | #include <math.h> | 24 | #include <math.h> |
| 25 | #include <setjmp.h> | 25 | #include <setjmp.h> |
| 26 | #include <ctype.h> | 26 | #include <ctype.h> |
| 27 | |||
| 28 | #ifdef HAVE_UNISTD_H | ||
| 29 | #include <unistd.h> | 27 | #include <unistd.h> |
| 30 | #endif | ||
| 31 | 28 | ||
| 32 | /* This makes the fields of a Display accessible, in Xlib header files. */ | 29 | /* This makes the fields of a Display accessible, in Xlib header files. */ |
| 33 | 30 | ||
diff --git a/src/xrdb.c b/src/xrdb.c index 8356ab8a45c..d8e2dfb2c6a 100644 --- a/src/xrdb.c +++ b/src/xrdb.c | |||
| @@ -22,10 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | 22 | ||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | 24 | ||
| 25 | #ifdef HAVE_UNISTD_H | ||
| 26 | #include <unistd.h> | 25 | #include <unistd.h> |
| 27 | #endif | ||
| 28 | |||
| 29 | #include <errno.h> | 26 | #include <errno.h> |
| 30 | #include <epaths.h> | 27 | #include <epaths.h> |
| 31 | 28 | ||
diff --git a/src/xselect.c b/src/xselect.c index 7b91d6f69b9..ed064584cc5 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -27,9 +27,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 27 | #ifdef HAVE_SYS_TYPES_H | 27 | #ifdef HAVE_SYS_TYPES_H |
| 28 | #include <sys/types.h> | 28 | #include <sys/types.h> |
| 29 | #endif | 29 | #endif |
| 30 | #ifdef HAVE_UNISTD_H | 30 | |
| 31 | #include <unistd.h> | 31 | #include <unistd.h> |
| 32 | #endif | ||
| 33 | 32 | ||
| 34 | #include "lisp.h" | 33 | #include "lisp.h" |
| 35 | #include "xterm.h" /* for all of the X includes */ | 34 | #include "xterm.h" /* for all of the X includes */ |
diff --git a/src/xsmfns.c b/src/xsmfns.c index 561fd5ee51a..cea7c0247d1 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c | |||
| @@ -26,10 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #include <X11/Xlib.h> | 26 | #include <X11/Xlib.h> |
| 27 | #include <X11/Xutil.h> | 27 | #include <X11/Xutil.h> |
| 28 | 28 | ||
| 29 | #ifdef HAVE_UNISTD_H | ||
| 30 | #include <unistd.h> | 29 | #include <unistd.h> |
| 31 | #endif | ||
| 32 | |||
| 33 | #include <sys/param.h> | 30 | #include <sys/param.h> |
| 34 | #include <stdio.h> | 31 | #include <stdio.h> |
| 35 | #include <setjmp.h> | 32 | #include <setjmp.h> |
diff --git a/src/xterm.c b/src/xterm.c index f0ef8746b01..8168eb92bec 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -90,9 +90,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 90 | #ifdef HAVE_SYS_TIME_H | 90 | #ifdef HAVE_SYS_TIME_H |
| 91 | #include <sys/time.h> | 91 | #include <sys/time.h> |
| 92 | #endif | 92 | #endif |
| 93 | #ifdef HAVE_UNISTD_H | 93 | |
| 94 | #include <unistd.h> | 94 | #include <unistd.h> |
| 95 | #endif | ||
| 96 | 95 | ||
| 97 | #ifdef USE_GTK | 96 | #ifdef USE_GTK |
| 98 | #include "gtkutil.h" | 97 | #include "gtkutil.h" |