[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] What is xchar() macro?
From: |
Joel Cunningham |
Subject: |
[lwip-devel] What is xchar() macro? |
Date: |
Tue, 31 Oct 2017 14:50:40 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
I'm working on getting IPv6 code building with ARMCC 5 and GCC ARM
Embedded toolchain. ARM provides their own standard C library and GCC
ARM uses newlib. I'm having problems with ip6_addr.c because neither
one of these toolchains provide a function/macro called xchar(), but
both provide the other macros guarded by #ifndef isprint:
#ifndef isprint
#define in_range(c, lo, up) ((u8_t)c >= lo && (u8_t)c <= up)
#define isprint(c) in_range(c, 0x20, 0x7f)
#define isdigit(c) in_range(c, '0', '9')
#define isxdigit(c) (isdigit(c) || in_range(c, 'a', 'f') || in_range(c,
'A', 'F'))
#define islower(c) in_range(c, 'a', 'z')
#define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c
== '\t' || c == '\v')
#define xchar(i) ((char)((i) < 10 ? '0' + (i) : 'A' + (i) - 10))
#endif
Resulting in the following failures:
lwip\src\core\ipv6\ip6_addr.c:255:7: error: implicit declaration of
function 'xchar' [-Werror=implicit-function-declaration]
buf[i++] = xchar(((current_block_value & 0xf000) >> 12));
^
Looking online, I can't find any information on something called xchar
that would be part of the standard C library
Joel
- [lwip-devel] What is xchar() macro?,
Joel Cunningham <=