diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2025-09-17 09:12:23 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2025-09-17 12:20:24 -0700 |
| commit | ee367bd38daca8e36e4088d11301e52b782597ad (patch) | |
| tree | a88cd197df4f38f99340915abd542fe1256c6b9f /src/system.h | |
| parent | build: update gnulib submodule to latest (diff) | |
| download | coreutils-ee367bd38daca8e36e4088d11301e52b782597ad.tar.gz coreutils-ee367bd38daca8e36e4088d11301e52b782597ad.zip | |
maint: STREQ → streq
Use new Gnulib streq function instead of rolling our own macro.
* bootstrap.conf (gnulib_modules): Add stringeq.
* src/rm.c (main): Don’t assume streq is a macro that expands to (...),
as it is now a function.
* src/system.h:
* tests/df/no-mtab-status.sh, tests/df/skip-duplicates.sh:
(STREQ): Remove. All uses replaced by streq.
Diffstat (limited to 'src/system.h')
| -rw-r--r-- | src/system.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/system.h b/src/system.h index 2296c8bbb..f37d4b811 100644 --- a/src/system.h +++ b/src/system.h @@ -183,7 +183,6 @@ select_plural (uintmax_t n) return (n <= ULONG_MAX ? n : n % PLURAL_REDUCER + PLURAL_REDUCER); } -#define STREQ(a, b) (strcmp (a, b) == 0) #define STREQ_LEN(a, b, n) (strncmp (a, b, n) == 0) /* n==-1 means unbounded */ #define STRPREFIX(a, b) (strncmp (a, b, strlen (b)) == 0) @@ -652,7 +651,7 @@ emit_ancillary_info (char const *program) char const *node = program; struct infomap const *map_prog = infomap; - while (map_prog->program && ! STREQ (program, map_prog->program)) + while (map_prog->program && ! streq (program, map_prog->program)) map_prog++; if (map_prog->node) @@ -675,7 +674,7 @@ emit_ancillary_info (char const *program) /* .htaccess on the coreutils web site maps programs to the appropriate page, however we explicitly handle "[" -> "test" here as the "[" is not recognized as part of a URL by default in terminals. */ - char const *url_program = STREQ (program, "[") ? "test" : program; + char const *url_program = streq (program, "[") ? "test" : program; printf (_("Full documentation <%s%s>\n"), PACKAGE_URL, url_program); printf (_("or available locally via: info '(coreutils) %s%s'\n"), |
