xref: /freebsd/contrib/xz/src/common/tuklib_progname.h (revision 7aa383846770374466b1dcb2cefd71bde9acf463)
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       tuklib_progname.h
4 /// \brief      Program name to be displayed in messages
5 //
6 //  Author:     Lasse Collin
7 //
8 //  This file has been put into the public domain.
9 //  You can do whatever you want with this file.
10 //
11 ///////////////////////////////////////////////////////////////////////////////
12 
13 #ifndef TUKLIB_PROGNAME_H
14 #define TUKLIB_PROGNAME_H
15 
16 #include "tuklib_common.h"
17 #include <errno.h>
18 
19 TUKLIB_DECLS_BEGIN
20 
21 #if HAVE_DECL_PROGRAM_INVOCATION_NAME
22 #	define progname program_invocation_name
23 #else
24 #	define progname TUKLIB_SYMBOL(tuklib_progname)
25 	extern char *progname;
26 #endif
27 
28 #define tuklib_progname_init TUKLIB_SYMBOL(tuklib_progname_init)
29 extern void tuklib_progname_init(char **argv);
30 
31 TUKLIB_DECLS_END
32 #endif
33