From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4443 invoked from network); 8 Mar 2000 07:38:04 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Mar 2000 07:38:04 -0000 Received: (qmail 16062 invoked by alias); 8 Mar 2000 07:37:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10006 Received: (qmail 16048 invoked from network); 8 Mar 2000 07:37:56 -0000 From: "Bart Schaefer" Message-Id: <1000308073752.ZM8603@candle.brasslantern.com> Date: Wed, 8 Mar 2000 07:37:52 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: PATCH: Configure tweak for _mktemp() MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Dan Nelson wrote: } Under FreeBSD, you can use the undocumented _mktemp() function to } bypass the linker warning. I don't know if the other BSDs implement } their warning message in the same way. Does OpenBSD print a similar } warning for sprintf? :) } } char * _mktemp(char *path) } { return(_gettemp(path, (int *)NULL, 0, 0) ? path : (char *)NULL); } } Index: configure.in =================================================================== RCS file: /extra/cvsroot/zsh/zsh-3.1/configure.in,v retrieving revision 1.69 diff -u -r1.69 configure.in --- configure.in 2000/02/28 04:44:47 1.69 +++ configure.in 2000/03/08 06:34:23 @@ -813,7 +813,7 @@ nis_list initgroups fchdir cap_get_proc readlink nice \ getgrgid getgrnam getpwent getpwnam getpwuid setpgrp \ inet_aton inet_pton inet_ntop getipnodebyname gethostbyname2 \ - fseeko ftello mmap munmap msync ftruncate setlocale) + fseeko ftello mmap munmap msync ftruncate setlocale _mktemp) dnl --------------- dnl CHECK FUNCTIONS Index: Src/utils.c =================================================================== @@ -1091,7 +1091,12 @@ if (!(s = getsparam("TMPPREFIX"))) s = DEFAULT_TMPPREFIX; +#ifdef HAVE__MKTEMP + /* Zsh uses mktemp() safely, so silence the warnings */ + return ((char *) _mktemp(dyncat(unmeta(s), "XXXXXX"))); +#else return ((char *) mktemp(dyncat(unmeta(s), "XXXXXX"))); +#endif } /* Check if a string contains a token */ -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com