diff options
author | Araq <rumpf_a@web.de> | 2010-08-28 22:33:07 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2010-08-28 22:33:07 +0200 |
commit | 47886978c79a3246295114a853a9cd945d368708 (patch) | |
tree | f006dc90bb9c8c166214ca751af3739b89a73621 /tinyc/win32/include/stddef.h | |
parent | b2075302b10b88047ea16007895bff4e46a2fa9c (diff) | |
download | Nim-47886978c79a3246295114a853a9cd945d368708.tar.gz |
tiny C support; cosmetic improvements for the docs
Diffstat (limited to 'tinyc/win32/include/stddef.h')
-rwxr-xr-x | tinyc/win32/include/stddef.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tinyc/win32/include/stddef.h b/tinyc/win32/include/stddef.h new file mode 100755 index 000000000..6e4e2c88e --- /dev/null +++ b/tinyc/win32/include/stddef.h @@ -0,0 +1,23 @@ +#ifndef _STDDEF_H +#define _STDDEF_H + +#define NULL ((void *)0) +typedef __SIZE_TYPE__ size_t; +typedef __WCHAR_TYPE__ wchar_t; +typedef __PTRDIFF_TYPE__ ptrdiff_t; +#define offsetof(type, field) ((size_t) &((type *)0)->field) + +/* need to do that because of glibc 2.1 bug (should have a way to test + presence of 'long long' without __GNUC__, or TCC should define + __GNUC__ ? */ +#if !defined(__int8_t_defined) && !defined(__dietlibc__) +#define __int8_t_defined +typedef char int8_t; +typedef short int int16_t; +typedef int int32_t; +typedef long long int int64_t; +#endif + +void *alloca(size_t); + +#endif |