WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xen-unstable: fix stubdom newlib SIZE_MAX definition

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xen-unstable: fix stubdom newlib SIZE_MAX definition in stdint.h
From: Pasi Kärkkäinen <pasik@xxxxxx>
Date: Tue, 25 Aug 2009 17:57:02 +0300
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 25 Aug 2009 07:57:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
Hello,

While working on adding bzip2/lzma decompression support into stubdom/pvgrub
I noticed a problem in newlib 1.16.0 (current version in xen-unstable)
libc/include/stdint.h.

It defines SIZE_MAX like this:

#define SIZE_MAX __STDINT_EXP(LONG_MAX)

Which is an incorrect signed value. This problem is fixed in upstream 
newlib 1.17.0. The correct definition is this:

#ifdef __SIZE_MAX__
#define SIZE_MAX __SIZE_MAX__
#else
#define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
#endif

The attached patches fix this problem. These are needed for being able to
build lzma (xz) libs for stubdom/pvgrub.

-- Pasi

Attachment: stubdom-Makefile-add-newlib-size_max-patch.patch
Description: Text Data

Attachment: newlib-stdint-size_max-fix-from-1.17.0.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xen-unstable: fix stubdom newlib SIZE_MAX definition in stdint.h, Pasi Kärkkäinen <=