home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / compat / stdio / mkstemp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-04  |  281 b   |  16 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <stdio.h>
  3. #include <fcntl.h>
  4. #include <errno.h>
  5.  
  6. int
  7. mkstemp (char *_template)
  8. {
  9.   if (mktemp (_template))
  10.     return creat (_template, 0666);
  11.   else {
  12.     errno = ENOENT;
  13.     return -1;
  14.   }
  15. }
  16.