public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* [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

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).