Mercurial > hg > octave-kai > gnulib-hg
changeset 8285:fd56d321b961
Provide a program_name variable on platforms other than glibc.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 03 Mar 2007 00:34:55 +0000 |
parents | e504a82e98cf |
children | bd763d866c77 |
files | ChangeLog modules/argp-tests tests/test-argp.c |
diffstat | 3 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-03-02 Bruno Haible <bruno@clisp.org> + + * modules/argp-tests (Depends-on): Add progname. + * tests/test-argp.c: Include argp.h first. Include progname.h. + (main): Call set_program_name. + 2007-03-02 Paul Eggert <eggert@cs.ucla.edu> * doc/gnulib-tool.texi (Initial import): Reword description of
--- a/modules/argp-tests +++ b/modules/argp-tests @@ -3,6 +3,7 @@ tests/test-argp-2.sh Depends-on: +progname Makefile.am: TESTS += test-argp test-argp-2.sh
--- a/tests/test-argp.c +++ b/tests/test-argp.c @@ -1,5 +1,5 @@ /* Test suite for argp. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006-2007 Free Software Foundation, Inc. This file is part of the GNUlib Library. This program is free software; you can redistribute it and/or modify @@ -20,6 +20,8 @@ # include <config.h> #endif +#include "argp.h" + #include <stdio.h> #include <stdlib.h> #if HAVE_STRING_H @@ -29,7 +31,7 @@ # include <strings.h> #endif -#include "argp.h" +#include "progname.h" struct test_args { @@ -355,7 +357,9 @@ { struct argp_child argp_children[3]; test_fp *fun; - + + set_program_name (argv[0]); + argp_children[0] = group1_child; argp_children[1] = group2_child; argp_children[2].argp = NULL;