bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xalloc: new function xpalloc, from dfa


From: Bruno Haible
Subject: Re: [PATCH] xalloc: new function xpalloc, from dfa
Date: Sat, 03 Apr 2021 18:27:22 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-206-generic; KDE/5.18.0; x86_64; ; )

Paul Eggert wrote:
> * lib/xalloc.h: Include idx.h, for idx_t.

This causes a compilation error in a testdir:

In file included from ../../gltests/xalloc-die.c:21:0:
../../gltests/xalloc.h:24:17: fatal error: idx.h: No such file or directory
compilation terminated.
make[4]: *** [Makefile:3215: xalloc-die.o] Error 1

This patch fixes it.


2021-04-03  Bruno Haible  <bruno@clisp.org>

        xalloc-die: Fix compilation error (regression from 2021-03-28).
        * lib/xalloc.h: Don't include idx.h and xalloc-oversized.h if the module
        'xalloc' is not in use.
        * modules/xalloc-die (Depends-on): Remove xalloc-oversized.

diff --git a/lib/xalloc.h b/lib/xalloc.h
index 5633fdf..6e7de60 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -21,8 +21,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include "idx.h"
-#include "xalloc-oversized.h"
+#if GNULIB_XALLOC
+# include "idx.h"
+# include "xalloc-oversized.h"
+#endif
 
 #ifndef _GL_INLINE_HEADER_BEGIN
  #error "Please include config.h first."
diff --git a/modules/xalloc-die b/modules/xalloc-die
index f53de5a..e8ef52a 100644
--- a/modules/xalloc-die
+++ b/modules/xalloc-die
@@ -11,7 +11,6 @@ extern-inline
 gettext-h
 exitfail
 stdint
-xalloc-oversized
 
 configure.ac:
 gl_MODULE_INDICATOR([xalloc-die])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]