]> andersk Git - openssh.git/blobdiff - openbsd-compat/mktemp.c
- (djm) [auth-pam.c clientloop.c includes.h monitor.c session.c]
[openssh.git] / openbsd-compat / mktemp.c
index 2cd74783505eacc12c59afd24901e676af23a3cf..53a50c5121de660e9cb2157291813b00eed2e12b 100644 (file)
@@ -1,6 +1,7 @@
 /* THIS FILE HAS BEEN MODIFIED FROM THE ORIGINAL OPENBSD SOURCE */
 /* Changes: Removed mktemp */
 
+/*     $OpenBSD: mktemp.c,v 1.19 2005/08/08 08:05:36 espie Exp $ */
 /*
  * Copyright (c) 1987, 1993
  *     The Regents of the University of California.  All rights reserved.
  * SUCH DAMAGE.
  */
 
-#include "includes.h"
+/* OPENBSD ORIGINAL: lib/libc/stdio/mktemp.c */
 
-#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
+#include "includes.h"
 
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: mktemp.c,v 1.17 2003/06/02 20:18:37 millert Exp $";
-#endif /* LIBC_SCCS and not lint */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <ctype.h>
 
-#ifdef HAVE_CYGWIN
-#define open binary_open
-extern int binary_open();
-#endif
+#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
 
 static int _gettemp(char *, int *, int, int);
 
 int
-mkstemps(path, slen)
-       char *path;
-       int slen;
+mkstemps(char *path, int slen)
 {
        int fd;
 
@@ -56,8 +52,7 @@ mkstemps(path, slen)
 }
 
 int
-mkstemp(path)
-       char *path;
+mkstemp(char *path)
 {
        int fd;
 
@@ -65,8 +60,7 @@ mkstemp(path)
 }
 
 char *
-mkdtemp(path)
-       char *path;
+mkdtemp(char *path)
 {
        return(_gettemp(path, (int *)NULL, 1, 0) ? path : (char *)NULL);
 }
This page took 0.04024 seconds and 4 git commands to generate.