From: "Jan Beulich" Subject: Re: [PATCH 1/5] xen: add ssize_t to types.h Date: Thu, 31 May 2012 16:29:05 +0100 Message-ID: <4FC7AA6102000078000876FE@nat28.tlf.novell.com> References: <1338476832-26653-1-git-send-email-jean.guyader@citrix.com> <1338476832-26653-2-git-send-email-jean.guyader@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1338476832-26653-2-git-send-email-jean.guyader@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jean Guyader Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 31.05.12 at 17:07, Jean Guyader wrote: >--- a/xen/include/xen/types.h >+++ b/xen/include/xen/types.h >@@ -58,5 +58,6 @@ typedef __u64 __le64; > typedef __u64 __be64; > > typedef unsigned long uintptr_t; >+typedef int ssize_t; If you add a new type, it needs to be defined correctly and portably - here, it obviously needs to follow the definition of size_t (which isn't a typedef of "unsigned int" unilaterally). With ssize_t in particular I have always been wondering what benefit it provides over ptrdiff_t (i.e. whether there are environments where the two could sensibly be different). Jan > > #endif /* __TYPES_H__ */