1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 11:46:37 +02:00

Added two missing files

This commit is contained in:
Adam
2011-08-10 01:34:14 -04:00
parent ded98ed3de
commit 4bdc9824a0
2 changed files with 56 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
/* POSIX emulation layer for Windows.
*
* Copyright (C) 2008-2011 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
#include <windows.h>
#include "sigaction.h"
#include <signal.h>
int sigaction(int sig, struct sigaction *action, struct sigaction *old)
{
if (sig == -1)
return 0;
if (old == NULL)
{
if (signal(sig, SIG_DFL) == SIG_ERR)
return -1;
}
else
{
if (signal(sig, action->sa_handler) == SIG_ERR)
return -1;
}
return 0;
}
+25
View File
@@ -0,0 +1,25 @@
/* POSIX emulation layer for Windows.
*
* Copyright (C) 2008-2011 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
#define sigemptyset(x) memset((x), 0, sizeof(*(x)))
#ifndef SIGHUP
# define SIGHUP -1
#endif
struct sigaction
{
void (*sa_handler)(int);
int sa_flags;
int sa_mask;
};
extern int sigaction(int, struct sigaction *, struct sigaction *);