From: Ben Pfaff Date: Mon, 13 Sep 2004 22:57:25 +0000 (+0000) Subject: Use __SIZE_TYPE__ for size_t, __PTRDIFF_TYPE__ for ptrdiff_t. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbbbda184599cc7607f3718bb3be74ffa32974a1;p=pintos-anon Use __SIZE_TYPE__ for size_t, __PTRDIFF_TYPE__ for ptrdiff_t. --- diff --git a/src/lib/stddef.h b/src/lib/stddef.h index 2a05bc9..4e74fa6 100644 --- 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) -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 */