These produce Mach-o executables for Mac OS X on Intel or PowerPC
processors. Our code generator for PowerPC (mach/powerpc) still has
bugs. Some examples seem to run, but startrek crashes. Our code
generator for Intel (mach/i386) is better.
There is a problem with job control. If you run paranoia or startrek,
then suspend the job (^Z) and resume it ('fg' in bash), then read(2)
might fail with EINTR.
The larger files in this commit are
- plat/osx/cvmach/cvmach.c
- plat/osx/libsys/brk.c
- plat/osx386/libsys/sigaction.s
- plat/osxppc/libsys/sigaction.s
20 lines
362 B
C
20 lines
362 B
C
#ifndef _SYS_MMAN_H
|
|
#define _SYS_MMAN_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#define MAP_FAILED ((void *)-1)
|
|
|
|
#define PROT_NONE 0x00
|
|
#define PROT_READ 0x01
|
|
#define PROT_WRITE 0x02
|
|
#define PROT_EXEC 0x04
|
|
|
|
#define MAP_PRIVATE 0x0002
|
|
#define MAP_FIXED 0x0010
|
|
#define MAP_ANON 0x1000
|
|
|
|
void *mmap(void *, size_t, int, int, int, off_t);
|
|
int mprotect(void *, size_t, int);
|
|
|
|
#endif
|