aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-08-15 17:29:58 +0000
committerChristopher Faylor <me@cgf.cx>2012-08-15 17:29:58 +0000
commit588b40e260f180d02c91132821856c12c83fddc2 (patch)
tree48b80e6e2f575ebddb74fa15eabc2f8aec1e0a7c
parent042759864145e9239b8d6869e549703cadaf0226 (diff)
downloadnewlib-588b40e260f180d02c91132821856c12c83fddc2.zip
newlib-588b40e260f180d02c91132821856c12c83fddc2.tar.gz
newlib-588b40e260f180d02c91132821856c12c83fddc2.tar.bz2
* gendef: Tighten up whitespace detection.
-rw-r--r--winsup/cygwin/ChangeLog4
-rwxr-xr-xwinsup/cygwin/gendef8
2 files changed, 8 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 782e84c..b2ea1a0 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2012-08-15 Christopher Faylor <me.cygwin2012@cgf.cx>
+ * gendef: Tighten up whitespace detection.
+
+2012-08-15 Christopher Faylor <me.cygwin2012@cgf.cx>
+
* gendef: Delete unneeded read from <IN> which ate an arbitrary line
from cygwin.din.
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef
index 64d2491..1e2d117 100755
--- a/winsup/cygwin/gendef
+++ b/winsup/cygwin/gendef
@@ -26,7 +26,7 @@ open(IN, $in) or die "$0: couldn't open \"$in\" - $!\n";
my @top = ();
while (<IN>) {
push(@top, cleanup $_);
- last if /^\s*exports\s*$/i;
+ last if /^\s*exports$/i;
}
my @in = cleanup <IN>;
close(IN);
@@ -37,14 +37,14 @@ my @nosigfuncs = ();
my @text = ();
for (@in) {
chomp;
- s/\sDATA$//o and do {
+ s/\s+DATA$//o and do {
push @data, $_;
next;
};
if (/=/o) {
if (s/\s+NOSIGFE\s*$//) {
# nothing
- } elsif (s/ SIGFE(_MAYBE)?$//) {
+ } elsif (s/\s+SIGFE(_MAYBE)?$//) {
my $func = (split(' '))[2];
my $maybe = lc $1 . '_';
$sigfe{$func} = '_sigfe' . $maybe . $func;
@@ -67,7 +67,7 @@ for (@in) {
}
for (@text) {
- my ($alias, $func) = /^(\S+) = (\S+)\s*$/o;
+ my ($alias, $func) = /^(\S+)\s+=\s+(\S+)\s*$/o;
$_ = $alias . ' = ' . $sigfe{$func}
if defined($func) && $sigfe{$func};
}