65816-llvm-mos/runtime/include/signal.h
Scott Duensing d6a34075a5 Checkpoint
2026-05-01 20:24:30 -05:00

27 lines
699 B
C

// Minimal signal.h for the W65816 runtime. No real signal handling
// — IIgs has no concept of POSIX signals. signal() always returns
// SIG_ERR; raise() always returns -1. These exist so portable code
// (e.g. asserts that map abort() through raise(SIGABRT)) compiles.
#ifndef _SIGNAL_H
#define _SIGNAL_H
typedef int sig_atomic_t;
typedef void (*__sighandler_t)(int);
#define SIG_DFL ((__sighandler_t)0)
#define SIG_IGN ((__sighandler_t)1)
#define SIG_ERR ((__sighandler_t)-1)
#define SIGINT 2
#define SIGILL 4
#define SIGABRT 6
#define SIGFPE 8
#define SIGSEGV 11
#define SIGTERM 15
__sighandler_t signal(int sig, __sighandler_t handler);
int raise(int sig);
#endif