summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/mktemp.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/mktemp.c')
-rw-r--r--newlib/libc/stdio/mktemp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/newlib/libc/stdio/mktemp.c b/newlib/libc/stdio/mktemp.c
index f3eaa09ce..24bbf67e1 100644
--- a/newlib/libc/stdio/mktemp.c
+++ b/newlib/libc/stdio/mktemp.c
@@ -132,7 +132,11 @@ _DEFUN (_gettemp, (ptr, path, doopen),
if (*trv == '/')
{
*trv = '\0';
+#ifdef __CYGWIN_USE_BIG_TYPES__
+ if (_stat64_r (ptr, path, &sbuf))
+#else
if (_stat_r (ptr, path, &sbuf))
+#endif
return (0);
if (!(sbuf.st_mode & S_IFDIR))
{
@@ -158,7 +162,11 @@ _DEFUN (_gettemp, (ptr, path, doopen),
#endif
return 0;
}
+#ifdef __CYGWIN_USE_BIG_TYPES__
+ else if (_stat64_r (ptr, path, &sbuf))
+#else
else if (_stat_r (ptr, path, &sbuf))
+#endif
return (ptr->_errno == ENOENT ? 1 : 0);
/* tricky little algorithm for backward compatibility */