* [PATCH] mkglobals: Fix EOL detection
@ 2015-08-17 7:42 Orgad Shaneh
2015-08-17 7:59 ` Corinna Vinschen
2015-08-17 9:06 ` Corinna Vinschen
0 siblings, 2 replies; 6+ messages in thread
From: Orgad Shaneh @ 2015-08-17 7:42 UTC (permalink / raw)
To: cygwin-patches
When globals.cc has CRLF line endings, winsup.h is not removed, and
compilation fails for duplicate definitions.
---
winsup/cygwin/mkglobals_h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/mkglobals_h b/winsup/cygwin/mkglobals_h
index ea4a582..2d185f2 100755
--- a/winsup/cygwin/mkglobals_h
+++ b/winsup/cygwin/mkglobals_h
@@ -1,6 +1,7 @@
#!/usr/bin/perl
my @argv = @ARGV;
$_ = join('', <>);
+s/\s+\n/\n/sog;
s/\n[^\n]*!globals.h[^\n]*\n/\n/sog;
s%/\*.*?\*/%%sog;
s/(enum\s.*?{.*?})/munge($1)/soge;
@@ -12,7 +13,6 @@ s/^\n+//sog;
s/#include "winsup\.h"\n//so;
s/-NL-/\n/sog;
s/-EQ-/=/sog;
-s/\s+\n/\n/sog;
s/\n{2,}/\n/sog;
print <<PRELUDE,$_;
/* $target - Autogenerated from @argv. Look there for comments. */
--
2.4.6.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mkglobals: Fix EOL detection
2015-08-17 7:42 [PATCH] mkglobals: Fix EOL detection Orgad Shaneh
@ 2015-08-17 7:59 ` Corinna Vinschen
2015-08-17 8:02 ` Orgad Shaneh
2015-08-17 9:06 ` Corinna Vinschen
1 sibling, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2015-08-17 7:59 UTC (permalink / raw)
To: cygwin-patches
[-- Attachment #1: Type: text/plain, Size: 459 bytes --]
On Aug 17 10:41, Orgad Shaneh wrote:
> When globals.cc has CRLF line endings, winsup.h is not removed, and
> compilation fails for duplicate definitions.
Why on earth should globals.h get CRLF line endings? It's stored
with LF line endings in git. There's no reason to convert the file.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mkglobals: Fix EOL detection
2015-08-17 7:59 ` Corinna Vinschen
@ 2015-08-17 8:02 ` Orgad Shaneh
2015-08-17 8:15 ` Corinna Vinschen
0 siblings, 1 reply; 6+ messages in thread
From: Orgad Shaneh @ 2015-08-17 8:02 UTC (permalink / raw)
To: cygwin-patches
On Mon, Aug 17, 2015 at 10:59 AM, Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> On Aug 17 10:41, Orgad Shaneh wrote:
>> When globals.cc has CRLF line endings, winsup.h is not removed, and
>> compilation fails for duplicate definitions.
>
> Why on earth should globals.h get CRLF line endings? It's stored
> with LF line endings in git. There's no reason to convert the file.
globals.h is generated, I guess you refer to globals.cc.
Well, git has a setting named core.autocrlf which converts
line-endings to CRLF on Windows.
This is very commonly used with msysGit and Git for Windows.
If the cygwin repository is cloned with autocrlf set, then all the
source files will have CRLF line endings, including globals.cc...
- Orgad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mkglobals: Fix EOL detection
2015-08-17 8:02 ` Orgad Shaneh
@ 2015-08-17 8:15 ` Corinna Vinschen
2015-08-17 8:21 ` Orgad Shaneh
0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2015-08-17 8:15 UTC (permalink / raw)
To: cygwin-patches
[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]
On Aug 17 11:02, Orgad Shaneh wrote:
> On Mon, Aug 17, 2015 at 10:59 AM, Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
> > On Aug 17 10:41, Orgad Shaneh wrote:
> >> When globals.cc has CRLF line endings, winsup.h is not removed, and
> >> compilation fails for duplicate definitions.
> >
> > Why on earth should globals.h get CRLF line endings? It's stored
> > with LF line endings in git. There's no reason to convert the file.
>
> globals.h is generated, I guess you refer to globals.cc.
>
> Well, git has a setting named core.autocrlf which converts
> line-endings to CRLF on Windows.
>
> This is very commonly used with msysGit and Git for Windows.
>
> If the cygwin repository is cloned with autocrlf set, then all the
> source files will have CRLF line endings, including globals.cc...
You should set core.autocrlf to no in Cygwin's local git config.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mkglobals: Fix EOL detection
2015-08-17 8:15 ` Corinna Vinschen
@ 2015-08-17 8:21 ` Orgad Shaneh
0 siblings, 0 replies; 6+ messages in thread
From: Orgad Shaneh @ 2015-08-17 8:21 UTC (permalink / raw)
To: cygwin-patches
On Mon, Aug 17, 2015 at 11:15 AM, Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> On Aug 17 11:02, Orgad Shaneh wrote:
>> On Mon, Aug 17, 2015 at 10:59 AM, Corinna Vinschen
>> <corinna-cygwin@cygwin.com> wrote:
>> > On Aug 17 10:41, Orgad Shaneh wrote:
>> >> When globals.cc has CRLF line endings, winsup.h is not removed, and
>> >> compilation fails for duplicate definitions.
>> >
>> > Why on earth should globals.h get CRLF line endings? It's stored
>> > with LF line endings in git. There's no reason to convert the file.
>>
>> globals.h is generated, I guess you refer to globals.cc.
>>
>> Well, git has a setting named core.autocrlf which converts
>> line-endings to CRLF on Windows.
>>
>> This is very commonly used with msysGit and Git for Windows.
>>
>> If the cygwin repository is cloned with autocrlf set, then all the
>> source files will have CRLF line endings, including globals.cc...
>
> You should set core.autocrlf to no in Cygwin's local git config.
Well, I don't see that in the FAQ[1].
Is there a reason *not* to accept this patch? It's merely reordering
substitutions...
- Orgad
[1] https://cygwin.com/faq/faq.html#faq.programming.building-cygwin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mkglobals: Fix EOL detection
2015-08-17 7:42 [PATCH] mkglobals: Fix EOL detection Orgad Shaneh
2015-08-17 7:59 ` Corinna Vinschen
@ 2015-08-17 9:06 ` Corinna Vinschen
1 sibling, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2015-08-17 9:06 UTC (permalink / raw)
To: cygwin-patches
[-- Attachment #1: Type: text/plain, Size: 341 bytes --]
On Aug 17 10:41, Orgad Shaneh wrote:
> When globals.cc has CRLF line endings, winsup.h is not removed, and
> compilation fails for duplicate definitions.
Applied.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-17 9:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-17 7:42 [PATCH] mkglobals: Fix EOL detection Orgad Shaneh
2015-08-17 7:59 ` Corinna Vinschen
2015-08-17 8:02 ` Orgad Shaneh
2015-08-17 8:15 ` Corinna Vinschen
2015-08-17 8:21 ` Orgad Shaneh
2015-08-17 9:06 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).