Subversion Repositories Kolibri OS

Rev

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

  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
  12. #define NULL ((void*)0)
  13. #endif
  14.  
  15. #ifdef _BUILD_LIBC
  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)
  24. #else
  25. #define _FUNC(func) (*func) // FIXME: this needed for legacy reason (see above)
  26. #define DLLAPI __attribute__((dllimport))
  27. #endif
  28.  
  29. #define offsetof(type, field) ((size_t) & ((type*)0)->field)
  30.  
  31. #ifndef __stdcall
  32. #define __stdcall __attribute__((stdcall))
  33. #endif
  34.  
  35. #ifndef __cdecl
  36. #define __cdecl __attribute__((cdecl))
  37. #endif
  38.  
  39. #endif /* _STDDEF_H_ */