You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2005/09/13 04:46:02 UTC
svn commit: r280464 - /apr/apr/branches/1.2.x/test/testdso.c
Author: wrowe
Date: Mon Sep 12 19:45:58 2005
New Revision: 280464
URL: http://svn.apache.org/viewcvs?rev=280464&view=rev
Log:
Backport: commit 280463
First; on Win32, the convention is .dll. Secondly, once we determine
that it's not possible to invoke the dereferenced function, skip it.
Modified:
apr/apr/branches/1.2.x/test/testdso.c
Modified: apr/apr/branches/1.2.x/test/testdso.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/test/testdso.c?rev=280464&r1=280463&r2=280464&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testdso.c (original)
+++ apr/apr/branches/1.2.x/test/testdso.c Mon Sep 12 19:45:58 2005
@@ -30,8 +30,10 @@
#ifdef NETWARE
# define MOD_NAME "mod_test.nlm"
-#elif defined(BEOS) || defined(WIN32)
+#elif defined(BEOS)
# define MOD_NAME "mod_test.so"
+#elif defined(WIN32)
+# define MOD_NAME "mod_test.dll"
#elif defined(DARWIN)
# define MOD_NAME ".libs/mod_test.so"
# define LIB_NAME ".libs/libmod_test.dylib"
@@ -78,9 +80,11 @@
ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
ABTS_PTR_NOTNULL(tc, func1);
- function = (void (*)(char *))func1;
- (*function)(teststr);
- ABTS_STR_EQUAL(tc, "Hello - I'm a DSO!\n", teststr);
+ if (!tc->failed) {
+ function = (void (*)(char *))func1;
+ (*function)(teststr);
+ ABTS_STR_EQUAL(tc, "Hello - I'm a DSO!\n", teststr);
+ }
apr_dso_unload(h);
}
@@ -101,9 +105,11 @@
ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
ABTS_PTR_NOTNULL(tc, func1);
- function = (int (*)(int))func1;
- status = (*function)(5);
- ABTS_INT_EQUAL(tc, 5, status);
+ if (!tc->failed) {
+ function = (int (*)(int))func1;
+ status = (*function)(5);
+ ABTS_INT_EQUAL(tc, 5, status);
+ }
apr_dso_unload(h);
}
@@ -160,9 +166,11 @@
ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
ABTS_PTR_NOTNULL(tc, func1);
- function = (void (*)(char *))func1;
- (*function)(teststr);
- ABTS_STR_EQUAL(tc, "Hello - I'm a DSO!\n", teststr);
+ if (!tc->failed) {
+ function = (void (*)(char *))func1;
+ (*function)(teststr);
+ ABTS_STR_EQUAL(tc, "Hello - I'm a DSO!\n", teststr);
+ }
apr_dso_unload(h);
}
@@ -183,9 +191,11 @@
ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
ABTS_PTR_NOTNULL(tc, func1);
- function = (int (*)(int))func1;
- status = (*function)(5);
- ABTS_INT_EQUAL(tc, 5, status);
+ if (!tc->failed) {
+ function = (int (*)(int))func1;
+ status = (*function)(5);
+ ABTS_INT_EQUAL(tc, 5, status);
+ }
apr_dso_unload(h);
}