cvs commit: src/lib/libc/stdio freopen.c

Andrey A. Chernov ache at FreeBSD.org
Mon Oct 16 14:32:01 UTC 2006


ache        2006-10-16 14:31:56 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/stdio       freopen.c 
  Log:
  file == NULL:
  Issue __sflush() before possible setting O_APPEND mode or ftruncate(),
  write to wrong place may occurse oserwise.
  Use simplified _sseek() to the start, if no O_APPEND is set, instead
  of _fseeko() (_sseek() to the end, if O_APPEND, occurse later, as for
  file != NULL).
  Don't check seek error return, as original fopen() and freopen() never
  does.
  
  file != NULL:
  Add missing _sseek() to the end.
  
  Revision  Changes    Path
  1.17      +14 -9     src/lib/libc/stdio/freopen.c


More information about the cvs-all mailing list