2f67e21393
while technically a 32 bit ptrdiff_t is in spec on systems with 64 bit ponters as long as we guarantee that individual objects are small enough, this can confuse legitimate code, so lets fix this.
27 lines
439 B
C
27 lines
439 B
C
#ifndef __STDDEF_H
|
|
#define __STDDEF_H
|
|
|
|
#ifndef __STDDEF_ARCH_H
|
|
typedef long _ptrdiff_t;
|
|
#endif
|
|
|
|
#ifndef NULL
|
|
#ifdef __cplusplus
|
|
#define NULL 0
|
|
#else
|
|
#define NULL ((void*)0)
|
|
#endif
|
|
#endif
|
|
#define offsetof(ty,mem) ((size_t) &(((ty *)0)->mem))
|
|
|
|
typedef _ptrdiff_t ptrdiff_t;
|
|
#ifndef _SIZE_T
|
|
#define _SIZE_T
|
|
typedef unsigned long size_t;
|
|
#endif
|
|
#ifndef _WCHAR_T
|
|
#define _WCHAR_T
|
|
typedef unsigned short wchar_t;
|
|
#endif
|
|
|
|
#endif /* __STDDEF_H */
|