| Line | |
|---|
| 1 | #ifndef _STDDEF_H |
|---|
| 2 | #define _STDDEF_H |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | /* ugh. This is normally provided by gcc. */ |
|---|
| 6 | |
|---|
| 7 | #ifdef __GNUC__ |
|---|
| 8 | typedef __PTRDIFF_TYPE__ ptrdiff_t; |
|---|
| 9 | #if !defined(__cplusplus) |
|---|
| 10 | typedef __WCHAR_TYPE__ wchar_t; |
|---|
| 11 | #endif |
|---|
| 12 | #else |
|---|
| 13 | typedef signed long ptrdiff_t; |
|---|
| 14 | typedef int wchar_t; |
|---|
| 15 | #endif |
|---|
| 16 | |
|---|
| 17 | #undef NULL |
|---|
| 18 | #if defined(__cplusplus) |
|---|
| 19 | #define NULL 0 |
|---|
| 20 | #else |
|---|
| 21 | #define NULL (void*)0 |
|---|
| 22 | #endif |
|---|
| 23 | |
|---|
| 24 | #undef offsetof |
|---|
| 25 | #define offsetof(type,member) ((size_t) &((type*)0)->member) |
|---|
| 26 | |
|---|
| 27 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.