Changeset

3274:366ac5e47096

util.signal: Make kill() available on OpenBSD, NetBSD (thanks Florob, filip).
author Waqas Hussain <waqas20@gmail.com>
date Tue, 15 Jun 2010 16:57:15 +0500
parents 3273:e9f5489ed2fe
children 3275:05c1d8269043
files util-src/signal.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/util-src/signal.c	Tue Jun 15 09:59:26 2010 +0500
+++ b/util-src/signal.c	Tue Jun 15 16:57:15 2010 +0500
@@ -29,6 +29,10 @@
 #include <signal.h>
 #include <stdlib.h>
 
+#ifdef __unix__
+#include <sys/param.h>
+#endif
+
 #include "lua.h"
 #include "lauxlib.h"
 
@@ -326,7 +330,7 @@
   return 1;
 }
 
-#if defined _POSIX_SOURCE || (defined(sun) || defined(__sun))
+#ifdef __unix__
 
 /* define some posix only functions */
 
@@ -373,7 +377,7 @@
 static const struct luaL_Reg lsignal_lib[] = {
   {"signal", l_signal},
   {"raise", l_raise},
-#if defined _POSIX_SOURCE || (defined(sun) || defined(__sun))
+#ifdef __unix__
   {"kill", l_kill},
 #endif
   {NULL, NULL}