1 --- Python-2.7.1/Modules/python.c.orig Tue Jun 21 21:35:45 2011
2 +++ Python-2.7.1/Modules/python.c Tue Jun 21 21:39:29 2011
4 #include <floatingpoint.h>
7 +#if defined(sun) && defined(__SVR4) && !defined(_LP64)
8 +#define USE_EXTENDED_FILE_STDIO 1
10 +#include <stdio_ext.h>
15 main(int argc, char **argv)
19 fpsetmask(m & ~FP_X_OFL);
21 +#ifdef USE_EXTENDED_FILE_STDIO
23 + * enable extended FILE facility on Solaris so that Python
24 + * apps can keep more than 256 file descriptors open
27 + (void) getrlimit(RLIMIT_NOFILE, &rlp);
28 + rlp.rlim_cur = rlp.rlim_max;
29 + if (setrlimit(RLIMIT_NOFILE, &rlp) != -1) {
30 + enable_extended_FILE_stdio(-1, 0);
34 return Py_Main(argc, argv);