mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 22:10:11 +01:00
util: add util_strdup() wrapper macro
To work around MSVC warning that strdup() is a deprecated POSIX function. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
6230773936
commit
acd6ea0cc0
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue