Come to think of it, there's one more simplification: remove the test for and the use of HAVE_FCNTL_H. This should be safe since several modules already include unconditionally. Here's a patch, and I'll attach a combined patch relative to trunk bzr 110908. === modified file 'ChangeLog' --- ChangeLog 2012-11-16 01:35:18 +0000 +++ ChangeLog 2012-11-16 01:43:28 +0000 @@ -1,6 +1,7 @@ 2012-11-16 Paul Eggert Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881). + * configure.ac: Do not check for fcntl.h. * lib/gnulib.mk: Regenerate. 2012-11-14 Paul Eggert === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2012-11-14 07:26:25 +0000 +++ admin/CPP-DEFINES 2012-11-16 04:33:15 +0000 @@ -150,7 +150,6 @@ HAVE_ENDPWENT HAVE_ENVIRON_DECL HAVE_EUIDACCESS -HAVE_FCNTL_H HAVE_FORK HAVE_FPATHCONF HAVE_FREEIFADDRS === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-11-16 01:35:18 +0000 +++ admin/ChangeLog 2012-11-16 04:33:27 +0000 @@ -1,7 +1,7 @@ 2012-11-16 Paul Eggert Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881). - * CPP-DEFINES (O_RDONLY, O_RDWR): Remove. + * CPP-DEFINES (O_RDONLY, O_RDWR, HAVE_FCNTL_H): Remove. * merge-gnulib (GNULIB_MODULES): Add fcntl-h. 2012-11-14 Paul Eggert === modified file 'configure.ac' --- configure.ac 2012-11-14 04:55:41 +0000 +++ configure.ac 2012-11-16 01:39:47 +0000 @@ -1268,7 +1268,7 @@ dnl checks for header files AC_CHECK_HEADERS_ONCE( linux/version.h sys/systeminfo.h - fcntl.h coff.h pty.h + coff.h pty.h sys/vlimit.h sys/resource.h sys/utsname.h pwd.h utmp.h dirent.h util.h) === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-10-26 07:40:51 +0000 +++ lib-src/ChangeLog 2012-11-16 01:44:21 +0000 @@ -1,3 +1,8 @@ +2012-11-16 Paul Eggert + + Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881). + * movemail.c, update-game-score.c: Assume exists. + 2012-10-26 Glenn Morris * Makefile.in (uninstall): No INSTALLABLES live in archlibdir. === modified file 'lib-src/movemail.c' --- lib-src/movemail.c 2012-08-10 07:07:07 +0000 +++ lib-src/movemail.c 2012-11-16 01:38:58 +0000 @@ -65,9 +65,7 @@ #include #include -#ifdef HAVE_FCNTL_H #include -#endif #include #include "syswait.h" #ifdef MAIL_USE_POP === modified file 'lib-src/update-game-score.c' --- lib-src/update-game-score.c 2012-07-11 05:44:06 +0000 +++ lib-src/update-game-score.c 2012-11-16 01:39:03 +0000 @@ -42,9 +42,7 @@ #include #include #include -#ifdef HAVE_FCNTL_H #include -#endif #include #include === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-16 01:35:18 +0000 +++ src/ChangeLog 2012-11-16 01:44:43 +0000 @@ -5,6 +5,7 @@ * emacs.c, term.c (O_RDWR): Remove. * keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than O_NDELAY, since O_NONBLOCK is the standard name for this flag. + * nsterm.m: Assume exists. * process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process) (create_pty, Fmake_network_process, server_accept_connection) (wait_reading_process_output, init_process_emacs): === modified file 'src/nsterm.m' --- src/nsterm.m 2012-11-14 04:55:41 +0000 +++ src/nsterm.m 2012-11-16 01:39:22 +0000 @@ -30,6 +30,7 @@ interpretation of even the system includes. */ #include +#include #include #include #include @@ -40,10 +41,6 @@ #include #include -#ifdef HAVE_FCNTL_H -#include -#endif - #include "lisp.h" #include "blockinput.h" #include "sysselect.h"