* 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 <bruno@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 <bruno@clisp.org>
Adjust comments in <config.h> reminders.
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
#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>
#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>
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>
#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.
#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>
#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>
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
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)
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>
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>
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>
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
#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>
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>.
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
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. */
#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>
#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>
#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>
#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"
#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. */
#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>
#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>
#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. */
#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. */
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)
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
#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