From: Paul Eggert <eggert@cs.ucla.edu>
To: bug-gnulib@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: [PATCH 1/2] stdbit-tests: make GNULIB_TEST_STDBIT work standalone
Date: Mon, 13 May 2024 01:27:32 -0700 [thread overview]
Message-ID: <20240513082733.264102-1-eggert@cs.ucla.edu> (raw)
* modules/stdbit-tests (GNULIB_TEST_STDBIT):
Do not define in config.h, since config.h is conditionally
included depending on this macro.
Instead, specify -DGNULIB_TEST_STDBIT in the CPPFLAGS
of each test.
---
ChangeLog | 9 +++++++++
modules/stdbit-tests | 18 ++++++++++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b6aa21d7f7..e14eedd9c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-05-12 Paul Eggert <eggert@cs.ucla.edu>
+
+ stdbit-tests: make GNULIB_TEST_STDBIT work standalone
+ * modules/stdbit-tests (GNULIB_TEST_STDBIT):
+ Do not define in config.h, since config.h is conditionally
+ included depending on this macro.
+ Instead, specify -DGNULIB_TEST_STDBIT in the CPPFLAGS
+ of each test.
+
2024-05-12 Simon Josefsson <simon@josefsson.org>
maintainer-makefile: Silence announce-gen error with GNULIB_REVISION.
diff --git a/modules/stdbit-tests b/modules/stdbit-tests
index a5832c84f2..3361ff62e0 100644
--- a/modules/stdbit-tests
+++ b/modules/stdbit-tests
@@ -23,8 +23,6 @@ libc-config
stdint
configure.ac:
-AC_DEFINE([GNULIB_TEST_STDBIT], [1],
- [Define to 1 so that stdbit tests use the Gnulib framework, not glibc's.])
Makefile.am:
TESTS += \
@@ -42,3 +40,19 @@ check_PROGRAMS += \
tst-stdc_first_trailing_zero tst-stdc_has_single_bit \
tst-stdc_leading_ones tst-stdc_leading_zeros tst-stdc_trailing_ones \
tst-stdc_trailing_zeros
+
+TEST_STDBIT_CPPFLAGS = $(AM_CPPFLAGS) -DGNULIB_TEST_STDBIT
+tst_stdc_bit_ceil_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_bit_floor_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_bit_width_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_count_ones_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_count_zeros_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_first_leading_one_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_first_leading_zero_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_first_trailing_one_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_first_trailing_zero_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_has_single_bit_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_leading_ones_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_leading_zeros_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_trailing_ones_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
+tst_stdc_trailing_zeros_CPPFLAGS = $(TEST_STDBIT_CPPFLAGS)
--
2.40.1
next reply other threads:[~2024-05-13 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 8:27 Paul Eggert [this message]
2024-05-13 8:27 ` [PATCH 2/2] stdbit: port to theoretical platforms Paul Eggert
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=20240513082733.264102-1-eggert@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=bug-gnulib@gnu.org \
/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).