brintos

brintos / linux-shallow public Read only

0
0
Text · 1.1 KiB · fadb3f8 Raw
32 lines · c
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */2#ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG3#define _UAPI__ASM_GENERIC_BITS_PER_LONG4 5#ifndef __BITS_PER_LONG6/*7 * In order to keep safe and avoid regression, only unify uapi8 * bitsperlong.h for some archs which are using newer toolchains9 * that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__.10 * See the following link for more info:11 * https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/12 */13#if defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__)14#define __BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__)15#else16/*17 * There seems to be no way of detecting this automatically from user18 * space, so 64 bit architectures should override this in their19 * bitsperlong.h. In particular, an architecture that supports20 * both 32 and 64 bit user space must not rely on CONFIG_64BIT21 * to decide it, but rather check a compiler provided macro.22 */23#define __BITS_PER_LONG 3224#endif25#endif26 27#ifndef __BITS_PER_LONG_LONG28#define __BITS_PER_LONG_LONG 6429#endif30 31#endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */32