changeset 8298:0afb48f6e566

Avoid link error due to program_name.
author Bruno Haible <bruno@clisp.org>
date Sat, 03 Mar 2007 12:56:10 +0000
parents 2319a04e267d
children 0e50eecf9ac4
files ChangeLog modules/rbtree-list-tests modules/rbtree-oset-tests modules/rbtreehash-list-tests tests/test-rbtree_list.c tests/test-rbtree_oset.c tests/test-rbtreehash_list.c
diffstat 7 files changed, 27 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,11 @@
 2007-03-02  Bruno Haible  <bruno@clisp.org>
 
-	* modules/rbtreehash-list-tests (Depends-on): Add progname.
-	* tests/test-rbtreehash_list.c: Include progname.h.
+	* modules/rbtree-oset-tests (Depends-on): Add progname.
+	* tests/test-rbtree_oset.c: Include progname.h.
+	(main): Call set_program_name.
+
+	* modules/rbtree-list-tests (Depends-on): Add progname.
+	* tests/test-rbtree_list.c: Include progname.h.
 	(main): Call set_program_name.
 
 	* modules/linked-list-tests (Depends-on): Add progname.
--- a/modules/rbtree-list-tests
+++ b/modules/rbtree-list-tests
@@ -3,6 +3,7 @@
 
 Depends-on:
 array-list
+progname
 
 configure.ac:
 
--- a/modules/rbtree-oset-tests
+++ b/modules/rbtree-oset-tests
@@ -3,6 +3,7 @@
 
 Depends-on:
 array-oset
+progname
 
 configure.ac:
 
--- a/modules/rbtreehash-list-tests
+++ b/modules/rbtreehash-list-tests
@@ -3,6 +3,7 @@
 
 Depends-on:
 array-list
+progname
 
 configure.ac:
 
--- a/tests/test-rbtree_list.c
+++ b/tests/test-rbtree_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_rbtree_list.h"
+
 #include <stdlib.h>
 
 #include "gl_array_list.h"
-#include "gl_rbtree_list.h"
+#include "progname.h"
 
 extern void gl_rbtree_list_check_invariants (gl_list_t list);
 
@@ -64,6 +66,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-rbtree_oset.c
+++ b/tests/test-rbtree_oset.c
@@ -1,5 +1,5 @@
 /* Test of ordered set 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,11 +20,13 @@
 # include <config.h>
 #endif
 
+#include "gl_rbtree_oset.h"
+
 #include <stdlib.h>
 #include <string.h>
 
 #include "gl_array_oset.h"
-#include "gl_rbtree_oset.h"
+#include "progname.h"
 
 extern void gl_rbtree_oset_check_invariants (gl_oset_t set);
 
@@ -74,6 +76,8 @@
 {
   gl_oset_t set1, set2;
 
+  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-rbtreehash_list.c
+++ b/tests/test-rbtreehash_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_rbtreehash_list.h"
+
 #include <limits.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "gl_array_list.h"
-#include "gl_rbtreehash_list.h"
+#include "progname.h"
 
 extern void gl_rbtreehash_list_check_invariants (gl_list_t list);
 
@@ -91,6 +93,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]));