diff options
author | Maciej Wereski <m.wereski@partner.samsung.com> | 2014-01-15 16:15:00 +0100 |
---|---|---|
committer | Maciej Wereski <m.wereski@partner.samsung.com> | 2014-01-15 16:15:00 +0100 |
commit | bcca19a055cbdb0d67985ac08fef491f6d4bb42b (patch) | |
tree | 1d49ec65d242cf1dec494570622b3737aef06a03 /libcap/libcap.h | |
parent | b138da4a4b9d57b850ca4d0061969f5e3299861d (diff) | |
download | libcap-bcca19a055cbdb0d67985ac08fef491f6d4bb42b.tar.gz libcap-bcca19a055cbdb0d67985ac08fef491f6d4bb42b.tar.bz2 libcap-bcca19a055cbdb0d67985ac08fef491f6d4bb42b.zip |
Imported Upstream version 2.24upstream/2.24
Diffstat (limited to 'libcap/libcap.h')
-rw-r--r-- | libcap/libcap.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libcap/libcap.h b/libcap/libcap.h index 1e66f98..2596c11 100644 --- a/libcap/libcap.h +++ b/libcap/libcap.h @@ -12,14 +12,15 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <stdint.h> #include <sys/capability.h> #ifndef __u8 -#define __u8 unsigned char +#define __u8 uint8_t #endif /* __8 */ #ifndef __u32 -#define __u32 unsigned int +#define __u32 uint32_t #endif /* __u32 */ /* include the names for the caps and a definition of __CAP_BITS */ @@ -197,4 +198,12 @@ extern int capsetp(pid_t pid, cap_t cap_d); #define PR_GET_SECUREBITS 27 #define PR_SET_SECUREBITS 28 +/* + * The library compares sizeof() with integer return values. To avoid + * signed/unsigned comparisons, leading to unfortunate + * misinterpretations of -1, we provide a convenient cast-to-signed-integer + * version of sizeof(). + */ +#define ssizeof(x) ((ssize_t) sizeof(x)) + #endif /* LIBCAP_H */ |