projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6230773
)
util: add util_strdup() wrapper macro
author
Brian Paul
<brianp@vmware.com>
Tue, 17 Oct 2017 19:57:45 +0000
(13:57 -0600)
committer
Brian Paul
<brianp@vmware.com>
Mon, 23 Oct 2017 21:10:24 +0000
(15:10 -0600)
To work around MSVC warning that strdup() is a deprecated POSIX function.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/util/u_string.h
patch
|
blob
|
history
diff --git
a/src/util/u_string.h
b/src/util/u_string.h
index
fa0241e
..
ce45430
100644
(file)
--- a/
src/util/u_string.h
+++ b/
src/util/u_string.h
@@
-203,6
+203,7
@@
util_strstr(const char *haystack, const char *needle)
#define util_strcasecmp stricmp
+#define util_strdup _strdup
#else
@@
-217,6
+218,7
@@
util_strstr(const char *haystack, const char *needle)
#define util_strncat strncat
#define util_strstr strstr
#define util_strcasecmp strcasecmp
+#define util_strdup strdup
#endif