aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in2.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r--bfd/bfd-in2.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index c8bf687..8874da8 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -63,15 +63,7 @@ extern "C" {
comma and then the length of the string. Doing this by hand
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
- evaluating STRING_COMMA_LEN and so missing the comma). This is a
- problem for example when trying to use STRING_COMMA_LEN to build
- the arguments to the strncmp() macro. Hence this alternative
- definition of strncmp is provided here.
-
- Note - these macros do NOT work if STR2 is not a constant string. */
+
/* strcpy() can have a similar problem, but since we know we are
copying a constant string, we can use memcpy which will be faster
since there is no need to check for a NUL byte inside STR. We
@@ -79,7 +71,6 @@ extern "C" {
#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
#define BFD_SUPPORTS_PLUGINS @supports_plugins@
/* The word size used by BFD on the host. This may be 64 with a 32
@@ -578,7 +569,6 @@ startswith (const char *str, const char *prefix)
{
return strncmp (str, prefix, strlen (prefix)) == 0;
}
-#define CONST_STRNEQ(STR1,STR2) startswith (STR1, STR2)
/* Extracted from init.c. */
unsigned int bfd_init (void);