PR gdb/2339
	* bfd-in.h (STRING_COMMA_LEN): Don't handle NULL STR case.
	* bfd-in2.h: Regenerate.
This commit is contained in:
Pedro Alves
2007-10-25 21:38:23 +00:00
parent 90db74a0fa
commit b6acad27bf
3 changed files with 10 additions and 6 deletions

View File

@@ -1,3 +1,9 @@
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.
2007-09-04 Michael Snyder <msnyder@access-company.com> 2007-09-04 Michael Snyder <msnyder@access-company.com>
* elf32-bfin.c (howto_table): Cut and paste error? * elf32-bfin.c (howto_table): Cut and paste error?

View File

@@ -46,9 +46,8 @@ extern "C" {
/* This is a utility macro to handle the situation where the code /* This is a utility macro to handle the situation where the code
wants to place a constant string into the code, followed by a wants to place a constant string into the code, followed by a
comma and then the length of the string. Doing this by hand comma and then the length of the string. Doing this by hand
is error prone, so using this macro is safer. The macro will is error prone, so using this macro is safer. */
also safely handle the case where a NULL is passed as the arg. */ #define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro /* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
to create the arguments to another macro, since the preprocessor to create the arguments to another macro, since the preprocessor
will mis-count the number of arguments to the outer macro (by not will mis-count the number of arguments to the outer macro (by not

View File

@@ -53,9 +53,8 @@ extern "C" {
/* This is a utility macro to handle the situation where the code /* This is a utility macro to handle the situation where the code
wants to place a constant string into the code, followed by a wants to place a constant string into the code, followed by a
comma and then the length of the string. Doing this by hand comma and then the length of the string. Doing this by hand
is error prone, so using this macro is safer. The macro will is error prone, so using this macro is safer. */
also safely handle the case where a NULL is passed as the arg. */ #define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro /* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
to create the arguments to another macro, since the preprocessor to create the arguments to another macro, since the preprocessor
will mis-count the number of arguments to the outer macro (by not will mis-count the number of arguments to the outer macro (by not