diff options
author | Keith Packard <keithp@keithp.com> | 2014-01-29 12:54:26 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-08-20 12:59:41 -0700 |
commit | c761c6505d49e8381a3eae94f2e5e118cbdf6487 (patch) | |
tree | 5758c3941ed7e02cd217c71de09ea5ccfb9f7358 | |
parent | 8c0f5228e75aa949963aa8d27dcfa2648db2e197 (diff) |
Use font server ErrorF/VErrorF instead of private versions
XTrans creates custom ErrorF/VErrorF functions when the including
project doesn't provide them, however the test for that is weak and xtrans
ends up using the private versions for the font server as well.
This means that all xtrans error messages will not be included in the
font server log. It also causes redefinition warnings when building
the font server (which is how this problem was identified).
However, the font server doesn't currently provide a VErrorF function,
so instead of just always relying on the font server to provide these
functions, this patch uses a new TRANS_HAS_ERRORF define to select
whether the project-provided or internal versions will be used. A
patch to the font server that adds VErrorF and defines
TRANS_HAS_ERRORF will be required to fix this bug.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | Xtransint.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Xtransint.h b/Xtransint.h index 44d8b6d..b8f3b76 100644 --- a/Xtransint.h +++ b/Xtransint.h @@ -370,10 +370,11 @@ static int trans_mkdir ( #include <stdarg.h> /* - * The X server provides ErrorF() & VErrorF(), for other software that uses - * xtrans, we provide our own simple versions. + * The X server and the font server both provide ErrorF() & VErrorF(). For + * other software that uses xtrans, we provide our own simple + * versions. */ -# if defined(XSERV_t) && defined(TRANS_SERVER) +# if (defined(XSERV_t) || defined(TRANS_HAS_ERRORF)) && defined(TRANS_SERVER) # include "os.h" # else static inline void _X_ATTRIBUTE_PRINTF(1, 0) |