projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Comments and a bit of initialization order cleanup.
[pintos-anon]
/
src
/
lib
/
stddef.h
diff --git
a/src/lib/stddef.h
b/src/lib/stddef.h
index 2a05bc9c980d845af6ed562377fc9401d0639d56..4e74fa6178e80b155a776b77b2c90d3d9e7d1b4b 100644
(file)
--- a/
src/lib/stddef.h
+++ b/
src/lib/stddef.h
@@
-3,7
+3,10
@@
#define NULL ((void *) 0)
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER)
#define NULL ((void *) 0)
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER)
-typedef int ptrdiff_t;
-typedef unsigned int size_t;
+
+/* 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 */
#endif /* lib/stddef.h */