History

Small patch from collective work to better support FreeBSD.

Christian Jullien committed 4 years ago

Commit 72252821 parent e9f59c82 files · +11 −3Browse files

Unified · Split

2 files
  1. include/tccdefs.h +5 −0
  2. lib/bcheck.c +6 −3
include/tccdefs.h+5−0
@@ -92,6 +92,11 @@ · 91 unmodified lines
9292 # if __SIZEOF_POINTER__ == 8
9393 /* FIXME, __int128_t is used by setjump */
9494 #define __int128_t struct { unsigned char _dummy[16] __attribute((aligned(16))); }
95+ #define __SIZEOF_SIZE_T__ 8
96+ #define __SIZEOF_PTRDIFF_T__ 8
97+#else
98+ #define __SIZEOF_SIZE_T__ 4
99+ #define __SIZEOF_PTRDIFF_T__ 4
95100 # endif
96101
97102 #elif defined __FreeBSD_kernel__
lib/bcheck.c+6−3
@@ -226,10 +226,13 @@ typedef struct alloca_list_struct { · 225 unmodified lines
226226 #elif defined(__OpenBSD__)
227227 #define BOUND_TID_TYPE pid_t
228228 #define BOUND_GET_TID syscall (SYS_getthrid)
229−#elif defined(__FreeBSD__) || defined(__NetBSD__)
229+#elif defined(__FreeBSD__)
230230 #define BOUND_TID_TYPE pid_t
231−#define BOUND_GET_TID 0
232−#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
231+#define BOUND_GET_TID syscall (SYS_thr_self)
232+#elif defined(__NetBSD__)
233+#define BOUND_TID_TYPE pid_t
234+#define BOUND_GET_TID syscall (SYS__lwp_self)
235+#elif defined(__linux__)
233236 #define BOUND_TID_TYPE pid_t
234237 #define BOUND_GET_TID syscall (SYS_gettid)
235238 #else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t