apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r376407 - /apr/apr/trunk/test/testdso.c
Date Thu, 09 Feb 2006 19:54:15 GMT
Author: wrowe
Date: Thu Feb  9 11:54:14 2006
New Revision: 376407

URL: http://svn.apache.org/viewcvs?rev=376407&view=rev
Log:

  getcwd() isn't portable.  We can 'exercise' some more apr_ functions
  here anyways.  [On win32, it's _getcwd(), fwiw.]

Modified:
    apr/apr/trunk/test/testdso.c

Modified: apr/apr/trunk/test/testdso.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/test/testdso.c?rev=376407&r1=376406&r2=376407&view=diff
==============================================================================
--- apr/apr/trunk/test/testdso.c (original)
+++ apr/apr/trunk/test/testdso.c Thu Feb  9 11:54:14 2006
@@ -21,6 +21,7 @@
 #include "apr_errno.h"
 #include "apr_dso.h"
 #include "apr_strings.h"
+#include "apr_file_info.h"
 #include "apr.h"
 #if APR_HAVE_UNISTD_H
 #include <unistd.h>
@@ -238,20 +239,16 @@
     suite = ADD_SUITE(suite)
 
 #if APR_HAS_DSO
-    modname = apr_pcalloc(p, 256);
-    getcwd(modname, 256);
-    modname = apr_pstrcat(p, modname, "/", MOD_NAME, NULL);
-
+    apr_filepath_merge(&modname, NULL, MOD_NAME, 0, p);
+    
     abts_run_test(suite, test_load_module, NULL);
     abts_run_test(suite, test_dso_sym, NULL);
     abts_run_test(suite, test_dso_sym_return_value, NULL);
     abts_run_test(suite, test_unload_module, NULL);
 
 #ifdef LIB_NAME
-    libname = apr_pcalloc(p, 256);
-    getcwd(libname, 256);
-    libname = apr_pstrcat(p, libname, "/", LIB_NAME, NULL);
-
+    apr_filepath_merge(&libname, NULL, LIB_NAME, 0, p);
+    
     abts_run_test(suite, test_load_library, NULL);
     abts_run_test(suite, test_dso_sym_library, NULL);
     abts_run_test(suite, test_dso_sym_return_value_library, NULL);



Mime
View raw message