3 Commits

Author SHA1 Message Date
Jessica Clarke
9c5654ed44 Increase portability by using uintptr_t rather than size_t for pointers
The only integral types guaranteed by the C standard, if they exist, to
support having a pointer cast to them and back are (u)intptr_t. On most
architectures, size_t and uintptr_t are typedefs for the same underlying
type, so this code ends up working. However, on CHERI, and thus Arm's
experimental Morello prototype, C language pointers are implemented with
hardware capabilities, which are unforgeable pointers with bounds and
permissions. This means that, whilst size_t remains a plain 32/64-bit
integer size, (u)intotr_t is represented with a capability. Casting to
size_t and back to a pointer causes the capability metadata to be lost
and the resulting capability to be invalid, meaning it will trap when
dereferenced. Instead, use uintptr_t, and provide fallback definitions
for old versions of MSVC like for the other C99 integer types.
2021-08-06 23:49:16 +01:00
yuangongji
9eba7c482c remove C++ part in source code 2020-06-05 18:16:07 +08:00
yuangongji
9c6857c425 rename pack_template.h and sysdep.h
include/msgpack/pack_template.h => cmake/pack_template.h.in
include/msgpack/sysdep.h => cmake/sysdep.h.in

Use `git log --follow cmake/filename.h.in` to see full log
2020-06-05 16:09:17 +08:00