File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 146
146
# define vsnprintf _vsnprintf
147
147
#endif // GTEST_OS_WINDOWS
148
148
149
+ #if GTEST_OS_MAC
150
+ # ifndef GTEST_OS_IOS
151
+ # include < crt_externs.h>
152
+ # endif
153
+ #endif
154
+
149
155
namespace testing {
150
156
151
157
using internal::CountIf;
@@ -5341,6 +5347,16 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
5341
5347
}
5342
5348
}
5343
5349
5350
+ // Fix the value of *_NSGetArgc() on macOS, but iff
5351
+ // *_NSGetArgv() == argv
5352
+ #if GTEST_OS_MAC
5353
+ # ifndef GTEST_OS_IOS
5354
+ if (*_NSGetArgv () == argv) {
5355
+ *_NSGetArgc () = *argc;
5356
+ }
5357
+ # endif
5358
+ #endif
5359
+
5344
5360
if (g_help_flag) {
5345
5361
// We print the help here instead of in RUN_ALL_TESTS(), as the
5346
5362
// latter may not be called at all if the user is using Google
You can’t perform that action at this time.
0 commit comments