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