Include string.h in bfd.h and delete LITMEMCPY, LITSTRCPY
[binutils-gdb.git] / bfd / bfd-in.h
index fda9fe0198ebecf2a294fa9a9ce4b959e443d326..f90f71809116fa21d3df95222cc1a7536152dda1 100644 (file)
@@ -37,6 +37,7 @@ extern "C" {
 #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)
@@ -57,13 +58,6 @@ extern "C" {
    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