1. 09 Jul, 2011 2 commits
    • posix: Portable `vsnprintf` · 2fc78e70
      Our good, lovely folks at Microsoft decided that there was no good
      reason to make `vsnprintf` compilant with the C standard, so that
      function in Windows returns -1 on overflow, instead of returning the
      actual byte count needed to write the full string.
      
      We now handle this situation more gracefully with the POSIX
      compatibility layer, by returning the needed byte size using an
      auxiliary method instead of blindly resizing the target buffer until it
      fits.
      
      This means we can now support `printf`s of any size by allocating a
      temporary buffer. That's good.
      Vicent Marti committed
  2. 05 Jul, 2011 5 commits
  3. 03 Jul, 2011 1 commit
  4. 23 May, 2011 2 commits
  5. 08 May, 2011 1 commit
  6. 20 Mar, 2011 1 commit
  7. 15 Mar, 2011 1 commit
  8. 11 Jan, 2011 1 commit
  9. 20 Jan, 2010 2 commits
  10. 15 Jun, 2009 1 commit
    • win32: Add an fsync() implementation for windows · c79dded3
      For information on FlushFileBuffers(), see the msdn document
      at msdn.microsoft.com/en-us/library/aa364439(VS.85).aspx
      
      Note that Windows 2000 is shown as the minimum windows version
      to support FlushFileBuffers(), so if we wish to support Win9X
      and NT4, we will need to add code to dynamically check if
      kernel32.dll contains the function.
      
      The only error return mentioned in the msdn document is
      ERROR_INVALID_HANDLE, which is returned if the file/device
      (eg console) is not buffered. The fsync(2) manpage says that
      EINVAL is returned in errno, if "fd is bound to a special
      file which does not support synchronization".
      
      Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Ramsay Jones committed
  11. 05 Jun, 2009 2 commits
  12. 20 Mar, 2009 2 commits