diff options
Diffstat (limited to 'iconv/gconv.c')
-rw-r--r-- | iconv/gconv.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/iconv/gconv.c b/iconv/gconv.c index 9484fc8881..ceefffcc87 100644 --- a/iconv/gconv.c +++ b/iconv/gconv.c @@ -22,8 +22,10 @@ #include <assert.h> #include <gconv.h> #include <sys/param.h> -#include <elf/ldsodefs.h> +#ifndef STATIC_GCONV +# include <elf/ldsodefs.h> +#endif int internal_function @@ -41,8 +43,12 @@ __gconv (gconv_t cd, const char **inbuf, const char *inbufend, char **outbuf, if (inbuf == NULL || *inbuf == NULL) /* We just flush. */ +#ifdef _CALL_DL_FCT result = _CALL_DL_FCT (cd->steps->fct, (cd->steps, cd->data, NULL, NULL, converted, 1)); +#else + result = cd->steps->fct (cd->steps, cd->data, NULL, NULL, converted, 1); +#endif else { const char *last_start; @@ -54,9 +60,14 @@ __gconv (gconv_t cd, const char **inbuf, const char *inbufend, char **outbuf, do { last_start = *inbuf; +#ifdef _CALL_DL_FCT result = _CALL_DL_FCT (cd->steps->fct, (cd->steps, cd->data, inbuf, inbufend, converted, 0)); +#else + result = cd->steps->fct (cd->steps, cd->data, inbuf, inbufend, + converted, 0); +#endif } while (result == GCONV_EMPTY_INPUT && last_start != *inbuf && *inbuf + cd->steps->min_needed_from <= inbufend); |