diff tests/testloadext.c @ 695:712a0bb8d3bf

Add ability to skip dlclose() calls since it creates problems on FreeBSD8.1 64bits
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 21 Jan 2011 16:18:39 +0900
parents dc1b3bd8ef54
children 4a9f08d6b6ba
line wrap: on
line diff
--- a/tests/testloadext.c	Fri Jan 21 16:17:54 2011 +0900
+++ b/tests/testloadext.c	Fri Jan 21 16:18:39 2011 +0900
@@ -68,7 +68,6 @@
 		if (dot && !(strcmp(dot, ".fdx"))) {
 			/* We found a file with name *.fdx, attempt to load it */
 			void *hdl, * ep;
-			int r;
 			snprintf(fullname + pathlen, sizeof(fullname) - pathlen, "%s", dp->d_name);
 			
 			TRACE_DEBUG(INFO, "Extension: '%s'", dp->d_name);
@@ -88,11 +87,9 @@
 			CHECK( 0, ep == NULL ? 1 : 0 );
 			
 			/* Done, now unload */
-			r = dlclose(hdl);
-			if (r) {
-				TRACE_DEBUG(INFO, "Unable to dlclose '%s': %s.", fullname, dlerror());
-			}
-			CHECK( 0, r );
+#ifndef SKIP_DLCLOSE
+			CHECK( 0, dlclose(hdl) );
+#endif /* SKIP_DLCLOSE */
 		}
 	}
 	
"Welcome to our mercurial repository"