[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/21] getdtablesize: do not use getrlimit() on OS/2 kLIBC
From: |
KO Myung-Hun |
Subject: |
[PATCH 14/21] getdtablesize: do not use getrlimit() on OS/2 kLIBC |
Date: |
Sun, 30 Nov 2014 13:20:16 +0900 |
getrlimit() was implemented in kLIBC and works well. Strangely,
however, it crashes due to 'stack overflow' or 'SIGSEGV' when used in
GNU M4. So just use getdtablesize().
* lib/getdtablesize.c (rpl_getdtablesize): Do not use getrlimit() on
OS/2 kLIBC.
---
lib/getdtablesize.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c
index f0c6271..bd4932f 100644
--- a/lib/getdtablesize.c
+++ b/lib/getdtablesize.c
@@ -92,6 +92,7 @@ getdtablesize (void)
int
rpl_getdtablesize(void)
{
+#ifndef __KLIBC__
/* To date, this replacement is only compiled for Cygwin 1.7.25,
which auto-increased the RLIMIT_NOFILE soft limit until it
hits the compile-time constant hard limit of 3200. Although
@@ -101,6 +102,7 @@ rpl_getdtablesize(void)
struct rlimit lim;
if (!getrlimit (RLIMIT_NOFILE, &lim) && lim.rlim_max != RLIM_INFINITY)
return lim.rlim_max;
+#endif
return getdtablesize ();
}
--
1.8.5.2
- [PATCH 08/21] get_shared_library_fullname: port to EMX, (continued)
- [PATCH 08/21] get_shared_library_fullname: port to EMX, KO Myung-Hun, 2014/11/30
- [PATCH 09/21] relocatable: support UNIXROOT in relocate() on EMX, KO Myung-Hun, 2014/11/30
- [PATCH 12/21] pipe_filter_ii_execute: port to OS/2 kLIBC, KO Myung-Hun, 2014/11/30
- [PATCH 10/21] binary-io: put fd in binary mode if it is not a console on EMX, KO Myung-Hun, 2014/11/30
- [PATCH 11/21] pipe-filter-aux: undefine HAVE_SELECT on KLIBC, KO Myung-Hun, 2014/11/30
- [PATCH 14/21] getdtablesize: do not use getrlimit() on OS/2 kLIBC,
KO Myung-Hun <=
- [PATCH 13/21] w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC, KO Myung-Hun, 2014/11/30
- [PATCH 16/21] wcwidth: fix 'conflicting types' error for `__wcwidth' on OS/2 kLIBC, KO Myung-Hun, 2014/11/30
- [PATCH 18/21] Workaround for dirfd() on OS/2 kLIBC, KO Myung-Hun, 2014/11/30
- [PATCH 15/21] freopen: workaround freopen() on OS/2 kLIBC, KO Myung-Hun, 2014/11/30