ReactOS
0.4.16-dev-125-g798ea90
main.c
Go to the documentation of this file.
1
#define _sio_main_c_
2
#include "
syshdrs.h
"
3
4
int
gLibSio_Uses_Me_To_Quiet_Variable_Unused_Warnings
= 0;
5
6
#ifndef NO_SIGNALS
7
8
volatile
Sjmp_buf
gNetTimeoutJmp;
9
volatile
Sjmp_buf
gPipeJmp;
10
11
void
12
SIOHandler
(
int
sigNum)
13
{
14
if
(sigNum ==
SIGPIPE
)
15
SLongjmp
(gPipeJmp, 1);
16
SLongjmp
(gNetTimeoutJmp, 1);
17
}
/* SIOHandler */
18
19
20
21
22
void
(*
SSignal
(
int
signum,
void
(*
handler
)(
int
)))(
int
)
23
{
24
#ifdef HAVE_SIGACTION
25
struct
sigaction
sa
, osa;
26
27
(
void
) sigemptyset(&
sa
.sa_mask);
28
sa
.sa_flags = 0;
29
sa
.sa_handler =
handler
;
30
if
(signum == SIGALRM) {
31
#ifdef SA_INTERRUPT
32
sa
.sa_flags |= SA_INTERRUPT;
33
#endif
34
}
else
{
35
#ifdef SA_RESTART
36
sa
.sa_flags |= SA_RESTART;
37
#endif
38
}
39
if
(sigaction(signum, &
sa
, &osa) < 0)
40
return
(
SIG_ERR
);
41
return
(osa.sa_handler);
42
#else
43
return
SSignal
(signum,
handler
);
44
#endif
/* HAVE_SIGACTION */
45
}
46
47
#endif
/* NO_SIGNALS */
48
49
/* eof main.c */
sa
static struct sockaddr_in sa
Definition:
adnsresfilter.c:69
SIG_ERR
#define SIG_ERR
Definition:
signal.h:52
SIGPIPE
#define SIGPIPE
Definition:
signal.h:35
handler
UINT(* handler)(MSIPACKAGE *)
Definition:
action.c:7512
int
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition:
typeof.h:31
void
Definition:
nsiface.idl:2307
gLibSio_Uses_Me_To_Quiet_Variable_Unused_Warnings
int gLibSio_Uses_Me_To_Quiet_Variable_Unused_Warnings
Definition:
main.c:4
SIOHandler
void SIOHandler(int)
SSignal
void(*)(int) SSignal(int signum, void(*handler)(int))
Definition:
sio.h:237
SLongjmp
#define SLongjmp(a, b)
Definition:
sio.h:40
Sjmp_buf
#define Sjmp_buf
Definition:
sio.h:41
syshdrs.h
modules
rosapps
applications
net
ncftp
sio
main.c
Generated on Mon Oct 14 2024 06:14:58 for ReactOS by
1.9.6