software/libbase: stddef.h
This commit is contained in:
parent
fdc7da5826
commit
cd546edc19
|
@ -0,0 +1,11 @@
|
||||||
|
#ifndef __STDDEF_H
|
||||||
|
#define __STDDEF_H
|
||||||
|
|
||||||
|
#define NULL ((void *)0)
|
||||||
|
|
||||||
|
typedef unsigned long size_t;
|
||||||
|
typedef long ptrdiff_t;
|
||||||
|
|
||||||
|
#define offsetof(s,m) (size_t)&(((s *)0)->m)
|
||||||
|
|
||||||
|
#endif /* __STDDEF_H */
|
|
@ -19,6 +19,8 @@
|
||||||
#ifndef __STDLIB_H
|
#ifndef __STDLIB_H
|
||||||
#define __STDLIB_H
|
#define __STDLIB_H
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#define PRINTF_ZEROPAD 1 /* pad with zero */
|
#define PRINTF_ZEROPAD 1 /* pad with zero */
|
||||||
#define PRINTF_SIGN 2 /* unsigned/signed long */
|
#define PRINTF_SIGN 2 /* unsigned/signed long */
|
||||||
#define PRINTF_PLUS 4 /* show plus */
|
#define PRINTF_PLUS 4 /* show plus */
|
||||||
|
@ -27,11 +29,6 @@
|
||||||
#define PRINTF_SPECIAL 32 /* 0x */
|
#define PRINTF_SPECIAL 32 /* 0x */
|
||||||
#define PRINTF_LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
|
#define PRINTF_LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
|
||||||
|
|
||||||
typedef unsigned long size_t;
|
|
||||||
typedef long ptrdiff_t;
|
|
||||||
|
|
||||||
#define NULL ((void *)0)
|
|
||||||
|
|
||||||
#define likely(x) x
|
#define likely(x) x
|
||||||
#define unlikely(x) x
|
#define unlikely(x) x
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue