2021-09-15 23:24:19 +00:00
|
|
|
#ifndef STDDEF_H
|
|
|
|
#define STDDEF_H
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-03-22 21:50:11 +00:00
|
|
|
#define NULL ((void*)0)
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2023-10-27 14:06:44 +00:00
|
|
|
#if !defined(_SIZE_T) && !defined(_SIZE_T_)
|
|
|
|
#define _SIZE_T
|
|
|
|
|
|
|
|
#if !defined(_MIPS_SZLONG) || (_MIPS_SZLONG == 32)
|
|
|
|
typedef unsigned int size_t;
|
|
|
|
#endif
|
2023-10-17 19:16:31 +00:00
|
|
|
#if defined(_MIPS_SZLONG) && (_MIPS_SZLONG == 64)
|
2023-10-27 14:06:44 +00:00
|
|
|
typedef unsigned long size_t;
|
|
|
|
#endif
|
|
|
|
|
2023-10-17 19:16:31 +00:00
|
|
|
#endif
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-02-13 05:05:11 +00:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#define offsetof(structure, member) __builtin_offsetof (structure, member)
|
|
|
|
#else
|
|
|
|
#define offsetof(structure, member) ((size_t)&(((structure*)0)->member))
|
|
|
|
#endif
|
|
|
|
|
2020-03-17 04:31:30 +00:00
|
|
|
#endif
|