dnl
AC_FUNC_ALLOCA
AC_FUNC_MMAP
-AC_CHECK_FUNCS(strdup strstr strcasecmp strncasecmp strpbrk)
+AC_CHECK_FUNCS(strdup strstr strcasecmp strncasecmp strpbrk memmove)
AC_CHECK_FUNCS(gettimeofday mktime strptime)
AC_CHECK_FUNCS(strerror snprintf vsnprintf select signal symlink access isatty)
AC_CHECK_FUNCS(uname gethostname usleep)
+2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
+
+ * cmpt.c (memmove): Include a simple memmove implementation.
+
2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
* headers: Guard against header files being included twice.
#endif /* not WINDOWS */
#endif /* not HAVE_USLEEP */
+
+
+#ifndef HAVE_MEMMOVE
+void *
+memmove (char *dest, const char *source, unsigned length)
+{
+ char *d0 = dest;
+ if (source < dest)
+ /* Moving from low mem to hi mem; start at end. */
+ for (source += length, dest += length; length; --length)
+ *--dest = *--source;
+ else if (source != dest)
+ {
+ /* Moving from hi mem to low mem; start at beginning. */
+ for (; length; --length)
+ *dest++ = *source++;
+ }
+ return (void *) d0;
+}
+#endif /* not HAVE_MEMMOVE */
/* Define if you have the strpbrk function. */
#undef HAVE_STRPBRK
+/* Define if you have the memmove function. */
+#undef HAVE_MEMMOVE
+
/* Define if you have the strptime function. */
#undef HAVE_STRPTIME
#ifndef HAVE_USLEEP
int usleep ();
#endif
+#ifndef HAVE_MEMMOVE
+void *memmove ();
+#endif
/* SunOS brain damage -- for some reason, SunOS header files fail to
declare the functions below, which causes all kinds of problems