aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-03-01 11:18:33 +0000
committerRon Yorston <rmy@pobox.com>2018-03-01 11:18:33 +0000
commit5f8dac68690e92f0be220f8f8d9f797a2aedc806 (patch)
tree28c1d611ace374f615cac23415b35b2ab54059f4 /include
parent701a8d6783f09597e1c9b386b1e6ba890807854c (diff)
downloadbusybox-w32-5f8dac68690e92f0be220f8f8d9f797a2aedc806.tar.gz
busybox-w32-5f8dac68690e92f0be220f8f8d9f797a2aedc806.tar.bz2
busybox-w32-5f8dac68690e92f0be220f8f8d9f797a2aedc806.zip
Remove fake signal-handling code
Microsoft Windows has only limited support for signals. busybox-w32 initially papered over this fact by adding definitions for unsupported signals and signal-handling functions. Remove this fake code and deal with the consequences by excluding anything that fails to compile as a result.
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h18
-rw-r--r--include/mingw.h28
2 files changed, 18 insertions, 28 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 761370111..4a59ee7d8 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -526,18 +526,36 @@ enum {
526 * Dance around with long long to guard against that... 526 * Dance around with long long to guard against that...
527 */ 527 */
528 BB_FATAL_SIGS = (int)(0 528 BB_FATAL_SIGS = (int)(0
529#ifdef SIGHUP
529 + (1LL << SIGHUP) 530 + (1LL << SIGHUP)
531#endif
530 + (1LL << SIGINT) 532 + (1LL << SIGINT)
531 + (1LL << SIGTERM) 533 + (1LL << SIGTERM)
534#ifdef SIGPIPE
532 + (1LL << SIGPIPE) // Write to pipe with no readers 535 + (1LL << SIGPIPE) // Write to pipe with no readers
536#endif
537#ifdef SIGQUIT
533 + (1LL << SIGQUIT) // Quit from keyboard 538 + (1LL << SIGQUIT) // Quit from keyboard
539#endif
534 + (1LL << SIGABRT) // Abort signal from abort(3) 540 + (1LL << SIGABRT) // Abort signal from abort(3)
541#ifdef SIGALRM
535 + (1LL << SIGALRM) // Timer signal from alarm(2) 542 + (1LL << SIGALRM) // Timer signal from alarm(2)
543#endif
544#ifdef SIGVTALRM
536 + (1LL << SIGVTALRM) // Virtual alarm clock 545 + (1LL << SIGVTALRM) // Virtual alarm clock
546#endif
547#ifdef SIGXCPU
537 + (1LL << SIGXCPU) // CPU time limit exceeded 548 + (1LL << SIGXCPU) // CPU time limit exceeded
549#endif
550#ifdef SIGXFSZ
538 + (1LL << SIGXFSZ) // File size limit exceeded 551 + (1LL << SIGXFSZ) // File size limit exceeded
552#endif
553#ifdef SIGUSR1
539 + (1LL << SIGUSR1) // Yes kids, these are also fatal! 554 + (1LL << SIGUSR1) // Yes kids, these are also fatal!
555#endif
556#ifdef SIGUSR1
540 + (1LL << SIGUSR2) 557 + (1LL << SIGUSR2)
558#endif
541 + 0), 559 + 0),
542}; 560};
543#if !ENABLE_PLATFORM_MINGW32 561#if !ENABLE_PLATFORM_MINGW32
diff --git a/include/mingw.h b/include/mingw.h
index c662f4baf..1bb2032cd 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -90,39 +90,11 @@ IMPL(getpwent,struct passwd *,NULL,void)
90/* 90/*
91 * signal.h 91 * signal.h
92 */ 92 */
93#define SIGHUP 1
94#define SIGQUIT 3
95#define SIGKILL 9 93#define SIGKILL 9
96#define SIGUSR1 10
97#define SIGUSR2 12
98#define SIGPIPE 13
99#define SIGALRM 14
100#define SIGCHLD 17
101#define SIGCONT 18
102#define SIGSTOP 19
103#define SIGTSTP 20
104#define SIGTTIN 21
105#define SIGTTOU 22
106#define SIGXCPU 24
107#define SIGXFSZ 25
108#define SIGVTALRM 26
109#define SIGWINCH 28
110 94
111#define SIG_UNBLOCK 1 95#define SIG_UNBLOCK 1
112 96
113typedef void (__cdecl *sighandler_t)(int);
114struct sigaction {
115 sighandler_t sa_handler;
116 unsigned sa_flags;
117 int sa_mask;
118};
119#define sigemptyset(x) (void)0
120#define SA_RESTART 0
121
122NOIMPL(sigaction,int sig UNUSED_PARAM, struct sigaction *in UNUSED_PARAM, struct sigaction *out UNUSED_PARAM);
123NOIMPL(sigfillset,int *mask UNUSED_PARAM);
124NOIMPL(FAST_FUNC sigprocmask_allsigs, int how UNUSED_PARAM); 97NOIMPL(FAST_FUNC sigprocmask_allsigs, int how UNUSED_PARAM);
125NOIMPL(FAST_FUNC sigaction_set,int signo UNUSED_PARAM, const struct sigaction *sa UNUSED_PARAM);
126 98
127/* 99/*
128 * stdio.h 100 * stdio.h