From af98ec727c5c1e43db6f5a4bf42ce9a4dc75db36 Mon Sep 17 00:00:00 2001 From: whh8b <whh8b@git.zephyr-software.com> Date: Tue, 29 Sep 2015 19:28:56 +0000 Subject: [PATCH] Revert 18400 --- configure | 3 --- configure.in | 1 - libc/include/itox.h | 3 +-- libc/src/itoa.c | 6 +++--- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/configure b/configure index f7613c1..adf1197 100755 --- a/configure +++ b/configure @@ -6089,9 +6089,6 @@ enable_dir watchsyscall enable_dir p1 enable_dir inferfn enable_dir rss -enable_dir hookdynamic -enable_dir canaries -enable_dir cookbook ac_config_files="$ac_config_files Makefile" diff --git a/configure.in b/configure.in index d4a8610..c4573ad 100644 --- a/configure.in +++ b/configure.in @@ -70,7 +70,6 @@ enable_dir inferfn enable_dir rss enable_dir hookdynamic enable_dir canaries -enable_dir cookbook AC_OUTPUT(Makefile) diff --git a/libc/include/itox.h b/libc/include/itox.h index 00005e1..45bf488 100644 --- a/libc/include/itox.h +++ b/libc/include/itox.h @@ -1,8 +1,7 @@ #ifndef itox_h #define itox_h -//char* itox(int i, char b[]); -void itox(unsigned long long i, char *s); +char* itox(int i, char b[]); #endif diff --git a/libc/src/itoa.c b/libc/src/itoa.c index 303f041..ee69424 100644 --- a/libc/src/itoa.c +++ b/libc/src/itoa.c @@ -3,15 +3,15 @@ #include <stdint.h> /* convert integer i into string of hex digits at string s. */ -void itox(unsigned long long i, char *s) +void itox(uintptr_t i, char *s) { unsigned char n; /* 4-byte integers print 8 chars, 8-byte integers print 16 bytes */ - s += 2*sizeof(unsigned long long); + s += 2*sizeof(void*); *s = '\0'; - for (n = 2*sizeof(unsigned long long); n != 0; --n) { + for (n = 2*sizeof(void*); n != 0; --n) { *--s = "0123456789ABCDEF"[i & 0x0F]; i >>= 4; } -- GitLab