mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[liba] Define ssize_t and offsetof
Change-Id: Icbf546cd09f4e3c3e849f830bb3c60ffa3c13b6c
This commit is contained in:
committed by
Romain Goyet
parent
750b51dd2f
commit
c8e2b0d2be
@@ -3,10 +3,9 @@
|
||||
|
||||
#define NULL 0
|
||||
|
||||
/* C99 says that size_t is an unsigned integer type of at least 16 bit.
|
||||
* Moreover, size_t is the return type of the "sizeof" operator, which is
|
||||
* defined by the compiler. That's why both GCC and clang define a __SIZE_TYPE__
|
||||
* macro to let the libc header know about the type used by the compiler. */
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
typedef int ssize_t;
|
||||
typedef unsigned int size_t;
|
||||
|
||||
#define offsetof(st, m) __builtin_offsetof(st, m)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user