SPIRV-Tools/tools
Steven Perron 0bd920eb9d
Use standard function to get stdin to binary mode. (#4141)
* Use standard function to get stdin to binary mode.

The fisrt implementation to try to change stdin to binary mode is not
protable.  Using freopen has a lot of implementation defined behaviour,
and the code relied on that working.

Looking into the MSVC documentation, I do not see a protable way of
doing this.  I've implemented a Windows specific method and do nothing
for other systems.  In general, UNIX based systems do make a distinction
between text and binary files, so nothing needs to be done for them.

Fixes #2518

* Split ReadFile into two different functions.

We want to remove the flag parameter.  So the original function has been
replaced with ReadBinaryFile and ReadTextFile.  This should make the
code more readable.

* Change name of CorrectlyReadFile to avoid confusion.
2021-03-01 09:38:49 -05:00
..
as Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
cfg Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
dis Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
emacs Define variable to skip installation 2017-07-04 12:24:44 -04:00
fuzz Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
lesspipe tools/lesspipe: Allow generic shell (#2255) 2018-12-27 15:06:37 -05:00
link Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
opt Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
reduce Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
sva Build deps: dump ini from 1.3.5 to 1.3.7 in tools/sva (#4092) 2021-01-06 13:32:11 -05:00
util Fix header include syntax. (#2882) 2019-09-19 09:26:24 -05:00
val Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
CMakeLists.txt CMake: Add SPIRV_TOOLS_BUILD_STATIC flag (#3910) 2020-10-29 09:25:26 -04:00
io.h Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00