patches/binutils-04-non-constant_initializer_op.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 546 7976e6fd6450
child 8249 994ab7add44e
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
546
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
     1
--- binutils-2.18-orig/bfd/bfd-in.h	2007-08-06 19:59:14.000000000 +0000
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
     2
+++ binutils-2.18/bfd/bfd-in.h	2007-10-14 09:49:53.043842758 +0000
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
     3
@@ -48,7 +48,7 @@
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
     4
    comma and then the length of the string.  Doing this by hand
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
     5
    is error prone, so using this macro is safer.  The macro will
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
     6
    also safely handle the case where a NULL is passed as the arg.  */
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
     7
-#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
     8
+#define STRING_COMMA_LEN(STR) (STR), ((sizeof(STR) > 0) ? sizeof (STR) - 1 : 0)
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
     9
 /* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    10
    to create the arguments to another macro, since the preprocessor
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    11
    will mis-count the number of arguments to the outer macro (by not
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    12
--- binutils-2.18-orig/bfd/bfd-in2.h	2007-08-06 19:59:15.000000000 +0000
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    13
+++ binutils-2.18/bfd/bfd-in2.h	2007-10-14 09:49:26.509636374 +0000
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    14
@@ -55,7 +55,7 @@
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    15
    comma and then the length of the string.  Doing this by hand
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    16
    is error prone, so using this macro is safer.  The macro will
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    17
    also safely handle the case where a NULL is passed as the arg.  */
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    18
-#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    19
+#define STRING_COMMA_LEN(STR) (STR), ((sizeof(STR) > 0) ? sizeof (STR) - 1 : 0)
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    20
 /* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    21
    to create the arguments to another macro, since the preprocessor
7976e6fd6450 2007-10-14 Mark Wright <[email protected]>
markwright
parents:
diff changeset
    22
    will mis-count the number of arguments to the outer macro (by not