Purtill@MIT-MULTICS.ARPA (Mark Purtill) (03/22/85)
>> 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