]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
options: Add reminder to include <config.h>.
authorCollin Funk <collin.funk1@gmail.com>
Tue, 8 Jul 2025 22:59:08 +0000 (15:59 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Tue, 8 Jul 2025 22:59:08 +0000 (15:59 -0700)
* lib/options.h: Check that config.h was already included.

ChangeLog
lib/options.h

index 02db58e594adb8bba030ef8ef9605fd69e158416..f52a90748772a587b227181e135b30adf94ec0dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2025-07-08  Collin Funk  <collin.funk1@gmail.com>
 
+       options: Add reminder to include <config.h>.
+       * lib/options.h: Check that config.h was already included.
+
        stdcountof-h: Add reminder to include <config.h>.
        * lib/stdcountof.in.h: Check that config.h was already included.
 
index 66d8710ca4f71f58d973d5b0827c036d9512584c..7a4a266f843bc16032fd0893c85201459612e39b 100644 (file)
 #ifndef _OPTIONS_H
 #define _OPTIONS_H
 
+/* This file uses _GL_GNUC_PREREQ.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* This file provides a more convenient API to parsing program options,
    based on GNU getopt_long() and thus compatible with the option parsing
    conventions for GNU programs