Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!ames!ptsfa!ihnp4!homxb!houxm!mhuxt!mhuxm!mhuxo!ulysses!gamma!pyuxp!pyuxv!cim2 From: cim2@pyuxv.UUCP (Robert L. Fair) Newsgroups: comp.sys.ibm.pc Subject: Re: MSC 4.0 bugs Message-ID: <286@pyuxv.UUCP> Date: Thu, 14-May-87 10:50:33 EDT Article-I.D.: pyuxv.286 Posted: Thu May 14 10:50:33 1987 Date-Received: Sat, 16-May-87 19:42:59 EDT Organization: CHC Lines: 20 Bonnie Olszewski, Sun Microsystems East Coast Division (home of PC-NFS) writes on the MSC 4.0 compiler: >2) result = mktemp(template) corrupts the template after the call, > so that template must be reinitialized before mktemp > can be called again. > UUCP: {ihnp4,decwrl,...}!sun!bonnieo decvax!eagle_snax!bonnieo THIS IS NOT A BUG ! This has been the *documented* functionality of mktemp(3) for many years - it replaces your template with the file name, and returns a pointer to the template. The alternative is for mktemp to malloc storage for the created name - not always desirable. Personally, I think mktemp s*cks - checkout tmpnam(3) and tempnam(3) as MUCH better and more flexible ways of creating temporary file names. (Also available on UNIX SYS-V) Bob Fair Bellcore/CHC ihnp4!pyuxww!pyuxv!cim2