This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin 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] machine/_types.h: __blkcnt_t should be signed


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

commit 82e06490de56519d6310282bf321433537e9efa0
Author: Ray Donnelly <mingw.android@gmail.com>
Date:   Thu Jul 14 12:40:47 2016 +0100

    machine/_types.h: __blkcnt_t should be signed
    
    [1] states: "blkcnt_t and off_t shall be signed integer types."
    
    This causes pacman to fail when the size requirement
    of the net update operation is negative, instead it
    calculated a huge positive number.
    
    [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html

Diff:
---
 winsup/cygwin/include/machine/_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/include/machine/_types.h b/winsup/cygwin/include/machine/_types.h
index e6ed313..7e636f8 100644
--- a/winsup/cygwin/include/machine/_types.h
+++ b/winsup/cygwin/include/machine/_types.h
@@ -14,7 +14,7 @@ typedef __uint32_t __ino32_t;
 #endif
 
 #define __machine_blkcnt_t_defined
-typedef __uint64_t __blkcnt_t;
+typedef __int64_t __blkcnt_t;
 
 #define __machine_blksize_t_defined
 typedef __int32_t __blksize_t;


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