matos/core/stdarg.h

53 lines
1.1 KiB
C
Raw Normal View History

2018-07-20 15:41:58 +02:00
#pragma once
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
#ifdef __GNUC__
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#else
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
/* sysv */
typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef __s8 int8_t;
typedef __s16 int16_t;
typedef __s32 int32_t;
typedef __u8 uint8_t;
typedef __u16 uint16_t;
typedef __u32 uint32_t;
typedef __u64 uint64_t;
typedef __u64 u_int64_t;
typedef __s64 int64_t;
typedef enum { FALSE=0, TRUE } bool_t;
#define NULL ((void*)0)
#if __x86_64__
typedef unsigned long size_t;
typedef long ssize_t;
#else
typedef unsigned int size_t;
typedef int ssize_t;
#endif
typedef void *va_list;
#define va_start(v, l) ((v) = (va_list) & (l) + sizeof(l))
#define va_end(v) ((v) = NULL)
#define va_arg(v, type) (*(type *)(((v)+=sizeof(type))-sizeof(type)))