diff options
Diffstat (limited to 'text-utils/column.c')
-rw-r--r-- | text-utils/column.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/text-utils/column.c b/text-utils/column.c index be99f94fa..fb57b4748 100644 --- a/text-utils/column.c +++ b/text-utils/column.c @@ -160,14 +160,22 @@ static wchar_t *local_wcstok(wchar_t *p, const wchar_t *separator, int greedy, w wchar_t *result = NULL; if (greedy) +#ifdef HAVE_WIDECHAR return wcstok(p, separator, state); +#else + return strtok_r(p, separator, state); +#endif if (!p) { if (!*state || !**state) return NULL; p = *state; } result = p; +#ifdef HAVE_WIDECHAR p = wcspbrk(result, separator); +#else + p = strpbrk(result, separator); +#endif if (!p) *state = NULL; else { |