+2021-03-31 Alan Modra <amodra@gmail.com>
+
+ * bfd-in.h: Include string.h.
+ (LITMEMCPY, LITSTRCPY): Delete.
+ * bfd-in2.h: Regenerate.
+
2021-03-30 Alan Modra <amodra@gmail.com>
* elflink.c (elf_link_add_object_symbols): Don't set h->indx
#include "bfd_stdint.h"
#include "diagnostics.h"
#include <stdarg.h>
+#include <string.h>
#include <sys/stat.h>
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
is error prone, so using this macro is safer. */
#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
- /* 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
- can also save time if we do not need to copy the terminating NUL. */
-#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
#include "bfd_stdint.h"
#include "diagnostics.h"
#include <stdarg.h>
+#include <string.h>
#include <sys/stat.h>
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
is error prone, so using this macro is safer. */
#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
- /* 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
- can also save time if we do not need to copy the terminating NUL. */
-#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
+2021-03-31 Alan Modra <amodra@gmail.com>
+
+ * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
+
2021-03-29 Alan Modra <amodra@gmail.com>
* dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
/* Now the return type is on the top of the stack. */
s = (char *) xmalloc (len);
- LITSTRCPY (s, "(|) (");
+ strcpy (s, "(|) (");
if (argcount < 0)
strcat (s, "/* unknown */");