From: Guillem Jover Date: Tue, 9 Feb 2021 01:46:49 +0000 (+0100) Subject: Use uintptr_t and size_t instead of __-prefixed types in X-Git-Tag: 0.11.3~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c3ff61699a6343ea4b5b6a757300581c5374d35;p=thirdparty%2Flibbsd.git Use uintptr_t and size_t instead of __-prefixed types in The __-prefixed types cannot be assumed to be defined. Use the standard types instead. Closes: #6 --- diff --git a/include/bsd/sys/cdefs.h b/include/bsd/sys/cdefs.h index 999bda2..ac18296 100644 --- a/include/bsd/sys/cdefs.h +++ b/include/bsd/sys/cdefs.h @@ -187,10 +187,10 @@ # else # ifndef __cplusplus # define __offsetof(type, field) \ - ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field)) + ((size_t)(uintptr_t)((const volatile void *)&((type *)0)->field)) # else # define __offsetof(type, field) \ - (__offsetof__ (reinterpret_cast <__size_t> \ + (__offsetof__ (reinterpret_cast \ (&reinterpret_cast \ (static_cast (0)->field)))) # endif @@ -243,15 +243,15 @@ #endif #ifndef __DECONST -#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var)) +#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) #endif #ifndef __DEVOLATILE -#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) +#define __DEVOLATILE(type, var) ((type)(uintptr_t)(volatile void *)(var)) #endif #ifndef __DEQUALIFY -#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) +#define __DEQUALIFY(type, var) ((type)(uintptr_t)(const volatile void *)(var)) #endif #endif