about summary refs log tree commit diff
path: root/iconv
diff options
context:
space:
mode:
Diffstat (limited to 'iconv')
-rw-r--r--iconv/gconv.c13
-rw-r--r--iconv/gconv_db.c17
2 files changed, 28 insertions, 2 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);
diff --git a/iconv/gconv_db.c b/iconv/gconv_db.c
index d5d075df88..cbaaf18339 100644
--- a/iconv/gconv_db.c
+++ b/iconv/gconv_db.c
@@ -22,7 +22,10 @@
 #include <stdlib.h>
 #include <string.h>
 #include <bits/libc-lock.h>
-#include <elf/ldsodefs.h>
+
+#ifndef STATIC_GCONV
+# include <elf/ldsodefs.h>
+#endif
 
 #include <gconv_int.h>
 
@@ -155,7 +158,11 @@ free_derivation (void *p)
 
   for (cnt = 0; cnt < deriv->nsteps; ++cnt)
     if (deriv->steps[cnt].end_fct)
+#ifdef _CALL_DL_FCT
       _CALL_DL_FCT (deriv->steps[cnt].end_fct, (&deriv->steps[cnt]));
+#else
+      deriv->steps[cnt].end_fct (&deriv->steps[cnt]);
+#endif
 
   free ((struct gconv_step *) deriv->steps);
   free (deriv);
@@ -221,7 +228,11 @@ gen_steps (struct derivation_step *best, const char *toset,
 
 	  /* Call the init function.  */
 	  if (result[step_cnt].init_fct != NULL)
+#ifdef _CALL_DL_FCT
 	    _CALL_DL_FCT (result[step_cnt].init_fct, (&result[step_cnt]));
+#else
+	    result[step_cnt].init_fct (&result[step_cnt]);
+#endif
 
 	  current = current->last;
 	}
@@ -232,7 +243,11 @@ gen_steps (struct derivation_step *best, const char *toset,
 	  while (++step_cnt < *nsteps)
 	    {
 	      if (result[step_cnt].end_fct != NULL)
+#ifdef _CALL_DL_FCT
 		_CALL_DL_FCT (result[step_cnt].end_fct, (&result[step_cnt]));
+#else
+		result[step_cnt].end_fct (&result[step_cnt]);
+#endif
 #ifndef STATIC_GCONV
 	      __gconv_release_shlib (result[step_cnt].shlib_handle);
 #endif