diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-02-02 15:08:20 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-02-02 15:08:20 +0000 |
| commit | 74ee6e70c9a4f7822e7461069579c4e6ef0a2f04 (patch) | |
| tree | 1db535ead8de13300dcceadf07278dec22fb2d02 /include/libbb.h | |
| parent | e27f759c63b338e6e6cf6dc8d9d0711e9c05d6a5 (diff) | |
| parent | a2f8c89aecf473f905da6eba53d02fb23eca93cd (diff) | |
| download | busybox-w32-74ee6e70c9a4f7822e7461069579c4e6ef0a2f04.tar.gz busybox-w32-74ee6e70c9a4f7822e7461069579c4e6ef0a2f04.tar.bz2 busybox-w32-74ee6e70c9a4f7822e7461069579c4e6ef0a2f04.zip | |
Merge branch 'busybox' into mergemerge
Diffstat (limited to 'include/libbb.h')
| -rw-r--r-- | include/libbb.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index 1c75df523..562860cf4 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -506,6 +506,11 @@ void *xmmap_anon(size_t size) FAST_FUNC; | |||
| 506 | //sparc64,alpha,openrisc: fixed 8k pages | 506 | //sparc64,alpha,openrisc: fixed 8k pages |
| 507 | #endif | 507 | #endif |
| 508 | 508 | ||
| 509 | #if defined(__x86_64__) || defined(i386) | ||
| 510 | /* 0x7f would be better, but it causes alignment problems */ | ||
| 511 | # define ARCH_GLOBAL_PTR_OFF 0x80 | ||
| 512 | #endif | ||
| 513 | |||
| 509 | #if defined BB_ARCH_FIXED_PAGESIZE | 514 | #if defined BB_ARCH_FIXED_PAGESIZE |
| 510 | # define IF_VARIABLE_ARCH_PAGESIZE(...) /*nothing*/ | 515 | # define IF_VARIABLE_ARCH_PAGESIZE(...) /*nothing*/ |
| 511 | # define bb_getpagesize() BB_ARCH_FIXED_PAGESIZE | 516 | # define bb_getpagesize() BB_ARCH_FIXED_PAGESIZE |
| @@ -2680,6 +2685,16 @@ void XZALLOC_CONST_PTR(const void *pptr, size_t size) FAST_FUNC; | |||
| 2680 | } \ | 2685 | } \ |
| 2681 | } while (0) | 2686 | } while (0) |
| 2682 | 2687 | ||
| 2688 | #if defined(ARCH_GLOBAL_PTR_OFF) | ||
| 2689 | # define SET_OFFSET_PTR_TO_GLOBALS(x) \ | ||
| 2690 | ASSIGN_CONST_PTR(&ptr_to_globals, (char*)(x) + ARCH_GLOBAL_PTR_OFF) | ||
| 2691 | # define OFFSET_PTR_TO_GLOBALS \ | ||
| 2692 | ((struct globals*)((char*)ptr_to_globals - ARCH_GLOBAL_PTR_OFF)) | ||
| 2693 | #else | ||
| 2694 | # define SET_OFFSET_PTR_TO_GLOBALS(x) SET_PTR_TO_GLOBALS(x) | ||
| 2695 | # define OFFSET_PTR_TO_GLOBALS ptr_to_globals | ||
| 2696 | #endif | ||
| 2697 | |||
| 2683 | 2698 | ||
| 2684 | /* You can change LIBBB_DEFAULT_LOGIN_SHELL, but don't use it, | 2699 | /* You can change LIBBB_DEFAULT_LOGIN_SHELL, but don't use it, |
| 2685 | * use bb_default_login_shell and following defines. | 2700 | * use bb_default_login_shell and following defines. |
