From c52ac05c3a213c3016b18693d6b3457448404e53 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 3 Jul 2009 12:03:25 +0000 Subject: Add mkdtemp, mkstemps. * libc/stdio/mktemp.c: Fix documentation. (_gettemp): Add domkdir and length parameters. Check for insufficient 'X' suffix. Drop cygwin-specific code. (_mkstemp_r, _mktemp_r, mkstemp, mktemp): Adjust clients. (_mkdtemp_r, _mkstemps_r, mkdtemp, mkstemps): New functions. * libc/include/stdlib.h (_mkdtemp_r, _mkstemps_r, mkdtemp) (mkstemps): Declare them. --- newlib/libc/include/stdlib.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'newlib/libc/include/stdlib.h') diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index 8f7d31e18..9dcd5e251 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -98,10 +98,14 @@ size_t _EXFUN(wcstombs,(char *, const wchar_t *, size_t)); size_t _EXFUN(_wcstombs_r,(struct _reent *, char *, const wchar_t *, size_t, _mbstate_t *)); #ifndef __STRICT_ANSI__ #ifndef _REENT_ONLY -int _EXFUN(mkstemp,(char *)); -char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((warning ("the use of `mktemp' is dangerous; use `mkstemp' instead")))); +char * _EXFUN(mkdtemp,(char *)); +int _EXFUN(mkstemp,(char *)); +int _EXFUN(mkstemps,(char *, int)); +char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((warning ("the use of `mktemp' is dangerous; use `mkstemp' instead")))); #endif +char * _EXFUN(_mkdtemp_r, (struct _reent *, char *)); int _EXFUN(_mkstemp_r, (struct _reent *, char *)); +int _EXFUN(_mkstemps_r, (struct _reent *, char *, int)); char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((warning ("the use of `mktemp' is dangerous; use `mkstemp' instead")))); #endif _VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR))); -- cgit v1.2.3