mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-11 03:39:59 +00:00
2191c8b0a0
* Add offsetof macro * Change old uses of OFFSETOF with offsetof
16 lines
309 B
C
16 lines
309 B
C
#ifndef STDDEF_H
|
|
#define STDDEF_H
|
|
|
|
#define NULL ((void*)0)
|
|
|
|
typedef unsigned long size_t;
|
|
|
|
typedef unsigned int uintptr_t;
|
|
|
|
#ifdef __GNUC__
|
|
#define offsetof(structure, member) __builtin_offsetof (structure, member)
|
|
#else
|
|
#define offsetof(structure, member) ((size_t)&(((structure*)0)->member))
|
|
#endif
|
|
|
|
#endif
|