projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
radv: enable radv_no_dynamic_bounds for more Path of Exile executables
[mesa.git]
/
src
/
util
/
u_string.h
diff --git
a/src/util/u_string.h
b/src/util/u_string.h
index 499894b9f9477665dcabd9d31b7e6859e395da3b..88df2cceda66681d02e6b8c2f9752bce7f845080 100644
(file)
--- a/
src/util/u_string.h
+++ b/
src/util/u_string.h
@@
-50,7
+50,7
@@
extern "C" {
#endif
extern "C" {
#endif
-#if
ndef _GNU_SOURCE
+#if
!defined(_GNU_SOURCE) || defined(__APPLE__)
#define strchrnul util_strchrnul
static inline char *
#define strchrnul util_strchrnul
static inline char *
@@
-98,10
+98,28
@@
util_vasprintf(char **ret, const char *format, va_list ap)
return vsnprintf(*ret, r + 1, format, ap);
}
return vsnprintf(*ret, r + 1, format, ap);
}
+#define asprintf util_asprintf
+static inline int
+util_asprintf(char **str, const char *fmt, ...)
+{
+ int ret;
+ va_list args;
+ va_start(args, fmt);
+ ret = vasprintf(str, fmt, args);
+ va_end(args);
+ return ret;
+}
+#ifndef strcasecmp
#define strcasecmp stricmp
#define strcasecmp stricmp
+#endif
+
#define strdup _strdup
#define strdup _strdup
+#if defined(_WIN32) && !defined(HAVE_STRTOK_R)
+#define strtok_r strtok_s
+#endif
+
#endif
#endif