From: Eric Engestrom Date: Tue, 20 Nov 2018 11:24:55 +0000 (+0000) Subject: util: use standard name for strchrnul() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09a8a39940ad02951b62454a5d222af669fef694;p=mesa.git util: use standard name for strchrnul() Signed-off-by: Eric Engestrom Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Reviewed-by: Eric Anholt --- diff --git a/src/amd/common/ac_debug.c b/src/amd/common/ac_debug.c index 1632106fdb9..36a01fd8bf7 100644 --- a/src/amd/common/ac_debug.c +++ b/src/amd/common/ac_debug.c @@ -542,7 +542,7 @@ static void format_ib_output(FILE *f, char *out) 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) diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c index 29718a2aa20..b435486903c 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c @@ -138,7 +138,7 @@ pipe_loader_find_module(const char *driver_name, 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) diff --git a/src/util/u_string.h b/src/util/u_string.h index 751ae909e1b..b43c42650e1 100644 --- a/src/util/u_string.h +++ b/src/util/u_string.h @@ -50,12 +50,9 @@ 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) {