Small patch from collective work to better support FreeBSD.
This commit is contained in:
parent
e9f59c804d
commit
7225282ea5
2 changed files with 11 additions and 3 deletions
|
|
@ -92,6 +92,11 @@
|
||||||
# if __SIZEOF_POINTER__ == 8
|
# if __SIZEOF_POINTER__ == 8
|
||||||
/* FIXME, __int128_t is used by setjump */
|
/* FIXME, __int128_t is used by setjump */
|
||||||
#define __int128_t struct { unsigned char _dummy[16] __attribute((aligned(16))); }
|
#define __int128_t struct { unsigned char _dummy[16] __attribute((aligned(16))); }
|
||||||
|
#define __SIZEOF_SIZE_T__ 8
|
||||||
|
#define __SIZEOF_PTRDIFF_T__ 8
|
||||||
|
#else
|
||||||
|
#define __SIZEOF_SIZE_T__ 4
|
||||||
|
#define __SIZEOF_PTRDIFF_T__ 4
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#elif defined __FreeBSD_kernel__
|
#elif defined __FreeBSD_kernel__
|
||||||
|
|
|
||||||
|
|
@ -226,10 +226,13 @@ typedef struct alloca_list_struct {
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
#define BOUND_TID_TYPE pid_t
|
#define BOUND_TID_TYPE pid_t
|
||||||
#define BOUND_GET_TID syscall (SYS_getthrid)
|
#define BOUND_GET_TID syscall (SYS_getthrid)
|
||||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
#define BOUND_TID_TYPE pid_t
|
#define BOUND_TID_TYPE pid_t
|
||||||
#define BOUND_GET_TID 0
|
#define BOUND_GET_TID syscall (SYS_thr_self)
|
||||||
#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
|
#elif defined(__NetBSD__)
|
||||||
|
#define BOUND_TID_TYPE pid_t
|
||||||
|
#define BOUND_GET_TID syscall (SYS__lwp_self)
|
||||||
|
#elif defined(__linux__)
|
||||||
#define BOUND_TID_TYPE pid_t
|
#define BOUND_TID_TYPE pid_t
|
||||||
#define BOUND_GET_TID syscall (SYS_gettid)
|
#define BOUND_GET_TID syscall (SYS_gettid)
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue