summaryrefslogtreecommitdiff
path: root/wm/wm2/patches/patch-ac
blob: 9ef65f1ba825f35c3055c0a090d00875960432a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-ac,v 1.4 2005/12/06 16:23:15 joerg Exp $

--- General.h.orig	1997-03-21 12:12:30.000000000 +0100
+++ General.h
@@ -10,7 +10,9 @@
 #undef _POSIX_SOURCE
 #endif
 
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
 #define _POSIX_SOURCE 1
+#endif
 
 #include <stdio.h>
 #include <signal.h>
@@ -32,9 +34,10 @@ typedef char Boolean;
 #define NewString(x) (strcpy((char *)malloc(strlen(x)+1),(x)))
 
 #ifndef SIGNAL_CALLBACK_TYPE
-#define SIGNAL_CALLBACK_TYPE (void (*)(...))
+#define SIGNAL_CALLBACK_TYPE (void (*)(int sig))
 #endif
 
+#if defined(SA_SIGINFO)
 #define signal(x,y)     \
   do { \
     struct sigaction sAct; \
@@ -43,6 +46,7 @@ typedef char Boolean;
     sAct.sa_handler = (SIGNAL_CALLBACK_TYPE(y)); \
     (void)sigaction((x), &sAct, NULL); \
   } while (0)
+#endif
 
 #include "Config.h"