Mercurial > hg > octave-nkf > gnulib-hg
comparison lib/getdtablesize.c @ 17930:71aba7a74c52
Android doesn't define RLIM_SAVED_*
Portability problem reported by Kevin Cernekee in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00122.html
* doc/posix-headers/sys_resource.texi (sys/resource.h):
Mention the portability problem.
* lib/getdtablesize.c (RLIM_SAVED_CUR, RLIM_SAVED_MAX):
Define if not defined.
* m4/dup2.m4 (gl_FUNC_DUP2):
* m4/fcntl.m4 (gl_FUNC_FCNTL):
Likewise.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sun, 22 Feb 2015 19:07:46 -0800 |
parents | b76a3e3d3926 |
children |
comparison
equal
deleted
inserted
replaced
17929:7f19e7f2afa2 | 17930:71aba7a74c52 |
---|---|
87 #else | 87 #else |
88 | 88 |
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 |
95 well just report the hard limit. */ | 102 well just report the hard limit. */ |
96 # define rlim_cur rlim_max | 103 # define rlim_cur rlim_max |