]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Use uintptr_t and size_t instead of __-prefixed types in <sys/cdefs.h>
authorGuillem Jover <guillem@hadrons.org>
Tue, 9 Feb 2021 01:46:49 +0000 (02:46 +0100)
committerGuillem Jover <guillem@hadrons.org>
Tue, 9 Feb 2021 05:23:27 +0000 (06:23 +0100)
The __-prefixed types cannot be assumed to be defined. Use the standard
types instead.

Closes: #6
include/bsd/sys/cdefs.h

index 999bda22c7998eef902d5d9ced8b2fe0a45b2ce7..ac18296a5e47a5a6f241fe519b95089015b960dd 100644 (file)
 # 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 <size_t> \
                       (&reinterpret_cast <const volatile char &> \
                        (static_cast<type *> (0)->field))))
 #  endif
 #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