Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pedro Alves" <pedro_alves@portugalmail.pt>
To: gdb-patches@sourceware.org
Subject: Fix building with Sun CC breakage.
Date: Thu, 25 Oct 2007 14:49:00 -0000	[thread overview]
Message-ID: <4053daab0710250743j17a80b77k28bfe1d61b253e15@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

Hi guys,

Just sent a patch to binutils for fix the bfd building with Sun CC.
Here is the same
patch for the 6.7 branch.

Cheers,
Pedro Alves

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: solaris_bfd.diff --]
[-- Type: text/x-patch; name=solaris_bfd.diff, Size: 2287 bytes --]

bfd/
2007-10-25  Pedro Alves  <pedro_alves@portugalmail.pt>

	PR gdb/2339
	* bfd-in.h (STRING_COMMA_LEN): Don't handle NULL STR case.
	* bfd-in2.h: Regenerate.

---
 bfd/bfd-in.h  |    5 ++---
 bfd/bfd-in2.h |    5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

Index: binutils-2.18.50/bfd/bfd-in.h
===================================================================
--- binutils-2.18.50.orig/bfd/bfd-in.h	2007-10-25 14:41:47.927945000 +0100
+++ binutils-2.18.50/bfd/bfd-in.h	2007-10-25 14:42:07.690856000 +0100
@@ -46,9 +46,8 @@ extern "C" {
 /* This is a utility macro to handle the situation where the code
    wants to place a constant string into the code, followed by a
    comma and then the length of the string.  Doing this by hand
-   is error prone, so using this macro is safer.  The macro will
-   also safely handle the case where a NULL is passed as the arg.  */
-#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
+   is error prone, so using this macro is safer.  */
+#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
 /* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
    to create the arguments to another macro, since the preprocessor
    will mis-count the number of arguments to the outer macro (by not
Index: binutils-2.18.50/bfd/bfd-in2.h
===================================================================
--- binutils-2.18.50.orig/bfd/bfd-in2.h	2007-10-25 14:41:47.999578000 +0100
+++ binutils-2.18.50/bfd/bfd-in2.h	2007-10-25 14:42:07.747176000 +0100
@@ -53,9 +53,8 @@ extern "C" {
 /* This is a utility macro to handle the situation where the code
    wants to place a constant string into the code, followed by a
    comma and then the length of the string.  Doing this by hand
-   is error prone, so using this macro is safer.  The macro will
-   also safely handle the case where a NULL is passed as the arg.  */
-#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
+   is error prone, so using this macro is safer.  */
+#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
 /* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
    to create the arguments to another macro, since the preprocessor
    will mis-count the number of arguments to the outer macro (by not

             reply	other threads:[~2007-10-25 14:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 14:49 Pedro Alves [this message]
2007-10-25 21:47 ` Pedro Alves

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=4053daab0710250743j17a80b77k28bfe1d61b253e15@mail.gmail.com \
    --to=pedro_alves@portugalmail.pt \
    --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