view modules/progname @ 11897:341123ec9461

progname: also set global program_invocation_name, when possible. Before this change, a libtool-enabled program that calls glibc's error function would report the program name as "/abs/dir/.libs/lt-program_name" rather than the desired program_name. * modules/progname (configure.ac): Check for a declaration of program_invocation_name. * lib/progname.c: Include <errno.h>. (set_program_name) [HAVE_DECL_PROGRAM_INVOCATION_NAME]: Set program_invocation_name.
author Jim Meyering <meyering@redhat.com>
date Tue, 25 Aug 2009 01:02:32 +0200
parents 42b53a22aee5
children 281617eccdf5
line wrap: on
line source

Description:
Program name management.

Files:
lib/progname.h
lib/progname.c

Depends-on:

configure.ac:
AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])

Makefile.am:
lib_SOURCES += progname.h progname.c

Include:
"progname.h"

License:
GPL

Maintainer:
Bruno Haible