[newlib-cygwin] mkglobals_h: Handle CRLF earlier.

Corinna Vinschen corinna@sourceware.org
Mon Aug 17 09:06:00 GMT 2015


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ede983934cd75d8149e9fcd1b8419c1db6ada1fa

commit ede983934cd75d8149e9fcd1b8419c1db6ada1fa
Author: Orgad Shaneh <orgads@gmail.com>
Date:   Mon Aug 17 11:05:20 2015 +0200

    mkglobals_h: Handle CRLF earlier.
    
    	When globals.cc has CRLF line endings, winsup.h is not removed, and
    	compilation fails for duplicate definitions.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/ChangeLog   | 4 ++++
 winsup/cygwin/mkglobals_h | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 3a2f981..03a850a 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2015-08-17  Orgad Shaneh  <orgads@gmail.com>
+
+	* mkglobals_h: Handle CRLF earlier.
+
 2015-08-17  Corinna Vinschen  <corinna@vinschen.de>
 
 	* fhandler_proc.cc (format_proc_cpuinfo): Print cpb and eff_freq_ro
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. */



More information about the Cygwin-cvs mailing list