Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!brl-tgr!tgr!Purtill@MIT-MULTICS.ARPA From: Purtill@MIT-MULTICS.ARPA (Mark Purtill) Newsgroups: net.lang.c Subject: Re: mktemp Message-ID: <9425@brl-tgr.ARPA> Date: Thu, 21-Mar-85 18:25:06 EST Article-I.D.: brl-tgr.9425 Posted: Thu Mar 21 18:25:06 1985 Date-Received: Sat, 23-Mar-85 01:19:45 EST Sender: news@brl-tgr.ARPA Lines: 24 >> mktemp ("/tmp/fooXXXXXX"); >> becomes >> mktemp ( (char *) "/tmp/fooXXXXXX"); >Even better, it becomes > char tempstr[14+1]; > strcpy(tempstr, "/tmp/fooXXXXXX"); > mktemp(tempstr); Wouldn't it be better to have the mktemp routine do the copying for you? When the compiler is changed to make it ANSI standard, presumably mktemp will be to, and if not, void _mktemp (const char foo[]) { char tempstr[14+1]; strcpy(tempstr, "/tmp/fooXXXXXX"); mktemp(tempstr); } #define mktemp _mktemp in a header file is probably easier than changing all the references to mktemp in all your programs. (By the way, what does mktemp do?) Mark