From c66dbe00b9c98bb9d1fc10c9007fdcfb98a59b73 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 Oct 1998 11:41:15 +0000 Subject: Update. 1998-10-16 10:07 Ulrich Drepper * iconv/Makefile [! elf]: Define CFLAGS-gconv_simple.c to -DSTATIC_GCONV. * iconv/skeleton.c: Include ELF header only of STATIC?GCONV is not defined. Avoid using DL_CLL_FCT if it is not defined. 1998-10-16 10:40 -0400 Zack Weinberg * resolv/arpa/nameser.h: Include sys/types.h unconditionally. Include endian.h unconditionally. Remove portability goop depending on #ifdef linux, #ifdef BSD, #ifdef machine-type. 1998-10-16 11:39 -0400 Zack Weinberg * sunrpc/rpc/types.h: Mark file so fixincludes won't modify it. --- iconv/Makefile | 1 + iconv/skeleton.c | 24 +++++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) (limited to 'iconv') diff --git a/iconv/Makefile b/iconv/Makefile index cd486b737e..8b4f605e5b 100644 --- a/iconv/Makefile +++ b/iconv/Makefile @@ -31,6 +31,7 @@ ifeq ($(elf),yes) routines += gconv_dl else CFLAGS-gconv_db.c = -DSTATIC_GCONV +CFLAGS-gconv_simple.c = -DSTATIC_GCONV endif distribute = gconv_builtin.h gconv_int.h loop.c skeleton.c diff --git a/iconv/skeleton.c b/iconv/skeleton.c index 90203213ef..bae82be3ed 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -77,13 +77,16 @@ */ #include -#include #include #include #define __need_size_t #define __need_NULL #include -#include + +#ifndef STATIC_GCONV +# include +# include +#endif /* The direction objects. */ @@ -219,9 +222,15 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data, if (status == GCONV_OK) #endif - /* Give the modules below the same chance. */ - status = DL_CALL_FCT (fct, (next_step, next_data, NULL, NULL, - written, 1)); + { + /* Give the modules below the same chance. */ +#ifdef DL_CALL_FCT + status = DL_CALL_FCT (fct, (next_step, next_data, NULL, NULL, + written, 1)); +#else + status = (*fct) (next_step, next_data, NULL, NULL, written, 1); +#endif + } } } else @@ -287,8 +296,13 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data, const char *outerr = data->outbuf; int result; +#ifdef DL_CALL_FCT result = DL_CALL_FCT (fct, (next_step, next_data, &outerr, outbuf, written, 0)); +#else + result = (*fct) (next_step, next_data, &outerr, outbuf, + written, 0); +#endif if (result != GCONV_EMPTY_INPUT) { -- cgit v1.2.3