mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 02:51:31 -08:00
Merge from gnulib
* lib/getdtablesize.c, m4/dup2.m4, m4/fcntl.m4: Update from gnulib, incorporating: 2015-02-23 dup2: doc and test for Android bug 2015-02-23 Replace dup2() on Android 2015-02-22 Android doesn't define RLIM_SAVED_*
This commit is contained in:
parent
b74db6347c
commit
27bd6dadf4
4 changed files with 33 additions and 3 deletions
|
|
@ -1,3 +1,12 @@
|
||||||
|
2015-02-25 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
Merge from gnulib
|
||||||
|
* lib/getdtablesize.c, m4/dup2.m4, m4/fcntl.m4:
|
||||||
|
Update from gnulib, incorporating:
|
||||||
|
2015-02-23 dup2: doc and test for Android bug
|
||||||
|
2015-02-23 Replace dup2() on Android
|
||||||
|
2015-02-22 Android doesn't define RLIM_SAVED_*
|
||||||
|
|
||||||
2015-02-21 Paul Eggert <eggert@cs.ucla.edu>
|
2015-02-21 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
Merge from gnulib
|
Merge from gnulib
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,13 @@ getdtablesize (void)
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
# include <sys/resource.h>
|
# include <sys/resource.h>
|
||||||
|
|
||||||
|
# ifndef RLIM_SAVED_CUR
|
||||||
|
# define RLIM_SAVED_CUR RLIM_INFINITY
|
||||||
|
# endif
|
||||||
|
# ifndef RLIM_SAVED_MAX
|
||||||
|
# define RLIM_SAVED_MAX RLIM_INFINITY
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifdef __CYGWIN__
|
# ifdef __CYGWIN__
|
||||||
/* Cygwin 1.7.25 auto-increases the RLIMIT_NOFILE soft limit until it
|
/* Cygwin 1.7.25 auto-increases the RLIMIT_NOFILE soft limit until it
|
||||||
hits the compile-time constant hard limit of 3200. We might as
|
hits the compile-time constant hard limit of 3200. We might as
|
||||||
|
|
|
||||||
12
m4/dup2.m4
12
m4/dup2.m4
|
|
@ -1,4 +1,4 @@
|
||||||
#serial 22
|
#serial 24
|
||||||
dnl Copyright (C) 2002, 2005, 2007, 2009-2015 Free Software Foundation, Inc.
|
dnl Copyright (C) 2002, 2005, 2007, 2009-2015 Free Software Foundation, Inc.
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -25,6 +25,12 @@ AC_DEFUN([gl_FUNC_DUP2],
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifndef RLIM_SAVED_CUR
|
||||||
|
# define RLIM_SAVED_CUR RLIM_INFINITY
|
||||||
|
#endif
|
||||||
|
#ifndef RLIM_SAVED_MAX
|
||||||
|
# define RLIM_SAVED_MAX RLIM_INFINITY
|
||||||
|
#endif
|
||||||
]],
|
]],
|
||||||
[[int result = 0;
|
[[int result = 0;
|
||||||
int bad_fd = INT_MAX;
|
int bad_fd = INT_MAX;
|
||||||
|
|
@ -39,7 +45,7 @@ AC_DEFUN([gl_FUNC_DUP2],
|
||||||
if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
|
if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
|
||||||
result |= 1;
|
result |= 1;
|
||||||
#endif
|
#endif
|
||||||
if (dup2 (1, 1) == 0)
|
if (dup2 (1, 1) != 1)
|
||||||
result |= 2;
|
result |= 2;
|
||||||
#ifdef FD_CLOEXEC
|
#ifdef FD_CLOEXEC
|
||||||
if (fcntl (1, F_GETFD) != FD_CLOEXEC)
|
if (fcntl (1, F_GETFD) != FD_CLOEXEC)
|
||||||
|
|
@ -70,6 +76,8 @@ AC_DEFUN([gl_FUNC_DUP2],
|
||||||
gl_cv_func_dup2_works="guessing no" ;;
|
gl_cv_func_dup2_works="guessing no" ;;
|
||||||
haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
|
haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
|
||||||
gl_cv_func_dup2_works="guessing no" ;;
|
gl_cv_func_dup2_works="guessing no" ;;
|
||||||
|
*-android*) # implemented using dup3(), which fails if oldfd == newfd
|
||||||
|
gl_cv_func_dup2_works="guessing no" ;;
|
||||||
*) gl_cv_func_dup2_works="guessing yes" ;;
|
*) gl_cv_func_dup2_works="guessing yes" ;;
|
||||||
esac])
|
esac])
|
||||||
])
|
])
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# fcntl.m4 serial 7
|
# fcntl.m4 serial 8
|
||||||
dnl Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
dnl Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -34,6 +34,12 @@ AC_DEFUN([gl_FUNC_FCNTL],
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifndef RLIM_SAVED_CUR
|
||||||
|
# define RLIM_SAVED_CUR RLIM_INFINITY
|
||||||
|
#endif
|
||||||
|
#ifndef RLIM_SAVED_MAX
|
||||||
|
# define RLIM_SAVED_MAX RLIM_INFINITY
|
||||||
|
#endif
|
||||||
]],
|
]],
|
||||||
[[int result = 0;
|
[[int result = 0;
|
||||||
int bad_fd = INT_MAX;
|
int bad_fd = INT_MAX;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue