From 04fa6e021596935f96dc755d5f7bc56ae4884ca9 Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 17 Oct 2007 12:52:27 +0000 Subject: [PATCH] 2007-10-17 Martin Hunt PR5000 * vsprintf.c: Remove _stp_endian. --- runtime/ChangeLog | 4 ++++ runtime/vsprintf.c | 23 ----------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 900ef0fc5..a7dea2c48 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,7 @@ +2007-10-17 Martin Hunt + PR5000 + * vsprintf.c: Remove _stp_endian. + 2007-10-15 Masami Hiramatsu * autoconf-tsc-khz.c: Fix a bug to be configured correctly. diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c index 0e52f5c33..061aba3fe 100644 --- a/runtime/vsprintf.c +++ b/runtime/vsprintf.c @@ -12,9 +12,6 @@ #ifndef _VSPRINTF_C_ #define _VSPRINTF_C_ -enum endian {STP_NATIVE=0, STP_LITTLE, STP_BIG}; -static enum endian _stp_endian = STP_NATIVE; - static int skip_atoi(const char **s) { int i=0; @@ -213,37 +210,17 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) ++str; break; case 2: - if (_stp_endian != STP_NATIVE) { - if (_stp_endian == STP_BIG) - num = cpu_to_be16(num); - else - num = cpu_to_le16(num); - } if((str + 1) <= end) *(int16_t *)str = (int16_t)num; str+=2; break; case 8: - if (_stp_endian != STP_NATIVE) { - if (_stp_endian == STP_BIG) - num = cpu_to_be64(num); - else - num = cpu_to_le64(num); - } - if((str + 7) <= end) *(int64_t *)str = num; str+=8; break; case 4: default: // "%4b" by default - if (_stp_endian != STP_NATIVE) { - if (_stp_endian == STP_BIG) - num = cpu_to_be32(num); - else - num = cpu_to_le32(num); - } - if((str + 3) <= end) *(int32_t *)str = num; str+=4; -- 2.43.5