# HG changeset patch # User Paul Eggert # Date 1294560755 28800 # Node ID 7df2e30d72ec55fe6ba14d056875bb93fc166562 # Parent 2887524f362a7e6c9de40f565293cf4396b7d068 Include unilaterally. diff -r 2887524f362a -r 7df2e30d72ec lib-src/ChangeLog --- a/lib-src/ChangeLog Sun Jan 09 00:00:02 2011 -0800 +++ b/lib-src/ChangeLog Sun Jan 09 00:12:35 2011 -0800 @@ -1,5 +1,11 @@ 2011-01-09 Paul Eggert + Include unilaterally. + * emacsclient.c, etags.c, fakemail.c, make-docfile.c, movemail.c: + * pop.c, test-distrib.c, update-game-score.c: + Include without worrying about HAVE_UNISTD_H, since + unistd.h is always present now, possibly supplied by gnulib. + Include not "getopt.h". * ebrowse.c, emacsclient.c: Include , not "getopt.h". Since getopt.h is no longer in this directory, there's no point diff -r 2887524f362a -r 7df2e30d72ec lib-src/emacsclient.c --- a/lib-src/emacsclient.c Sun Jan 09 00:00:02 2011 -0800 +++ b/lib-src/emacsclient.c Sun Jan 09 00:12:35 2011 -0800 @@ -75,9 +75,7 @@ #include #include #include -#ifdef HAVE_UNISTD_H -# include -#endif +#include #include #include diff -r 2887524f362a -r 7df2e30d72ec lib-src/etags.c --- a/lib-src/etags.c Sun Jan 09 00:00:02 2011 -0800 +++ b/lib-src/etags.c Sun Jan 09 00:12:35 2011 -0800 @@ -172,9 +172,8 @@ # endif #endif /* !WINDOWSNT */ -#ifdef HAVE_UNISTD_H -# include -#else +#include +#ifndef HAVE_UNISTD_H # if defined (HAVE_GETCWD) && !defined (WINDOWSNT) extern char *getcwd (char *buf, size_t size); # endif diff -r 2887524f362a -r 7df2e30d72ec lib-src/fakemail.c --- a/lib-src/fakemail.c Sun Jan 09 00:00:02 2011 -0800 +++ b/lib-src/fakemail.c Sun Jan 09 00:12:35 2011 -0800 @@ -62,9 +62,7 @@ #include /* This is to declare cuserid. */ -#ifdef HAVE_UNISTD_H #include -#endif /* Type definitions */ diff -r 2887524f362a -r 7df2e30d72ec lib-src/make-docfile.c --- a/lib-src/make-docfile.c Sun Jan 09 00:00:02 2011 -0800 +++ b/lib-src/make-docfile.c Sun Jan 09 00:12:35 2011 -0800 @@ -78,9 +78,7 @@ #undef chdir #endif -#ifdef HAVE_UNISTD_H #include -#endif /* Stdio stream for output to the DOC file. */ FILE *outfile; diff -r 2887524f362a -r 7df2e30d72ec lib-src/movemail.c --- a/lib-src/movemail.c Sun Jan 09 00:00:02 2011 -0800 +++ b/lib-src/movemail.c Sun Jan 09 00:12:35 2011 -0800 @@ -63,9 +63,7 @@ #include #include -#ifdef HAVE_UNISTD_H #include -#endif #ifdef HAVE_FCNTL_H #include #endif diff -r 2887524f362a -r 7df2e30d72ec lib-src/pop.c --- a/lib-src/pop.c Sun Jan 09 00:00:02 2011 -0800 +++ b/lib-src/pop.c Sun Jan 09 00:12:35 2011 -0800 @@ -68,9 +68,7 @@ #include #define index strchr #endif -#ifdef HAVE_UNISTD_H #include -#endif #ifdef KERBEROS # ifdef HAVE_KRB5_H diff -r 2887524f362a -r 7df2e30d72ec lib-src/test-distrib.c --- a/lib-src/test-distrib.c Sun Jan 09 00:00:02 2011 -0800 +++ b/lib-src/test-distrib.c Sun Jan 09 00:12:35 2011 -0800 @@ -22,10 +22,7 @@ #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif /* Break string in two parts to avoid buggy C compilers that ignore characters after nulls in strings. */ diff -r 2887524f362a -r 7df2e30d72ec lib-src/update-game-score.c --- a/lib-src/update-game-score.c Sun Jan 09 00:00:02 2011 -0800 +++ b/lib-src/update-game-score.c Sun Jan 09 00:12:35 2011 -0800 @@ -34,9 +34,7 @@ #include -#ifdef HAVE_UNISTD_H #include -#endif #include #ifdef HAVE_STRING_H #include diff -r 2887524f362a -r 7df2e30d72ec src/ChangeLog --- a/src/ChangeLog Sun Jan 09 00:00:02 2011 -0800 +++ b/src/ChangeLog Sun Jan 09 00:12:35 2011 -0800 @@ -1,5 +1,15 @@ 2011-01-09 Paul Eggert + Include unilaterally. + * alloc.c, atimer.c, buffer.c, callproc.c, dired.c, dispnew.c, doc.c: + * doprnt.c, editfns.c, emacs.c, fileio.c, filelock.c, fns.c: + * getloadavg.c, getpagesize.h, gmalloc.c, image.c, keyboard.c: + * lread.c, process.c, process.h, ralloc.c, regex.c, sysdep.c: + * systty.h, term.c, termcap.c, xfns.c, xrdb.c, xselect.c, xsmfns.c: + * xterm.c: + Include without worrying about HAVE_UNISTD_H, since + unistd.h is always present now, possibly supplied by gnulib. + * mktime.c: Remove; moving to ../lib. Use gnulib's mktime module. diff -r 2887524f362a -r 7df2e30d72ec src/alloc.c --- a/src/alloc.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/alloc.c Sun Jan 09 00:12:35 2011 -0800 @@ -59,9 +59,8 @@ #undef GC_MALLOC_CHECK #endif -#ifdef HAVE_UNISTD_H #include -#else +#ifndef HAVE_UNISTD_H extern POINTER_TYPE *sbrk (); #endif diff -r 2887524f362a -r 7df2e30d72ec src/atimer.c --- a/src/atimer.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/atimer.c Sun Jan 09 00:12:35 2011 -0800 @@ -26,10 +26,7 @@ #include "systime.h" #include "blockinput.h" #include "atimer.h" - -#ifdef HAVE_UNISTD_H #include -#endif #ifdef HAVE_SYS_TIME_H #include diff -r 2887524f362a -r 7df2e30d72ec src/buffer.c --- a/src/buffer.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/buffer.c Sun Jan 09 00:12:35 2011 -0800 @@ -27,10 +27,7 @@ #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif #include "lisp.h" #include "intervals.h" diff -r 2887524f362a -r 7df2e30d72ec src/callproc.c --- a/src/callproc.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/callproc.c Sun Jan 09 00:12:35 2011 -0800 @@ -25,10 +25,7 @@ #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif #include #include diff -r 2887524f362a -r 7df2e30d72ec src/dired.c --- a/src/dired.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/dired.c Sun Jan 09 00:12:35 2011 -0800 @@ -31,10 +31,7 @@ #include #include - -#ifdef HAVE_UNISTD_H #include -#endif /* The d_nameln member of a struct dirent includes the '\0' character on some systems, but not on others. What's worse, you can't tell diff -r 2887524f362a -r 7df2e30d72ec src/dispnew.c --- a/src/dispnew.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/dispnew.c Sun Jan 09 00:12:35 2011 -0800 @@ -23,10 +23,7 @@ #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif #include "lisp.h" #include "termchar.h" diff -r 2887524f362a -r 7df2e30d72ec src/doc.c --- a/src/doc.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/doc.c Sun Jan 09 00:12:35 2011 -0800 @@ -26,10 +26,7 @@ #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif #include "lisp.h" #include "buffer.h" diff -r 2887524f362a -r 7df2e30d72ec src/doprnt.c --- a/src/doprnt.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/doprnt.c Sun Jan 09 00:12:35 2011 -0800 @@ -29,9 +29,7 @@ #include #endif -#ifdef HAVE_UNISTD_H #include -#endif #include "lisp.h" diff -r 2887524f362a -r 7df2e30d72ec src/editfns.c --- a/src/editfns.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/editfns.c Sun Jan 09 00:12:35 2011 -0800 @@ -29,9 +29,7 @@ #include #endif -#ifdef HAVE_UNISTD_H #include -#endif #ifdef HAVE_SYS_UTSNAME_H #include diff -r 2887524f362a -r 7df2e30d72ec src/emacs.c --- a/src/emacs.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/emacs.c Sun Jan 09 00:12:35 2011 -0800 @@ -28,10 +28,7 @@ #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif #ifdef WINDOWSNT #include diff -r 2887524f362a -r 7df2e30d72ec src/fileio.c --- a/src/fileio.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/fileio.c Sun Jan 09 00:12:35 2011 -0800 @@ -26,10 +26,7 @@ #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif #if !defined (S_ISLNK) && defined (S_IFLNK) # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) diff -r 2887524f362a -r 7df2e30d72ec src/filelock.c --- a/src/filelock.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/filelock.c Sun Jan 09 00:12:35 2011 -0800 @@ -32,10 +32,7 @@ #include #include - -#ifdef HAVE_UNISTD_H #include -#endif #ifdef __FreeBSD__ #include diff -r 2887524f362a -r 7df2e30d72ec src/fns.c --- a/src/fns.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/fns.c Sun Jan 09 00:12:35 2011 -0800 @@ -21,9 +21,7 @@ #include -#ifdef HAVE_UNISTD_H #include -#endif #include #include diff -r 2887524f362a -r 7df2e30d72ec src/getloadavg.c --- a/src/getloadavg.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/getloadavg.c Sun Jan 09 00:12:35 2011 -0800 @@ -355,10 +355,7 @@ # define LDAV_SYMBOL "avenrun" # endif -# ifdef HAVE_UNISTD_H -# include -# endif - +# include # include /* LOAD_AVE_TYPE should only get defined if we're going to use the diff -r 2887524f362a -r 7df2e30d72ec src/getpagesize.h --- a/src/getpagesize.h Sun Jan 09 00:00:02 2011 -0800 +++ b/src/getpagesize.h Sun Jan 09 00:12:35 2011 -0800 @@ -19,9 +19,7 @@ #ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif +# include # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) diff -r 2887524f362a -r 7df2e30d72ec src/gmalloc.c --- a/src/gmalloc.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/gmalloc.c Sun Jan 09 00:12:35 2011 -0800 @@ -72,9 +72,7 @@ #define CHAR_BIT 8 #endif -#ifdef HAVE_UNISTD_H #include -#endif #ifdef USE_PTHREAD #include diff -r 2887524f362a -r 7df2e30d72ec src/image.c --- a/src/image.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/image.c Sun Jan 09 00:12:35 2011 -0800 @@ -22,10 +22,7 @@ #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif #ifdef HAVE_PNG #if defined HAVE_LIBPNG_PNG_H diff -r 2887524f362a -r 7df2e30d72ec src/keyboard.c --- a/src/keyboard.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/keyboard.c Sun Jan 09 00:12:35 2011 -0800 @@ -58,10 +58,7 @@ #include "syssignal.h" #include -#ifdef HAVE_UNISTD_H #include -#endif - #include /* This is to get the definitions of the XK_ symbols. */ diff -r 2887524f362a -r 7df2e30d72ec src/lread.c --- a/src/lread.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/lread.c Sun Jan 09 00:12:35 2011 -0800 @@ -45,10 +45,7 @@ #include "msdos.h" #endif -#ifdef HAVE_UNISTD_H #include -#endif - #include #ifdef HAVE_SETLOCALE diff -r 2887524f362a -r 7df2e30d72ec src/process.c --- a/src/process.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/process.c Sun Jan 09 00:12:35 2011 -0800 @@ -32,9 +32,7 @@ #include #endif -#ifdef HAVE_UNISTD_H #include -#endif #include /* Only MS-DOS does not define `subprocesses'. */ diff -r 2887524f362a -r 7df2e30d72ec src/process.h --- a/src/process.h Sun Jan 09 00:00:02 2011 -0800 +++ b/src/process.h Sun Jan 09 00:12:35 2011 -0800 @@ -20,9 +20,8 @@ #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_UNISTD_H + #include -#endif #ifdef HAVE_GNUTLS #include "gnutls.h" diff -r 2887524f362a -r 7df2e30d72ec src/ralloc.c --- a/src/ralloc.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/ralloc.c Sun Jan 09 00:12:35 2011 -0800 @@ -30,9 +30,7 @@ #include "lisp.h" /* Needed for VALBITS. */ #include "blockinput.h" -#ifdef HAVE_UNISTD_H #include -#endif typedef POINTER_TYPE *POINTER; typedef size_t SIZE; diff -r 2887524f362a -r 7df2e30d72ec src/regex.c --- a/src/regex.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/regex.c Sun Jan 09 00:12:35 2011 -0800 @@ -196,9 +196,7 @@ even if config.h says that we can. */ # undef REL_ALLOC -# ifdef HAVE_UNISTD_H -# include -# endif +# include /* When used in Emacs's lib-src, we need xmalloc and xrealloc. */ diff -r 2887524f362a -r 7df2e30d72ec src/sysdep.c --- a/src/sysdep.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/sysdep.c Sun Jan 09 00:12:35 2011 -0800 @@ -30,9 +30,7 @@ #ifdef HAVE_LIMITS_H #include #endif /* HAVE_LIMITS_H */ -#ifdef HAVE_UNISTD_H #include -#endif #include "lisp.h" #include "sysselect.h" diff -r 2887524f362a -r 7df2e30d72ec src/systty.h --- a/src/systty.h Sun Jan 09 00:00:02 2011 -0800 +++ b/src/systty.h Sun Jan 09 00:12:35 2011 -0800 @@ -37,9 +37,7 @@ #include #endif /* AIX */ -#ifdef HAVE_UNISTD_H #include -#endif /* Special cases - inhibiting the use of certain features. */ diff -r 2887524f362a -r 7df2e30d72ec src/term.c --- a/src/term.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/term.c Sun Jan 09 00:12:35 2011 -0800 @@ -25,11 +25,7 @@ #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif - #include #include #include diff -r 2887524f362a -r 7df2e30d72ec src/termcap.c --- a/src/termcap.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/termcap.c Sun Jan 09 00:12:35 2011 -0800 @@ -22,9 +22,7 @@ #include #include #include -#ifdef HAVE_UNISTD_H #include -#endif #include "lisp.h" diff -r 2887524f362a -r 7df2e30d72ec src/xfns.c --- a/src/xfns.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/xfns.c Sun Jan 09 00:12:35 2011 -0800 @@ -24,10 +24,7 @@ #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif /* This makes the fields of a Display accessible, in Xlib header files. */ diff -r 2887524f362a -r 7df2e30d72ec src/xrdb.c --- a/src/xrdb.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/xrdb.c Sun Jan 09 00:12:35 2011 -0800 @@ -22,10 +22,7 @@ #include -#ifdef HAVE_UNISTD_H #include -#endif - #include #include diff -r 2887524f362a -r 7df2e30d72ec src/xselect.c --- a/src/xselect.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/xselect.c Sun Jan 09 00:12:35 2011 -0800 @@ -27,9 +27,8 @@ #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_UNISTD_H + #include -#endif #include "lisp.h" #include "xterm.h" /* for all of the X includes */ diff -r 2887524f362a -r 7df2e30d72ec src/xsmfns.c --- a/src/xsmfns.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/xsmfns.c Sun Jan 09 00:12:35 2011 -0800 @@ -26,10 +26,7 @@ #include #include -#ifdef HAVE_UNISTD_H #include -#endif - #include #include #include diff -r 2887524f362a -r 7df2e30d72ec src/xterm.c --- a/src/xterm.c Sun Jan 09 00:00:02 2011 -0800 +++ b/src/xterm.c Sun Jan 09 00:12:35 2011 -0800 @@ -90,9 +90,8 @@ #ifdef HAVE_SYS_TIME_H #include #endif -#ifdef HAVE_UNISTD_H + #include -#endif #ifdef USE_GTK #include "gtkutil.h"