git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH/RFC] SunOS grep does not understand -C<n>

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 24, 2009, 05:30 UTC
Message-ID
<7vr5w6tzq8.fsf@alter.siamese.dyndns.org>

I noticed that the first "grep -C1" test in t7002 does not pass on my SunOS-5.11-i86pc, and that is not because our way to spawn external grep is broken, but because the native grep does not understand -C<n>.

Is it just me and my installation (i.e. I might have failed to install saner grep from the distribution that everybody uses), or everybody on SunOS is using this option himself because our Makefile doesn't do that automatically for them?

Just in case it is the latter, here is a proposed patch.
---
 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index bde27ed..daf4296 100644
--- a/Makefile
+++ b/Makefile
@@ -728,6 +728,7 @@ ifeq ($(uname_S),SunOS)
 	NO_MKDTEMP = YesPlease
 	NO_MKSTEMPS = YesPlease
 	NO_REGEX = YesPlease
+	NO_EXTERNAL_GREP = YesPlease
 	ifeq ($(uname_R),5.7)
 		NEEDS_RESOLV = YesPlease
 		NO_IPV6 = YesPlease
Next: Jeff King
Message 1 of 8 in “SunOS grep does not understand -C<n>”
  1. SunOS grep does not understand -C<n>Junio C Hamano, Jul 24, 2009
  2. Jeff KingJul 24, 2009
  3. Junio C HamanoJul 24, 2009
  4. Jeff KingJul 24, 2009
  5. FreeBSD iconv function signature is "old"Junio C Hamano, Jul 24, 2009
  6. FreeBSD iconv function signature is "old"Junio C Hamano, Dec 26, 2009
  7. Brandon CaseyJul 24, 2009
  8. Junio C HamanoJul 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.