From: Paul Eggert Date: Mon, 13 May 2024 08:18:53 +0000 (-0700) Subject: stdbit-tests: make GNULIB_TEST_STDBIT work standalone X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=1ed2e43af23a4a183dcc6209ee198a769978dd8b;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index b6aa21d7f7..e14eedd9c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024-05-12 Paul Eggert + + 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 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)