mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Add a new type, l_uintptr_t, which is an unsigned integer type with the
same width as a pointer under Linux. Add two new macros, PTRIN and PTROUT, which convert between l_uintptr_t and native pointers.
This commit is contained in:
parent
9f676d2ed6
commit
0e73a96209
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133815
@ -45,6 +45,9 @@ extern u_char linux_debug_map[];
|
||||
MALLOC_DECLARE(M_LINUX);
|
||||
#endif
|
||||
|
||||
#define PTRIN(v) (void *)(v)
|
||||
#define PTROUT(v) (l_uintptr_t)(v)
|
||||
|
||||
typedef int l_int;
|
||||
typedef int64_t l_long;
|
||||
typedef int64_t l_longlong;
|
||||
@ -55,6 +58,7 @@ typedef uint64_t l_ulonglong;
|
||||
typedef unsigned short l_ushort;
|
||||
|
||||
typedef char *l_caddr_t;
|
||||
typedef l_ulong l_uintptr_t;
|
||||
typedef l_long l_clock_t;
|
||||
typedef l_int l_daddr_t;
|
||||
typedef l_uint l_dev_t;
|
||||
|
@ -47,6 +47,9 @@ extern u_char linux_debug_map[];
|
||||
MALLOC_DECLARE(M_LINUX);
|
||||
#endif
|
||||
|
||||
#define PTRIN(v) (void *)(v)
|
||||
#define PTROUT(v) (l_uintptr_t)(v)
|
||||
|
||||
/*
|
||||
* Provide a separate set of types for the Linux types.
|
||||
*/
|
||||
@ -60,6 +63,7 @@ typedef uint64_t l_ulonglong;
|
||||
typedef unsigned short l_ushort;
|
||||
|
||||
typedef char *l_caddr_t;
|
||||
typedef l_ulong l_uintptr_t;
|
||||
typedef l_long l_clock_t;
|
||||
typedef l_int l_daddr_t;
|
||||
typedef l_ushort l_dev_t;
|
||||
|
Loading…
Reference in New Issue
Block a user