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

[PATCH] grep.h: Fix compilation error on mingw

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Dec 16, 2011, 22:56 UTC
Message-ID
<4EEBCC96.3010901@ramsay1.demon.co.uk>
In particular, gcc complains as follows:
        CC bisect.o
    In file included from revision.h:5,
                     from bisect.c:4:
    grep.h:138: error: expected '=', ',', ';', 'asm' or \
        '__attribute__' before 'grep_attr_mutex'
    make: *** [bisect.o] Error 1

In order to fix the error, we include the 'thread-utils.h' header file in grep.h, since it provides a definition of pthread_mutex_t (indirectly via compat/win32/pthread.h).

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Thomas,

If you need to re-roll your grep-threading series, could you please squash this patch into your commit 53f4b6f7 (grep: enable threading with -p and -W using lazy attribute lookup, 12-12-2011).

[Note: you could also remove the '#include "thread-utils.h"' in both grep.c and builtin/grep.c, since it is now included from grep.h.]

Thanks!

ATB, Ramsay Jones

 grep.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/grep.h b/grep.h
index 15d227c..b6f06cb 100644
--- a/grep.h
+++ b/grep.h
@@ -8,6 +8,7 @@ typedef int pcre;
 typedef int pcre_extra;
 #endif
 #include "kwset.h"
+#include "thread-utils.h"
 
 enum grep_pat_token {
 	GREP_PATTERN,
-- 
1.7.8
Message 1 of 1 in “grep.h: Fix compilation error on mingw”
  1. grep.h: Fix compilation error on mingwRamsay Jones, Dec 16, 2011

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.