From 588b40e260f180d02c91132821856c12c83fddc2 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 15 Aug 2012 17:29:58 +0000 Subject: [PATCH] * gendef: Tighten up whitespace detection. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/gendef | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 782e84c02..b2ea1a0f6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2012-08-15 Christopher Faylor + + * gendef: Tighten up whitespace detection. + 2012-08-15 Christopher Faylor * gendef: Delete unneeded read from which ate an arbitrary line diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef index 64d24913e..1e2d117c7 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 () { push(@top, cleanup $_); - last if /^\s*exports\s*$/i; + last if /^\s*exports$/i; } my @in = cleanup ; 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}; }