From: Todd C. Miller Date: Sun, 6 Feb 2005 03:56:38 +0000 (+0000) Subject: use bcopy on systems w/o memmove X-Git-Tag: SUDO_1_7_0~723 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f780611c3315bb25a3036244106d8f5e82051719;p=sudo use bcopy on systems w/o memmove --- diff --git a/compat.h b/compat.h index f2cf8fb28..d514fcd2f 100644 --- a/compat.h +++ b/compat.h @@ -161,6 +161,9 @@ #if !defined(HAVE_MEMCPY) && !defined(memcpy) # define memcpy(_d, _s, _n) (bcopy(_s, _d, _n)) #endif +#if !defined(HAVE_MEMMOVE) && !defined(memmove) +# define memmove(_d, _s, _n) (bcopy(_s, _d, _n)) +#endif #if !defined(HAVE_MEMSET) && !defined(memset) # define memset(_s, _x, _n) (bzero(_s, _n)) #endif diff --git a/config.h.in b/config.h.in index 5127192e5..cc36c79f8 100644 --- a/config.h.in +++ b/config.h.in @@ -221,6 +221,9 @@ /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H diff --git a/configure b/configure index 3abc50b2b..9a9c091c6 100755 --- a/configure +++ b/configure @@ -25909,7 +25909,8 @@ esac -for ac_func in strchr strrchr memchr memcpy memset sysconf tzset \ + +for ac_func in strchr strrchr memchr memcpy memmove memset sysconf tzset \ strftime setrlimit initgroups getgroups fstat gettimeofday do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` diff --git a/configure.in b/configure.in index 5a80e8fa3..3a4b469c8 100644 --- a/configure.in +++ b/configure.in @@ -1724,7 +1724,7 @@ esac dnl dnl Function checks dnl -AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \ +AC_CHECK_FUNCS(strchr strrchr memchr memcpy memmove memset sysconf tzset \ strftime setrlimit initgroups getgroups fstat gettimeofday) if test -z "$SKIP_SETRESUID"; then AC_CHECK_FUNCS(setresuid, [SKIP_SETREUID=yes])