diff options
author | Christopher Faylor <me@cgf.cx> | 2003-08-21 06:19:25 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-08-21 06:19:25 +0400 |
commit | 0b10f795f1e1bfc48ccd88ce089373881764a83a (patch) | |
tree | c862419961e323279ff128e228922094fedf0d76 /winsup/cygwin/speclib | |
parent | 49703eb3f53c12fb0ac3d12ca0beaddfe581cfd4 (diff) |
* speclib: Fix created lib to avoid "File truncated" problems.
Diffstat (limited to 'winsup/cygwin/speclib')
-rwxr-xr-x | winsup/cygwin/speclib | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib index c686343ad..4a08ab709 100755 --- a/winsup/cygwin/speclib +++ b/winsup/cygwin/speclib @@ -37,3 +37,16 @@ else fi /bin/rm -f $lib $ar crus $lib *.o +export lib; +perl -pi.bak -- - $lib << 'EOF' +BEGIN { + binmode STDIN; + binmode STDOUT; + $lib = ($ENV{lib} =~ m!/([^/]+)$!o)[0] || $ENV{lib}; + $lib =~ s/\.a//o; + my $pad = length('cygwin1_dll') - length($lib); + die "speclib: library name too long (" . length($lib) . ")\n" if $pad < 0; + $lib = "__head_$lib" . "\0" x $pad; +} + s/__head_cygwin1_dll/$lib/g; +'EOF' |