svn rev #24815: trunk/src/util/support/

raeburn@MIT.EDU raeburn at MIT.EDU
Sun Apr 3 02:48:46 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=24815
Commit By: raeburn
Log Message:
Only use RTLD_NODELETE if it's available.


Changed Files:
U   trunk/src/util/support/plugins.c
Modified: trunk/src/util/support/plugins.c
===================================================================
--- trunk/src/util/support/plugins.c	2011-04-03 06:46:19 UTC (rev 24814)
+++ trunk/src/util/support/plugins.c	2011-04-03 06:48:45 UTC (rev 24815)
@@ -258,12 +258,20 @@
 #endif /* USE_CFBUNDLE */
 
 #ifdef RTLD_GROUP
-#define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL | RTLD_GROUP)
+# ifdef RTLD_NODELETE
+#  define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL | RTLD_GROUP | RTLD_NODELETE)
+# else
+#  define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL | RTLD_GROUP)
+# endif
 #else
-#define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL)
+# ifdef RTLD_NODELETE
+#  define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL | RTLD_NODELETE)
+# else
+#  define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL)
+# endif
 #endif
         if (!err) {
-            handle = dlopen(filepath, PLUGIN_DLOPEN_FLAGS | RTLD_NODELETE);
+            handle = dlopen(filepath, PLUGIN_DLOPEN_FLAGS);
             if (handle == NULL) {
                 const char *e = dlerror();
                 if (e == NULL)




More information about the cvs-krb5 mailing list