You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/09/13 09:40:08 UTC

svn commit: r814276 - in /commons/sandbox/runtime/trunk/src/main/native/include: acr_error.h arch/windows/acr_arch.h

Author: mturk
Date: Sun Sep 13 07:40:08 2009
New Revision: 814276

URL: http://svn.apache.org/viewvc?rev=814276&view=rev
Log:
Suppress warnings

Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/acr_error.h
    commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch.h

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_error.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_error.h?rev=814276&r1=814275&r2=814276&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_error.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_error.h Sun Sep 13 07:40:08 2009
@@ -72,6 +72,7 @@
 #if HAVE_UCONTEXT_H
 #include <ucontext.h>
 #endif
+typedef void (_seh_handler_t)(int);
 #if HAVE_SIGSETJMP
 #define SEH_SETJMP(E)        sigsetjmp((E), 1)
 #define SEH_DOJUMP(E, V)     siglongjmp((E), (V))
@@ -91,8 +92,8 @@
     int _seh_error = 0;                                                       \
     {                                                                         \
     acr_thread_local_t *_tlsd = ACR_TLSD();                                   \
-    void* _org_sigseg_handler = signal(SIGSEGV, _seh_handler);                \
-    void* _org_sigbus_handler = signal(SIGBUS,  _seh_handler);                \
+    _seh_handler_t* _org_sigseg_handler = signal(SIGSEGV, _seh_handler);      \
+    _seh_handler_t* _org_sigbus_handler = signal(SIGBUS,  _seh_handler);      \
     if (_tlsd && (_seh_error = SEH_SETJMP(_tlsd->seh_jump)))                  \
             goto _seh_catch_block;
 

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch.h?rev=814276&r1=814275&r2=814276&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch.h Sun Sep 13 07:40:08 2009
@@ -424,16 +424,29 @@
 #define SIGUSR2     31  /* user defined signal 2 */
 
 /*
+ * Although defined ony for __cplusplus we use it anyhow
+ */
+typedef void (SIG_FUNC_TYP)(int);
+typedef SIG_FUNC_TYP *SIG_TYP;
+#define SIG_PF        SIG_TYP
+
+/*
  * Language spec says we must list exactly one parameter, even though we
  * actually supply three.  Ugh!
  */
-#define SIG_DFL     (void (*)(int))0    /* default signal action */
-#define SIG_IGN     (void (*)(int))1    /* igore signal          */
-#define SIG_GET     (void (*)(int))2    /* return current value  */
-#define SIG_SGE     (void (*)(int))4    /* signal gets error     */
-#define SIG_ACK     (void (*)(int))5    /* acknowledge           */
+#define SIG_DFL     (SIG_PF)0    /* default signal action */
+#define SIG_ERR     (SIG_PF)-1
+#define SIG_IGN     (SIG_PF)1    /* igore signal          */
+#define SIG_GET     (SIG_PF)2    /* return current value  */
+#define SIG_SGE     (SIG_PF)4    /* signal gets error     */
+#define SIG_ACK     (SIG_PF)5    /* acknowledge           */
 
 #define sigmask(S)  (1 << ((S) - 1))
+#define SIG_BLOCK   1
+#define SIG_UNBLOCK 2
+#define SIG_SETMASK 3
+
+
 /*
  * ---------------------------------------------------------------------
  * end   of POSIX utilities