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>2002-09-30 08:26:52 +0400
committerChristopher Faylor <me@cgf.cx>2002-09-30 08:26:52 +0400
commite7733defb9f32df605532b6dfa028f96810a3447 (patch)
tree0695b95baaed754930f6b7c47c9f28959602b61a
parentf789fbbf355ef6fcec036806fed6948b47d04320 (diff)
* exceptions.cc (unused_sig_wrapper): Accommodate newer compilers.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/exceptions.cc13
-rw-r--r--winsup/cygwin/thread.cc2
3 files changed, 14 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 1ca8c9394..8d8614452 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2002-09-30 Christopher Faylor <cgf@redhat.com>
+
+ * exceptions.cc (unused_sig_wrapper): Accommodate newer compilers.
+
2002-09-29 Christopher Faylor <cgf@redhat.com>
* security.cc (allow_ntsec): Default to zero.
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index a1d7019fe..54c5d59e0 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1178,7 +1178,13 @@ reset_signal_arrived ()
sigproc_printf ("reset signal_arrived");
}
-void unused_sig_wrapper ()
+static void unused_sig_wrapper () __attribute__((const, unused));
+
+#undef errno
+#define errno ((DWORD volatile) _impure_ptr) + (((char *) &_impure_ptr->_errno) - ((char *) _impure_ptr))
+
+static void
+unused_sig_wrapper ()
{
/* Signal cleanup stuff. Cleans up stack (too bad that we didn't
prototype signal handlers as __stdcall), calls _set_process_mask
@@ -1199,8 +1205,7 @@ _sigreturn: \n\
1: popl %%eax # saved errno \n\
testl %%eax,%%eax # Is it < 0 \n\
jl 2f # yup. ignore it \n\
- movl %1,%%ebx \n\
- movl %%eax,(%%ebx) \n\
+ movl %%eax,%1 \n\
2: popl %%eax \n\
popl %%ebx \n\
popl %%ecx \n\
@@ -1240,7 +1245,7 @@ _sigdelayed0: \n\
popl %%eax \n\
jmp *%%eax \n\
__no_sig_end: \n\
-" : "=m" (sigsave.sig) : "m" (&_impure_ptr->_errno),
+" : "=m" (sigsave.sig): "X" (errno),
"g" (sigsave.retaddr), "g" (sigsave.oldmask), "g" (sigsave.sig),
"g" (sigsave.func), "g" (sigsave.saved_errno), "g" (sigsave.newmask)
);
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 0f27ef3d4..6411cdbd6 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -2225,7 +2225,7 @@ pthread_mutex::init (pthread_mutex_t *mutex,
DWORD waitResult = WaitForSingleObject (mutexInitializationLock, INFINITE);
if (waitResult != WAIT_OBJECT_0)
{
- system_printf ("Received a unexpected wait result on mutexInitializationLock %d\n", waitResult);
+ system_printf ("Received a unexpected wait result on mutexInitializationLock %d, %E\n", waitResult);
return EINVAL;
}