Avoid link error due to 'program_name'.
authorBruno Haible <bruno@clisp.org>
Sat, 3 Mar 2007 01:43:55 +0000 (01:43 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 3 Mar 2007 01:43:55 +0000 (01:43 +0000)
ChangeLog
modules/array-list-tests
tests/test-array_list.c

index acfe9b5..e210c2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-03-02  Bruno Haible  <bruno@clisp.org>
 
+       * modules/array-list-tests (Depends-on): Add progname.
+       * tests/test-array_list.c: Include progname.h.
+       (main): Call set_program_name.
+
        * modules/argp-tests (Depends-on): Add progname.
        * tests/test-argp.c: Include argp.h first. Include progname.h.
        (main): Call set_program_name.
index a1d1ba1..83dc54c 100644 (file)
@@ -2,6 +2,7 @@ Files:
 tests/test-array_list.c
 
 Depends-on:
+progname
 
 configure.ac:
 
index c043c83..3cd1e3e 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 
 #include "gl_array_list.h"
+#include "progname.h"
 
 static const char *objects[15] =
   {
@@ -52,6 +53,8 @@ main (int argc, char *argv[])
 {
   gl_list_t list1, list2;
 
+  set_program_name (argv[0]);
+
   /* Allow the user to provide a non-default random seed on the command line.  */
   if (argc > 1)
     srand (atoi (argv[1]));