summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-02-21 08:15:23 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-02-21 08:15:23 +0000
commit84446472e9cb4e966d9ff5aaf2bd447a8ffe8abc (patch)
treef82ca62e9efb96bfe38d3059cf2095f1e419fd86
parentf34e4657330bdcb0f497aa14ea9768aa474e5355 (diff)
fix a potential bug in kpathsea/lib.h. Thanks to Douglas McKenna
git-svn-id: svn://tug.org/texlive/trunk@46696 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/kpathsea/ChangeLog5
-rw-r--r--Build/source/texk/kpathsea/lib.h9
2 files changed, 12 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 32fbbfd746b..123ff223ae7 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,8 @@
+2018-02-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * lib.h: Fix a bug in LIB_START_FATAL().
+ Private report from Douglas McKenna, 2018/02/21.
+
2018-02-20 Karl Berry <karl@freefriends.org>
* progname.c (expand_symlinks): make error message on unresolvable
diff --git a/Build/source/texk/kpathsea/lib.h b/Build/source/texk/kpathsea/lib.h
index df380f654d6..9592a4790c5 100644
--- a/Build/source/texk/kpathsea/lib.h
+++ b/Build/source/texk/kpathsea/lib.h
@@ -1,7 +1,7 @@
/* lib.h: declarations for common, low-level routines in kpathsea.
Copyright 1992, 1993, 1994, 1995, 1996, 2008, 2009, 2010, 2011,
- 2012, 2015 Karl Berry.
+ 2012, 2015, 2018 Karl Berry.
Copyright 1999, 2000, 2003, 2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -87,8 +87,13 @@ extern "C" {
#define WARNING4(str, e1, e2, e3, e4) \
START_WARNING (); fprintf (stderr, str, e1, e2, e3, e4); END_WARNING ()
+#if defined (KPSE_COMPAT_API)
+#define LIB_START_FATAL() do { \
+ fprintf (stderr, "%s: fatal: ", kpse_def->invocation_name);
+#else
#define LIB_START_FATAL() do { \
- fprintf (stderr, "%s: fatal: ", kpse->invocation_name);
+ fprintf (stderr, "fatal: ");
+#endif
#define LIB_FATAL(str) \
LIB_START_FATAL (); fputs (str, stderr); END_FATAL ()