forked from Imagelibrary/rtems
Added freebsd support from Dario Alcocer <alcocer@connectnet.com>.
This commit is contained in:
@@ -24,6 +24,20 @@
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -382,6 +382,14 @@ extern "C" {
|
||||
*/
|
||||
|
||||
#ifdef RTEMS_UNIXLIB
|
||||
#if defined(__FreeBSD__)
|
||||
#define RET_OFF 0
|
||||
#define EBX_OFF 1
|
||||
#define EBP_OFF 2
|
||||
#define ESP_OFF 3
|
||||
#define ESI_OFF 4
|
||||
#define EDI_OFF 5
|
||||
#else
|
||||
#define EBX_OFF 0
|
||||
#define ESI_OFF 1
|
||||
#define EDI_OFF 2
|
||||
@@ -389,6 +397,7 @@ extern "C" {
|
||||
#define ESP_OFF 4
|
||||
#define RET_OFF 5
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -46,6 +46,10 @@ extern "C" {
|
||||
|
||||
#define CPU_MODEL_NAME "Linux"
|
||||
|
||||
#elif defined(__FreeBSD__)
|
||||
|
||||
#define CPU_MODEL_NAME "FreeBSD"
|
||||
|
||||
#else
|
||||
|
||||
#error "Unsupported CPU Model"
|
||||
|
||||
@@ -54,6 +54,13 @@ case $target in
|
||||
echo Not supported on unix port.
|
||||
exit 0
|
||||
;;
|
||||
i[3456]86-unknown-freebsd2.[12]*)
|
||||
echo freebsd
|
||||
rtems_cpu=unix
|
||||
bsp=freebsd2
|
||||
echo Not supported on unix port.
|
||||
exit 0
|
||||
;;
|
||||
*-rtems*)
|
||||
cpu=`echo $target | sed -e 's/-.*//'`
|
||||
rtems_cpu=$cpu
|
||||
|
||||
@@ -24,6 +24,20 @@
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user