software/libbase: stddef.h

This commit is contained in:
Sebastien Bourdeauducq 2012-05-25 22:30:17 +02:00
parent fdc7da5826
commit cd546edc19
2 changed files with 13 additions and 5 deletions

View File

@ -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 */

View File

@ -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