aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stddef.h
blob: 4e74fa6178e80b155a776b77b2c90d3d9e7d1b4b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef __LIB_STDDEF_H
#define __LIB_STDDEF_H

#define NULL ((void *) 0)
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER)

/* GCC predefines the types we need for ptrdiff_t and size_t,
   so that we don't have to guess. */
typedef __PTRDIFF_TYPE__ ptrdiff_t;
typedef __SIZE_TYPE__ size_t;

#endif /* lib/stddef.h */