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 <kerolasa@iki.fi>
This commit is contained in:
Hamish Moffatt 2008-09-09 02:06:52 +00:00 committed by Craig Small
parent dd03003edd
commit 86fe50d179

View File

@ -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 <wchar.h>
# include <wctype.h>
# include <stdlib.h> /* MB_CUR_MAX */
@ -23,7 +23,7 @@
# include <langinfo.h>
#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){