From 86fe50d179a57bf4f203b3e15fe579f46ac145f9 Mon Sep 17 00:00:00 2001 From: Hamish Moffatt Date: Tue, 9 Sep 2008 02:06:52 +0000 Subject: [PATCH] libproc-ng: support building without WCHAR support The uClibc might not have wchar. A patch from Buildroot. Reference: http://git.buildroot.net/buildroot/tree/package/procps/procps-wchar.patch?id=fc333e7d083d144e0f8d1c4bac061b8de2ee7510 Backported-by: Sami Kerola --- proc/escape.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proc/escape.c b/proc/escape.c index 92ba4b19..1fd4e74a 100644 --- a/proc/escape.c +++ b/proc/escape.c @@ -15,7 +15,7 @@ #include "escape.h" #include "readproc.h" -#if (__GNU_LIBRARY__ >= 6) +#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)) # include # include # include /* MB_CUR_MAX */ @@ -23,7 +23,7 @@ # include #endif -#if (__GNU_LIBRARY__ >= 6) +#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)) static int escape_str_utf8(char *restrict dst, const char *restrict src, int bufsize, int *maxcells){ int my_cells = 0; int my_bytes = 0; @@ -116,7 +116,7 @@ int escape_str(char *restrict dst, const char *restrict src, int bufsize, int *m "????????????????????????????????" "????????????????????????????????"; -#if (__GNU_LIBRARY__ >= 6) +#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)) static int utf_init=0; if(utf_init==0){