diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-06-06 08:56:03 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-06-07 00:44:45 -0700 |
commit | 111408a0e9eb3a9492c4057ac7d6ddbb8b365aa9 (patch) | |
tree | 9b3928219a0a3f0ff4c8fd123bb5b1a2f23df0e2 /lib/binary-io.h | |
parent | a14eb43215b5cbb99175d2b23f582011948b2eaa (diff) | |
download | emacs-111408a0e9eb3a9492c4057ac7d6ddbb8b365aa9.tar.gz |
Update from Gnulib
This incorporates:
2019-06-04 copy-file-range: new module
2019-05-28 binaty-io: O_BINARY on consoles no longer fails
* doc/misc/texinfo.tex, lib/binary-io.c, lib/binary-io.h:
* lib/unistd.in.h, m4/unistd_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
Diffstat (limited to 'lib/binary-io.h')
-rw-r--r-- | lib/binary-io.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/binary-io.h b/lib/binary-io.h index 720b08c7551..8d4133b0f38 100644 --- a/lib/binary-io.h +++ b/lib/binary-io.h @@ -53,25 +53,21 @@ __gl_setmode (int fd _GL_UNUSED, int mode _GL_UNUSED) } #endif -#if defined __DJGPP__ || defined __EMX__ -extern int __gl_setmode_check (int); -#else -BINARY_IO_INLINE int -__gl_setmode_check (int fd _GL_UNUSED) { return 0; } -#endif - /* Set FD's mode to MODE, which should be either O_TEXT or O_BINARY. Return the old mode if successful, -1 (setting errno) on failure. Ordinarily this function would be called 'setmode', since that is its name on MS-Windows, but it is called 'set_binary_mode' here to avoid colliding with a BSD function of another name. */ +#if defined __DJGPP__ || defined __EMX__ +extern int set_binary_mode (int fd, int mode); +#else BINARY_IO_INLINE int set_binary_mode (int fd, int mode) { - int r = __gl_setmode_check (fd); - return r != 0 ? r : __gl_setmode (fd, mode); + return __gl_setmode (fd, mode); } +#endif /* This macro is obsolescent. */ #define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY)) |