aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-01-02 22:33:48 +0800
committerJia Tan <jiat0218@gmail.com>2023-01-05 00:29:39 +0800
commit507648ad114c2ae0cd6d181063e1ac07e8106718 (patch)
treeb6202aa26010bdb7936bb485b286d67312d92d44 /src/common
parentTests: test_check: Test corner cases of CLMUL CRC64. (diff)
downloadxz-507648ad114c2ae0cd6d181063e1ac07e8106718.tar.xz
Build: Only define HAVE_PROGRAM_INVOCATION_NAME if it is set to 1.
HAVE_DECL_PROGRAM_INVOCATION_NAME is renamed to HAVE_PROGRAM_INVOCATION_NAME. Previously, HAVE_DECL_PROGRAM_INVOCATION_NAME was always set when building with autotools. CMake would only set this when it was 1, and the dos/config.h did not define it. The new macro definition is consistent across build systems.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tuklib_progname.c2
-rw-r--r--src/common/tuklib_progname.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/common/tuklib_progname.c b/src/common/tuklib_progname.c
index 7cb7e203..e2ef4e55 100644
--- a/src/common/tuklib_progname.c
+++ b/src/common/tuklib_progname.c
@@ -14,7 +14,7 @@
#include <string.h>
-#if !HAVE_DECL_PROGRAM_INVOCATION_NAME
+#ifndef HAVE_PROGRAM_INVOCATION_NAME
char *progname = NULL;
#endif
diff --git a/src/common/tuklib_progname.h b/src/common/tuklib_progname.h
index 791b1251..bb80f25e 100644
--- a/src/common/tuklib_progname.h
+++ b/src/common/tuklib_progname.h
@@ -18,7 +18,7 @@
TUKLIB_DECLS_BEGIN
-#if HAVE_DECL_PROGRAM_INVOCATION_NAME
+#ifdef HAVE_PROGRAM_INVOCATION_NAME
# define progname program_invocation_name
#else
# define progname TUKLIB_SYMBOL(tuklib_progname)