xref: /csrg-svn/lib/libc/stdio/tempnam.c (revision 21396)
1*21396Smckusick /*
2*21396Smckusick  * Copyright (c) 1980 Regents of the University of California.
3*21396Smckusick  * All rights reserved.  The Berkeley software License Agreement
4*21396Smckusick  * specifies the terms and conditions for redistribution.
5*21396Smckusick  */
6*21396Smckusick 
7*21396Smckusick #ifndef lint
8*21396Smckusick static char sccsid[] = "@(#)tempnam.c	4.2 (Berkeley) 05/30/85";
9*21396Smckusick #endif not lint
10*21396Smckusick 
112036Swnj char *tmpnam(s)
122036Swnj char *s;
132036Swnj {
142036Swnj 	static seed;
152036Swnj 
162036Swnj 	sprintf(s, "temp.%d.%d", getpid(), seed++);
172036Swnj 	return(s);
182036Swnj }
19