Re: [PATCH 2/3] getdtablesize: Extend RLIMIT_NOFILE fallback case to Android

2015-02-23 Thread enh
EINVAL if oldfd == > newfd. Unlike dup2(), which should return newfd. > > gnulib commit f9fa7159134175 ("dup2, fcntl: cross-compiler better for > Android") changed the logic to guess "yes" instead of "no" on the > question of whether dup2() is sane on L

Re: [PATCH 2/3] getdtablesize: Extend RLIMIT_NOFILE fallback case to Android

2015-02-23 Thread enh
red/testdir/gllib' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/shared/testdir' > make: *** [all] Error 2 > > > So maybe we need to add something like: > > #ifndef RLIM_SAVED_CUR > #define RLIM_SAVED_CUR RLIM_INFINITY > #endif > > Based on comments in tests/test-sys_resource.c it looks like somebody > may have started a replacement, but there is more > work to be done. -- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Java i18n/JNI/NIO, or bionic questions? Mail me/drop by/add me as a reviewer.

Re: [PATCH 2/3] getdtablesize: Extend RLIMIT_NOFILE fallback case to Android

2015-02-17 Thread enh
dtablesize()); > return 0; > } > > > FWIW, the deprecated Bionic getdtablesize() function is implemented as: > > // This was removed from POSIX 2004. > extern "C" int getdtablesize() { > struct rlimit r; > > if (getrlimit(RLIMIT_NOFILE, &r) < 0) { > return sysconf(_SC_OPEN_MAX); > } > > return r.rlim_cur; > } -- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Java i18n/JNI/NIO, or bionic questions? Mail me/drop by/add me as a reviewer.

Re: [PATCH 3/3] localename: Implement gl_locale_name_thread_unsafe() for Android

2015-02-16 Thread enh
); > +# elif defined __ANDROID__ > +struct { > + size_t mb_cur_max; > +} *__locale = (void *)thread_locale; > + > + return __locale->mb_cur_max == 4 ? "C.UTF-8" : "C"; > # endif >} >} > -- > 1.9.1 > -- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Java i18n/JNI/NIO, or bionic questions? Mail me/drop by/add me as a reviewer.