diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-04-13 10:15:50 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-04-13 10:15:50 +0000 |
commit | db55bab0e18b79757d41402a257af19805dcc3ce (patch) | |
tree | 6b15ce0cec802bca16c3de811f24e2fd92e10746 /regress/lib | |
parent | ea34965f8126cc43f9691ba463e97146abf8a902 (diff) |
Make it easier to compile regress tests on other OSes
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libpthread/include/test.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/regress/lib/libpthread/include/test.h b/regress/lib/libpthread/include/test.h index 61afc45be4b..bb04b66bc3d 100644 --- a/regress/lib/libpthread/include/test.h +++ b/regress/lib/libpthread/include/test.h @@ -1,4 +1,4 @@ -/* $OpenBSD: test.h,v 1.5 2003/09/02 23:52:17 david Exp $ */ +/* $OpenBSD: test.h,v 1.6 2012/04/13 10:15:49 guenther Exp $ */ #ifndef _h_test_ #define _h_test_ @@ -9,22 +9,25 @@ #include <errno.h> #include <string.h> #include <stdarg.h> +#include <unistd.h> -int _thread_sys_write(int, const char*, size_t); -__dead void _thread_sys__exit(int) __attribute__((__noreturn__)); - -static __dead void __vpanic(const char *, const char *, const char *, +static void __vpanic(const char *, const char *, const char *, int, const char *, va_list) __attribute__((__noreturn__)); -static __dead void __panic(const char *, const char *, const char *, +static void __panic(const char *, const char *, const char *, int, const char *, ...) __attribute__((__noreturn__)); #if defined(__OpenBSD__) || defined(__FreeBSD__) #include <pthread.h> #include <pthread_np.h> void _thread_dump_info(void); +int _thread_sys_write(int, const char*, size_t); +void _thread_sys__exit(int) __attribute__((__noreturn__)); #define SET_NAME(x) pthread_set_name_np(pthread_self(), x) #define DUMP_INFO() _thread_dump_info() #else +#define _thread_sys_write(fd,buf,len) write(fd,buf,len) +#define _thread_sys__exit(ret) _exit(ret) +#define strlcat(dst,src,siz) strcat(dst,src) #define SET_NAME(x) /* nada */ #define DUMP_INFO() /* nada */ #endif |