public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Clean up gmp-utils.h includes
@ 2023-03-14 14:19 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-03-14 14:19 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c8a67010d133374dfb3b4ed88da7953702a2091d

commit c8a67010d133374dfb3b4ed88da7953702a2091d
Author: Tom Tromey <tromey@adacore.com>
Date:   Thu Feb 23 07:13:40 2023 -0700

    Clean up gmp-utils.h includes
    
    gmp-utils.h includes "defs.h", but normally the rule in gdb is that
    the .c files include this first.  This patch changes this code to
    match the rest of gdb.

Diff:
---
 gdb/gmp-utils.c                     | 1 +
 gdb/gmp-utils.h                     | 2 --
 gdb/unittests/gmp-utils-selftests.c | 1 +
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/gmp-utils.c b/gdb/gmp-utils.c
index b9c9b495398..8150fa5dcdf 100644
--- a/gdb/gmp-utils.c
+++ b/gdb/gmp-utils.c
@@ -15,6 +15,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "defs.h"
 #include "gmp-utils.h"
 
 /* See gmp-utils.h.  */
diff --git a/gdb/gmp-utils.h b/gdb/gmp-utils.h
index 9aa501ac8c6..3f30b575f72 100644
--- a/gdb/gmp-utils.h
+++ b/gdb/gmp-utils.h
@@ -20,8 +20,6 @@
 #ifndef GMP_UTILS_H
 #define GMP_UTILS_H
 
-#include "defs.h"
-
 /* Include <stdio.h> and <stdarg.h> ahead of <gmp.h>, so as to get
    access to GMP's various formatting functions.  */
 #include <stdio.h>
diff --git a/gdb/unittests/gmp-utils-selftests.c b/gdb/unittests/gmp-utils-selftests.c
index cc525a13fc0..e2ccd2ca094 100644
--- a/gdb/unittests/gmp-utils-selftests.c
+++ b/gdb/unittests/gmp-utils-selftests.c
@@ -17,6 +17,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "defs.h"
 #include "gmp-utils.h"
 #include "gdbsupport/selftest.h"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-14 14:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 14:19 [binutils-gdb] Clean up gmp-utils.h includes Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).