public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/6] Clean up gmp-utils.h includes
Date: Thu, 23 Feb 2023 12:47:59 -0700	[thread overview]
Message-ID: <20230223-submit-gmp-hiding-v1-1-ea6ff9e32716@adacore.com> (raw)
In-Reply-To: <20230223-submit-gmp-hiding-v1-0-ea6ff9e32716@adacore.com>

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.
---
 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 0e57471b2ef..0522f3453aa 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"
 

-- 
2.39.1


  reply	other threads:[~2023-02-23 19:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 19:47 [PATCH 0/6] Make GMP data members private Tom Tromey
2023-02-23 19:47 ` Tom Tromey [this message]
2023-02-23 19:48 ` [PATCH 2/6] Add methods and operators to gdb_mpz Tom Tromey
2023-02-23 19:48 ` [PATCH 3/6] Rename gdb_mpz::val and make contents private Tom Tromey
2023-02-23 19:48 ` [PATCH 4/6] Add operators and methods to gdb_mpq Tom Tromey
2023-02-23 19:48 ` [PATCH 5/6] Rename gdb_mpq::val and make contents private Tom Tromey
2023-02-23 19:48 ` [PATCH 6/6] Hide the implementation of gdb_mpf Tom Tromey
2023-03-14 14:15 ` [PATCH 0/6] Make GMP data members private Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230223-submit-gmp-hiding-v1-1-ea6ff9e32716@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).