Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
if (indent)
print_spaces(f, indent);
- char *end = util_strchrnul(out, '\n');
+ char *end = strchrnul(out, '\n');
fwrite(out, end - out, 1, f);
fputc('\n', f); /* always end with a new line */
if (!*end)
int len, ret;
for (next = library_paths; *next; library_paths = next + 1) {
- next = util_strchrnul(library_paths, ':');
+ next = strchrnul(library_paths, ':');
len = next - library_paths;
if (len)
extern "C" {
#endif
-#ifdef _GNU_SOURCE
-
-#define util_strchrnul strchrnul
-
-#else
+#ifndef _GNU_SOURCE
+#define strchrnul util_strchrnul
static inline char *
util_strchrnul(const char *s, char c)
{