Commit 422a40d8 authored by Michael M's avatar Michael M Committed by Dylan Baker

tests/gl_basic_test: copy definition of removeXcodeArgs

This fixes compilation on macOS.
Signed-off-by: 's avatarMichael M <mchtly@gmail.com>
parent 9249a2b2
......@@ -760,6 +760,34 @@ CREATE_TESTSUITE(WAFFLE_PLATFORM_WGL, wgl)
#undef test_XX_rgba
#undef test_XX_rgb
#ifdef __APPLE__
static void
removeArg(int index, int *argc, char **argv)
{
--*argc;
for (; index < *argc; ++index)
argv[index] = argv[index + 1];
}
static void
removeXcodeArgs(int *argc, char **argv)
{
// Xcode sometimes adds additional arguments.
for (int i = 1; i < *argc; )
{
if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0 ||
strcmp(argv[i], "-ApplePersistenceIgnoreState" ) == 0)
{
removeArg(i, argc, argv);
removeArg(i, argc, argv);
} else
++i;
}
}
#endif // __APPLE__
static const char *usage_message =
"Usage:\n"
" gl_basic_test <Required Parameter> [Options]\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment