X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/d74671e4f6305b52358153545c32858b05a263e6..d83115683b69af0bc68f101f7494d052b7dd6a44:/openbsd-compat/mktemp.c diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c index aff8d200..2285c84d 100644 --- a/openbsd-compat/mktemp.c +++ b/openbsd-compat/mktemp.c @@ -1,8 +1,7 @@ -/* OPENBSD ORIGINAL: lib/libc/stdio/mktemp.c */ - /* 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. @@ -32,25 +31,24 @@ * SUCH DAMAGE. */ +/* OPENBSD ORIGINAL: lib/libc/stdio/mktemp.c */ + #include "includes.h" -#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) +#include +#include -#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 +#include +#include +#include -#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; @@ -58,8 +56,7 @@ mkstemps(path, slen) } int -mkstemp(path) - char *path; +mkstemp(char *path) { int fd; @@ -67,8 +64,7 @@ mkstemp(path) } char * -mkdtemp(path) - char *path; +mkdtemp(char *path) { return(_gettemp(path, (int *)NULL, 1, 0) ? path : (char *)NULL); }