aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/speclib
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-04-12 05:11:08 +0000
committerChristopher Faylor <me@cgf.cx>2009-04-12 05:11:08 +0000
commit73bd57524a80a46826a5a71e1b34305df7471e09 (patch)
treec091b486086899d71733433a5bbe3f674815c642 /winsup/cygwin/speclib
parentd129941aefc7860b9bd0b6f1e464c96b3374914a (diff)
downloadnewlib-73bd57524a80a46826a5a71e1b34305df7471e09.zip
newlib-73bd57524a80a46826a5a71e1b34305df7471e09.tar.gz
newlib-73bd57524a80a46826a5a71e1b34305df7471e09.tar.bz2
* speclib: Initial stab at cleaning up temp files. More work needed.
* mkimport: Ditto.
Diffstat (limited to 'winsup/cygwin/speclib')
-rwxr-xr-xwinsup/cygwin/speclib9
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib
index 80ef233..8074408 100755
--- a/winsup/cygwin/speclib
+++ b/winsup/cygwin/speclib
@@ -1,6 +1,6 @@
#!/usr/bin/perl
use Getopt::Long;
-use File::Temp qw'tempdir';
+use File::Temp;
use File::Basename;
use File::Spec;
use strict;
@@ -43,11 +43,14 @@ close $nm_fd;
%extract or die "$0: couldn't find symbols for $lib\n";
-my $dir = tempdir(CLEANUP => 1);
+my $dir = File::Temp->newdir();
chdir $dir;
# print join(' ', '+', $ar, 'x', sort keys %extract), "\n";
my $res = system $ar, 'x', $libdll, sort keys %extract;
die "$0: $ar extraction exited with non-zero status\n" if $res;
unlink $lib;
-exec $ar, 'crus', $lib, sort keys %extract;
+$res = system $ar, 'crus', $lib, sort keys %extract;
+unlink keys %extract;
+die "$0: ar creation of $lib exited with non-zero status\n" if $res;
+exit 0;