changeset 8294:b12520f4cc34

Avoid a link error due to program_name.
author Bruno Haible <bruno@clisp.org>
date Sat, 03 Mar 2007 04:01:15 +0000
parents 30c0598f4feb
children 6286cf72a42e
files ChangeLog modules/carray-list-tests modules/linkedhash-list-tests tests/test-carray_list.c tests/test-linkedhash_list.c
diffstat 5 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@
 
 2007-03-02  Bruno Haible  <bruno@clisp.org>
 
+	* modules/linkedhash-list-tests (Depends-on): Add progname.
+	* tests/test-linkedhash_list.c: Include progname.h.
+	(main): Call set_program_name.
+
 	* modules/carray-list-tests (Depends-on): Add progname.
 	* tests/test-carray_list.c: Include progname.h.
 	(main): Call set_program_name.
--- a/modules/carray-list-tests
+++ b/modules/carray-list-tests
@@ -3,6 +3,7 @@
 
 Depends-on:
 array-list
+progname
 
 configure.ac:
 
--- a/modules/linkedhash-list-tests
+++ b/modules/linkedhash-list-tests
@@ -3,6 +3,7 @@
 
 Depends-on:
 array-list
+progname
 
 configure.ac:
 
--- a/tests/test-carray_list.c
+++ b/tests/test-carray_list.c
@@ -1,5 +1,5 @@
 /* Test of sequential list data type implementation.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006-2007 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software; you can redistribute it and/or modify
@@ -20,10 +20,12 @@
 # include <config.h>
 #endif
 
+#include "gl_carray_list.h"
+
 #include <stdlib.h>
 
 #include "gl_array_list.h"
-#include "gl_carray_list.h"
+#include "progname.h"
 
 static const char *objects[15] =
   {
@@ -60,6 +62,8 @@
 {
   gl_list_t list1, list2, list3;
 
+  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]));
--- a/tests/test-linkedhash_list.c
+++ b/tests/test-linkedhash_list.c
@@ -1,5 +1,5 @@
 /* Test of sequential list data type implementation.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006-2007 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software; you can redistribute it and/or modify
@@ -20,12 +20,14 @@
 # include <config.h>
 #endif
 
+#include "gl_linkedhash_list.h"
+
 #include <limits.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "gl_array_list.h"
-#include "gl_linkedhash_list.h"
+#include "progname.h"
 
 static const char *objects[15] =
   {
@@ -87,6 +89,8 @@
 {
   gl_list_t list1, list2, list3;
 
+  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]));