* Updating glob() actually broke it, since Haiku does have broken mbrtowc(),
and wcrtomb() functions. I worked around the issue, and added a build warning so that we don't forget to change it back once we have working versions of those. * This lets apps like "ftp", and "sftp" work again. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28531 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -109,7 +109,7 @@ static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
|
||||
#define SLASH '/'
|
||||
#define COMMA ','
|
||||
|
||||
#ifndef DEBUG
|
||||
#if !defined(DEBUG) && !defined(__HAIKU__)
|
||||
|
||||
#define M_QUOTE 0x8000000000ULL
|
||||
#define M_PROTECT 0x4000000000ULL
|
||||
@@ -164,6 +164,30 @@ static int match(Char *, Char *, Char *);
|
||||
static void qprintf(const char *, Char *);
|
||||
#endif
|
||||
|
||||
#ifdef __HAIKU__
|
||||
# warning glob() wants to use wide character functions
|
||||
|
||||
static size_t
|
||||
my_wcrtomb(char* to, char wchar, mbstate_t* state)
|
||||
{
|
||||
*to = wchar;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static size_t
|
||||
my_mbrtowc(wchar_t* to, const char* string, size_t len, mbstate_t* state)
|
||||
{
|
||||
if (!string[0])
|
||||
return 0;
|
||||
*to = *string;
|
||||
return 1;
|
||||
}
|
||||
|
||||
# define wcrtomb my_wcrtomb
|
||||
# define mbrtowc my_mbrtowc
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user