Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
1778f209
Unverified
Commit
1778f209
authored
Aug 19, 2018
by
Gennadiy Civil
Committed by
GitHub
Aug 19, 2018
Browse files
Merge pull request #1347 from Burgch/fix-argc
Fix value pointed to by `_NSGetArgc()` on macOS.
parents
d1c1aac7
97274b1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
googletest/src/gtest.cc
googletest/src/gtest.cc
+17
-0
No files found.
googletest/src/gtest.cc
View file @
1778f209
...
...
@@ -138,6 +138,12 @@
# define vsnprintf _vsnprintf
#endif // GTEST_OS_WINDOWS
#if GTEST_OS_MAC
#ifndef GTEST_OS_IOS
#include <crt_externs.h>
#endif
#endif
#if GTEST_HAS_ABSL
#include "absl/debugging/failure_signal_handler.h"
#include "absl/debugging/stacktrace.h"
...
...
@@ -5825,6 +5831,17 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
// other parts of Google Test.
void
ParseGoogleTestFlagsOnly
(
int
*
argc
,
char
**
argv
)
{
ParseGoogleTestFlagsOnlyImpl
(
argc
,
argv
);
// Fix the value of *_NSGetArgc() on macOS, but iff
// *_NSGetArgv() == argv
// Only applicable to char** version of argv
#if GTEST_OS_MAC
#ifndef GTEST_OS_IOS
if
(
*
_NSGetArgv
()
==
argv
)
{
*
_NSGetArgc
()
=
*
argc
;
}
#endif
#endif
}
void
ParseGoogleTestFlagsOnly
(
int
*
argc
,
wchar_t
**
argv
)
{
ParseGoogleTestFlagsOnlyImpl
(
argc
,
argv
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment