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>2005-03-02 19:13:24 +0300
committerChristopher Faylor <me@cgf.cx>2005-03-02 19:13:24 +0300
commitd0f0ea3034355adfa76b7fe669ad089726a2aded (patch)
treea388ccedc427a2ad261c6b0e3043873ff872b01e
parentd83eb0c7d0c4c58ade045e1ee44a6f5ade83e964 (diff)
* autoload.cc (LoadDLLprime): Mask error code to low-order 16 bits.
(noload): Preserve sign when returning error code.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/autoload.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 2b2f1caea..542479350 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2005-03-02 Christopher Faylor <cgf@timesys.com>
+ * autoload.cc (LoadDLLprime): Mask error code to low-order 16 bits.
+ (noload): Preserve sign when returning error code.
+
+2005-03-02 Christopher Faylor <cgf@timesys.com>
+
* spawn.cc (do_cleanup): Properly restore SIGINT/SIGQUIT even if they
had previously been SIG_DFL.
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index 59c24f7c2..805b765c1 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -89,7 +89,7 @@ _win32_" mangle (name, n) ": \n\
1:movl (2f),%eax \n\
call *(%eax) \n\
2:.long ." #dllname "_info \n\
- .long (" #n "+" #notimp ") | " #err "<<16 \n\
+ .long (" #n "+" #notimp ") | (((" #err ") & 0xffff) <<16) \n\
.asciz \"" #name "\" \n\
.text \n\
");
@@ -128,7 +128,7 @@ noload: \n\
pushl %eax # First argument \n\
call _SetLastError@4 # Set it \n\
popl %eax # Get back argument \n\
- shrl $16,%eax # return value in high order word \n\
+ sarl $16,%eax # return value in high order word \n\
jmp *%edx # Return \n\
1: \n\
movl (%edx),%eax # Handle value \n\