diff -r 6cc95ec7b1bb -r c360825c3a3f components/python/python26/patches/Python26-19-ext-stdio.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/python/python26/patches/Python26-19-ext-stdio.patch Tue Mar 01 14:19:15 2011 -0800 @@ -0,0 +1,34 @@ +diff --git Python-2.6.4/Modules/python.c Python-2.6.4/Modules/python.c +--- Python-2.6.4/Modules/python.c ++++ Python-2.6.4/Modules/python.c +@@ -6,6 +6,13 @@ + #include + #endif + ++#if defined(sun) && defined(__SVR4) && !defined(_LP64) ++#define USE_EXTENDED_FILE_STDIO 1 ++#include ++#include ++#include ++#endif ++ + int + main(int argc, char **argv) + { +@@ -20,5 +27,16 @@ + m = fpgetmask(); + fpsetmask(m & ~FP_X_OFL); + #endif ++#ifdef USE_EXTENDED_FILE_STDIO ++ /* enable extended FILE facility on Solaris so that Python ++ apps can keep more than 256 file descriptors open */ ++ struct rlimit rlp; ++ (void) getrlimit(RLIMIT_NOFILE, &rlp); ++ rlp.rlim_cur = rlp.rlim_max; ++ if (setrlimit(RLIMIT_NOFILE, &rlp) != -1) { ++ enable_extended_FILE_stdio(-1, SIGABRT); ++ } ++#endif ++ + return Py_Main(argc, argv); + }