This is the mail archive of the newlib-cvs@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Fix definition of __size_t


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=af5bbbec815f8034c8c38439449b6fb723a824c1

commit af5bbbec815f8034c8c38439449b6fb723a824c1
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Mon Apr 18 08:47:46 2016 +0200

    Fix definition of __size_t
    
    Fix definition of __size_t in case __SIZE_TYPE__ is not defined.
    
    Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>

Diff:
---
 newlib/libc/include/sys/_types.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 06ddd83..297b1ea 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -127,9 +127,9 @@ typedef _off64_t _fpos64_t;
 typedef __SIZE_TYPE__ __size_t;
 #else
 #if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
-typedef int __size_t;
+typedef unsigned int __size_t;
 #else
-typedef long __size_t;
+typedef unsigned long __size_t;
 #endif
 #endif
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]