From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22055 invoked from network); 1 Apr 1997 00:04:16 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 1 Apr 1997 00:04:16 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id SAA10494; Mon, 31 Mar 1997 18:55:35 -0500 (EST) Resent-Date: Mon, 31 Mar 1997 18:55:35 -0500 (EST) Date: Tue, 1 Apr 1997 00:58:29 +0100 (BST) From: Zefram Message-Id: <14498.199703312358@stone.dcs.warwick.ac.uk> Subject: memmove() X-Patch: 241 Resent-Message-ID: <"eMF4l2.0.vZ2.sx4Gp"@euclid> To: zsh-workers@math.gatech.edu Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3055 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----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-----