/* freopen.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */

#include <sys/emx.h>
#include <stdio.h>
#include <share.h>

FILE *freopen (const char *fname, const char *mode, FILE *stream)
{
  if (stream->flags & _IOOPEN)
    if (fclose (stream) != 0)
      return (NULL);
  return (_fopen (stream, fname, mode, SH_DENYNO));
}
