GNU bug report logs - #34285
grep.c should #include <strings.h>

Previous Next

Package: grep;

Reported by: DAVID MONNIAUX <david.monniaux <at> univ-grenoble-alpes.fr>

Date: Sat, 2 Feb 2019 09:10:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34285 in the body.
You can then email your comments to 34285 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#34285; Package grep. (Sat, 02 Feb 2019 09:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to DAVID MONNIAUX <david.monniaux <at> univ-grenoble-alpes.fr>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Sat, 02 Feb 2019 09:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: DAVID MONNIAUX <david.monniaux <at> univ-grenoble-alpes.fr>
To: bug-grep <at> gnu.org
Subject: grep.c should #include <strings.h>
Date: Sat, 2 Feb 2019 10:08:55 +0100 (CET)
[Message part 1 (text/plain, inline)]
grep.c should #include <strings.h> because it uses strcasecmp, and POSIX says it is declared in <strings.h> 

Not doing so results in a warning about an undeclared function on some systems (including Kalray k1c), thus possibly in incorrect code being generated. 


Directeur de recherche au CNRS, laboratoire VERIMAG, équipe PACSS 
http://www-verimag.imag.fr/~monniaux/ 
[Message part 2 (text/html, inline)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sun, 03 Feb 2019 06:49:01 GMT) Full text and rfc822 format available.

Notification sent to DAVID MONNIAUX <david.monniaux <at> univ-grenoble-alpes.fr>:
bug acknowledged by developer. (Sun, 03 Feb 2019 06:49:02 GMT) Full text and rfc822 format available.

Message #10 received at 34285-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: DAVID MONNIAUX <david.monniaux <at> univ-grenoble-alpes.fr>,
 34285-done <at> debbugs.gnu.org
Subject: Re: bug#34285: grep.c should #include <strings.h>
Date: Sat, 2 Feb 2019 22:48:47 -0800
[Message part 1 (text/plain, inline)]
DAVID MONNIAUX wrote:
> grep.c should #include <strings.h> because it uses strcasecmp, and POSIX says it is declared in <strings.h>

Thanks for reporting that. I fixed it as part of installing the attached patches.
[0001-build-update-gnulib-submodule-to-latest.patch (text/x-patch, attachment)]
[0002-grep-fix-grep.c-includes.patch (text/x-patch, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#34285; Package grep. (Sun, 03 Feb 2019 19:51:01 GMT) Full text and rfc822 format available.

Message #13 received at 34285 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: DAVID MONNIAUX <david.monniaux <at> univ-grenoble-alpes.fr>,
 34285 <at> debbugs.gnu.org
Subject: Re: bug#34285: grep.c should #include <strings.h>
Date: Sun, 3 Feb 2019 11:50:31 -0800
[Message part 1 (text/plain, inline)]
Paul Eggert wrote:
> I fixed it as part of installing the attached patches.

Come to think of it, grep shouldn't call strcasecmp here. It should call 
c_strcasecmp instead because the matching should be locale-independent. So I 
installed the attached further patch and there is no longer a need to include 
strings.h even on non-GNU platforms.

[0001-grep-parse-color-arg-independent-of-locale.patch (text/x-patch, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 04 Mar 2019 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 54 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.