[Fedora-directory-commits] ldapserver/lib/base systhr.cpp,1.6,1.7

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Tue Feb 28 03:00:21 UTC 2006


Author: nhosoi

Update of /cvs/dirsec/ldapserver/lib/base
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11113/lib/base

Modified Files:
	systhr.cpp 
Log Message:
Fixing nightly build
Changes:
1) NSPR_RELDATE: v4.6.1 --> v4.6
2) ICU_LIB_VERSION: 34 --> 24
This is a temporary degrade to adjust the version to match the one in adminutil.Once adminutil is built with icu 3.4 and pushed to /s/b/c, we'd go back to 3.4.
3) lib/base/systhr.cpp: Applied NSPR sysfd table patch
4) DS version: 7.1 --> 7.2



Index: systhr.cpp
===================================================================
RCS file: /cvs/dirsec/ldapserver/lib/base/systhr.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- systhr.cpp	19 Apr 2005 22:07:45 -0000	1.6
+++ systhr.cpp	28 Feb 2006 03:00:14 -0000	1.7
@@ -47,11 +47,19 @@
 #ifdef USE_NSPR
 #include "nspr.h"
 #include "private/prpriv.h"
+#ifdef LINUX
+#    include <sys/time.h>
+#    include <sys/resource.h>
+#else
+/* This declaration should be removed when NSPR newer than v4.6 is picked up,
+   which should have the fix for bug 326110
+ */
 extern "C" {
 int32 PR_GetSysfdTableMax(void);
 int32 PR_SetSysfdTableSize(int table_size);
 }
 #endif
+#endif
 #include "systems.h"
 
 #ifdef THREAD_WIN32
@@ -161,9 +169,25 @@
 {
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 256);
 #ifdef XP_UNIX
-    /* XXXrobm allocate all the fd's we can... */
+#ifdef LINUX
+    /*
+     * NSPR 4.6 does not export PR_SetSysfdTableSize
+     * and PR_GetSysfdTableMax by mistake (NSPR Bugzilla
+     * bug 326110) on platforms that use GCC with symbol
+     * visibility, so we have to call the system calls
+     * directly.
+     */
+    {
+        struct rlimit rlim;
+        if (getrlimit(RLIMIT_NOFILE, &rlim) < 0)
+            return;
+        rlim.rlim_cur = rlim.rlim_max;
+        (void) setrlimit(RLIMIT_NOFILE, &rlim);
+    }
+#else 
     PR_SetSysfdTableSize(PR_GetSysfdTableMax());
 #endif
+#endif
 }
 
 




More information about the Fedora-directory-commits mailing list