Made the two OSX platforms work with the new libc layout.
This commit is contained in:
parent
b727b7affd
commit
680b4071b7
|
@ -10,8 +10,8 @@ vars.plats = {
|
|||
"linux386",
|
||||
"linux68k",
|
||||
"linuxppc",
|
||||
-- "osx386",
|
||||
-- "osxppc",
|
||||
"osx386",
|
||||
"osxppc",
|
||||
-- --"qemuppc",
|
||||
-- "pc86",
|
||||
-- "rpi",
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
/* $Source$
|
||||
* $State$
|
||||
* $Revision$
|
||||
*/
|
||||
|
||||
#ifndef _SYS_IOCTL_H
|
||||
#define _SYS_IOCTL_H
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#endif
|
|
@ -48,13 +48,13 @@
|
|||
|
||||
#define _NSIG 16 /* Biggest signal number + 1
|
||||
(not including real-time signals). */
|
||||
typedef void (*sighandler_t)(int);
|
||||
typedef uint16_t sigset_t;
|
||||
|
||||
struct sigaction;
|
||||
#else
|
||||
#include <ack/signal.h>
|
||||
#endif
|
||||
typedef void (*sighandler_t)(int);
|
||||
|
||||
/* Time handling. */
|
||||
|
||||
|
|
|
@ -54,8 +54,6 @@ typedef int sig_atomic_t;
|
|||
#define SIG_SETMASK 2
|
||||
typedef unsigned long sigset_t;
|
||||
|
||||
typedef void (*sighandler_t)(int);
|
||||
|
||||
/* sa_flags */
|
||||
#define SA_NODEFER 0x40000000UL
|
||||
#define SA_RESETHAND 0x80000000UL
|
||||
|
|
13
plat/osx/include/ack/fcntl.h
Normal file
13
plat/osx/include/ack/fcntl.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef _ACK_FCNTL_H
|
||||
#define _ACK_FCNTL_H
|
||||
|
||||
#define O_RDONLY 0x0000
|
||||
#define O_WRONLY 0x0001
|
||||
#define O_RDWR 0x0002
|
||||
#define O_NONBLOCK 0x0004
|
||||
#define O_APPEND 0x0008
|
||||
#define O_CREAT 0x0200
|
||||
#define O_TRUNC 0x0400
|
||||
#define O_EXCL 0x0800
|
||||
|
||||
#endif
|
|
@ -11,4 +11,7 @@
|
|||
|
||||
/* #define ACKCONF_TIME_IS_A_SYSCALL */
|
||||
|
||||
#define ACKCONF_WANT_STANDARD_O 0
|
||||
#define ACKCONF_WANT_STANDARD_SIGNALS 0
|
||||
|
||||
#endif
|
||||
|
|
60
plat/osx/include/ack/signal.h
Normal file
60
plat/osx/include/ack/signal.h
Normal file
|
@ -0,0 +1,60 @@
|
|||
#ifndef _ACK_SIGNAL_H
|
||||
#define _ACK_SIGNAL_H
|
||||
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3
|
||||
#define SIGILL 4
|
||||
#define SIGTRAP 5
|
||||
#define SIGABRT 6
|
||||
#define SIGEMT 7
|
||||
#define SIGFPE 8
|
||||
#define SIGKILL 9
|
||||
#define SIGBUS 10
|
||||
#define SIGSEGV 11
|
||||
#define SIGSYS 12
|
||||
#define SIGPIPE 13
|
||||
#define SIGALRM 14
|
||||
#define SIGTERM 15
|
||||
#define SIGURG 16
|
||||
#define SIGSTOP 17
|
||||
#define SIGTSTP 18
|
||||
#define SIGCONT 19
|
||||
#define SIGCHLD 20
|
||||
#define SIGTTIN 21
|
||||
#define SIGTTOU 22
|
||||
#define SIGIO 23
|
||||
#define SIGXCPU 24
|
||||
#define SIGXFSZ 25
|
||||
#define SIGVTALRM 26
|
||||
#define SIGPROF 27
|
||||
#define SIGWINCH 28
|
||||
#define SIGINFO 29
|
||||
#define SIGUSR1 30
|
||||
#define SIGUSR2 31
|
||||
#define _NSIG 32
|
||||
|
||||
/* sa_flags */
|
||||
#define SA_RESTART 0x0002
|
||||
|
||||
typedef void (*sig_t)(int);
|
||||
#define SIG_DFL ((sig_t)0)
|
||||
#define SIG_IGN ((sig_t)1)
|
||||
#define SIG_ERR ((sig_t)-1)
|
||||
|
||||
typedef unsigned int sigset_t;
|
||||
|
||||
struct __siginfo;
|
||||
|
||||
struct sigaction {
|
||||
union {
|
||||
void (*__sa_handler)(int);
|
||||
void (*__sa_sigaction)(int, struct __siginfo *, void *);
|
||||
} __sigaction_u;
|
||||
sigset_t sa_mask;
|
||||
int sa_flags;
|
||||
};
|
||||
#define sa_handler __sigaction_u.__sa_handler
|
||||
#define sa_sigaction __sigaction_u.__sa_sigaction
|
||||
|
||||
#endif
|
|
@ -9,11 +9,13 @@ local function addheader(h)
|
|||
end
|
||||
|
||||
addheader("ack/plat.h")
|
||||
addheader("ack/signal.h")
|
||||
addheader("ack/fcntl.h")
|
||||
addheader("sys/dirent.h")
|
||||
addheader("sys/mman.h")
|
||||
addheader("sys/stat.h")
|
||||
addheader("sys/types.h")
|
||||
addheader("unistd.h")
|
||||
addheader("sys/ioctl.h")
|
||||
|
||||
acklibrary {
|
||||
name = "headers",
|
||||
|
|
8
plat/osx/include/sys/ioctl.h
Normal file
8
plat/osx/include/sys/ioctl.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _SYS_IOCTL_H
|
||||
#define _SYS_IOCTL_H
|
||||
|
||||
#define TIOCGETD 0x4004741a
|
||||
|
||||
extern int ioctl(int fd, unsigned long request, ...);
|
||||
|
||||
#endif
|
|
@ -11,7 +11,8 @@ typedef unsigned int ino_t;
|
|||
typedef unsigned short mode_t;
|
||||
typedef unsigned short nlink_t;
|
||||
typedef int pid_t;
|
||||
typedef ptrdiff_t ssize_t;
|
||||
typedef unsigned int uid_t;
|
||||
typedef long time_t;
|
||||
typedef int suseconds_t;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,137 +0,0 @@
|
|||
#ifndef _UNISTD_H
|
||||
#define _UNISTD_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* XXX - The following parts belong in other header files,
|
||||
* but those headers are including us!
|
||||
*/
|
||||
|
||||
/* XXX - begin sys/ioctl.h */
|
||||
|
||||
#define TIOCGETD 0x4004741a
|
||||
|
||||
int ioctl(int, unsigned long, ...);
|
||||
|
||||
/* XXX - end sys/ioctl.h */
|
||||
|
||||
/* XXX - begin sys/time.h */
|
||||
|
||||
/* Don't conflict with time_t from <time.h> */
|
||||
typedef long _libsys_time_t;
|
||||
typedef int suseconds_t;
|
||||
|
||||
struct timespec {
|
||||
_libsys_time_t tv_sec;
|
||||
long tv_nsec;
|
||||
};
|
||||
|
||||
struct timeval {
|
||||
_libsys_time_t tv_sec;
|
||||
suseconds_t tv_usec;
|
||||
};
|
||||
|
||||
struct timezone {
|
||||
int tz_minuteswest;
|
||||
int tz_dsttime;
|
||||
};
|
||||
|
||||
int gettimeofday(struct timeval *, struct timezone *);
|
||||
|
||||
/* XXX - end sys/time.h */
|
||||
|
||||
/* XXX - begin fcntl.h */
|
||||
|
||||
/* flags for open() */
|
||||
#define O_RDONLY 0x0000
|
||||
#define O_WRONLY 0x0001
|
||||
#define O_RDWR 0x0002
|
||||
#define O_NONBLOCK 0x0004
|
||||
#define O_APPEND 0x0008
|
||||
#define O_CREAT 0x0200
|
||||
#define O_TRUNC 0x0400
|
||||
#define O_EXCL 0x0800
|
||||
|
||||
int creat(const char *, mode_t);
|
||||
int open(const char *, int, ...);
|
||||
|
||||
/* XXX - end fcntl.h */
|
||||
|
||||
/* XXX - begin signal.h */
|
||||
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3
|
||||
#define SIGILL 4
|
||||
#define SIGTRAP 5
|
||||
#define SIGABRT 6
|
||||
#define SIGEMT 7
|
||||
#define SIGFPE 8
|
||||
#define SIGKILL 9
|
||||
#define SIGBUS 10
|
||||
#define SIGSEGV 11
|
||||
#define SIGSYS 12
|
||||
#define SIGPIPE 13
|
||||
#define SIGALRM 14
|
||||
#define SIGTERM 15
|
||||
#define SIGURG 16
|
||||
#define SIGSTOP 17
|
||||
#define SIGTSTP 18
|
||||
#define SIGCONT 19
|
||||
#define SIGCHLD 20
|
||||
#define SIGTTIN 21
|
||||
#define SIGTTOU 22
|
||||
#define SIGIO 23
|
||||
#define SIGXCPU 24
|
||||
#define SIGXFSZ 25
|
||||
#define SIGVTALRM 26
|
||||
#define SIGPROF 27
|
||||
#define SIGWINCH 28
|
||||
#define SIGINFO 29
|
||||
#define SIGUSR1 30
|
||||
#define SIGUSR2 31
|
||||
#define _NSIG 32
|
||||
|
||||
/* sa_flags */
|
||||
#define SA_RESTART 0x0002
|
||||
|
||||
typedef void (*sig_t)(int);
|
||||
#define SIG_DFL ((sig_t)0)
|
||||
#define SIG_IGN ((sig_t)1)
|
||||
#define SIG_ERR ((sig_t)-1)
|
||||
|
||||
typedef unsigned int sigset_t;
|
||||
|
||||
struct __siginfo;
|
||||
|
||||
struct sigaction {
|
||||
union {
|
||||
void (*__sa_handler)(int);
|
||||
void (*__sa_sigaction)(int, struct __siginfo *, void *);
|
||||
} __sigaction_u;
|
||||
sigset_t sa_mask;
|
||||
int sa_flags;
|
||||
};
|
||||
#define sa_handler __sigaction_u.__sa_handler
|
||||
#define sa_sigaction __sigaction_u.__sa_sigaction
|
||||
|
||||
int kill(pid_t, int);
|
||||
int sigaction(int, const struct sigaction *, struct sigaction *);
|
||||
sig_t signal(int, sig_t);
|
||||
|
||||
int raise(int); /* in libc */
|
||||
|
||||
/* XXX - end signal.h */
|
||||
|
||||
void _exit(int);
|
||||
int brk(void *);
|
||||
int close(int);
|
||||
pid_t getpid(void);
|
||||
int isatty(int);
|
||||
off_t lseek(int, off_t, int);
|
||||
ssize_t read(int, void *, size_t);
|
||||
void *sbrk(int);
|
||||
ssize_t write(int, const void *, size_t);
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue