This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: gconv
- To: drepper@cygnus.com (Ulrich Drepper)
- Subject: Re: gconv
- From: Philip Blundell <pb@nexus.co.uk>
- Date: Mon, 19 Oct 1998 15:31:28 +0200
- cc: libc-hacker@gnu.org
>Take a look at the changes I just checked in. Does this fix your problem?
Almost. I had to change a couple of other files in the same way.
Thanks
p.
1998-10-19 Philip Blundell <pb@nexus.co.uk>
* iconv/gconv_db.c: Include ELF header only if STATIC_GCONV is not
defined. Avoid using _CALL_DL_FCT if it is not defined.
* iconv/gconv.c: Likewise.
Index: gconv_db.c
===================================================================
RCS file: /home/cvs/repository/gnu/libc/iconv/gconv_db.c,v
retrieving revision 1.8
diff -u -r1.8 gconv_db.c
--- gconv_db.c 1998/09/03 14:24:34 1.8
+++ gconv_db.c 1998/10/19 14:03:21
@@ -22,8 +22,11 @@
#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 @@
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 @@
/* 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 @@
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
Index: gconv.c
===================================================================
RCS file: /home/cvs/repository/gnu/libc/iconv/gconv.c,v
retrieving revision 1.4
diff -u -r1.4 gconv.c
--- gconv.c 1998/07/21 11:34:20 1.4
+++ gconv.c 1998/10/19 14:28:49
@@ -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 @@
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 @@
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);
- Follow-Ups:
- Re: gconv
- From: Ulrich Drepper <drepper@cygnus.com>
- References:
- Re: gconv
- From: Ulrich Drepper <drepper@cygnus.com>