aboutsummaryrefslogtreecommitdiffstats
path: root/src/wc.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2025-09-17 09:12:23 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2025-09-17 12:20:24 -0700
commitee367bd38daca8e36e4088d11301e52b782597ad (patch)
treea88cd197df4f38f99340915abd542fe1256c6b9f /src/wc.c
parentbuild: update gnulib submodule to latest (diff)
downloadcoreutils-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/wc.c')
-rw-r--r--src/wc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wc.c b/src/wc.c
index 5f974e1c0..777277f23 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -623,7 +623,7 @@ wc (int fd, char const *file_x, struct fstatus *fstatus)
static bool
wc_file (char const *file, struct fstatus *fstatus)
{
- if (! file || STREQ (file, "-"))
+ if (! file || streq (file, "-"))
{
have_read_stdin = true;
xset_binary_mode (STDIN_FILENO, O_BINARY);
@@ -670,7 +670,7 @@ get_input_fstatus (idx_t nfiles, char *const *file)
else
{
for (idx_t i = 0; i < nfiles; i++)
- fstatus[i].failed = (! file[i] || STREQ (file[i], "-")
+ fstatus[i].failed = (! file[i] || streq (file[i], "-")
? fstat (STDIN_FILENO, &fstatus[i].st)
: stat (file[i], &fstatus[i].st));
}
@@ -815,7 +815,7 @@ main (int argc, char **argv)
usage (EXIT_FAILURE);
}
- if (STREQ (files_from, "-"))
+ if (streq (files_from, "-"))
stream = stdin;
else
{
@@ -871,7 +871,7 @@ main (int argc, char **argv)
for (int i = 0; (file_name = argv_iter (ai, &ai_err)); i++)
{
bool skip_file = false;
- if (files_from && STREQ (files_from, "-") && STREQ (file_name, "-"))
+ if (files_from && streq (files_from, "-") && streq (file_name, "-"))
{
/* Give a better diagnostic in an unusual case:
printf - | wc --files0-from=- */