aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-01-25 22:08:46 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2015-01-25 22:08:46 +0100
commit50a6d86520b2c45a70a3d0e2d19fde37c49d8c90 (patch)
treeeb9e0e3bf04b78fde616c5b2e144c8ebceae9dd4
parentcc70b6f8b6c6441e1c48690c7885700a2d389946 (diff)
downloadbusybox-w32-50a6d86520b2c45a70a3d0e2d19fde37c49d8c90.tar.gz
busybox-w32-50a6d86520b2c45a70a3d0e2d19fde37c49d8c90.tar.bz2
busybox-w32-50a6d86520b2c45a70a3d0e2d19fde37c49d8c90.zip
platform.h: add compat mempcpy
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/platform.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
index 09c7ccd9c..f00669695 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -370,6 +370,7 @@ typedef unsigned smalluint;
370#define HAVE_SETBIT 1 370#define HAVE_SETBIT 1
371#define HAVE_SIGHANDLER_T 1 371#define HAVE_SIGHANDLER_T 1
372#define HAVE_STPCPY 1 372#define HAVE_STPCPY 1
373#define HAVE_MEMPCPY 1
373#define HAVE_STRCASESTR 1 374#define HAVE_STRCASESTR 1
374#define HAVE_STRCHRNUL 1 375#define HAVE_STRCHRNUL 1
375#define HAVE_STRSEP 1 376#define HAVE_STRSEP 1
@@ -450,6 +451,7 @@ typedef unsigned smalluint;
450#endif 451#endif
451 452
452#if defined(__FreeBSD__) 453#if defined(__FreeBSD__)
454//# undef HAVE_MEMPCPY - not yet confirmed
453# undef HAVE_CLEARENV 455# undef HAVE_CLEARENV
454# undef HAVE_FDATASYNC 456# undef HAVE_FDATASYNC
455# undef HAVE_MNTENT_H 457# undef HAVE_MNTENT_H
@@ -513,6 +515,13 @@ typedef void (*sighandler_t)(int);
513extern char *stpcpy(char *p, const char *to_add) FAST_FUNC; 515extern char *stpcpy(char *p, const char *to_add) FAST_FUNC;
514#endif 516#endif
515 517
518#ifndef HAVE_MEMPCPY
519static ALWAYS_INLINE void *mempcpy(void *dest, const void *src, size_t len)
520{
521 return memcpy(dest, src, len) + len;
522}
523#endif
524
516#ifndef HAVE_STRCASESTR 525#ifndef HAVE_STRCASESTR
517extern char *strcasestr(const char *s, const char *pattern) FAST_FUNC; 526extern char *strcasestr(const char *s, const char *pattern) FAST_FUNC;
518#endif 527#endif