[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MS-Windows build of Grep [2/4]
From: |
Jim Meyering |
Subject: |
Re: MS-Windows build of Grep [2/4] |
Date: |
Fri, 30 Dec 2011 22:06:33 +0100 |
Paul Eggert wrote:
> On 12/30/11 02:39, Paolo Bonzini wrote:
>> It can go
>> in lib/ rather than src/, but I disagree about splitting it in POSIX
>> and Windows files as long as the code for Windows is a superset of the
>> POSIX code.
>
> It's not a superset, e.g., the Windows code disagrees with the POSIX code
> if there is no TERM variable in the environment. But I'm not sure I
> would agree even if it were a strict superset. If there's sufficient
> clutter from a Windows port in the code, the clutter should be moved into
> a Windows-specific porting layer, even if the clutter merely adds to
> the mainline code.
>
> Anyway, the mild preference seems to be to make this more of a library
> and to put it under lib/* rather than src/*, so here's a revised patch
> to do that. Unlike the previous patch, it creates an interface file
> colorize.h and separates that from the implementation in colorize-impl.c,
> as this has more of a library feel. As before, I've tested this only
> under POSIX.
>
> This whole colorization business is a mess anyway. It mishandles
> signals, for one thing. All I'm trying to do here is to avoid having it
> be even messier with the new Microsoft support.
Oh, there were two more syntax-check failures:
lib/colorize.c
0.27 const_long_option
maint.mk: the above files include some other header before <config.h>
make: *** [sc_require_config_h_first] Error 1
Here's one way to fix them:
diff --git a/cfg.mk b/cfg.mk
index d7cb9c4..ae310cc 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -67,3 +67,6 @@ exclude_file_name_regexp--sc_prohibit_xalloc_without_use =
^src/kwset\.c$$
exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
(Makefile|\.(am|mk)$$|^gl/lib/.*\.c\.diff$$)
exclude_file_name_regexp--sc_space_tab = ^gl/lib/.*\.c\.diff$$
+
+exclude_file_name_regexp--sc_require_config_h = ^lib/colorize\.c$$
+exclude_file_name_regexp--sc_require_config_h_first = ^lib/colorize\.c$$
- Re: MS-Windows build of Grep [2/4], (continued)
- Re: MS-Windows build of Grep [2/4], Paul Eggert, 2011/12/29
- Re: MS-Windows build of Grep [2/4], Paolo Bonzini, 2011/12/29
- Re: MS-Windows build of Grep [2/4], Paul Eggert, 2011/12/29
- Re: MS-Windows build of Grep [2/4], Jim Meyering, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Paolo Bonzini, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Paul Eggert, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Paolo Bonzini, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Jim Meyering, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Paul Eggert, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Jim Meyering, 2011/12/30
- Re: MS-Windows build of Grep [2/4],
Jim Meyering <=
- Re: MS-Windows build of Grep [2/4], Jim Meyering, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Eli Zaretskii, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Jim Meyering, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Eli Zaretskii, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Jim Meyering, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Eli Zaretskii, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Jim Meyering, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Paul Eggert, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Paul Eggert, 2011/12/30
- Re: MS-Windows build of Grep [2/4], Eli Zaretskii, 2011/12/31