diff options
author | rsc <devnull@localhost> | 2003-10-01 02:50:57 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2003-10-01 02:50:57 +0000 |
commit | a995e477ffb4dd1184da87e9e46a9e57f3178c63 (patch) | |
tree | 5b2260becdfb1aaf8b67fd91223b7d214b7e9451 /include | |
parent | e182749a982e415fba755bc1035c35da5c4fe606 (diff) | |
download | plan9port-a995e477ffb4dd1184da87e9e46a9e57f3178c63.tar.gz plan9port-a995e477ffb4dd1184da87e9e46a9e57f3178c63.tar.bz2 plan9port-a995e477ffb4dd1184da87e9e46a9e57f3178c63.zip |
Various tweaks to make things run on Mac OS.
The main change is the use of pthread to implement ffork.
Diffstat (limited to 'include')
-rw-r--r-- | include/lib9.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/lib9.h b/include/lib9.h index dd624484..42f6f44b 100644 --- a/include/lib9.h +++ b/include/lib9.h @@ -46,6 +46,11 @@ extern "C" { # undef _NEEDUINT # endif #endif +#if defined(__APPLE__) +# include <sys/types.h> +# undef _NEEDUSHORT +# undef _NEEDUINT +#endif typedef signed char schar; typedef unsigned int u32int; @@ -213,7 +218,8 @@ extern int errstr(char*, uint); /* command line */ extern char *argv0; -#define ARGBEGIN for((argv0||(argv0=*argv)),argv++,argc--;\ +extern void __fixargv0(void); +#define ARGBEGIN for((argv0||(argv0=(__fixargv0(),*argv))),argv++,argc--;\ argv[0] && argv[0][0]=='-' && argv[0][1];\ argc--, argv++) {\ char *_args, *_argt;\ |