mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-29 18:07:08 +00:00
For GLEW Patch #42 - Patch for _CRT_SECURE_NO_WARNINGS
This commit is contained in:
parent
1da137a949
commit
0d810d52f1
@ -58,7 +58,12 @@ int main (void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||||
|
if (fopen_s(&f, "glewinfo.txt", "w") != 0)
|
||||||
|
f = stdout;
|
||||||
|
#else
|
||||||
f = fopen("glewinfo.txt", "w");
|
f = fopen("glewinfo.txt", "w");
|
||||||
|
#endif
|
||||||
if (f == NULL) f = stdout;
|
if (f == NULL) f = stdout;
|
||||||
#else
|
#else
|
||||||
f = stdout;
|
f = stdout;
|
||||||
|
@ -147,7 +147,14 @@ main (int argc, char** argv)
|
|||||||
/* open file */
|
/* open file */
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
if (!displaystdout)
|
if (!displaystdout)
|
||||||
|
{
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||||
|
if (fopen_s(&file, "visualinfo.txt", "w") != 0)
|
||||||
|
file = stdout;
|
||||||
|
#else
|
||||||
file = fopen("visualinfo.txt", "w");
|
file = fopen("visualinfo.txt", "w");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
file = stdout;
|
file = stdout;
|
||||||
#else
|
#else
|
||||||
@ -236,7 +243,11 @@ void PrintExtensions (const char* s)
|
|||||||
fprintf(file, " %s\n", t);
|
fprintf(file, " %s\n", t);
|
||||||
p++;
|
p++;
|
||||||
i = (int)strlen(p);
|
i = (int)strlen(p);
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||||
|
strcpy_s(t, sizeof(t), p);
|
||||||
|
#else
|
||||||
strcpy(t, p);
|
strcpy(t, p);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user