mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
Avoid link error due to 'program_name'.
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
2007-03-02 Bruno Haible <bruno@clisp.org>
|
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.
|
* modules/argp-tests (Depends-on): Add progname.
|
||||||
* tests/test-argp.c: Include argp.h first. Include progname.h.
|
* tests/test-argp.c: Include argp.h first. Include progname.h.
|
||||||
(main): Call set_program_name.
|
(main): Call set_program_name.
|
||||||
|
@@ -2,6 +2,7 @@ Files:
|
|||||||
tests/test-array_list.c
|
tests/test-array_list.c
|
||||||
|
|
||||||
Depends-on:
|
Depends-on:
|
||||||
|
progname
|
||||||
|
|
||||||
configure.ac:
|
configure.ac:
|
||||||
|
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "gl_array_list.h"
|
#include "gl_array_list.h"
|
||||||
|
#include "progname.h"
|
||||||
|
|
||||||
static const char *objects[15] =
|
static const char *objects[15] =
|
||||||
{
|
{
|
||||||
@@ -52,6 +53,8 @@ main (int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
gl_list_t list1, list2;
|
gl_list_t list1, list2;
|
||||||
|
|
||||||
|
set_program_name (argv[0]);
|
||||||
|
|
||||||
/* Allow the user to provide a non-default random seed on the command line. */
|
/* Allow the user to provide a non-default random seed on the command line. */
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
srand (atoi (argv[1]));
|
srand (atoi (argv[1]));
|
||||||
|
Reference in New Issue
Block a user