Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
gflags
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
gflags
Commits
0c7012d6
Commit
0c7012d6
authored
Nov 09, 2018
by
Andreas Schuh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Build with MinGW version after Nov 2016
parent
b051bace
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
windows_port.h
src/windows_port.h
+2
-0
No files found.
src/windows_port.h
View file @
0c7012d6
...
...
@@ -77,6 +77,7 @@ extern int GFLAGS_DLL_DECL safe_vsnprintf(char *str, size_t size,
# pragma warning(push)
# pragma warning(disable: 4996) // ignore getenv security warning
#endif
#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
inline
void
setenv
(
const
char
*
name
,
const
char
*
value
,
int
)
{
// In windows, it's impossible to set a variable to the empty string.
// We handle this by setting it to "0" and the NUL-ing out the \0.
...
...
@@ -98,6 +99,7 @@ inline void setenv(const char* name, const char* value, int) {
*
getenv
(
name
)
=
'\0'
;
// works when putenv() copies nameval
}
}
#endif
#ifdef _MSC_VER
# pragma warning(pop)
#endif
...
...
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