diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-09-03 18:07:14 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-09-03 18:07:14 +0200 |
commit | 6990634f0688dc85bf5ee4c8867f1693ad0f69c0 (patch) | |
tree | 386af1beeecc851315af78638eb221592fb295ec /include | |
parent | m (diff) | |
download | slibc-6990634f0688dc85bf5ee4c8867f1693ad0f69c0.tar.gz slibc-6990634f0688dc85bf5ee4c8867f1693ad0f69c0.tar.bz2 slibc-6990634f0688dc85bf5ee4c8867f1693ad0f69c0.tar.xz |
add some integer types
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/bits/types.h | 112 | ||||
-rw-r--r-- | include/unistd.h | 10 |
2 files changed, 117 insertions, 5 deletions
diff --git a/include/bits/types.h b/include/bits/types.h index 3d178b8..9bace73 100644 --- a/include/bits/types.h +++ b/include/bits/types.h @@ -382,3 +382,115 @@ typedef int locale_t; /* TODO not implemented */ # include <stdarg.h> #undef __ONLY_va_list + +/** + * Datatype for file permissions and file type. + */ +#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) +# define __DEFINED_mode_t +typedef unsigned int mode_t; +#endif + + +/** + * Datatype for process identifiers. + */ +#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) +# define __DEFINED_pid_t +typedef signed int pid_t; +#endif + + +/** + * Datatype for user identifiers. + */ +#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) +# define __DEFINED_uid_t +typedef unsigned int uid_t; +#endif + + +/** + * Datatype for group identifiers. + */ +#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) +# define __DEFINED_gid_t +typedef unsigned int gid_t; +#endif + + +/** + * Datatype for microseconds. + * (The name should be 'µseconds', but we are limited + * to ASCII and 'u' looks similar to 'µ'.) + */ +#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) +# define __DEFINED_useconds_t +typedef signed long useconds_t; +#endif + + +/** + * Datatype for file offsets. + */ +#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) +# define __DEFINED_off_t +typedef signed __INT64 off_t; +#endif + + +/** + * Datatype for inode identifiers, the number identifying + * a file on a filesystem. + * ('inode' is probably a contraction of 'index node'.) + */ +#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) +# define __DEFINED_ino_t +typedef unsigned __INT64 ino_t; +#endif + + +/** + * Datatype for device identifiers. + */ +#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) +# define __DEFINED_dev_t +typedef unsigned __INT64 dev_t; +#endif + + +/** + * Datatype for filesystem block counts. + */ +#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) +# define __DEFINED_fsblkcnt_t +typedef unsigned __INT64 fsblkcnt_t; +#endif + + +/** + * Datatype for filesystem file counts. + */ +#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) +# define __DEFINED_fsfilcnt_t +typedef unsigned __INT64 fsfilcnt_t; +#endif + + +/** + * Datatype for block sizes. + */ +#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) +# define __DEFINED_blksize_t +typedef signed long int blksize_t; +#endif + + +/** + * Datatype for block counts. + */ +#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) +# define __DEFINED_blkcnt_t +typedef signed __INT64 blkcnt_t; +#endif + diff --git a/include/unistd.h b/include/unistd.h index 45ec712..6fa36bb 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -24,13 +24,13 @@ #define __NEED_size_t #define __NEED_ssize_t -#define __NEED_uid_t /* TODO not implement */ -#define __NEED_gid_t /* TODO not implement */ -#define __NEED_off_t /* TODO not implement */ -#define __NEED_pid_t /* TODO not implement */ +#define __NEED_uid_t +#define __NEED_gid_t +#define __NEED_off_t +#define __NEED_pid_t #define __NEED_ptrdiff_t #define __NEED_intptr_t -#define __NEED_useconds_t /* TODO not implement */ +#define __NEED_useconds_t #include <bits/types.h> |