diff options
| author | Paul Eggert | 2015-02-24 16:38:16 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-02-24 16:40:23 -0800 |
| commit | 27bd6dadf4a841c16e7f8fcdbd6068512c02bc3b (patch) | |
| tree | 67a1cae8f1f98c86e24ac80694d12a7c17c6ea7a | |
| parent | b74db6347cf5cac1ebd4c604fd5691c588fd8e32 (diff) | |
| download | emacs-27bd6dadf4a841c16e7f8fcdbd6068512c02bc3b.tar.gz emacs-27bd6dadf4a841c16e7f8fcdbd6068512c02bc3b.zip | |
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_*
| -rw-r--r-- | ChangeLog | 9 | ||||
| -rw-r--r-- | lib/getdtablesize.c | 7 | ||||
| -rw-r--r-- | m4/dup2.m4 | 12 | ||||
| -rw-r--r-- | m4/fcntl.m4 | 8 |
4 files changed, 33 insertions, 3 deletions
| @@ -1,3 +1,12 @@ | |||
| 1 | 2015-02-25 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Merge from gnulib | ||
| 4 | * lib/getdtablesize.c, m4/dup2.m4, m4/fcntl.m4: | ||
| 5 | Update from gnulib, incorporating: | ||
| 6 | 2015-02-23 dup2: doc and test for Android bug | ||
| 7 | 2015-02-23 Replace dup2() on Android | ||
| 8 | 2015-02-22 Android doesn't define RLIM_SAVED_* | ||
| 9 | |||
| 1 | 2015-02-21 Paul Eggert <eggert@cs.ucla.edu> | 10 | 2015-02-21 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 11 | ||
| 3 | Merge from gnulib | 12 | Merge from gnulib |
diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c index bad45f7e32f..03eb7ef1bff 100644 --- a/lib/getdtablesize.c +++ b/lib/getdtablesize.c | |||
| @@ -89,6 +89,13 @@ getdtablesize (void) | |||
| 89 | # include <limits.h> | 89 | # include <limits.h> |
| 90 | # include <sys/resource.h> | 90 | # include <sys/resource.h> |
| 91 | 91 | ||
| 92 | # ifndef RLIM_SAVED_CUR | ||
| 93 | # define RLIM_SAVED_CUR RLIM_INFINITY | ||
| 94 | # endif | ||
| 95 | # ifndef RLIM_SAVED_MAX | ||
| 96 | # define RLIM_SAVED_MAX RLIM_INFINITY | ||
| 97 | # endif | ||
| 98 | |||
| 92 | # ifdef __CYGWIN__ | 99 | # ifdef __CYGWIN__ |
| 93 | /* Cygwin 1.7.25 auto-increases the RLIMIT_NOFILE soft limit until it | 100 | /* Cygwin 1.7.25 auto-increases the RLIMIT_NOFILE soft limit until it |
| 94 | hits the compile-time constant hard limit of 3200. We might as | 101 | hits the compile-time constant hard limit of 3200. We might as |
diff --git a/m4/dup2.m4 b/m4/dup2.m4 index 9aa2ea85ebd..59028e0982c 100644 --- a/m4/dup2.m4 +++ b/m4/dup2.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #serial 22 | 1 | #serial 24 |
| 2 | dnl Copyright (C) 2002, 2005, 2007, 2009-2015 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2002, 2005, 2007, 2009-2015 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -25,6 +25,12 @@ AC_DEFUN([gl_FUNC_DUP2], | |||
| 25 | #include <limits.h> | 25 | #include <limits.h> |
| 26 | #include <sys/resource.h> | 26 | #include <sys/resource.h> |
| 27 | #include <unistd.h> | 27 | #include <unistd.h> |
| 28 | #ifndef RLIM_SAVED_CUR | ||
| 29 | # define RLIM_SAVED_CUR RLIM_INFINITY | ||
| 30 | #endif | ||
| 31 | #ifndef RLIM_SAVED_MAX | ||
| 32 | # define RLIM_SAVED_MAX RLIM_INFINITY | ||
| 33 | #endif | ||
| 28 | ]], | 34 | ]], |
| 29 | [[int result = 0; | 35 | [[int result = 0; |
| 30 | int bad_fd = INT_MAX; | 36 | int bad_fd = INT_MAX; |
| @@ -39,7 +45,7 @@ AC_DEFUN([gl_FUNC_DUP2], | |||
| 39 | if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) | 45 | if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) |
| 40 | result |= 1; | 46 | result |= 1; |
| 41 | #endif | 47 | #endif |
| 42 | if (dup2 (1, 1) == 0) | 48 | if (dup2 (1, 1) != 1) |
| 43 | result |= 2; | 49 | result |= 2; |
| 44 | #ifdef FD_CLOEXEC | 50 | #ifdef FD_CLOEXEC |
| 45 | if (fcntl (1, F_GETFD) != FD_CLOEXEC) | 51 | if (fcntl (1, F_GETFD) != FD_CLOEXEC) |
| @@ -70,6 +76,8 @@ AC_DEFUN([gl_FUNC_DUP2], | |||
| 70 | gl_cv_func_dup2_works="guessing no" ;; | 76 | gl_cv_func_dup2_works="guessing no" ;; |
| 71 | haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. | 77 | haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. |
| 72 | gl_cv_func_dup2_works="guessing no" ;; | 78 | gl_cv_func_dup2_works="guessing no" ;; |
| 79 | *-android*) # implemented using dup3(), which fails if oldfd == newfd | ||
| 80 | gl_cv_func_dup2_works="guessing no" ;; | ||
| 73 | *) gl_cv_func_dup2_works="guessing yes" ;; | 81 | *) gl_cv_func_dup2_works="guessing yes" ;; |
| 74 | esac]) | 82 | esac]) |
| 75 | ]) | 83 | ]) |
diff --git a/m4/fcntl.m4 b/m4/fcntl.m4 index 218e78628ba..76dd86711b2 100644 --- a/m4/fcntl.m4 +++ b/m4/fcntl.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # fcntl.m4 serial 7 | 1 | # fcntl.m4 serial 8 |
| 2 | dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -34,6 +34,12 @@ AC_DEFUN([gl_FUNC_FCNTL], | |||
| 34 | #include <limits.h> | 34 | #include <limits.h> |
| 35 | #include <sys/resource.h> | 35 | #include <sys/resource.h> |
| 36 | #include <unistd.h> | 36 | #include <unistd.h> |
| 37 | #ifndef RLIM_SAVED_CUR | ||
| 38 | # define RLIM_SAVED_CUR RLIM_INFINITY | ||
| 39 | #endif | ||
| 40 | #ifndef RLIM_SAVED_MAX | ||
| 41 | # define RLIM_SAVED_MAX RLIM_INFINITY | ||
| 42 | #endif | ||
| 37 | ]], | 43 | ]], |
| 38 | [[int result = 0; | 44 | [[int result = 0; |
| 39 | int bad_fd = INT_MAX; | 45 | int bad_fd = INT_MAX; |