This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] mkglobals: Fix EOL detection


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]