Use PRIx64 for Result.h to accomodate 32/64

This commit is contained in:
Stan Cox 2018-12-06 08:37:33 -05:00
parent 0428348348
commit 03009fb488
2 changed files with 14 additions and 7 deletions

View File

@ -1,24 +1,28 @@
--- ./dyninst-10.0.0/instructionAPI/h/Result.h.sv 2018-11-09 11:48:08.000000000 -0500 --- ./dyninst-10.0.0/instructionAPI/h/Result.h.sv 2018-11-09 11:48:08.000000000 -0500
+++ ./dyninst-10.0.0/instructionAPI/h/Result.h 2018-12-04 22:12:47.369579566 -0500 +++ ./dyninst-10.0.0/instructionAPI/h/Result.h 2018-12-04 22:12:47.369579566 -0500
@@ -450,8 +450,8 @@ @@ -449,10 +449,10 @@
snprintf(hex, 20, "%x", val.s32val);
break; break;
case u64: case u64:
- snprintf(hex, 20, "%lx", val.u64val); - snprintf(hex, 20, "%lx", val.u64val);
+ snprintf(hex, 20, "%Lx", val.u64val); + snprintf(hex, 20, "%" PRIx64, val.u64val);
break; break;
case s64: case s64:
- snprintf(hex, 20, "%lx", val.s64val); - snprintf(hex, 20, "%lx", val.s64val);
+ snprintf(hex, 20, "%Lx", val.s64val); + snprintf(hex, 20, "%" PRIx64, val.s64val);
break; break;
case sp_float: case sp_float:
@@ -465,8 +465,8 @@ snprintf(hex, 20, "%f", val.floatval);
@@ -464,10 +464,10 @@
snprintf(hex, 20, "%x", val.bitval);
break; break;
case u48: case u48:
- snprintf(hex, 20, "%lx", val.s48val); - snprintf(hex, 20, "%lx", val.s48val);
+ snprintf(hex, 20, "%Lx", val.s48val); + snprintf(hex, 20, "%" PRIx64, val.s48val);
break; break;
case s48: case s48:
- snprintf(hex, 20, "%lx", val.s48val); - snprintf(hex, 20, "%lx", val.s48val);
+ snprintf(hex, 20, "%Lx", val.s48val); + snprintf(hex, 20, "%" PRIx64, val.s48val);
break; break;
case m512: case m512:
snprintf(hex, 20, "%p", val.m512val);

View File

@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation
License: LGPLv2+ License: LGPLv2+
Name: dyninst Name: dyninst
Group: Development/Libraries Group: Development/Libraries
Release: 3%{?dist} Release: 4%{?dist}
URL: http://www.dyninst.org URL: http://www.dyninst.org
Version: 10.0.0 Version: 10.0.0
# Dyninst only has full support for a few architectures. # Dyninst only has full support for a few architectures.
@ -204,6 +204,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
%changelog %changelog
* Wed Dec 05 2018 Stan Cox <scox@redhat.com> - 10.0.0-4
- Use PRIx64
* Wed Dec 05 2018 Stan Cox <scox@redhat.com> - 10.0.0-3 * Wed Dec 05 2018 Stan Cox <scox@redhat.com> - 10.0.0-3
- Patch Result.h for i386. - Patch Result.h for i386.