$NetBSD: patch-av,v 1.1 2001/04/12 15:53:31 skrll Exp $ --- machdep/engine-sparc-netbsd-1.3.h.orig Thu Apr 12 09:31:32 2001 +++ machdep/engine-sparc-netbsd-1.3.h @@ -10,7 +10,12 @@ #include #include #include /* for _NSIG */ +#include +#include +#include + +#include /* * The first machine dependent functions are the SEMAPHORES * needing the test and set instruction. @@ -65,7 +70,7 @@ * For initial thread only. */ #define MACHDEP_PTHREAD_INIT \ -{ NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 } +{ NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, { 0 } } /* * Minimum stack size @@ -76,7 +81,7 @@ * Some fd flag defines that are necessary to distinguish between posix * behavior and bsd4.3 behavior. */ -#define __FD_NONBLOCK (O_NONBLOCK | O_NDELAY) +#define __FD_NONBLOCK O_NONBLOCK /* * New functions @@ -90,7 +95,7 @@ #define __machdep_stack_set(x, y) (x)->machdep_stack = y #define __machdep_stack_repl(x, y) \ { \ - if (stack = __machdep_stack_get(x)) { \ + if ((stack = __machdep_stack_get(x))) { \ __machdep_stack_free(stack); \ } \ __machdep_stack_set(x, y); \ @@ -100,6 +105,25 @@ void __machdep_stack_free(void *); int machdep_save_state(void); + +int machdep_sys_getdtablesize(void); + +void machdep_set_thread_timer(struct machdep_pthread *machdep_pthread); +void machdep_unset_thread_timer(struct machdep_pthread *machdep_pthread); +void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread); +void machdep_pthread_start(void); +void __machdep_stack_free(void * stack); +void * __machdep_stack_alloc(size_t size); +int machdep_sys_creat(char * path, int mode); +pid_t machdep_sys_wait3(int * b, int c, struct rusage * d); +pid_t machdep_sys_waitpid(int a, int * b, int c); +int machdep_sys_getdtablesize(void); + + +static inline int machdep_sys_getdirentries(int fd, char * buf, int len, int * seek) +{ + return(machdep_sys_getdents(fd, buf, len)); +} #endif