diff options
author | rsc <devnull@localhost> | 2003-11-24 22:48:39 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2003-11-24 22:48:39 +0000 |
commit | 54952cec104bcdf165d15f6cd1a3b477203d21ed (patch) | |
tree | f3bb10ccf532398b89c98fe6c4c7946551117227 | |
parent | 8b6a5e678a09ae92d95a25bc60c03467e0224ce9 (diff) | |
download | plan9port-54952cec104bcdf165d15f6cd1a3b477203d21ed.tar.gz plan9port-54952cec104bcdf165d15f6cd1a3b477203d21ed.tar.bz2 plan9port-54952cec104bcdf165d15f6cd1a3b477203d21ed.zip |
More Mac changes.
-rw-r--r-- | include/lib9.h | 14 | ||||
-rw-r--r-- | include/regexp9.h | 31 |
2 files changed, 31 insertions, 14 deletions
diff --git a/include/lib9.h b/include/lib9.h index 94b0d047..8f15ce6e 100644 --- a/include/lib9.h +++ b/include/lib9.h @@ -44,8 +44,6 @@ extern "C" { #define _HAVETMTZOFF 1 #define _HAVEFUTIMESAT 1 #define _HAVEFUTIMES 1 -#define _HAVEGETDENTS 1 -#define _HAVEGETDIRENTRIES 1 typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)]; @@ -60,7 +58,6 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)]; # undef _HAVETMZONE # undef _HAVETMTZOFF # undef _HAVEFUTIMESAT -# undef _HAVEGETDENTS #endif #if defined(__sun__) # include <sys/types.h> @@ -86,6 +83,8 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)]; # include <sys/types.h> # undef _NEEDUSHORT # undef _NEEDUINT +# define _NEEDLL 1 +# define _GETDIRENTRIES_TAKES_LONG 1 #endif typedef signed char schar; @@ -432,8 +431,8 @@ enum }; /* extern int abs(int); <stdlib.h> */ -extern int atexit(void(*)(void)); -extern void atexitdont(void(*)(void)); +extern int p9atexit(void(*)(void)); +extern void p9atexitdont(void(*)(void)); extern int atnotify(int(*)(void*, char*), int); /* * <stdlib.h> @@ -475,7 +474,8 @@ extern int postnote(int, int, char *); extern double pow10(int); /* extern int putenv(char*, char*); <stdlib.h. */ /* extern void qsort(void*, long, long, int (*)(void*, void*)); <stdlib.h> */ -extern int p9setjmp(p9jmp_buf); +/* extern int p9setjmp(p9jmp_buf); */ +#define p9setjmp(b) sigsetjmp((void*)(b), 1) /* * <stdlib.h> extern double strtod(char*, char**); @@ -490,6 +490,8 @@ extern long time(long*); /* extern int tolower(int); <ctype.h> */ /* extern int toupper(int); <ctype.h> */ #ifndef NOPLAN9DEFINES +#define atexit p9atexit +#define atexitdont p9atexitdont #define getenv p9getenv #define getwd p9getwd #define longjmp p9longjmp diff --git a/include/regexp9.h b/include/regexp9.h index e25658a3..745a6d77 100644 --- a/include/regexp9.h +++ b/include/regexp9.h @@ -58,14 +58,29 @@ struct Reprog{ Reinst firstinst[5]; /* .text */ }; -extern Reprog *regcomp(char*); -extern Reprog *regcomplit(char*); -extern Reprog *regcompnl(char*); -extern void regerror(char*); -extern int regexec(Reprog*, char*, Resub*, int); -extern void regsub(char*, char*, int, Resub*, int); +extern Reprog *regcomp9(char*); +extern Reprog *regcomplit9(char*); +extern Reprog *regcompnl9(char*); +extern void regerror9(char*); +extern int regexec9(Reprog*, char*, Resub*, int); +extern void regsub9(char*, char*, int, Resub*, int); -extern int rregexec(Reprog*, Rune*, Resub*, int); -extern void rregsub(Rune*, Rune*, Resub*, int); +extern int rregexec9(Reprog*, Rune*, Resub*, int); +extern void rregsub9(Rune*, Rune*, Resub*, int); + +/* + * Darwin simply cannot handle having routines that + * override other library routines. + */ +#ifndef NOPLAN9DEFINES +#define regcomp regcomp9 +#define regcomplit regcomplit9 +#define regcompnl regcompnl9 +#define regerror regerror9 +#define regexec regexec9 +#define regsub regsub9 +#define rregexec rregexec9 +#define rregsub rregsub9 +#endif #endif |