Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-07-27 20:16:51 +0400
committerChristopher Faylor <me@cgf.cx>2005-07-27 20:16:51 +0400
commitefc7accc9dc187bc6dab9db6a08f8d5d1641d21f (patch)
tree61ebed77ac9e2c39601aed79e5a91c01e7def313 /winsup/cygwin/gendef
parenta3c024d6ea4e67a72f03490ba937024b4f960f41 (diff)
* gendef: Use nocr to remove \r's from input. gendef (nocr): New function.
Diffstat (limited to 'winsup/cygwin/gendef')
-rwxr-xr-xwinsup/cygwin/gendef11
1 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef
index 83e9e1245..9d8a211e6 100755
--- a/winsup/cygwin/gendef
+++ b/winsup/cygwin/gendef
@@ -1,5 +1,6 @@
#!/usr/bin/perl
use strict;
+sub nocr(@);
my $in = shift;
my $tls_offsets = shift;
my $out = shift;
@@ -15,11 +16,11 @@ require $tls_offsets;
open(IN, $in) or die "$0: couldn't open \"$in\" - $!\n";
my @top = ();
while (<IN>) {
- push(@top, $_);
+ push(@top, nocr $_);
last if /^\s*exports\s*$/i;
}
-my $libline = <IN>;
-my @in = <IN>;
+my $libline = nocr scalar(<IN>);
+my @in = nocr <IN>;
close(IN);
my %sigfe = ();
@@ -349,3 +350,7 @@ _longjmp:
ret
EOF
}
+
+sub nocr(@) {
+ map {s/\r//g; $_} @_;
+}