From: "Jan Beulich" Subject: [PATCH] libelf: fix printing of pointers Date: Fri, 21 Jun 2013 11:21:40 +0100 Message-ID: <51C4455502000078000DF92F@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartF0C06824.1__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Keir Fraser , Ian Jackson List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartF0C06824.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Printing them as decimal number, the more with 0x prefix, is confusing and presumably relatively useless to most of us. Signed-off-by: Jan Beulich --- a/xen/include/xen/libelf.h +++ b/xen/include/xen/libelf.h @@ -82,13 +82,13 @@ typedef uintptr_t elf_ptrval; /* Provides a type declaration for a HANDLE. */ =20 #ifdef __XEN__ -# define ELF_PRPTRVAL "lu" +# define ELF_PRPTRVAL "lx" /* - * PRIuPTR is misdefined in xen/include/xen/inttypes.h, on 32-bit, - * to "u", when in fact uintptr_t is an unsigned long. + * PRIxPTR is misdefined in xen/include/xen/inttypes.h, on 32-bit, + * to "x", when in fact uintptr_t is an unsigned long. */ #else -# define ELF_PRPTRVAL PRIuPTR +# define ELF_PRPTRVAL PRIxPTR #endif /* printf format a la PRId... for a PTRVAL */ =20 --=__PartF0C06824.1__= Content-Type: text/plain; name="libelf-pointer-printing.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="libelf-pointer-printing.patch" libelf: fix printing of pointers=0A=0APrinting them as decimal number, the = more with 0x prefix, is confusing=0Aand presumably relatively useless to = most of us.=0A=0ASigned-off-by: Jan Beulich =0A=0A--- = a/xen/include/xen/libelf.h=0A+++ b/xen/include/xen/libelf.h=0A@@ -82,13 = +82,13 @@ typedef uintptr_t elf_ptrval;=0A /* Provides a type declaration= for a HANDLE. */=0A =0A #ifdef __XEN__=0A-# define ELF_PRPTRVAL "lu"=0A+# = define ELF_PRPTRVAL "lx"=0A /*=0A- * PRIuPTR is misdefined in = xen/include/xen/inttypes.h, on 32-bit,=0A- * to "u", when in fact = uintptr_t is an unsigned long.=0A+ * PRIxPTR is misdefined in xen/include= /xen/inttypes.h, on 32-bit,=0A+ * to "x", when in fact uintptr_t is an = unsigned long.=0A */=0A #else=0A-# define ELF_PRPTRVAL PRIuPTR=0A+# = define ELF_PRPTRVAL PRIxPTR=0A #endif=0A /* printf format a la PRId... = for a PTRVAL */=0A =0A --=__PartF0C06824.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__PartF0C06824.1__=--