• Kevin Locke's avatar
    configurator: Print test source without cat · fcdcba92
    Kevin Locke authored
    Windows does not provide cat.  Instead, copy the test source to stdout
    using the file stream to which it was written.
    
    Changes since v1:
    - Create fwrite_noeintr to avoid EINTR in fwrite without writing any
      data.
    - Handle short reads from fread.  This can happen with non-conformant
      libc or if EINTR occurs after reading some data.
    - Handle short writes from fwrite.  This can happen with non-conformant
      libc or if EINTR occurs after writing some data.
    
    Changes since v2:
    - Revert fwrite_noeintr and short read/write changes.
    Signed-off-by: default avatarKevin Locke <kevin@kevinlocke.name>
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    fcdcba92
configurator.c 20.9 KB