[rtems-libbsd commit] Map bcopy() and bzero() via macros

Sebastian Huber sebh at rtems.org
Thu Jan 29 08:32:05 UTC 2015


Module:    rtems-libbsd
Branch:    master
Commit:    8e009cddfe8d7a47d5b638a725adcc9b2a9bc3e1
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=8e009cddfe8d7a47d5b638a725adcc9b2a9bc3e1

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jan 27 07:58:44 2015 +0100

Map bcopy() and bzero() via macros

---

 freebsd/sys/sys/systm.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/freebsd/sys/sys/systm.h b/freebsd/sys/sys/systm.h
index 27f5197..44d2208 100644
--- a/freebsd/sys/sys/systm.h
+++ b/freebsd/sys/sys/systm.h
@@ -248,8 +248,13 @@ void	hexdump(const void *ptr, int length, const char *hdr, int flags);
 #define	HD_OMIT_CHARS	(1 << 18)
 
 #define ovbcopy(f, t, l) bcopy((f), (t), (l))
+#ifndef __rtems__
 void	bcopy(const void *from, void *to, size_t len) __nonnull(1) __nonnull(2);
 void	bzero(void *buf, size_t len) __nonnull(1);
+#else /* __rtems__ */
+#define bcopy(src, dst, len) memmove((dst), (src), (len))
+#define bzero(buf, size) memset((buf), 0, (size))
+#endif /* __rtems__ */
 
 void	*memcpy(void *to, const void *from, size_t len) __nonnull(1) __nonnull(2);
 void	*memmove(void *dest, const void *src, size_t n) __nonnull(1) __nonnull(2);




More information about the vc mailing list