]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/mdemo-exec.test: Also try absolute library names.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 24 Jul 2007 05:10:03 +0000 (05:10 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 24 Jul 2007 05:10:03 +0000 (05:10 +0000)
* tests/mdemo/main.c (test_dl, main): Try lt_dlopenext as well.
* THANKS: Update.
Report by Brian Barrett.

ChangeLog
THANKS
tests/mdemo-exec.test
tests/mdemo/main.c

index 2af47281a51c2ac2694a5589d104a532a8d1815e..1e9669f4be818d421f3736f3af408495ea0e264e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * tests/mdemo-exec.test: Also try absolute library names.
+       * tests/mdemo/main.c (test_dl, main): Try lt_dlopenext as well.
+       * THANKS: Update.
+       Report by Brian Barrett.
+
 2007-07-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * doc/fdl.texi: Update to GFDL 1.2.
diff --git a/THANKS b/THANKS
index 1adea6c1cca0ae6226809548e230783c9049bc96..3626dfec9e883afaf55c9519b1f33c5c28c66ea8 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -71,6 +71,7 @@
   Andrey Slepuhin              pooh@msu.ru
   Aneesh Kumar K.V             kvaneesh@hotmail.com
   Brad Smith                   brad@comstyle.com
+  Brian Barrett                        brbarret@osl.iu.edu
   Bruno Haible                 haible@ilog.fr
   Carl D. Roth                 roth@cse.ucsc.edu
   Chris P. Ross                        cross@eng.us.uu.net
index bdf221492d2121836f4e9dd89858c82f69341cb4..ee3014efe7950c01268836b9c7669ad1deef1e17 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # mdemo-exec.test - check that programs in the mdemo subdirectory are viable
 #
-#   Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+#   Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2003
 #
 #   This file is part of GNU Libtool.
@@ -33,5 +33,7 @@ func_exec "tests/mdemo/mdemo_static$EXEEXT tests/mdemo/foo1.la tests/mdemo/libfo
          "try_iterate: .*libfoo2"
 func_exec "tests/mdemo/mdemo$EXEEXT tests/mdemo/foo1.la tests/mdemo/libfoo2.la" \
          "try_iterate: .*libfoo2"
+func_exec "tests/mdemo/mdemo_static$EXEEXT `pwd`/tests/mdemo/foo1.la `pwd`/tests/mdemo/libfoo2.la"
+func_exec "tests/mdemo/mdemo$EXEEXT `pwd`/tests/mdemo/foo1.la `pwd`/tests/mdemo/libfoo2.la"
 
 exit $exec_status
index ca26b3a4de404183d4eb229a85f042e02045c68d..3a95664ee77afb3e96ac1f169bb106423a159994 100644 (file)
@@ -1,6 +1,6 @@
 /* main.c -- mdemo test program
 
-   Copyright (C) 1998-2000, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1998-2000, 2006, 2007 Free Software Foundation, Inc.
    Written by Thomas Tanner, 1998
 
    This file is part of GNU Libtool.
@@ -32,7 +32,7 @@ extern int myfunc (void);
 LT_END_C_DECLS
 
 int
-test_dl (char *filename)
+test_dl (char *filename, int test_ext)
 {
   lt_dlhandle handle;  
   const lt_dlinfo *info;
@@ -42,7 +42,11 @@ test_dl (char *filename)
   int *pnothing = 0;
   int ret = 0;
 
-  handle = lt_dlopen(filename);
+  if (test_ext)
+    handle = lt_dlopenext (filename);
+  else
+    handle = lt_dlopen (filename);
+
   if (!handle) {
     fprintf (stderr, "can't open the module %s!\n", filename);
     fprintf (stderr, "error was: %s\n", lt_dlerror());
@@ -206,6 +210,7 @@ main (int argc, char **argv)
 {
   int i;
   int ret = 0;
+  char *p;
 
   printf ("Welcome to GNU libtool mdemo!\n");
 
@@ -220,8 +225,18 @@ main (int argc, char **argv)
   }
 
   for (i = 1; i < argc; i++)
-    if (test_dl(argv[i]))
+  {
+    if (test_dl(argv[i], 0))
        ret = 1;
+    p = strrchr(argv[i], '.');
+    if (p)
+      {
+       *p = '\0';
+       if (test_dl(argv[i], 1))
+         ret = 1;
+       *p = '.';
+      }
+  }
 
   if (test_dlself())
     ret = 1;