Some .h files (other than .in.h files) test various HAVE_* macros, set by
Autoconf macros. These files too need <config.h> to be included first.

These two patches handle these .h files.


2023-04-13  Bruno Haible  <br...@clisp.org>

        Add more reminders to include <config.h>.
        * lib/aligned-malloc.h: Check that config.h was already included.
        * lib/careadlinkat.h: Likewise.
        * lib/filemode.h: Likewise.
        * lib/freadptr.h: Likewise.
        * lib/fseterr.h: Likewise.
        * lib/glthread/lock.h: Likewise.
        * lib/glthread/tls.h: Likewise.
        * lib/immutable.h: Likewise.
        * lib/isapipe.h: Likewise.
        * lib/isnand-nolibm.h: Likewise.
        * lib/isnanf-nolibm.h: Likewise.
        * lib/isnanl-nolibm.h: Likewise.
        * lib/mbswidth.h: Likewise.
        * lib/md5.h: Likewise.
        * lib/minmax.h: Likewise.
        * lib/msvc-inval.h: Likewise.
        * lib/msvc-nothrow.h: Likewise.
        * lib/pathmax.h: Likewise.
        * lib/sha1.h: Likewise.
        * lib/sha256.h: Likewise.
        * lib/sha512.h: Likewise.
        * lib/size_max.h: Likewise.
        * lib/sm3.h: Likewise.
        * lib/stat-size.h: Likewise.
        * lib/termcap.h: Likewise.
        * lib/terminfo.h: Likewise.
        * lib/thread-optim.h: Likewise.
        * lib/unlocked-io.h: Likewise.
        * lib/vma-iter.h: Likewise.

2023-04-13  Bruno Haible  <br...@clisp.org>

        Adjust comments in <config.h> reminders.
        * lib/*.h: In the comments, mention also HAVE_*.

>From 298293b2d060deaef96ac793a926ae8826d1f5e6 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Thu, 13 Apr 2023 23:18:19 +0200
Subject: [PATCH 1/2] Adjust comments in <config.h> reminders.

* lib/*.h: In the comments, mention also HAVE_*.
---
 ChangeLog                | 5 +++++
 lib/alignalloc.h         | 2 +-
 lib/fpending.h           | 3 ++-
 lib/freadable.h          | 2 +-
 lib/freadahead.h         | 2 +-
 lib/freading.h           | 2 +-
 lib/fwritable.h          | 2 +-
 lib/fwriting.h           | 2 +-
 lib/gethrxtime.h         | 3 ++-
 lib/glthread/cond.h      | 2 +-
 lib/glthread/thread.h    | 2 +-
 lib/localename.h         | 2 +-
 lib/malloca.h            | 2 +-
 lib/openat.h             | 2 +-
 lib/priv-set.h           | 3 ++-
 lib/readline.h           | 2 +-
 lib/readutmp.h           | 4 +++-
 lib/relocatable.h        | 2 +-
 lib/stat-time.h          | 2 +-
 lib/striconv.h           | 2 +-
 lib/striconveh.h         | 2 +-
 lib/term-style-control.h | 2 +-
 lib/xmalloca.h           | 2 +-
 lib/xsize.h              | 2 +-
 lib/xstriconv.h          | 2 +-
 lib/xstriconveh.h        | 2 +-
 26 files changed, 35 insertions(+), 25 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a00ff55404..c15d67bb26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-04-13  Bruno Haible  <br...@clisp.org>
+
+	Adjust comments in <config.h> reminders.
+	* lib/*.h: In the comments, mention also HAVE_*.
+
 2023-04-13  Bruno Haible  <br...@clisp.org>
 
 	Adjust comments in <config.h> reminders.
diff --git a/lib/alignalloc.h b/lib/alignalloc.h
index 1574e26c92..a3813db6f8 100644
--- a/lib/alignalloc.h
+++ b/lib/alignalloc.h
@@ -21,7 +21,7 @@
 #define ALIGNALLOC_H_
 
 /* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_ALLOC_SIZE,
-   _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+   _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL, HAVE_POSIX_MEMALIGN.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/fpending.h b/lib/fpending.h
index 0585dcb329..1604ca0b7a 100644
--- a/lib/fpending.h
+++ b/lib/fpending.h
@@ -18,7 +18,8 @@
 
    Written by Jim Meyering.  */
 
-/* This file uses _GL_ATTRIBUTE_PURE.  */
+/* This file uses _GL_ATTRIBUTE_PURE, HAVE_STDIO_EXT_H,
+   HAVE_DECL___FPENDING.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/freadable.h b/lib/freadable.h
index c5d5d5cfb9..9a2cb3fecd 100644
--- a/lib/freadable.h
+++ b/lib/freadable.h
@@ -14,7 +14,7 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-/* This file uses _GL_ATTRIBUTE_PURE.  */
+/* This file uses _GL_ATTRIBUTE_PURE, HAVE___FREADABLE, HAVE_STDIO_EXT_H.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/freadahead.h b/lib/freadahead.h
index d47026a05a..4a3275e90c 100644
--- a/lib/freadahead.h
+++ b/lib/freadahead.h
@@ -14,7 +14,7 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-/* This file uses _GL_ATTRIBUTE_PURE.  */
+/* This file uses _GL_ATTRIBUTE_PURE, HAVE___FREADAHEAD.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/freading.h b/lib/freading.h
index c18ea4a292..0fe4810c3d 100644
--- a/lib/freading.h
+++ b/lib/freading.h
@@ -14,7 +14,7 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-/* This file uses _GL_ATTRIBUTE_PURE.  */
+/* This file uses _GL_ATTRIBUTE_PURE, HAVE___FREADING, HAVE_STDIO_EXT_H.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/fwritable.h b/lib/fwritable.h
index d3c0b46615..84559a96a3 100644
--- a/lib/fwritable.h
+++ b/lib/fwritable.h
@@ -14,7 +14,7 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-/* This file uses _GL_ATTRIBUTE_PURE.  */
+/* This file uses _GL_ATTRIBUTE_PURE, HAVE___FWRITABLE, HAVE_STDIO_EXT_H.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/fwriting.h b/lib/fwriting.h
index 28cb2c878a..c907695d19 100644
--- a/lib/fwriting.h
+++ b/lib/fwriting.h
@@ -14,7 +14,7 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-/* This file uses _GL_ATTRIBUTE_PURE.  */
+/* This file uses _GL_ATTRIBUTE_PURE, HAVE___FWRITING, HAVE_STDIO_EXT_H.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/gethrxtime.h b/lib/gethrxtime.h
index 3a1340b69d..573e600b14 100644
--- a/lib/gethrxtime.h
+++ b/lib/gethrxtime.h
@@ -20,7 +20,8 @@
 #ifndef GETHRXTIME_H_
 #define GETHRXTIME_H_ 1
 
-/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE.  */
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, HAVE_ARITHMETIC_HRTIME_T,
+   HAVE_DECL_GETHRTIME.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/glthread/cond.h b/lib/glthread/cond.h
index 4c780d2def..b0d23888e2 100644
--- a/lib/glthread/cond.h
+++ b/lib/glthread/cond.h
@@ -48,7 +48,7 @@
 #ifndef _GLTHREAD_COND_H
 #define _GLTHREAD_COND_H
 
-/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE.  */
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, HAVE_THREADS_H.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/glthread/thread.h b/lib/glthread/thread.h
index 091b601e99..88bc53ee7f 100644
--- a/lib/glthread/thread.h
+++ b/lib/glthread/thread.h
@@ -70,7 +70,7 @@
 #ifndef _GLTHREAD_THREAD_H
 #define _GLTHREAD_THREAD_H
 
-/* This file uses _Noreturn.  */
+/* This file uses _Noreturn, HAVE_THREADS_H, HAVE_PTHREAD_ATFORK.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/localename.h b/lib/localename.h
index f5663a6b37..c804e2d823 100644
--- a/lib/localename.h
+++ b/lib/localename.h
@@ -17,7 +17,7 @@
 #ifndef _GL_LOCALENAME_H
 #define _GL_LOCALENAME_H
 
-/* This file uses _GL_ATTRIBUTE_CONST.  */
+/* This file uses _GL_ATTRIBUTE_CONST, HAVE_CFPREFERENCESCOPYAPPVALUE.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/malloca.h b/lib/malloca.h
index 576a56de40..f68ddfe010 100644
--- a/lib/malloca.h
+++ b/lib/malloca.h
@@ -19,7 +19,7 @@
 #define _MALLOCA_H
 
 /* This file uses _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_DEALLOC,
-   _GL_ATTRIBUTE_MALLOC.  */
+   _GL_ATTRIBUTE_MALLOC, HAVE_ALLOCA.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/openat.h b/lib/openat.h
index ba4a780dc0..97f066d10f 100644
--- a/lib/openat.h
+++ b/lib/openat.h
@@ -20,7 +20,7 @@
 #define _GL_HEADER_OPENAT
 
 /* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _Noreturn,
-   _GL_ATTRIBUTE_DEPRECATED.  */
+   _GL_ATTRIBUTE_DEPRECATED, HAVE_OPENAT.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/priv-set.h b/lib/priv-set.h
index e9ffc0c9aa..c9d42b4e07 100644
--- a/lib/priv-set.h
+++ b/lib/priv-set.h
@@ -17,7 +17,8 @@
 
    Written by David Bartley.  */
 
-/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE.  */
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, HAVE_PRIV_H,
+   HAVE_GETPPRIV.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/readline.h b/lib/readline.h
index 9048b727d7..416121c5c2 100644
--- a/lib/readline.h
+++ b/lib/readline.h
@@ -18,7 +18,7 @@
 #ifndef GL_READLINE_H
 #define GL_READLINE_H
 
-/* This file uses _GL_ATTRIBUTE_MALLOC.  */
+/* This file uses _GL_ATTRIBUTE_MALLOC, HAVE_READLINE_READLINE_H.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/readutmp.h b/lib/readutmp.h
index eda80a44fa..097dca6024 100644
--- a/lib/readutmp.h
+++ b/lib/readutmp.h
@@ -20,7 +20,9 @@
 #ifndef __READUTMP_H__
 # define __READUTMP_H__
 
-/* This file uses _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+/* This file uses _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL,
+   HAVE_UTMP_H, HAVE_UTMPX_H, HAVE_STRUCT_UTMP_*, HAVE_STRUCT_UTMPX_*,
+   HAVE_UTMPNAME, HAVE_UTMPXNAME, HAVE_DECL_GETUTENT.  */
 # if !_GL_CONFIG_H_INCLUDED
 #  error "Please include config.h first."
 # endif
diff --git a/lib/relocatable.h b/lib/relocatable.h
index b29c29ed1b..f4634b1238 100644
--- a/lib/relocatable.h
+++ b/lib/relocatable.h
@@ -18,7 +18,7 @@
 #ifndef _RELOCATABLE_H
 #define _RELOCATABLE_H
 
-/* This file uses _GL_ATTRIBUTE_MALLOC.  */
+/* This file uses _GL_ATTRIBUTE_MALLOC, HAVE_VISIBILITY.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/stat-time.h b/lib/stat-time.h
index 487e8b0971..5b2702356e 100644
--- a/lib/stat-time.h
+++ b/lib/stat-time.h
@@ -21,7 +21,7 @@
 #define STAT_TIME_H 1
 
 /* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_UNUSED,
-   _GL_ATTRIBUTE_PURE.  */
+   _GL_ATTRIBUTE_PURE, HAVE_STRUCT_STAT_*.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/striconv.h b/lib/striconv.h
index 6cd7dc31cf..a4164da636 100644
--- a/lib/striconv.h
+++ b/lib/striconv.h
@@ -18,7 +18,7 @@
 #ifndef _STRICONV_H
 #define _STRICONV_H
 
-/* This file uses _GL_ATTRIBUTE_MALLOC.  */
+/* This file uses _GL_ATTRIBUTE_MALLOC, HAVE_ICONV.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/striconveh.h b/lib/striconveh.h
index 6bced43e9c..b109af4ea9 100644
--- a/lib/striconveh.h
+++ b/lib/striconveh.h
@@ -18,7 +18,7 @@
 #ifndef _STRICONVEH_H
 #define _STRICONVEH_H
 
-/* This file uses _GL_ATTRIBUTE_MALLOC.  */
+/* This file uses _GL_ATTRIBUTE_MALLOC, HAVE_ICONV.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/term-style-control.h b/lib/term-style-control.h
index 6b77277cf3..e144db944d 100644
--- a/lib/term-style-control.h
+++ b/lib/term-style-control.h
@@ -21,7 +21,7 @@
 /* The user of this file will define a macro 'term_style_user_data', such that
    'struct term_style_user_data' is a user-defined struct.  */
 
-/* This file uses _GL_ASYNC_SAFE.  */
+/* This file uses _GL_ASYNC_SAFE, HAVE_TCGETATTR.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/xmalloca.h b/lib/xmalloca.h
index 3f03eba5aa..9ef41c6052 100644
--- a/lib/xmalloca.h
+++ b/lib/xmalloca.h
@@ -19,7 +19,7 @@
 #define _XMALLOCA_H
 
 /* This file uses _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_DEALLOC,
-   _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+   _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL, HAVE_ALLOCA.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/xsize.h b/lib/xsize.h
index 746d6569bf..5b08d61f2f 100644
--- a/lib/xsize.h
+++ b/lib/xsize.h
@@ -18,7 +18,7 @@
 #ifndef _XSIZE_H
 #define _XSIZE_H
 
-/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE.  */
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, HAVE_STDINT_H.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/xstriconv.h b/lib/xstriconv.h
index ee17e490c5..5a3a6636d3 100644
--- a/lib/xstriconv.h
+++ b/lib/xstriconv.h
@@ -18,7 +18,7 @@
 #ifndef _XSTRICONV_H
 #define _XSTRICONV_H
 
-/* This file uses _GL_ATTRIBUTE_MALLOC.  */
+/* This file uses _GL_ATTRIBUTE_MALLOC, HAVE_ICONV.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
diff --git a/lib/xstriconveh.h b/lib/xstriconveh.h
index fe15eed912..35ef5620f5 100644
--- a/lib/xstriconveh.h
+++ b/lib/xstriconveh.h
@@ -18,7 +18,7 @@
 #ifndef _XSTRICONVEH_H
 #define _XSTRICONVEH_H
 
-/* This file uses _GL_ATTRIBUTE_MALLOC.  */
+/* This file uses _GL_ATTRIBUTE_MALLOC, HAVE_ICONV.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
-- 
2.34.1

>From 45122e72f2ea96bade6719b4ca3c6e8102573731 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Thu, 13 Apr 2023 23:48:40 +0200
Subject: [PATCH 2/2] Add more reminders to include <config.h>.

* lib/aligned-malloc.h: Check that config.h was already included.
* lib/careadlinkat.h: Likewise.
* lib/filemode.h: Likewise.
* lib/freadptr.h: Likewise.
* lib/fseterr.h: Likewise.
* lib/glthread/lock.h: Likewise.
* lib/glthread/tls.h: Likewise.
* lib/immutable.h: Likewise.
* lib/isapipe.h: Likewise.
* lib/isnand-nolibm.h: Likewise.
* lib/isnanf-nolibm.h: Likewise.
* lib/isnanl-nolibm.h: Likewise.
* lib/mbswidth.h: Likewise.
* lib/md5.h: Likewise.
* lib/minmax.h: Likewise.
* lib/msvc-inval.h: Likewise.
* lib/msvc-nothrow.h: Likewise.
* lib/pathmax.h: Likewise.
* lib/sha1.h: Likewise.
* lib/sha256.h: Likewise.
* lib/sha512.h: Likewise.
* lib/size_max.h: Likewise.
* lib/sm3.h: Likewise.
* lib/stat-size.h: Likewise.
* lib/termcap.h: Likewise.
* lib/terminfo.h: Likewise.
* lib/thread-optim.h: Likewise.
* lib/unlocked-io.h: Likewise.
* lib/vma-iter.h: Likewise.
---
 ChangeLog            | 33 +++++++++++++++++++++++++++++++++
 lib/aligned-malloc.h |  6 ++++++
 lib/careadlinkat.h   |  5 +++++
 lib/filemode.h       |  5 +++++
 lib/freadptr.h       |  5 +++++
 lib/fseterr.h        |  5 +++++
 lib/glthread/lock.h  |  8 ++++++++
 lib/glthread/tls.h   |  5 +++++
 lib/immutable.h      |  5 +++++
 lib/isapipe.h        |  5 +++++
 lib/isnand-nolibm.h  |  5 +++++
 lib/isnanf-nolibm.h  |  5 +++++
 lib/isnanl-nolibm.h  |  5 +++++
 lib/mbswidth.h       |  5 +++++
 lib/md5.h            |  5 +++++
 lib/minmax.h         |  5 +++++
 lib/msvc-inval.h     |  5 +++++
 lib/msvc-nothrow.h   |  5 +++++
 lib/pathmax.h        |  5 +++++
 lib/sha1.h           |  5 +++++
 lib/sha256.h         |  5 +++++
 lib/sha512.h         |  5 +++++
 lib/size_max.h       |  5 +++++
 lib/sm3.h            |  5 +++++
 lib/stat-size.h      |  5 +++++
 lib/termcap.h        |  5 +++++
 lib/terminfo.h       |  5 +++++
 lib/thread-optim.h   |  5 +++++
 lib/unlocked-io.h    |  5 +++++
 lib/vma-iter.h       |  5 +++++
 30 files changed, 182 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index c15d67bb26..8a88a904fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2023-04-13  Bruno Haible  <br...@clisp.org>
+
+	Add more reminders to include <config.h>.
+	* lib/aligned-malloc.h: Check that config.h was already included.
+	* lib/careadlinkat.h: Likewise.
+	* lib/filemode.h: Likewise.
+	* lib/freadptr.h: Likewise.
+	* lib/fseterr.h: Likewise.
+	* lib/glthread/lock.h: Likewise.
+	* lib/glthread/tls.h: Likewise.
+	* lib/immutable.h: Likewise.
+	* lib/isapipe.h: Likewise.
+	* lib/isnand-nolibm.h: Likewise.
+	* lib/isnanf-nolibm.h: Likewise.
+	* lib/isnanl-nolibm.h: Likewise.
+	* lib/mbswidth.h: Likewise.
+	* lib/md5.h: Likewise.
+	* lib/minmax.h: Likewise.
+	* lib/msvc-inval.h: Likewise.
+	* lib/msvc-nothrow.h: Likewise.
+	* lib/pathmax.h: Likewise.
+	* lib/sha1.h: Likewise.
+	* lib/sha256.h: Likewise.
+	* lib/sha512.h: Likewise.
+	* lib/size_max.h: Likewise.
+	* lib/sm3.h: Likewise.
+	* lib/stat-size.h: Likewise.
+	* lib/termcap.h: Likewise.
+	* lib/terminfo.h: Likewise.
+	* lib/thread-optim.h: Likewise.
+	* lib/unlocked-io.h: Likewise.
+	* lib/vma-iter.h: Likewise.
+
 2023-04-13  Bruno Haible  <br...@clisp.org>
 
 	Adjust comments in <config.h> reminders.
diff --git a/lib/aligned-malloc.h b/lib/aligned-malloc.h
index cc938b608d..f05941f7e4 100644
--- a/lib/aligned-malloc.h
+++ b/lib/aligned-malloc.h
@@ -45,6 +45,12 @@
    returned by memalign() can be freed, but it actually can be freed with
    free().  */
 
+/* This file uses MALLOC_ALIGNMENT, HAVE_POSIX_MEMALIGN, HAVE_ALIGNED_ALLOC,
+   HAVE_MEMALIGN.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if !defined ALIGNMENT
 # error "ALIGNMENT is not defined"
 #endif
diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h
index 201d0415ff..562cf013b7 100644
--- a/lib/careadlinkat.h
+++ b/lib/careadlinkat.h
@@ -20,6 +20,11 @@
 #ifndef _GL_CAREADLINKAT_H
 #define _GL_CAREADLINKAT_H
 
+/* This file uses HAVE_READLINKAT.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <fcntl.h>
 #include <unistd.h>
 
diff --git a/lib/filemode.h b/lib/filemode.h
index 15a8dcc376..51e10053d2 100644
--- a/lib/filemode.h
+++ b/lib/filemode.h
@@ -18,6 +18,11 @@
 
 #ifndef FILEMODE_H_
 
+/* This file uses HAVE_DECL_STRMODE.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <sys/types.h>
 # include <sys/stat.h>
 
diff --git a/lib/freadptr.h b/lib/freadptr.h
index 1f0f0f94f5..a0fb3a4b7c 100644
--- a/lib/freadptr.h
+++ b/lib/freadptr.h
@@ -14,6 +14,11 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses HAVE___FREADPTR.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 #include <stdio.h>
 
diff --git a/lib/fseterr.h b/lib/fseterr.h
index 0e9d2060ae..87dc347332 100644
--- a/lib/fseterr.h
+++ b/lib/fseterr.h
@@ -17,6 +17,11 @@
 #ifndef _FSETERR_H
 #define _FSETERR_H
 
+/* This file uses HAVE___FSETERR.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stdio.h>
 
 /* Set the error indicator of the stream FP.
diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h
index ae3ee2d671..805cd1cf61 100644
--- a/lib/glthread/lock.h
+++ b/lib/glthread/lock.h
@@ -77,6 +77,14 @@
 #ifndef _LOCK_H
 #define _LOCK_H
 
+/* This file uses HAVE_THREADS_H, HAVE_PTHREAD_RWLOCK,
+   HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER,
+   PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
+   HAVE_PTHREAD_MUTEX_RECURSIVE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <errno.h>
 #include <stdlib.h>
 
diff --git a/lib/glthread/tls.h b/lib/glthread/tls.h
index aaaf0bb3b7..4788fae4f5 100644
--- a/lib/glthread/tls.h
+++ b/lib/glthread/tls.h
@@ -43,6 +43,11 @@
 #ifndef _TLS_H
 #define _TLS_H
 
+/* This file uses HAVE_THREADS_H.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <errno.h>
 #include <stdlib.h>
 
diff --git a/lib/immutable.h b/lib/immutable.h
index c76c625e31..6c5583261e 100644
--- a/lib/immutable.h
+++ b/lib/immutable.h
@@ -50,6 +50,11 @@
    functions work alike, except that the "read-only" pointers are actually
    writable.  */
 
+/* This file uses HAVE_WORKING_MPROTECT.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 
 #ifdef __cplusplus
diff --git a/lib/isapipe.h b/lib/isapipe.h
index 50a19c43b2..1a3f9c7bba 100644
--- a/lib/isapipe.h
+++ b/lib/isapipe.h
@@ -15,6 +15,11 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses HAVE_FIFO_PIPES.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Whether pipes are FIFOs; -1 if not known.  */
 #ifndef HAVE_FIFO_PIPES
 # define HAVE_FIFO_PIPES (-1)
diff --git a/lib/isnand-nolibm.h b/lib/isnand-nolibm.h
index 9c75a8c47b..bb5a38b39f 100644
--- a/lib/isnand-nolibm.h
+++ b/lib/isnand-nolibm.h
@@ -14,6 +14,11 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses HAVE_ISNAND_IN_LIBC.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if HAVE_ISNAND_IN_LIBC
 /* Get declaration of isnan macro.  */
 # include <math.h>
diff --git a/lib/isnanf-nolibm.h b/lib/isnanf-nolibm.h
index cc6b4198ff..f4bcba143e 100644
--- a/lib/isnanf-nolibm.h
+++ b/lib/isnanf-nolibm.h
@@ -14,6 +14,11 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses HAVE_ISNANF_IN_LIBC.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if HAVE_ISNANF_IN_LIBC
 /* Get declaration of isnan macro or (older) isnanf function.  */
 # include <math.h>
diff --git a/lib/isnanl-nolibm.h b/lib/isnanl-nolibm.h
index f04c489bb8..8becc5b409 100644
--- a/lib/isnanl-nolibm.h
+++ b/lib/isnanl-nolibm.h
@@ -14,6 +14,11 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses HAVE_ISNANL_IN_LIBC.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if HAVE_ISNANL_IN_LIBC
 /* Get declaration of isnan macro or (older) isnanl function.  */
 # include <math.h>
diff --git a/lib/mbswidth.h b/lib/mbswidth.h
index 5e4fc15b83..f385b64999 100644
--- a/lib/mbswidth.h
+++ b/lib/mbswidth.h
@@ -14,6 +14,11 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses HAVE_DECL_MBSWIDTH_IN_WCHAR_H.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 
 /* Avoid a clash of our mbswidth() with a function of the same name defined
diff --git a/lib/md5.h b/lib/md5.h
index f34e7cb8df..92dc603898 100644
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -20,6 +20,11 @@
 #ifndef _MD5_H
 #define _MD5_H 1
 
+/* This file uses HAVE_OPENSSL_MD5.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stdio.h>
 #include <stdint.h>
 
diff --git a/lib/minmax.h b/lib/minmax.h
index 1fbfc6616c..0ac40198e2 100644
--- a/lib/minmax.h
+++ b/lib/minmax.h
@@ -23,6 +23,11 @@
    MIN, MAX macro redefinitions on some systems; the workaround is to
    #include this file as the last one among the #include list.  */
 
+/* This file uses HAVE_MINMAX_IN_LIMITS_H, HAVE_MINMAX_IN_SYS_PARAM_H.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Before we define the following symbols we get the <limits.h> file
    since otherwise we get redefinitions on some systems if <limits.h> is
    included after this file.  Likewise for <sys/param.h>.
diff --git a/lib/msvc-inval.h b/lib/msvc-inval.h
index ed00461ff7..c16d880178 100644
--- a/lib/msvc-inval.h
+++ b/lib/msvc-inval.h
@@ -52,6 +52,11 @@
        AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [SANE_LIBRARY_HANDLING])
  */
 
+/* This file uses HAVE_MSVC_INVALID_PARAMETER_HANDLER.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #define DEFAULT_HANDLING       0
 #define HAIRY_LIBRARY_HANDLING 1
 #define SANE_LIBRARY_HANDLING  2
diff --git a/lib/msvc-nothrow.h b/lib/msvc-nothrow.h
index 82d3f6a2df..0dd229fd66 100644
--- a/lib/msvc-nothrow.h
+++ b/lib/msvc-nothrow.h
@@ -25,6 +25,11 @@
    This file defines wrappers that turn such an invalid parameter notification
    into an error code.  */
 
+/* This file uses HAVE_MSVC_INVALID_PARAMETER_HANDLER.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if defined _WIN32 && ! defined __CYGWIN__
 
 /* Get original declaration of _get_osfhandle.  */
diff --git a/lib/pathmax.h b/lib/pathmax.h
index 0dd8f3bc5c..6930283b82 100644
--- a/lib/pathmax.h
+++ b/lib/pathmax.h
@@ -39,6 +39,11 @@
          #endif
  */
 
+/* This file uses HAVE_SYS_PARAM_H.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <unistd.h>
 
 # include <limits.h>
diff --git a/lib/sha1.h b/lib/sha1.h
index 5a58b567ce..854213a921 100644
--- a/lib/sha1.h
+++ b/lib/sha1.h
@@ -19,6 +19,11 @@
 #ifndef SHA1_H
 # define SHA1_H 1
 
+/* This file uses HAVE_OPENSSL_SHA1.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <stdio.h>
 # include <stdint.h>
 
diff --git a/lib/sha256.h b/lib/sha256.h
index 2879477e89..938b106706 100644
--- a/lib/sha256.h
+++ b/lib/sha256.h
@@ -18,6 +18,11 @@
 #ifndef SHA256_H
 # define SHA256_H 1
 
+/* This file uses HAVE_OPENSSL_SHA256.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <stdio.h>
 # include <stdint.h>
 
diff --git a/lib/sha512.h b/lib/sha512.h
index e3a98a2644..f3465bc8a6 100644
--- a/lib/sha512.h
+++ b/lib/sha512.h
@@ -18,6 +18,11 @@
 #ifndef SHA512_H
 # define SHA512_H 1
 
+/* This file uses HAVE_OPENSSL_SHA512.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <stdio.h>
 # include "u64.h"
 
diff --git a/lib/size_max.h b/lib/size_max.h
index 48af025055..2cfd31a59b 100644
--- a/lib/size_max.h
+++ b/lib/size_max.h
@@ -18,6 +18,11 @@
 #ifndef GNULIB_SIZE_MAX_H
 #define GNULIB_SIZE_MAX_H
 
+/* This file uses HAVE_STDINT_H.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Get SIZE_MAX declaration on systems like Solaris 7/8/9.  */
 # include <limits.h>
 /* Get SIZE_MAX declaration on systems like glibc 2.  */
diff --git a/lib/sm3.h b/lib/sm3.h
index 4ca7f7a103..28af4dff1c 100644
--- a/lib/sm3.h
+++ b/lib/sm3.h
@@ -27,6 +27,11 @@
 #ifndef SM3_H
 # define SM3_H 1
 
+/* This file uses HAVE_OPENSSL_SM3.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <stdio.h>
 # include <stdint.h>
 
diff --git a/lib/stat-size.h b/lib/stat-size.h
index 48f0d3c356..bda00b7289 100644
--- a/lib/stat-size.h
+++ b/lib/stat-size.h
@@ -25,6 +25,11 @@
 #ifndef STAT_SIZE_H
 #define STAT_SIZE_H
 
+/* This file uses HAVE_SYS_PARAM_H, HAVE_STRUCT_STAT_ST_BLOCKS.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* sys/param.h may define DEV_BSIZE */
 #if HAVE_SYS_PARAM_H
 # include <sys/param.h>
diff --git a/lib/termcap.h b/lib/termcap.h
index 93d78e2227..f56543558a 100644
--- a/lib/termcap.h
+++ b/lib/termcap.h
@@ -19,6 +19,11 @@
 #ifndef _TERMCAP_H
 #define _TERMCAP_H
 
+/* This file uses HAVE_TERMCAP, HAVE_TERMINFO, HAVE_TPARAM.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Including <curses.h> or <term.h> is dangerous, because it also declares
    a lot of junk, such as variables PC, UP, and other.  */
 
diff --git a/lib/terminfo.h b/lib/terminfo.h
index 0b6aacbb76..eb0b3c855d 100644
--- a/lib/terminfo.h
+++ b/lib/terminfo.h
@@ -19,6 +19,11 @@
 #ifndef _TERMINFO_H
 #define _TERMINFO_H
 
+/* This file uses HAVE_TERMINFO, HAVE_TERMCAP, HAVE_TPARAM.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Including <curses.h> or <term.h> is dangerous, because it also declares
    a lot of junk, such as variables PC, UP, and other.  */
 
diff --git a/lib/thread-optim.h b/lib/thread-optim.h
index 9a4c80af32..b5ef15aaf4 100644
--- a/lib/thread-optim.h
+++ b/lib/thread-optim.h
@@ -50,6 +50,11 @@
    same optimization cannot be applied to locks that synchronize different
    processes (e.g. through shared memory mappings).  */
 
+/* This file uses HAVE_SYS_SINGLE_THREADED_H.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if HAVE_SYS_SINGLE_THREADED_H /* glibc >= 2.32 */
 # include <sys/single_threaded.h>
 # define gl_multithreaded()  (!__libc_single_threaded)
diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h
index fdef624ab9..4830df4a74 100644
--- a/lib/unlocked-io.h
+++ b/lib/unlocked-io.h
@@ -31,6 +31,11 @@
    the *_unlocked functions directly.  On hosts that lack those
    functions, invoke the non-thread-safe versions instead.  */
 
+/* This file uses HAVE_DECL_*_UNLOCKED.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <stdio.h>
 
 # if HAVE_DECL_CLEARERR_UNLOCKED || defined clearerr_unlocked
diff --git a/lib/vma-iter.h b/lib/vma-iter.h
index d181184aee..f89c8f0322 100644
--- a/lib/vma-iter.h
+++ b/lib/vma-iter.h
@@ -18,6 +18,11 @@
 #ifndef _VMA_ITER_H
 #define _VMA_ITER_H
 
+/* This file uses HAVE_PSTAT_GETPROCVM, HAVE_MQUERY.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stdint.h>
 
 #ifdef __cplusplus
-- 
2.34.1

Reply via email to