Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2009-08-12 22:22:38 +0400
committerJeff Johnston <jjohnstn@redhat.com>2009-08-12 22:22:38 +0400
commit12387ab6f77d6ae4fa3d8fdc1756d416a27197dd (patch)
tree36dafe73c5a032c70c5a02b3be651175ffc268b3 /newlib/libc/stdio/mktemp.c
parenta73a3f438bd75c84ab2f6eb2a27a9b5064b7af9c (diff)
2009=08-12 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/mktemp.c (_gettemp): Do not call _mkdir_r unless HAVE_MKDIR is defined. 2009-08-12 Hans-Peter Nilsson <hp@axis.com> * libc/include/reent.h: Add prototype and definition of _mkdir_r. * libc/reent/Makefile.am (GENERAL_SOURCES): Add mkdirr.c. (CHEWOUT_FILES): Add mkdirr.def. * libc/reent/Makefile.in: Regenerate. * libc/reent/mkdirr.c: New file.
Diffstat (limited to 'newlib/libc/stdio/mktemp.c')
-rw-r--r--newlib/libc/stdio/mktemp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/newlib/libc/stdio/mktemp.c b/newlib/libc/stdio/mktemp.c
index 167ee9b0f..185d9df35 100644
--- a/newlib/libc/stdio/mktemp.c
+++ b/newlib/libc/stdio/mktemp.c
@@ -201,10 +201,15 @@ _DEFUN(_gettemp, (ptr, path, doopen, domkdir, suffixlen),
#if !defined _ELIX_LEVEL || _ELIX_LEVEL >= 4
if (domkdir)
{
+#ifdef HAVE_MKDIR
if (_mkdir_r (ptr, path, 0700) == 0)
return 1;
if (ptr->_errno != EEXIST)
return 0;
+#else /* !HAVE_MKDIR */
+ ptr->_errno = ENOSYS;
+ return 0;
+#endif /* !HAVE_MKDIR */
}
else
#endif /* _ELIX_LEVEL */