xref: /freebsd/contrib/xz/src/common/tuklib_progname.h (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1 // SPDX-License-Identifier: 0BSD
2 
3 ///////////////////////////////////////////////////////////////////////////////
4 //
5 /// \file       tuklib_progname.h
6 /// \brief      Program name to be displayed in messages
7 //
8 //  Author:     Lasse Collin
9 //
10 ///////////////////////////////////////////////////////////////////////////////
11 
12 #ifndef TUKLIB_PROGNAME_H
13 #define TUKLIB_PROGNAME_H
14 
15 #include "tuklib_common.h"
16 #include <errno.h>
17 
18 TUKLIB_DECLS_BEGIN
19 
20 #ifdef HAVE_PROGRAM_INVOCATION_NAME
21 #	define progname program_invocation_name
22 #else
23 #	define progname TUKLIB_SYMBOL(tuklib_progname)
24 	extern char *progname;
25 #endif
26 
27 #define tuklib_progname_init TUKLIB_SYMBOL(tuklib_progname_init)
28 extern void tuklib_progname_init(char **argv);
29 
30 TUKLIB_DECLS_END
31 #endif
32