bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: [PATCH] xalloc: new function xpalloc, from dfa
Date: Sat, 03 Apr 2021 18:27:22 +0200	[thread overview]
Message-ID: <2792390.1oxI7cd6TZ@omega> (raw)
In-Reply-To: <20210329030608.1080047-1-eggert@cs.ucla.edu>

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	other threads:[~2021-04-03 16:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29  3:06 [PATCH] xalloc: new function xpalloc, from dfa Paul Eggert
2021-04-03 16:27 ` Bruno Haible [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2792390.1oxI7cd6TZ@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).