From 9a6994b490379074f546c395cb6d232cb1501348 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 18 Jun 1998 15:22:35 +0000 Subject: Added freebsd support from Dario Alcocer . --- cpukit/libcsupport/src/termios.c | 14 ++++++++++++++ cpukit/score/cpu/unix/cpu.c | 9 +++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'cpukit') diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 648e2c0c3e..0857f0eae7 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/termios.c @@ -24,6 +24,20 @@ #include #include +/* + * FreeBSD does not support a full POSIX termios so we have to help it out + */ + + +#if defined(__FreeBSD__) +#define XTABS 0 +#define ONLRET 0 +#define ONOCR 0 +#define TABDLY 0 +#define OLCUC 0 +#define ILCUC 0 +#endif + /* * The size of the cooked buffer */ diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c index 5b927b7a40..796d46d267 100644 --- a/cpukit/score/cpu/unix/cpu.c +++ b/cpukit/score/cpu/unix/cpu.c @@ -152,8 +152,12 @@ void _CPU_Signal_initialize( void ) sigaction(SIGUSR1, &act, 0); sigaction(SIGUSR2, &act, 0); sigaction(SIGCHLD, &act, 0); +#ifdef SIGCLD sigaction(SIGCLD, &act, 0); +#endif +#ifdef SIGPWR sigaction(SIGPWR, &act, 0); +#endif sigaction(SIGVTALRM, &act, 0); sigaction(SIGPROF, &act, 0); sigaction(SIGIO, &act, 0); @@ -741,9 +745,10 @@ void _CPU_Stray_signal(int sig_num) switch (sig_num) { +#ifdef SIGCLD case SIGCLD: break; - +#endif default: { /* @@ -987,7 +992,7 @@ void _CPU_SHM_Init( help.val = 1; status = semctl( _CPU_SHM_Semid, i, SETVAL, help ); -#elif defined(__linux__) +#elif defined(__linux__) || defined(__FreeBSD__) union semun help; help.val = 1; -- cgit v1.2.3