#include <signal.h>
#include <stdlib.h>
-#ifdef __unix__
-#include <sys/param.h>
-#endif
-
#include "lua.h"
#include "lauxlib.h"
static void sighook(lua_State *L, lua_Debug *ar)
{
+ struct signal_event *event;
/* restore the old hook */
lua_sethook(L, Hsig, Hmask, Hcount);
lua_pushstring(L, LUA_SIGNAL);
lua_gettable(L, LUA_REGISTRYINDEX);
- struct signal_event *event;
while((event = signal_queue))
{
lua_pushnumber(L, event->Nsig);
return 1;
}
-#ifdef __unix__
+#if defined(__unix__) || defined(__APPLE__)
/* define some posix only functions */
static const struct luaL_Reg lsignal_lib[] = {
{"signal", l_signal},
{"raise", l_raise},
-#ifdef __unix__
+#if defined(__unix__) || defined(__APPLE__)
{"kill", l_kill},
#endif
{NULL, NULL}