Invoke set_program_name() in main() functions to make gnulib happy.
This commit is contained in:
parent
b7fdc3911f
commit
954a849ff9
@ -8,7 +8,7 @@ else
|
||||
gnulibtool=gnulib-tool
|
||||
fi
|
||||
|
||||
gnulib_modules=( git-version-gen gitlog-to-changelog gnupload
|
||||
gnulib_modules=( git-version-gen gitlog-to-changelog gnupload progname
|
||||
maintainer-makefile announce-gen crypto/md5 )
|
||||
|
||||
$gnulibtool --m4-base build-aux --source-base libgnu --import "${gnulib_modules[@]}"
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* $Date$
|
||||
*/
|
||||
|
||||
#include <progname.h>
|
||||
#include "argv.h"
|
||||
|
||||
int
|
||||
@ -25,6 +26,8 @@ main(int argc, char ** argv)
|
||||
};
|
||||
unsigned int i;
|
||||
|
||||
set_program_name(argv[0]);
|
||||
|
||||
/* Parse the command line. */
|
||||
|
||||
argv_help_string = "You need help with a test program?";
|
||||
|
||||
@ -5,12 +5,12 @@ AM_LFLAGS = -i
|
||||
|
||||
noinst_LIBRARIES = librfc822.a
|
||||
noinst_HEADERS = rfc822.h
|
||||
librfc822_a_SOURCES = \
|
||||
address.y address_scan.l address_sep.c decomment.c
|
||||
librfc822_a_SOURCES = address.y address_scan.l address_sep.c decomment.c
|
||||
|
||||
noinst_PROGRAMS = test
|
||||
test_SOURCES = test.c ../libmpools/mpools.c ../liblists/lists.c
|
||||
test_LDADD = librfc822.a
|
||||
test_CPPFLAGS = -I${srcdir}/../libgnu
|
||||
test_LDADD = librfc822.a ../libgnu/libgnu.a
|
||||
|
||||
EXTRA_DIST = testaddresslines parse_address.c
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#ifdef DEBUG_DMALLOC
|
||||
# include <dmalloc.h>
|
||||
#endif
|
||||
#include <progname.h>
|
||||
|
||||
#include "rfc822.h"
|
||||
|
||||
@ -36,6 +37,8 @@ main(int argc, char ** argv)
|
||||
* host;
|
||||
int rc;
|
||||
|
||||
set_program_name(argv[0]);
|
||||
|
||||
while(gets(buffer)) {
|
||||
|
||||
printf("Read line: '%s'\n", buffer);
|
||||
|
||||
3
main.c
3
main.c
@ -26,6 +26,7 @@
|
||||
#include "libargv/argv.h"
|
||||
#include "libtext/text.h"
|
||||
#include "petidomo.h"
|
||||
#include "progname.h"
|
||||
|
||||
#ifndef LOG_PERROR
|
||||
# define LOG_PERROR 0
|
||||
@ -51,6 +52,8 @@ main(int argc, char * argv[])
|
||||
{ARGV_LAST}
|
||||
};
|
||||
|
||||
set_program_name(argv[0]);
|
||||
|
||||
/* Init logging routines first of all, so that we can report
|
||||
errors. */
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user