]> Savannah Git Hosting - gnulib.git/commitdiff
stdbit-tests: make GNULIB_TEST_STDBIT work standalone
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 May 2024 08:18:53 +0000 (01:18 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 May 2024 08:27:09 +0000 (01:27 -0700)
* 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
modules/stdbit-tests

index b6aa21d7f7fc3d82864b32269ad4eb2e42677fbd..e14eedd9c7b6e82233c060769aee68cad7ad2b8d 100644 (file)
--- 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.
index a5832c84f21a4e7feaa6606ffe7ddda5f3d2001a..3361ff62e020e93af044b2faac82d2125aa1e8fb 100644 (file)
@@ -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)