From db060d8753ac7fd15adcbb630f08aabd9e4d4cae Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 27 Jul 2000 20:10:44 +0000 Subject: [PATCH] Add AC_MEMCPY and AC_FAST_MEMCPY macros to eventually replace SAFEMEMCPY. AC_FAST_MEMCPY has a len==1 optimization for use in -llber. --- include/ac/string.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/ac/string.h b/include/ac/string.h index bac0dc256e..c5471e1583 100644 --- a/include/ac/string.h +++ b/include/ac/string.h @@ -75,4 +75,10 @@ int (strncasecmp)(); # endif #endif +#define AC_MEMCPY( d, s, n ) (SAFEMEMCPY((d),(s),(n))) +#define AC_FMEMCPY( d, s, n ) do { \ + if((n) == 1) *((char*)(d)) = *((char*)(s)); \ + else AC_MEMCPY( (d), (s), (n) ); \ + } while(0) + #endif /* _AC_STRING_H */ -- 2.39.5