GNU bug report logs - #12881
Assume at least POSIX.1-1988 for fcntl.h

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Wed, 14 Nov 2012 07:39:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 12881 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 12881 <at> debbugs.gnu.org
Cc: Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: Assume at least POSIX.1-1988 for fcntl.h
Date: Thu, 15 Nov 2012 20:38:15 -0800
[Message part 1 (text/plain, inline)]
Come to think of it, there's one more simplification:
remove the test for <fcntl.h> and the use of HAVE_FCNTL_H.
This should be safe since several modules already include <fcntl.h>
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  <eggert <at> cs.ucla.edu>
 
 	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  <eggert <at> cs.ucla.edu>

=== 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  <eggert <at> cs.ucla.edu>
 
 	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  <eggert <at> cs.ucla.edu>

=== 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  <eggert <at> cs.ucla.edu>
+
+	Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
+	* movemail.c, update-game-score.c: Assume <fcntl.h> exists.
+
 2012-10-26  Glenn Morris  <rgm <at> gnu.org>
 
 	* 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 <getopt.h>
 #include <unistd.h>
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#endif
 #include <string.h>
 #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 <time.h>
 #include <pwd.h>
 #include <ctype.h>
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#endif
 #include <sys/stat.h>
 #include <getopt.h>
 

=== 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 <fcntl.h> 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 <config.h>
 
+#include <fcntl.h>
 #include <math.h>
 #include <sys/types.h>
 #include <time.h>
@@ -40,10 +41,6 @@
 #include <c-strcase.h>
 #include <ftoastr.h>
 
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
 #include "lisp.h"
 #include "blockinput.h"
 #include "sysselect.h"
[fcntl.txt.gz (application/x-gzip, attachment)]

This bug report was last modified 12 years and 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.