]> sourceware.org Git - newlib-cygwin.git/commitdiff
* autoload.cc (LoadDLLprime): Mask error code to low-order 16 bits.
authorChristopher Faylor <me@cgf.cx>
Wed, 2 Mar 2005 16:13:24 +0000 (16:13 +0000)
committerChristopher Faylor <me@cgf.cx>
Wed, 2 Mar 2005 16:13:24 +0000 (16:13 +0000)
(noload): Preserve sign when returning error code.

winsup/cygwin/ChangeLog
winsup/cygwin/autoload.cc

index 2b2f1caea8c5c980eb79e5b6f9bd1c59274d4ef7..5424793500a4848fe9b9d39062b066476cd9d8a7 100644 (file)
@@ -1,3 +1,8 @@
+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
index 59c24f7c29bf86d04614d77cbdfd48108a4a8698..805b765c1bd2bc35581f718683f63dfa56de4eaf 100644 (file)
@@ -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\
This page took 0.035761 seconds and 5 git commands to generate.