mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-12 19:26:52 +08:00
Introduce lwip_toupper and use it in netbiosns.c
This fixes build error when LWIP_NO_CTYPE_H=1. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
@@ -223,6 +223,7 @@ typedef int ssize_t;
|
||||
#define lwip_isspace(c) ((c) == ' ' || (c) == '\f' || (c) == '\n' || (c) == '\r' || (c) == '\t' || (c) == '\v')
|
||||
#define lwip_isupper(c) lwip_in_range((c), 'A', 'Z')
|
||||
#define lwip_tolower(c) (lwip_isupper(c) ? (c) - 'A' + 'a' : c)
|
||||
#define lwip_toupper(c) (lwip_islower(c) ? (c) - 'a' + 'A' : c)
|
||||
#else
|
||||
#include <ctype.h>
|
||||
#define lwip_isdigit(c) isdigit((unsigned char)(c))
|
||||
@@ -230,6 +231,7 @@ typedef int ssize_t;
|
||||
#define lwip_islower(c) islower((unsigned char)(c))
|
||||
#define lwip_isspace(c) isspace((unsigned char)(c))
|
||||
#define lwip_tolower(c) tolower((unsigned char)(c))
|
||||
#define lwip_toupper(c) toupper((unsigned char)(c))
|
||||
#endif
|
||||
|
||||
/** C++ const_cast<target_type>(val) equivalent to remove constness from a value (GCC -Wcast-qual) */
|
||||
|
||||
Reference in New Issue
Block a user