Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-02-11 21:00:55 +0300
committerChristopher Faylor <me@cgf.cx>2011-02-11 21:00:55 +0300
commit98525461c875ab0808b7bfa4787d13ee2d413c40 (patch)
treed6d3252fd60f35119ee3cfd5e31b6b8698fd8f89
parent0ff9e2473f90cb63ba8b196c7447e57686b967d2 (diff)
* mkstatic: Make sure that we are not cd'ed to temporary directory on exit to
avoid bogus warnings on directory cleanup. * speclib: Ditto. * mkimport: Ditto.
-rw-r--r--winsup/cygwin/ChangeLog7
-rwxr-xr-xwinsup/cygwin/mkimport5
-rwxr-xr-xwinsup/cygwin/mkstatic6
-rwxr-xr-xwinsup/cygwin/speclib4
4 files changed, 20 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a255a9ba1..ba0f2227e 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
+ * mkstatic: Make sure that we are not cd'ed to temporary directory on
+ exit to avoid bogus warnings on directory cleanup.
+ * speclib: Ditto.
+ * mkimport: Ditto.
+
+2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
+
* cygwin.sc: Eliminate __cygheap_mid.
* cygheap.cc: Ditto.
diff --git a/winsup/cygwin/mkimport b/winsup/cygwin/mkimport
index 70c81048f..1dfcab3f4 100755
--- a/winsup/cygwin/mkimport
+++ b/winsup/cygwin/mkimport
@@ -80,5 +80,8 @@ for my $f (keys %text) {
unlink $libdll;
system $ar, 'crus', $libdll, glob('*.o'), @ARGV;
unlink glob('*.o');
-chdir '/tmp'; # Allow $dir directory removal on Windows
exit 1 if $?;
+
+END {
+ chdir '/tmp'; # Allow $dir directory removal on Windows
+}
diff --git a/winsup/cygwin/mkstatic b/winsup/cygwin/mkstatic
index b7a81b0ad..1a488f80c 100755
--- a/winsup/cygwin/mkstatic
+++ b/winsup/cygwin/mkstatic
@@ -55,5 +55,9 @@ exit 0;
sub xsystem(@) {
print join(' ', 'x', @_), "\n" if $x;
- system(@_) == 0 or die "$0: @_[0] $_[1] $_[2]... exited with non-zero status\n";
+ system(@_) == 0 or die "$0: $_[0] $_[1] $_[2]... exited with non-zero status\n";
+}
+
+END {
+ chdir '/tmp'; # Allow $dir directory removal on Windows
}
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib
index 7ac4d1cff..7bac7eac4 100755
--- a/winsup/cygwin/speclib
+++ b/winsup/cygwin/speclib
@@ -76,3 +76,7 @@ $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;
+
+END {
+ chdir '/tmp'; # Allow $dir directory removal on Windows
+}