#define __LUNAIX_TYPES_H
#include <lunaix/compiler.h>
+#include <lunaix/limits.h>
#include <stdarg.h>
#include <usr/lunaix/types.h>
typedef unsigned long ptr_t;
typedef unsigned long reg_t;
+typedef unsigned int uid_t;
+typedef unsigned int gid_t;
+
#ifndef CONFIG_ARCH_BITS_64
typedef unsigned long long u64_t;
#else
})
#define offset(data, off) \
- ((void*)(__ptr(data) + (off)))
+ ((typeof(data))(__ptr(data) + (off)))
+
+#define offset_t(data, type, off) \
+ ((type*)(__ptr(data) + (off)))
#define __ptr(val) ((ptr_t)(val))