]> granicus.if.org Git - icu/commitdiff
ICU-8452 do not use ptrdiff_t (signed) as a fallback for uintptr_t (unsigned)
authorMarkus Scherer <markus.icu@gmail.com>
Wed, 27 Jul 2011 23:37:05 +0000 (23:37 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Wed, 27 Jul 2011 23:37:05 +0000 (23:37 +0000)
X-SVN-Rev: 30438

icu4c/source/common/putilimp.h

index 84b605ec11c49a189c40f6cdfd462d5b8f3c87db..4d92acd35a201f61001915d09159d418d1d2ca06 100644 (file)
  * "On XSI-conformant systems, the intptr_t and uintptr_t types are required;
  * otherwise, they are optional."
  * We assume that when uintptr_t is defined, UINTPTR_MAX is defined as well.
+ *
+ * Do not use ptrdiff_t since it is signed. size_t is unsigned.
  */
 #if !defined(__intptr_t_defined) && !defined(UINTPTR_MAX)
-typedef ptrdiff_t uintptr_t;
+typedef size_t uintptr_t;
 #endif
 
 /**