* [PATCH] Rename "sun" variable to avoid conflicts on Solaris
@ 2019-12-18 22:52 Christian Biesinger via gdb-patches
2019-12-19 18:16 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-12-18 22:52 UTC (permalink / raw)
To: gdb-patches; +Cc: Christian Biesinger
A Solaris system header has a #define for "sun". This renames
that variable to avoid the conflict, fixing a build error with
--enable-targets=all on Solaris.
gdb/ChangeLog:
2019-12-18 Christian Biesinger <cbiesinger@google.com>
* fbsd-tdep.c (fbsd_info_proc_files_entry): Rename local var
"sun" to "saddr_un".
Change-Id: I07a5cd801db1e28ccab8a473ebad74d7afe017c2
---
gdb/fbsd-tdep.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index 937f696f44..d7482d3b58 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -1018,12 +1018,12 @@ fbsd_info_proc_files_entry (int kf_type, int kf_fd, int kf_flags,
/* For local sockets, print out the first non-nul path
rather than both paths. */
- const struct fbsd_sockaddr_un *sun
+ const struct fbsd_sockaddr_un *saddr_un
= reinterpret_cast<const struct fbsd_sockaddr_un *> (kf_sa_local);
- if (sun->sun_path[0] == 0)
- sun = reinterpret_cast<const struct fbsd_sockaddr_un *>
+ if (saddr_un->sun_path[0] == 0)
+ saddr_un = reinterpret_cast<const struct fbsd_sockaddr_un *>
(kf_sa_peer);
- printf_filtered ("%s", sun->sun_path);
+ printf_filtered ("%s", saddr_un->sun_path);
break;
}
case FBSD_AF_INET:
--
2.24.1.735.g03f4e72817-goog
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Rename "sun" variable to avoid conflicts on Solaris
2019-12-18 22:52 [PATCH] Rename "sun" variable to avoid conflicts on Solaris Christian Biesinger via gdb-patches
@ 2019-12-19 18:16 ` Tom Tromey
2019-12-19 19:03 ` Christian Biesinger via gdb-patches
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2019-12-19 18:16 UTC (permalink / raw)
To: Christian Biesinger via gdb-patches; +Cc: Christian Biesinger
>>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:
Christian> A Solaris system header has a #define for "sun". This renames
Christian> that variable to avoid the conflict, fixing a build error with
Christian> --enable-targets=all on Solaris.
Christian> gdb/ChangeLog:
Christian> 2019-12-18 Christian Biesinger <cbiesinger@google.com>
Christian> * fbsd-tdep.c (fbsd_info_proc_files_entry): Rename local var
Christian> "sun" to "saddr_un".
Thanks, this is ok.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Rename "sun" variable to avoid conflicts on Solaris
2019-12-19 18:16 ` Tom Tromey
@ 2019-12-19 19:03 ` Christian Biesinger via gdb-patches
0 siblings, 0 replies; 4+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-12-19 19:03 UTC (permalink / raw)
To: Tom Tromey; +Cc: Christian Biesinger via gdb-patches
On Thu, Dec 19, 2019 at 12:16 PM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:
>
> Christian> A Solaris system header has a #define for "sun". This renames
> Christian> that variable to avoid the conflict, fixing a build error with
> Christian> --enable-targets=all on Solaris.
>
> Christian> gdb/ChangeLog:
>
> Christian> 2019-12-18 Christian Biesinger <cbiesinger@google.com>
>
> Christian> * fbsd-tdep.c (fbsd_info_proc_files_entry): Rename local var
> Christian> "sun" to "saddr_un".
>
> Thanks, this is ok.
Thanks, pushed.
To ssh://sourceware.org/git/binutils-gdb.git
78aa740b76..aa989b27d0 HEAD -> master
Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/3] Fix Solaris build with enable-targets=all
@ 2019-12-19 0:01 Christian Biesinger via gdb-patches
2019-12-19 0:01 ` [PATCH] Rename "sun" variable to avoid conflicts on Solaris Christian Biesinger via gdb-patches
0 siblings, 1 reply; 4+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-12-19 0:01 UTC (permalink / raw)
To: gdb-patches; +Cc: Christian Biesinger
I tried compiling gdb on gcc211.fsffrance.org with enable-targets=all
and found a few issues. This patch series fixes the remaining ones.
https://sourceware.org/ml/gdb-patches/2019-12/msg00798.html should be part
of this series too; I apologize for not including it. When I sent that one
I hadn't decided yet to continue working on these build errors and thus
didn't make it a series.
Christian Biesinger (3):
Undef REG_Y in s12z.h, it may be defined in a system header
Cast the log10 argument to double to disambiguate it
Make the literal argument to pow a double, not an integer
gdb/score-tdep.c | 4 ++--
gdb/tui/tui-source.c | 2 +-
include/opcode/s12z.h | 4 ++++
3 files changed, 7 insertions(+), 3 deletions(-)
--
2.24.1.735.g03f4e72817-goog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Rename "sun" variable to avoid conflicts on Solaris
2019-12-19 0:01 [PATCH 0/3] Fix Solaris build with enable-targets=all Christian Biesinger via gdb-patches
@ 2019-12-19 0:01 ` Christian Biesinger via gdb-patches
0 siblings, 0 replies; 4+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-12-19 0:01 UTC (permalink / raw)
To: gdb-patches; +Cc: Christian Biesinger
A Solaris system header has a #define for "sun". This renames
that variable to avoid the conflict, fixing a build error with
--enable-targets=all on Solaris.
gdb/ChangeLog:
2019-12-18 Christian Biesinger <cbiesinger@google.com>
* fbsd-tdep.c (fbsd_info_proc_files_entry): Rename local var
"sun" to "saddr_un".
Change-Id: I07a5cd801db1e28ccab8a473ebad74d7afe017c2
---
gdb/fbsd-tdep.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index 937f696f44..d7482d3b58 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -1018,12 +1018,12 @@ fbsd_info_proc_files_entry (int kf_type, int kf_fd, int kf_flags,
/* For local sockets, print out the first non-nul path
rather than both paths. */
- const struct fbsd_sockaddr_un *sun
+ const struct fbsd_sockaddr_un *saddr_un
= reinterpret_cast<const struct fbsd_sockaddr_un *> (kf_sa_local);
- if (sun->sun_path[0] == 0)
- sun = reinterpret_cast<const struct fbsd_sockaddr_un *>
+ if (saddr_un->sun_path[0] == 0)
+ saddr_un = reinterpret_cast<const struct fbsd_sockaddr_un *>
(kf_sa_peer);
- printf_filtered ("%s", sun->sun_path);
+ printf_filtered ("%s", saddr_un->sun_path);
break;
}
case FBSD_AF_INET:
--
2.24.1.735.g03f4e72817-goog
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-19 19:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 22:52 [PATCH] Rename "sun" variable to avoid conflicts on Solaris Christian Biesinger via gdb-patches
2019-12-19 18:16 ` Tom Tromey
2019-12-19 19:03 ` Christian Biesinger via gdb-patches
2019-12-19 0:01 [PATCH 0/3] Fix Solaris build with enable-targets=all Christian Biesinger via gdb-patches
2019-12-19 0:01 ` [PATCH] Rename "sun" variable to avoid conflicts on Solaris Christian Biesinger via gdb-patches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox