]> code.delx.au - gnu-emacs/commitdiff
Include <unistd.h> unilaterally.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Jan 2011 08:12:35 +0000 (00:12 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Jan 2011 08:12:35 +0000 (00:12 -0800)
42 files changed:
lib-src/ChangeLog
lib-src/emacsclient.c
lib-src/etags.c
lib-src/fakemail.c
lib-src/make-docfile.c
lib-src/movemail.c
lib-src/pop.c
lib-src/test-distrib.c
lib-src/update-game-score.c
src/ChangeLog
src/alloc.c
src/atimer.c
src/buffer.c
src/callproc.c
src/dired.c
src/dispnew.c
src/doc.c
src/doprnt.c
src/editfns.c
src/emacs.c
src/fileio.c
src/filelock.c
src/fns.c
src/getloadavg.c
src/getpagesize.h
src/gmalloc.c
src/image.c
src/keyboard.c
src/lread.c
src/process.c
src/process.h
src/ralloc.c
src/regex.c
src/sysdep.c
src/systty.h
src/term.c
src/termcap.c
src/xfns.c
src/xrdb.c
src/xselect.c
src/xsmfns.c
src/xterm.c

index cdceff66db465f1d8b552d36e02339c40f8aadda..df9f176270b01e2c7f0d57c165107b30137a457d 100644 (file)
@@ -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
index 7bf19d11473eda0348f0c7adca134bedadebf2f3..6e52b4dfeab52ea3a9d4071f5835bb329397a87f 100644 (file)
@@ -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>
index f06e714c04136b7673fd1a8f779f44dbb0b05592..2721415adc98b9cfdbd25adf59cb79487a604557 100644 (file)
@@ -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
index 16baeb266a8b97959930c1d7a83ecc486ce7a5c1..b7ebe88cc5d2522f66054705fb27ca01ffb3fd93 100644 (file)
@@ -62,9 +62,7 @@ main ()
 #include <stdlib.h>
 
 /* This is to declare cuserid.  */
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 \f
 /* Type definitions */
 
index e2dc99214d2d5f64a5e115420f4832e7f08f5315..43648c8abc711719ea388115f793b3f932f5061b 100644 (file)
@@ -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;
index f300942427e72c644e4b1a5e9fe42bace5990888..8c6a0ddcb64d93b246e14c85a4ec4ab950d11230 100644 (file)
@@ -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
index 9eabbd2041e53ca7333e743c3b1796f29771a8b1..78793f1e9c734ac149600210e2faff28d9daf5ab 100644 (file)
@@ -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
index aca46f121faf991fcd123f836e0837cd06f14618..bdb5b1604919a0967b9f100bfbac446baec3c14f 100644 (file)
@@ -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.  */
index b8e1147d1c1b3e72029a0e92a21146fe80e24e9b..ee4b9a3ba9913b4579f477b0ffbee52994ebcd80 100644 (file)
@@ -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>
index badd1955c5065b2cf7fd99374fe7a977d2f8805e..7374c4d878d103a35c886e7e04e5aab4b80ad90e 100644 (file)
@@ -1,5 +1,15 @@
 2011-01-09  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Include <unistd.h> 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 <unistd.h> 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.
index 089a7766ca4c652df83c5e247a814c551a517f85..9a249e679b70b5bd862831672c3132f99386e402 100644 (file)
@@ -59,9 +59,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #undef GC_MALLOC_CHECK
 #endif
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#else
+#ifndef HAVE_UNISTD_H
 extern POINTER_TYPE *sbrk ();
 #endif
 
index 6258908e0b22bc997882b7b09edfdb23b76ff92c..56625edd9f4bd135c6b66a6571da8d8d6e531646 100644 (file)
@@ -26,10 +26,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "systime.h"
 #include "blockinput.h"
 #include "atimer.h"
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
index 9766c60da9e09ad9fbdee0b66b0ece02d60c2009..d85475b7155c64a72dc1771a799a9fda0d640ec9 100644 (file)
@@ -27,10 +27,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <errno.h>
 #include <stdio.h>
 #include <setjmp.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #include "lisp.h"
 #include "intervals.h"
index 59067040fd9c35d957532affa26116062035db0a..50025410354021747d39532f87c8c0a4f591b9cc 100644 (file)
@@ -25,10 +25,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdio.h>
 #include <setjmp.h>
 #include <sys/types.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #include <sys/file.h>
 #include <fcntl.h>
index d72ea54a5185a9d60c7e3da6613abf64c8c4bba5..7f3b59896e78254be803877ca8cbc68ee6f7a1ef 100644 (file)
@@ -31,10 +31,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <grp.h>
 
 #include <errno.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#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
index 254ee7a2404490767d5dd53168c3f42b008bc070..ae13cfc210c5880ba94bf5e7abfc84bef6de4ac4 100644 (file)
@@ -23,10 +23,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdio.h>
 #include <ctype.h>
 #include <setjmp.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #include "lisp.h"
 #include "termchar.h"
index 7caa88a7b5e71567baa1c3f467601395a6fb5605..e57fb4d12b27061469bbff7d7fb09830cf6b305b 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -26,10 +26,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <ctype.h>
 #include <setjmp.h>
 #include <fcntl.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #include "lisp.h"
 #include "buffer.h"
index 02adc51f1e523f847f37099f4488090a65d3e4c5..8bfa1c7e11bf2aa150203a1508cc6d34e1399f7e 100644 (file)
@@ -29,9 +29,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <float.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #include "lisp.h"
 
index 4a9e2314a8424c800216d22f3974f1140a1d262c..19eaf7ca0224cee8583c627628cb12f45d20ccef 100644 (file)
@@ -29,9 +29,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <pwd.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #ifdef HAVE_SYS_UTSNAME_H
 #include <sys/utsname.h>
index 6a04eda9aa27323fe610318cce5a500c8413320c..dca7245f9864c8260fcc5fa7d8dc9338a28ff625 100644 (file)
@@ -28,10 +28,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/types.h>
 #include <sys/file.h>
 #include <setjmp.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #ifdef WINDOWSNT
 #include <fcntl.h>
index 881dc92acab521249bf43c2837cfeb561a9a11fb..26139393784f5183bf90dd92cd9ebe766f7fb208 100644 (file)
@@ -26,10 +26,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <setjmp.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #if !defined (S_ISLNK) && defined (S_IFLNK)
 #  define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
index ae0584c447aac24d0778ee450e6fad4a8479ab2b..9eb1f461cd631bef21554ea820de6e3b171c6206 100644 (file)
@@ -32,10 +32,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <sys/file.h>
 #include <fcntl.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #ifdef __FreeBSD__
 #include <sys/sysctl.h>
index ddc193d85e4cdf607c8a065f7af38bab60e1f3f5..8fd5c7d291aa0c298c1cf0929f66eaeab8e18099 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -21,9 +21,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 <time.h>
 #include <setjmp.h>
 
index 779a0ef804c5e4dcb4b44787072007571e3dfc78..3b25e69116662a5d2fa6bb18e5052d7d589f77c3 100644 (file)
@@ -355,10 +355,7 @@ extern int errno;
 #  define LDAV_SYMBOL "avenrun"
 # endif
 
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
-
+# include <unistd.h>
 # include <stdio.h>
 
 /* LOAD_AVE_TYPE should only get defined if we're going to use the
index 2ec51ab371917161ac74dbb2e8a32b5d7d9b260d..b69f0123ddf1bb9b0ad815550907442d3f3c7d26 100644 (file)
@@ -19,9 +19,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef HAVE_GETPAGESIZE
 
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
+# include <unistd.h>
 
 # ifdef _SC_PAGESIZE
 #  define getpagesize() sysconf(_SC_PAGESIZE)
index 8314798b1710bf2aca4e650145bd9483da1205a6..7a5e95c74357cceeeefb2a435b333768badc32df 100644 (file)
@@ -72,9 +72,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.
 #define        CHAR_BIT        8
 #endif
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #ifdef USE_PTHREAD
 #include <pthread.h>
index fd1b921056cba47ac58f83670e6116a7d6f46f47..bff56b5f96108ea5f70846a787d58c398c9df165 100644 (file)
@@ -22,10 +22,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdio.h>
 #include <math.h>
 #include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #ifdef HAVE_PNG
 #if defined HAVE_LIBPNG_PNG_H
index 7759549fa23cc7b13cdcdb77ac7823cd98f4ac8a..a39b128d01443606afd647d4ffefd05c495f736a 100644 (file)
@@ -58,10 +58,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "syssignal.h"
 
 #include <sys/types.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
-
 #include <fcntl.h>
 
 /* This is to get the definitions of the XK_ symbols.  */
index bc371fc02b096a536aefcf780e8611a2d90f6dbc..4c73cc36dcffbde5ef3e1c1d737242eebfc7d5a0 100644 (file)
@@ -45,10 +45,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "msdos.h"
 #endif
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
-
 #include <math.h>
 
 #ifdef HAVE_SETLOCALE
index 6ffcc5b8099fb5e1599d400589b5c35b30217fec..8f9d935e08ff164574491e8a3f01e3d8dde7c6cf 100644 (file)
@@ -32,9 +32,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <inttypes.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #include <fcntl.h>
 
 /* Only MS-DOS does not define `subprocesses'.  */
index 0350e95310da82bcd53e041de605c3881b7302de..908304f06e73209844d45c1d2e2c65df38a5e850 100644 (file)
@@ -20,9 +20,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_UNISTD_H
+
 #include <unistd.h>
-#endif
 
 #ifdef HAVE_GNUTLS
 #include "gnutls.h"
index 5f2b52fcc4be004ea80f1a2154a78cf592c0d970..9b5e3bba5829ef101d17ce4b5aedbd7ba974faae 100644 (file)
@@ -30,9 +30,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "lisp.h"              /* Needed for VALBITS.  */
 #include "blockinput.h"
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 typedef POINTER_TYPE *POINTER;
 typedef size_t SIZE;
index 31f188efa9983fe7b5672eb3c1223a8f8e75ae21..4c54a2f863b1a0f5c1db56509f6371de269b9696 100644 (file)
    even if config.h says that we can.  */
 # undef REL_ALLOC
 
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
+# include <unistd.h>
 
 /* When used in Emacs's lib-src, we need xmalloc and xrealloc. */
 
index ac766058d34c55383539ac099ed4645c5821d3f2..95efd5059794fa6b83a53dac9eed2a392850f879 100644 (file)
@@ -30,9 +30,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif /* HAVE_LIMITS_H */
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #include "lisp.h"
 #include "sysselect.h"
index 59850e7c321b52241d6956f24c69c328cfcc6409..ec85818101153e7db4ae0f3c53ad573e678d1dac 100644 (file)
@@ -37,9 +37,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/pty.h>
 #endif /* AIX */
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 \f
 /* Special cases - inhibiting the use of certain features.  */
index a684edc5a85d9cd8c89ec68e5fa1dccb040a4d89..7027ba6b75bc4d73ae00ab61301a5cfb2b14d134 100644 (file)
@@ -25,11 +25,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <ctype.h>
 #include <errno.h>
 #include <sys/file.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
-
 #include <signal.h>
 #include <stdarg.h>
 #include <setjmp.h>
index 4ad0cee6264e76aa736adc5b6fed9f57f47ca450..39ad08a66d378225135173f07c17b901a6cf7ad9 100644 (file)
@@ -22,9 +22,7 @@ Boston, MA 02110-1301, USA.  */
 #include <setjmp.h>
 #include <sys/file.h>
 #include <fcntl.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #include "lisp.h"
 
index 32e390e1e1e9d7250d6669fab77b89a86ed812d2..0ca5fdfe8c01ea6deb580b41b5829f2c6647ea45 100644 (file)
@@ -24,10 +24,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <math.h>
 #include <setjmp.h>
 #include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 /* This makes the fields of a Display accessible, in Xlib header files.  */
 
index 8356ab8a45cb070a28f486ccec7808efe137df18..d8e2dfb2c6adf28088f3b7c513f4cc08b8cd03ca 100644 (file)
@@ -22,10 +22,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>
 #include <epaths.h>
 
index 7b91d6f69b9f14313864e2ff5460455ecbc82225..ed064584cc5e54ca65f99c42db38537747217bd3 100644 (file)
@@ -27,9 +27,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_UNISTD_H
+
 #include <unistd.h>
-#endif
 
 #include "lisp.h"
 #include "xterm.h"     /* for all of the X includes */
index 561fd5ee51a46a3ac19dcd78597275c792c42cfb..cea7c0247d17888a8fbbfd524916552941ad8364 100644 (file)
@@ -26,10 +26,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
-
 #include <sys/param.h>
 #include <stdio.h>
 #include <setjmp.h>
index f0ef8746b017ec3ce27b613b7eb176175bc54307..8168eb92bec550a318e1c926d7ef22fcd7751a9d 100644 (file)
@@ -90,9 +90,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
-#ifdef HAVE_UNISTD_H
+
 #include <unistd.h>
-#endif
 
 #ifdef USE_GTK
 #include "gtkutil.h"