1. 17 8月, 2020 1 次提交
  2. 17 2月, 2016 1 次提交
    • R
      fix assumption in fputs that fwrite returning 0 implies an error · 10a17dfb
      Rich Felker 提交于
      internally, the idiom of passing nmemb=1 to fwrite and interpreting
      the return value of fwrite (which is necessarily 0 or 1) as
      failure/success is fairly widely used. this is not correct, however,
      when the size argument is unknown and may be zero, since C requires
      fwrite to return 0 in that special case. previously fwrite always
      returned nmemb on success, but this was changed for conformance with
      ISO C by commit 500c6886.
      10a17dfb
  3. 05 9月, 2014 1 次提交
    • R
      fix multiple stdio functions' behavior on zero-length operations · 6e2bb7ac
      Rich Felker 提交于
      previously, fgets, fputs, fread, and fwrite completely omitted locking
      and access to the FILE object when their arguments yielded a zero
      length read or write operation independent of the FILE state. this
      optimization was invalid; it wrongly skipped marking the stream as
      byte-oriented (a C conformance bug) and exposed observably missing
      synchronization (a POSIX conformance bug) where one of these functions
      could wrongly complete despite another thread provably holding the
      lock.
      6e2bb7ac
  4. 09 11月, 2012 1 次提交
    • R
      clean up stdio_impl.h · 835f9f95
      Rich Felker 提交于
      this header evolved to facilitate the extremely lazy practice of
      omitting explicit includes of the necessary headers in individual
      stdio source files; not only was this sloppy, but it also increased
      build time.
      
      now, stdio_impl.h is only including the headers it needs for its own
      use; any further headers needed by source files are included directly
      where needed.
      835f9f95
  5. 07 9月, 2012 1 次提交
    • R
      use restrict everywhere it's required by c99 and/or posix 2008 · 400c5e5c
      Rich Felker 提交于
      to deal with the fact that the public headers may be used with pre-c99
      compilers, __restrict is used in place of restrict, and defined
      appropriately for any supported compiler. we also avoid the form
      [restrict] since older versions of gcc rejected it due to a bug in the
      original c99 standard, and instead use the form *restrict.
      400c5e5c
  6. 12 2月, 2011 1 次提交