mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Merge from gnulib.
This incorporates: 2014-06-02 acl: apply pure attribute to two functions 2014-06-01 gnulib-common.m4: add _GL_UNUSED_LABEL 2014-05-31 dup2, fcntl, fcntl-h: port to AIX 7.1 2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1 * lib/acl-internal.h, lib/fcntl.in.h, lib/ftoastr.h: * m4/dup2.m4, m4/fcntl.m4, m4/gnulib-common.m4: Update from gnulib.
This commit is contained in:
parent
b9928bbace
commit
eed652d649
7 changed files with 69 additions and 14 deletions
12
m4/fcntl.m4
12
m4/fcntl.m4
|
|
@ -19,7 +19,7 @@ AC_DEFUN([gl_FUNC_FCNTL],
|
|||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_CHECK_FUNCS_ONCE([fcntl])
|
||||
AC_CHECK_FUNCS_ONCE([fcntl getdtablesize])
|
||||
if test $ac_cv_func_fcntl = no; then
|
||||
gl_REPLACE_FCNTL
|
||||
else
|
||||
|
|
@ -28,11 +28,21 @@ AC_DEFUN([gl_FUNC_FCNTL],
|
|||
AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly],
|
||||
[gl_cv_func_fcntl_f_dupfd_works],
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifdef HAVE_GETDTABLESIZE
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
]], [[int result = 0;
|
||||
#ifdef HAVE_GETDTABLESIZE
|
||||
int bad_fd = getdtablesize ();
|
||||
#else
|
||||
int bad_fd = 1000000;
|
||||
#endif
|
||||
if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
|
||||
if (errno != EINVAL) result |= 2;
|
||||
if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
|
||||
if (errno != EINVAL) result |= 8;
|
||||
return result;
|
||||
]])],
|
||||
[gl_cv_func_fcntl_f_dupfd_works=yes],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue