Increase portability. (Submission from Nikita Kindt, as were some recent related submissions.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@28444 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
f57aa7bd91
commit
3ce4e59090
2 changed files with 6 additions and 11 deletions
|
|
@ -868,7 +868,7 @@ void usage()
|
|||
);
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
#if !defined _MSC_VER && !defined MINGW_HAS_SECURE_API
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
|
|
@ -903,12 +903,7 @@ int fopen_s(
|
|||
char** ReadFileData(const char* fileName)
|
||||
{
|
||||
FILE *in;
|
||||
#if defined(_WIN32) && defined(__GNUC__)
|
||||
in = fopen(fileName, "r");
|
||||
int errorCode = in ? 0 : 1;
|
||||
#else
|
||||
int errorCode = fopen_s(&in, fileName, "r");
|
||||
#endif
|
||||
int errorCode = fopen_s(&in, fileName, "r");
|
||||
|
||||
char *fdata;
|
||||
int count = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue