mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Merge from gnulib
This incorporates: 2016-01-24 openat_proc_name: fix last '/' overwritten on OS/2 kLIBC 2016-01-24 closedir, dirfd, opendir: port to OpenSolaris 5.10 2016-01-15 detect utimes() correctly on OS/2 kLIBC 2016-01-15 openat_proc_name: port to OS/2 kLIBC 2016-01-14 stdint: check _INTPTR_T_DECLARED for intptr_t etc. 2016-01-14 opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC 2016-01-14 dup, dup2, fcntl: support a directory fd on OS/2 kLIBC 2016-01-14 binary-io: don't put fd in binary mode if a console on EMX 2016-01-14 sig2str: list all signals on FreeBSD >= 7 2016-01-13 acl-permissions: port to USE_ACL==0 platforms 2016-01-12 mktime: rename macro to avoid glibc clash 2016-01-12 Port "$@" to OpenIndiana ksh93 2016-01-12 Port Universal Time settings to strict POSIX * build-aux/gitlog-to-changelog, build-aux/update-copyright: * doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h: * lib/binary-io.h, lib/dirent.in.h, lib/dirfd.c, lib/dup2.c: * lib/fcntl.c, lib/fdopendir.c, lib/mktime.c, lib/openat-proc.c: * lib/sig2str.h, lib/stdint.in.h, m4/dirfd.m4, m4/dup2.m4: * m4/fcntl.m4, m4/utimes.m4: Copy from gnulib. * m4/gnulib-comp.m4: Regenerate.
This commit is contained in:
parent
fbce4757a8
commit
1698036a43
20 changed files with 422 additions and 91 deletions
14
m4/dup2.m4
14
m4/dup2.m4
|
|
@ -1,4 +1,4 @@
|
|||
#serial 24
|
||||
#serial 25
|
||||
dnl Copyright (C) 2002, 2005, 2007, 2009-2016 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -62,6 +62,16 @@ AC_DEFUN([gl_FUNC_DUP2],
|
|||
result |= 32;
|
||||
dup2 (2, 255);
|
||||
dup2 (2, 256);
|
||||
/* On OS/2 kLIBC, dup2() does not work on a directory fd. */
|
||||
{
|
||||
int fd = open (".", O_RDONLY);
|
||||
if (fd == -1)
|
||||
result |= 64;
|
||||
else if (dup2 (fd, fd + 1) == -1)
|
||||
result |= 128;
|
||||
|
||||
close (fd);
|
||||
}
|
||||
return result;]])
|
||||
],
|
||||
[gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
|
||||
|
|
@ -78,6 +88,8 @@ AC_DEFUN([gl_FUNC_DUP2],
|
|||
gl_cv_func_dup2_works="guessing no" ;;
|
||||
*-android*) # implemented using dup3(), which fails if oldfd == newfd
|
||||
gl_cv_func_dup2_works="guessing no" ;;
|
||||
os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
|
||||
gl_cv_func_dup2_works="guessing no" ;;
|
||||
*) gl_cv_func_dup2_works="guessing yes" ;;
|
||||
esac])
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue