ntdll: use SIGSTKSZ in sigaltstack instead of depending on size_t

Austin English austinenglish at gmail.com
Sun Feb 28 19:04:49 CST 2010


OpenBSD complains about this, giving 'sigaltstack: invalid argument'
on every run (4 times). This cuts out 3 of them. Still chasing down
the last one...

Tested on Linux as well, and google seems to indicate this should work
on the BSD's and Solaris, so should be pretty portable.

If an #ifdef is preferred, please let me know and I'll resend.

-- 
-Austin
-------------- next part --------------
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 4eccb61..6503ea3 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -2128,7 +2128,7 @@ void signal_init_thread( TEB *teb )
 #endif
 
     ss.ss_sp    = (char *)teb + teb_size;
-    ss.ss_size  = signal_stack_size;
+    ss.ss_size = SIGSTKSZ;
     ss.ss_flags = 0;
     if (sigaltstack(&ss, NULL) == -1) perror( "sigaltstack" );
 
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 45cdb32..02a6f99 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -2274,7 +2274,7 @@ void signal_init_thread( TEB *teb )
 #endif
 
     ss.ss_sp    = (char *)teb + teb_size;
-    ss.ss_size  = signal_stack_size;
+    ss.ss_size  = SIGSTKSZ;
     ss.ss_flags = 0;
     if (sigaltstack(&ss, NULL) == -1) perror( "sigaltstack" );
 }


More information about the wine-patches mailing list