aboutsummaryrefslogtreecommitdiff
path: root/wcsmbs/wcsrtombs.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wcsrtombs.c')
-rw-r--r--wcsmbs/wcsrtombs.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/wcsmbs/wcsrtombs.c b/wcsmbs/wcsrtombs.c
index 875ef16..03ef013 100644
--- a/wcsmbs/wcsrtombs.c
+++ b/wcsmbs/wcsrtombs.c
@@ -17,6 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <dlfcn.h>
#include <errno.h>
#include <stdlib.h>
#include <gconv.h>
@@ -76,10 +77,10 @@ __wcsrtombs (dst, src, len, ps)
{
data.__outbuf = buf;
- status = (*tomb->__fct) (__wcsmbs_gconv_fcts.tomb, &data,
- (const unsigned char **) &inbuf,
- (const unsigned char *) srcend, &dummy,
- 0, 1);
+ status = DL_CALL_FCT (tomb->__fct,
+ (tomb, &data, (const unsigned char **) &inbuf,
+ (const unsigned char *) srcend, data.__outbuf,
+ &dummy, 0, 1));
/* Count the number of bytes. */
result += data.__outbuf - buf;
@@ -105,9 +106,10 @@ __wcsrtombs (dst, src, len, ps)
data.__outbuf = dst;
data.__outbufend = dst + len;
- status = (*tomb->__fct) (__wcsmbs_gconv_fcts.tomb, &data,
- (const unsigned char **) src,
- (const unsigned char *) srcend, &dummy, 0, 1);
+ status = DL_CALL_FCT (tomb->__fct,
+ (tomb, &data, (const unsigned char **) src,
+ (const unsigned char *) srcend, data.__outbuf,
+ &dummy, 0, 1));
/* Count the number of bytes. */
result = data.__outbuf - (unsigned char *) dst;