-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdio.h>
/* Replace STREAM, opening it on FILENAME. */
FILE *
-DEFUN(freopen, (filename, mode, stream),
- CONST char *filename AND CONST char *mode AND register FILE *stream)
+freopen (filename, mode, stream)
+ const char *filename;
+ const char *mode;
+ register FILE *stream;
{
__io_mode m;
- PTR cookie;
+ void *cookie;
if (!__getmode (mode, &m))
{
(void) fclose (stream);
- errno = EINVAL;
+ __set_errno (EINVAL);
return NULL;
}
{
int save = errno;
(void) fclose (stream);
- errno = save;
+ __set_errno (save);
return NULL;
}