Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

memmove()



-----BEGIN PGP SIGNED MESSAGE-----

A couple of my recent patches use memmove(), which isn't available
everywhere.  This patch adds an autoconf test for it, and also memcpy().

The header changes don't affect any object files.

 -zefram

 *** configure.in	1997/03/30 23:58:22	1.35
 --- configure.in	1997/03/30 23:58:36
 ***************
 *** 503,509 ****
   dnl need to integrate this function
   dnl AC_FUNC_STRFTIME
   
 ! AC_CHECK_FUNCS(strftime waitpid select tcsetpgrp tcgetattr strstr lstat \
                 getlogin setpgid gettimeofday gethostname mkfifo wait3 difftime \
                 sigblock sigsetmask sigrelse sighold killpg sigaction getrlimit \
                 sigprocmask setuid seteuid setreuid setresuid setsid strerror \
 --- 503,510 ----
   dnl need to integrate this function
   dnl AC_FUNC_STRFTIME
   
 ! AC_CHECK_FUNCS(memcpy memmove \
 !               strftime waitpid select tcsetpgrp tcgetattr strstr lstat \
                 getlogin setpgid gettimeofday gethostname mkfifo wait3 difftime \
                 sigblock sigsetmask sigrelse sighold killpg sigaction getrlimit \
                 sigprocmask setuid seteuid setreuid setresuid setsid strerror \
 *** Src/prototypes.h	1997/01/29 03:25:23	1.11
 --- Src/prototypes.h	1997/03/30 23:58:36
 ***************
 *** 151,153 ****
 --- 151,156 ----
   /*** end of prototypes for functions in compat.c ***/
   /***************************************************/
   
 + #ifndef HAVE_MEMMOVE
 + extern void bcopy _((const void *, void *, int));
 + #endif
 *** Src/system.h	1997/01/29 03:25:26	1.14
 --- Src/system.h	1997/03/30 23:58:36
 ***************
 *** 500,505 ****
 --- 500,513 ----
   # define R_OK 4
   #endif
   
 + #ifndef HAVE_MEMCPY
 + # define memcpy memmove
 + #endif
 + 
 + #ifndef HAVE_MEMMOVE
 + # define memmove(dest, src, len) bcopy(src, dest, len)
 + #endif
 + 
   extern char **environ;     /* environment variable list */
   
   /* These variables are sometimes defined in, *

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: ascii

iQCVAwUBMz8AjHD/+HJTpU/hAQGI7QQAuJNlp8oYSIHINs7AkWTlVFcXrVBt5kh+
DQCaFhUj604zBptyF3RG3WbPZheYr1ofvGT3QpakmnXIh/osyvA1qnHsjavOamz2
JS4hqm0Iy+6fXe+7+5lMhWOtnDp8/ieG3ZcAkltCGWpKiLOMAzcA8Mq6Lsg5F8Y8
fhFoL4FRtjI=
=O397
-----END PGP SIGNATURE-----



Messages sorted by: Reverse Date, Date, Thread, Author