diff options
author | Christopher Faylor <me@cgf.cx> | 2009-04-10 01:02:53 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2009-04-10 01:02:53 +0400 |
commit | 59328e28c4a925d81c95c72002ba2d6118aa28d6 (patch) | |
tree | b67c9cd6b3d6f72c10e688fb38992ae090a3e367 /winsup/cygwin/gendef | |
parent | 0c4023011d7dff1c67ff26e0919b3c6cf82b62ad (diff) |
* speclib: Semi-revert to previous version but don't try to generate
well-formed import library. Instead, just extract appropriate symbols and let
later libcygwin.a on link line fill in the rest of the import stuff.
* gendef: Hopefully no-op modification to allow easier post-processing on
symbol values.
Diffstat (limited to 'winsup/cygwin/gendef')
-rwxr-xr-x | winsup/cygwin/gendef | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef index d2f454362..7c17a11ee 100755 --- a/winsup/cygwin/gendef +++ b/winsup/cygwin/gendef @@ -34,13 +34,13 @@ close(IN); my %sigfe = (); my @data = (); my @nosigfuncs = (); -my @out = (); +my @text = (); for (@in) { - /\sDATA$/o and do { - push(@data, $_); + chomp; + s/\sDATA$//o and do { + push @data, $_; next; }; - chomp; if (/=/o) { if (s/\s+NOSIGFE\s*$//) { # nothing @@ -63,16 +63,18 @@ for (@in) { s/(\S)\s+(\S)/$1 $2/go; s/(\S)\s+$/$1/o; s/^\s+(\S)/$1/o; - push(@out, $_ . "\n"); + push @text, $_; } -for (@out) { +for (@text) { my ($alias, $func) = /^(\S+) = (\S+)\s*$/o; - $_ = $alias . ' = ' . $sigfe{$func} . "\n" + $_ = $alias . ' = ' . $sigfe{$func} if defined($func) && $sigfe{$func}; } + open(OUT, '>', $out) or die "$0: couldn't open \"$out\" - $!\n"; -print OUT @top, @data, @out; +push @top, (map {$_ . " DATA\n"} @data), (map {$_ . "\n"} @text); +print OUT @top; close OUT; open(SIGFE, '>', $sigfe) or die "$0: couldn't open sigfe file \"$sigfe\" - $!\n"; |