aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/tmpfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/tmpfile.c')
-rw-r--r--newlib/libc/stdio/tmpfile.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/newlib/libc/stdio/tmpfile.c b/newlib/libc/stdio/tmpfile.c
index c38e61d..a6c2c91 100644
--- a/newlib/libc/stdio/tmpfile.c
+++ b/newlib/libc/stdio/tmpfile.c
@@ -11,14 +11,14 @@ ANSI_SYNOPSIS
#include <stdio.h>
FILE *tmpfile(void);
- FILE *_tmpfile_r(void *<[reent]>);
+ FILE *_tmpfile_r(struct _reent *<[reent]>);
TRAD_SYNOPSIS
#include <stdio.h>
FILE *tmpfile();
FILE *_tmpfile_r(<[reent]>)
- char *<[reent]>;
+ struct _reent *<[reent]>;
DESCRIPTION
Create a temporary file (a file which will be deleted automatically),
@@ -45,12 +45,14 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<getpid>>,
<<tmpfile>> also requires the global pointer <<environ>>.
*/
+#include <_ansi.h>
+#include <reent.h>
#include <stdio.h>
#include <errno.h>
FILE *
-_DEFUN (_tmpfile_r, (ptr),
- struct _reent *ptr)
+_DEFUN(_tmpfile_r, (ptr),
+ struct _reent *ptr)
{
FILE *fp;
int e;
@@ -69,7 +71,7 @@ _DEFUN (_tmpfile_r, (ptr),
#ifndef _REENT_ONLY
FILE *
-_DEFUN_VOID (tmpfile)
+_DEFUN_VOID(tmpfile)
{
return _tmpfile_r (_REENT);
}