File: sig_action.h

package info (click to toggle)
ngetty 1.1-3.1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 392 kB
  • sloc: ansic: 1,588; makefile: 206; sh: 193; asm: 100
file content (34 lines) | stat: -rw-r--r-- 686 bytes parent folder | download | duplicates (2)
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
#include <signal.h>

#ifdef NGETTY_TINY
#if defined(__linux__) && defined(__dietlibc__)

#ifdef NGETTY_i386
extern int system__errno;
#define errno system__errno
#endif

#if defined(__i386__) || defined(__x86_64__)

#ifndef _NSIG_WORDS
#define _NSIG_WORDS (_NSIG / (8 * sizeof(unsigned long)))
#endif

#define sigemptyset(set) \
do { \
  set->sig[0]=0; \
  if (_NSIG_WORDS>1) set->sig[1]=0; \
  if (_NSIG_WORDS>2) { \
    set->sig[2]=0; \
    set->sig[3]=0; \
  } \
} while(0)

int __rt_sigaction(int signum, const struct sigaction *act, struct sigaction *oldact, long nr);

#define sigaction(signum, act, oldact) \
   __rt_sigaction(signum, act, oldact, _NSIG/8)

#endif
#endif
#endif