Ticket #299: freopen.diff

File freopen.diff, 629 bytes (added by KO Myung-Hun, 10 years ago)

patch for freopen()

  • src/emx/src/lib/io/freopen.c

    diff --git a/src/emx/src/lib/io/freopen.c b/src/emx/src/lib/io/freopen.c
    index b9a1c32..882b2d2 100755
    a b FILE *_STD(freopen) (const char *fname, const char *mode, FILE *stream) 
    119119                      /* flush it and set the new mode */
    120120                      fflush(stream);
    121121                      if (!fcntl(fileno(stream), F_SETFL, omode))
    122                         stream = stream;
     122                        result = stream;
    123123                    }
    124124                  else
    125125                    errno = EBADF; /* doesn't support the mode. */