diff options
| author | Paul Eggert | 2012-11-17 14:12:47 -0800 |
|---|---|---|
| committer | Paul Eggert | 2012-11-17 14:12:47 -0800 |
| commit | 49cdacdad393e2b9282a19a963030dfbe1a738ab (patch) | |
| tree | 40b11ac721a6a64102dae1a4f227fbc4d1eff0bc /admin | |
| parent | 310e60d9454fe2d7e6920cf51f20d438e57f7b28 (diff) | |
| download | emacs-49cdacdad393e2b9282a19a963030dfbe1a738ab.tar.gz emacs-49cdacdad393e2b9282a19a963030dfbe1a738ab.zip | |
Assume POSIX 1003.1-1988 or later for fcntl.h.
* admin/CPP-DEFINES (O_RDONLY, O_RDWR, HAVE_FCNTL_H): Remove.
* admin/merge-gnulib (GNULIB_MODULES): Add fcntl-h.
* configure.ac: Do not check for fcntl.h.
* lib/gnulib.mk: Regenerate.
* lib-src/movemail.c, lib-src/update-game-score.c: Assume <fcntl.h> exists.
* nt/inc/sys/socket.h (O_NONBLOCK): Rename from O_NDELAY, since the
POSIX name for this flag is O_NONBLOCK. All uses changed.
* nt/inc/unistd.h (O_RDWR, O_NOCTTY): New macros. Like AT_FDCWD etc.
these really should be moved to a replacement <fcntl.h> if and
when that gets implemented. In the meantime, include <fcntl.h>
to make sure we don't override its definitions.
* src/callproc.c (relocate_fd): Assume F_DUPFD.
* src/emacs.c, src/term.c (O_RDWR): Remove.
* src/keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
O_NDELAY, since O_NONBLOCK is the standard name for this flag.
* src/nsterm.m: Assume <fcntl.h> exists.
* src/process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
(create_pty, Fmake_network_process, server_accept_connection)
(wait_reading_process_output, init_process_emacs):
Assume O_NONBLOCK.
(wait_reading_process_output): Put in a special case for WINDOWSNT
to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
It's not clear this is needed, but it's a more-conservative change.
(create_process): Assume FD_CLOEXEC.
(create_process, create_pty): Assume O_NOCTTY.
* src/sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
(reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
Omit if not DOS_NT, since F_GETFL is not defined there.
(serial_open): Assume O_NONBLOCK and O_NOCTTY.
* src/term.c: Include <fcntl.h>, for flags like O_NOCTTY.
(O_NOCTTY): Remove.
(init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
lack it, since gnulib guarantees this.
* src/w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.
Fixes: debbugs:12881
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/CPP-DEFINES | 3 | ||||
| -rw-r--r-- | admin/ChangeLog | 6 | ||||
| -rwxr-xr-x | admin/merge-gnulib | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index 17c56dc7e9e..ae8673452a3 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES | |||
| @@ -150,7 +150,6 @@ HAVE_ENDGRENT | |||
| 150 | HAVE_ENDPWENT | 150 | HAVE_ENDPWENT |
| 151 | HAVE_ENVIRON_DECL | 151 | HAVE_ENVIRON_DECL |
| 152 | HAVE_EUIDACCESS | 152 | HAVE_EUIDACCESS |
| 153 | HAVE_FCNTL_H | ||
| 154 | HAVE_FORK | 153 | HAVE_FORK |
| 155 | HAVE_FREEIFADDRS | 154 | HAVE_FREEIFADDRS |
| 156 | HAVE_FREETYPE | 155 | HAVE_FREETYPE |
| @@ -419,8 +418,6 @@ NSIG | |||
| 419 | NSIG_MINIMUM | 418 | NSIG_MINIMUM |
| 420 | NULL_DEVICE | 419 | NULL_DEVICE |
| 421 | ORDINARY_LINK | 420 | ORDINARY_LINK |
| 422 | O_RDONLY | ||
| 423 | O_RDWR | ||
| 424 | PAGESIZE | 421 | PAGESIZE |
| 425 | PREFER_VSUSP | 422 | PREFER_VSUSP |
| 426 | PTY_ITERATION | 423 | PTY_ITERATION |
diff --git a/admin/ChangeLog b/admin/ChangeLog index 4eb413e948f..3d76f9dd2ba 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-11-17 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881). | ||
| 4 | * CPP-DEFINES (O_RDONLY, O_RDWR, HAVE_FCNTL_H): Remove. | ||
| 5 | * merge-gnulib (GNULIB_MODULES): Add fcntl-h. | ||
| 6 | |||
| 1 | 2012-11-16 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2012-11-16 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 8 | ||
| 3 | Remove no-longer-used pty_max_bytes variable. | 9 | Remove no-longer-used pty_max_bytes variable. |
diff --git a/admin/merge-gnulib b/admin/merge-gnulib index f7a675e5101..792818b2efe 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib | |||
| @@ -29,7 +29,7 @@ GNULIB_MODULES=' | |||
| 29 | alloca-opt c-ctype c-strcase | 29 | alloca-opt c-ctype c-strcase |
| 30 | careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 | 30 | careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 |
| 31 | dtoastr dtotimespec dup2 environ execinfo faccessat | 31 | dtoastr dtotimespec dup2 environ execinfo faccessat |
| 32 | filemode getloadavg getopt-gnu gettime gettimeofday | 32 | fcntl-h filemode getloadavg getopt-gnu gettime gettimeofday |
| 33 | ignore-value intprops largefile lstat | 33 | ignore-value intprops largefile lstat |
| 34 | manywarnings mktime pselect pthread_sigmask readlink | 34 | manywarnings mktime pselect pthread_sigmask readlink |
| 35 | socklen stat-time stdalign stdarg stdbool stdio | 35 | socklen stat-time stdalign stdarg stdbool stdio |