summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-11-07 22:57:00 +0000
committerbapt <bapt@FreeBSD.org>2015-11-07 22:57:00 +0000
commit88fd312cc51cf14553f4592a8999ff47ba234779 (patch)
tree8fcd4a6c1d16d6a849338a452496ce658d63f7ca /usr.bin
parentd54893afcb050f45e1808e5cbf05527a306e26b6 (diff)
downloadFreeBSD-src-88fd312cc51cf14553f4592a8999ff47ba234779.zip
FreeBSD-src-88fd312cc51cf14553f4592a8999ff47ba234779.tar.gz
Fix build of localedef(1) on arm where wchar_t is an unsigned int
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/localedef/charmap.c6
-rw-r--r--usr.bin/localedef/ctype.c2
-rw-r--r--usr.bin/localedef/localedef.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/localedef/charmap.c b/usr.bin/localedef/charmap.c
index 0c64873..18db802 100644
--- a/usr.bin/localedef/charmap.c
+++ b/usr.bin/localedef/charmap.c
@@ -227,7 +227,7 @@ add_charmap_impl(const char *sym, wchar_t wc, int nodups)
* also possibly insert the wide mapping, although note that there
* can only be one of these per wide character code.
*/
- if ((wc != -1) && ((RB_FIND(cmap_wc, &cmap_wc, &srch)) == NULL)) {
+ if ((wc != (wchar_t)-1) && ((RB_FIND(cmap_wc, &cmap_wc, &srch)) == NULL)) {
if ((n = calloc(1, sizeof (*n))) == NULL) {
errf("out of memory");
return;
@@ -269,7 +269,7 @@ add_charmap_undefined(char *sym)
srch.name = sym;
cm = RB_FIND(cmap_sym, &cmap_sym, &srch);
- if ((undefok == 0) && ((cm == NULL) || (cm->wc == -1))) {
+ if ((undefok == 0) && ((cm == NULL) || (cm->wc == (wchar_t)-1))) {
warn("undefined symbol <%s>", sym);
add_charmap_impl(sym, -1, 0);
} else {
@@ -344,7 +344,7 @@ lookup_charmap(const char *sym, wchar_t *wc)
srch.name = sym;
n = RB_FIND(cmap_sym, &cmap_sym, &srch);
- if (n && n->wc != -1) {
+ if (n && n->wc != (wchar_t)-1) {
if (wc)
*wc = n->wc;
return (0);
diff --git a/usr.bin/localedef/ctype.c b/usr.bin/localedef/ctype.c
index a083c81..d610833 100644
--- a/usr.bin/localedef/ctype.c
+++ b/usr.bin/localedef/ctype.c
@@ -199,7 +199,7 @@ add_ctype(int val)
}
void
-add_ctype_range(int end)
+add_ctype_range(wchar_t end)
{
ctype_node_t *ctn;
wchar_t cur;
diff --git a/usr.bin/localedef/localedef.h b/usr.bin/localedef/localedef.h
index 7805d37..8c82939 100644
--- a/usr.bin/localedef/localedef.h
+++ b/usr.bin/localedef/localedef.h
@@ -124,7 +124,7 @@ wchar_t * wsncpy(wchar_t *, const wchar_t *, size_t);
/* ctype.c - LC_CTYPE handling */
void init_ctype(void);
void add_ctype(int);
-void add_ctype_range(int);
+void add_ctype_range(wchar_t);
void add_width(int, int);
void add_width_range(int, int, int);
void add_caseconv(int, int);
OpenPOWER on IntegriCloud