grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v9 2/8] Where present, ensure config-util.h precedes config.h


From: Robbie Harwood
Subject: [PATCH v9 2/8] Where present, ensure config-util.h precedes config.h
Date: Tue, 15 Mar 2022 14:05:39 -0400

gnulib defines go in config-util.h, and we need to know whether to
provide duplicates in config.h or not.

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
 grub-core/disk/host.c                | 2 +-
 grub-core/gensymlist.sh              | 1 +
 grub-core/kern/emu/argp_common.c     | 2 +-
 grub-core/kern/emu/main.c            | 2 +-
 grub-core/osdep/aros/config.c        | 2 +-
 grub-core/osdep/basic/emunet.c       | 2 +-
 grub-core/osdep/basic/init.c         | 2 +-
 grub-core/osdep/haiku/getroot.c      | 2 +-
 grub-core/osdep/linux/emunet.c       | 2 +-
 grub-core/osdep/unix/config.c        | 2 +-
 grub-core/osdep/unix/cputime.c       | 2 +-
 grub-core/osdep/unix/dl.c            | 2 +-
 grub-core/osdep/unix/emuconsole.c    | 2 +-
 grub-core/osdep/unix/getroot.c       | 2 +-
 grub-core/osdep/windows/config.c     | 2 +-
 grub-core/osdep/windows/cputime.c    | 2 +-
 grub-core/osdep/windows/dl.c         | 2 +-
 grub-core/osdep/windows/emuconsole.c | 2 +-
 grub-core/osdep/windows/init.c       | 2 +-
 19 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/grub-core/disk/host.c b/grub-core/disk/host.c
index c151d225d..f34529f86 100644
--- a/grub-core/disk/host.c
+++ b/grub-core/disk/host.c
@@ -20,8 +20,8 @@
 /* When using the disk, make a reference to this module.  Otherwise
    the user will end up with a useless module :-).  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/dl.h>
 #include <grub/disk.h>
diff --git a/grub-core/gensymlist.sh b/grub-core/gensymlist.sh
index 5beaabdd6..5074ef6aa 100644
--- a/grub-core/gensymlist.sh
+++ b/grub-core/gensymlist.sh
@@ -31,6 +31,7 @@ cat <<EOF
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <../config-util.h>
 EOF
 
 for i in $*; do
diff --git a/grub-core/kern/emu/argp_common.c b/grub-core/kern/emu/argp_common.c
index 166885870..8cb4608c3 100644
--- a/grub-core/kern/emu/argp_common.c
+++ b/grub-core/kern/emu/argp_common.c
@@ -17,8 +17,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
 #pragma GCC diagnostic ignored "-Wmissing-declarations"
diff --git a/grub-core/kern/emu/main.c b/grub-core/kern/emu/main.c
index c01bfe093..44e087e98 100644
--- a/grub-core/kern/emu/main.c
+++ b/grub-core/kern/emu/main.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <time.h>
 #include <stdio.h>
diff --git a/grub-core/osdep/aros/config.c b/grub-core/osdep/aros/config.c
index c82d0ea8e..55f5728ef 100644
--- a/grub-core/osdep/aros/config.c
+++ b/grub-core/osdep/aros/config.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/emu/hostdisk.h>
 #include <grub/emu/exec.h>
diff --git a/grub-core/osdep/basic/emunet.c b/grub-core/osdep/basic/emunet.c
index 6362e5cfb..dbfd316d6 100644
--- a/grub-core/osdep/basic/emunet.c
+++ b/grub-core/osdep/basic/emunet.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/i18n.h>
 #include <grub/emu/net.h>
diff --git a/grub-core/osdep/basic/init.c b/grub-core/osdep/basic/init.c
index c54c710db..b104c7e16 100644
--- a/grub-core/osdep/basic/init.c
+++ b/grub-core/osdep/basic/init.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/util/misc.h>
 #include <grub/i18n.h>
diff --git a/grub-core/osdep/haiku/getroot.c b/grub-core/osdep/haiku/getroot.c
index 85ca2f5b9..2539a58c2 100644
--- a/grub-core/osdep/haiku/getroot.c
+++ b/grub-core/osdep/haiku/getroot.c
@@ -1,5 +1,5 @@
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <string.h>
diff --git a/grub-core/osdep/linux/emunet.c b/grub-core/osdep/linux/emunet.c
index 19b188f09..d5a641735 100644
--- a/grub-core/osdep/linux/emunet.c
+++ b/grub-core/osdep/linux/emunet.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <sys/socket.h>
 #include <sys/types.h>
diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c
index 7d6325138..0b1f7618d 100644
--- a/grub-core/osdep/unix/config.c
+++ b/grub-core/osdep/unix/config.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/emu/hostdisk.h>
 #include <grub/emu/exec.h>
diff --git a/grub-core/osdep/unix/cputime.c b/grub-core/osdep/unix/cputime.c
index 7a8cbfd6b..d43e625f2 100644
--- a/grub-core/osdep/unix/cputime.c
+++ b/grub-core/osdep/unix/cputime.c
@@ -1,5 +1,5 @@
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <sys/times.h>
 #include <unistd.h>
diff --git a/grub-core/osdep/unix/dl.c b/grub-core/osdep/unix/dl.c
index 562b101a2..99b189bc1 100644
--- a/grub-core/osdep/unix/dl.c
+++ b/grub-core/osdep/unix/dl.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/dl.h>
 #include <grub/misc.h>
diff --git a/grub-core/osdep/unix/emuconsole.c 
b/grub-core/osdep/unix/emuconsole.c
index 7308798ef..cac159424 100644
--- a/grub-core/osdep/unix/emuconsole.c
+++ b/grub-core/osdep/unix/emuconsole.c
@@ -17,8 +17,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/term.h>
 #include <grub/types.h>
diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c
index f70c499bb..7d2a29f31 100644
--- a/grub-core/osdep/unix/getroot.c
+++ b/grub-core/osdep/unix/getroot.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config-util.h>
 #include <config.h>
+#include <config-util.h>
 
 #include <sys/stat.h>
 #include <sys/types.h>
diff --git a/grub-core/osdep/windows/config.c b/grub-core/osdep/windows/config.c
index 928ab1a49..2bb8a2fd8 100644
--- a/grub-core/osdep/windows/config.c
+++ b/grub-core/osdep/windows/config.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/emu/hostfile.h>
 #include <grub/emu/config.h>
diff --git a/grub-core/osdep/windows/cputime.c 
b/grub-core/osdep/windows/cputime.c
index 3568aa2d3..5d06d79dd 100644
--- a/grub-core/osdep/windows/cputime.c
+++ b/grub-core/osdep/windows/cputime.c
@@ -1,5 +1,5 @@
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/emu/misc.h>
 #include <windows.h>
diff --git a/grub-core/osdep/windows/dl.c b/grub-core/osdep/windows/dl.c
index eec6a24ad..8eab7057e 100644
--- a/grub-core/osdep/windows/dl.c
+++ b/grub-core/osdep/windows/dl.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/dl.h>
 #include <grub/misc.h>
diff --git a/grub-core/osdep/windows/emuconsole.c 
b/grub-core/osdep/windows/emuconsole.c
index 4fb3693cc..17a44de46 100644
--- a/grub-core/osdep/windows/emuconsole.c
+++ b/grub-core/osdep/windows/emuconsole.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 
 #include <grub/term.h>
 #include <grub/misc.h>
diff --git a/grub-core/osdep/windows/init.c b/grub-core/osdep/windows/init.c
index 155a3e514..b67c73c59 100644
--- a/grub-core/osdep/windows/init.c
+++ b/grub-core/osdep/windows/init.c
@@ -16,8 +16,8 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
 #include <config-util.h>
+#include <config.h>
 #include <grub/util/misc.h>
 #include <grub/osdep/hostfile.h>
 #include <grub/util/windows.h>
-- 
2.35.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]