diff: memmove() & SunOS 4.x
Fergus Henderson
fjh at cs.mu.oz.au
Thu Oct 2 12:45:44 AEST 1997
configure.in:
runtime/conf.h.in:
util/mdemangle.c:
Check whether the system has memmove(). (SunOS 4.x doesn't.)
If not, use memcpy().
cvs diff configure.in runtime/conf.h.in util/mdemangle.c
Index: configure.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/configure.in,v
retrieving revision 1.108
diff -u -r1.108 configure.in
--- configure.in 1997/09/15 10:49:27 1.108
+++ configure.in 1997/10/02 02:24:58
@@ -213,7 +213,7 @@
AC_C_CROSS
AC_PROG_RANLIB
AC_RETSIGTYPE
-AC_HAVE_FUNCS(sysconf getpagesize memalign mprotect sigaction setitimer strerror)
+AC_HAVE_FUNCS(sysconf getpagesize memalign mprotect sigaction setitimer strerror memmove)
#-----------------------------------------------------------------------------#
AC_CHECK_HEADER(sys/siginfo.h, HAVE_SYS_SIGINFO_H=1)
if test "$HAVE_SYS_SIGINFO_H" = 1; then
Index: runtime/conf.h.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/runtime/conf.h.in,v
retrieving revision 1.21
diff -u -r1.21 conf.h.in
--- conf.h.in 1997/09/30 13:31:38 1.21
+++ conf.h.in 1997/10/02 02:27:42
@@ -72,6 +72,7 @@
** HAVE_MEMALIGN we have the memalign() function.
** HAVE_STRERROR we have the strerror() function.
** HAVE_SETITIMER we have the setitimer() function.
+** HAVE_MEMMOVE we have the memmove() function.
*/
#undef HAVE_SYSCONF
#undef HAVE_SIGACTION
@@ -80,6 +81,7 @@
#undef HAVE_MPROTECT
#undef HAVE_STRERROR
#undef HAVE_SETITIMER
+#undef HAVE_MEMMOVE
/*
** RETSIGTYPE: the return type of signal handlers.
Index: util/mdemangle.c
===================================================================
RCS file: /home/staff/zs/imp/mercury/util/mdemangle.c,v
retrieving revision 1.25
diff -u -r1.25 mdemangle.c
--- mdemangle.c 1997/09/29 07:23:38 1.25
+++ mdemangle.c 1997/10/02 02:31:01
@@ -37,6 +37,15 @@
static bool cut_trailing_underscore_integer(char *str, char **end, int *num);
static bool strip_prefix(char **str, const char *prefix);
+/*
+** Bloody SunOS 4.x doesn't have memmove()...
+** Using memcpy() may not work, but it doesn't really matter
+** if the demangler doesn't work 100% correctly on SunOS 4.x.
+*/
+#ifndef HAVE_MEMMOVE
+#define memmove memcpy
+#endif
+
int
main(int argc, char **argv)
{
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list