Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit fix compilation



details:   https://anonhg.NetBSD.org/src/rev/f33b62f6f49d
branches:  trunk
changeset: 837074:f33b62f6f49d
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Nov 18 17:15:41 2018 +0000

description:
fix compilation

diffstat:

 lib/libedit/chartype.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 2e810da0359a -r f33b62f6f49d lib/libedit/chartype.c
--- a/lib/libedit/chartype.c    Sun Nov 18 17:09:39 2018 +0000
+++ b/lib/libedit/chartype.c    Sun Nov 18 17:15:41 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chartype.c,v 1.32 2018/11/18 17:09:39 christos Exp $   */
+/*     $NetBSD: chartype.c,v 1.33 2018/11/18 17:15:41 christos Exp $   */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,10 +31,11 @@
  */
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: chartype.c,v 1.32 2018/11/18 17:09:39 christos Exp $");
+__RCSID("$NetBSD: chartype.c,v 1.33 2018/11/18 17:15:41 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <ctype.h>
+#include <limits.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -185,9 +186,9 @@
 {
        char buf[MB_LEN_MAX];
        int size;
-       if ((size = ct_wctomb(buf, c)) < 0)
+       if ((size = wctomb(buf, c)) < 0)
                return 0;
-       return size;
+       return (size_t)size;
 }
 
 libedit_private ssize_t



Home | Main Index | Thread Index | Old Index