Subversion Repositories Kolibri OS

Rev

Rev 9811 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8687 turbocat 1
#ifndef _STDDEF_H_
2
#define _STDDEF_H_
3
 
4
typedef __SIZE_TYPE__ size_t;
5
typedef __PTRDIFF_TYPE__ ssize_t;
6
typedef __WCHAR_TYPE__ wchar_t;
7
typedef __PTRDIFF_TYPE__ ptrdiff_t;
8
typedef __PTRDIFF_TYPE__ intptr_t;
9
typedef __SIZE_TYPE__ uintptr_t;
10
 
11
#ifndef NULL
9766 turbocat 12
#define NULL ((void*)0)
8687 turbocat 13
#endif
14
 
8787 turbocat 15
#ifdef _BUILD_LIBC
9812 Coldy 16
 
17
/* FIXME: Now _FUNC is used in conio only.
18
          This should be removed after revrite somme apps who use conio
19
          (because these app use pointer dereferencing for conio)
20
*/
21
#define _FUNC(func) (func)
22
 
23
#define DLLAPI //__attribute__((dllexport)) // Comming soon(tcc not support yet)
8687 turbocat 24
#else
9812 Coldy 25
#define _FUNC(func) (*func) // FIXME: this needed for legacy reason (see above)
26
#define DLLAPI __attribute__((dllimport))
8687 turbocat 27
#endif
28
 
9766 turbocat 29
#define offsetof(type, field) ((size_t) & ((type*)0)->field)
8687 turbocat 30
 
9620 turbocat 31
#ifndef __stdcall
9766 turbocat 32
#define __stdcall __attribute__((stdcall))
9620 turbocat 33
#endif
34
 
35
#ifndef __cdecl
9766 turbocat 36
#define __cdecl __attribute__((cdecl))
9620 turbocat 37
#endif
38
 
9558 turbocat 39
#endif /* _STDDEF_H_ */