From 4bca4c174852bfc348f99e85684fc8f65631d125 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Apr 1998 09:21:28 +0000 Subject: Update. 1998-04-07 08:51 Ulrich Drepper * iconv/gconv.c: Take care for NULL arguments. * iconv/gconv_dl.c: Make find_func function global. * iconv/gconv_int.h: Add prototype for __gconv_find_func. Add prototypes for ASCII conversion functions. * iconv/gconv_simple.c: Add ASCII conversion functions. * locale/C-ctype.c: Correct charset name. * wcsmbs/Makefile (distribute): Add wcsmbsload.h. (routines): Remove wmemrtowcs and wmemrtombs, add wcsnlen and wcsmbsload. * wcsmbs/btowc.c: Rewrite to use iconv functionality. * wcsmbs/mbrtowc.c: Likewise. * wcsmbs/mbsnrtowcs.c: Likewise. * wcsmbs/mbsrtowcs.c: Likewise. * wcsmbs/wcrtomb.c: Likewise. * wcsmbs/wcsnrtombs.c: Likewise. * wcsmbs/wcsrtombs.c: Likewise. * wcsmbs/wctob.c: Likewise. * wcsmbs/wchar.h: Add prototype for __wcslen, wcsnlen. Remove prototypes for wmemr*. * wcsmbs/wcslen.c: Rename to __wcslen and make wcslen weak alias. * wcsmbs/wcsnlen.c: New file. * wcsmbs/wcsmbsload.c: New file. * wcsmbs/wcsmbsload.h: New file. * manual/filesys.texi: Mention risks of tmpnam and mktemp. * manual/install.texi: Describe some more critical points. * string/string.h: Add prototype for __strnlen. * string/strnlen.c: Rename to __strnlen and make strnlen weak alias. * sysdeps/posix/mktemp.c: Rewrite to allow many more files and much less predictable names. * sysdeps/posix/mkstemp.c: Likewise. 1998-04-05 Andreas Jaeger * manual/libc.texinfo (Top): Change "file namespace" to "local namespace". * manual/socket.texi: Change file namespace to local namespace. (Out-of-Band Data): Remove unneeded variable link. (Host Address Functions): Use uint32_t consequently and add a number of clarifications for IPv4/IPv6, classless addresses. (Internet Namespace): Added some paragraphs about IPv6. Based on suggestions by Francesco Potorti` . 1998-04-05 Philip Blundell Update for draft-ietf-ipngwg-bsd-api-new-01.txt: * resolv/netdb.h (getnameinfo): Use `socklen_t' not `size_t'. (NI_NUMERICHOST, et al.): Tidy up and add comments. (AI_NUMERICHOST): Define. (getnodebyname): New prototype. (AI_V4MAPPED, et al.): New constants. * sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h (SA_LEN): New macro.< * sysdeps/generic/bits/sockaddr.h (SA_LEN): Likewise. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add sa_len for socket. * sysdeps/unix/sysv/linux/sa_len.c: New file. * sysdeps/unix/sysv/linux/Dist: Add sa_len.c. * sysdeps/unix/sysv/linux/bits/socket.h: Make multiple #inclusion safe. * sysdeps/generic/bits/sockunion.h: New file, defining sockaddr_union. * sysdeps/unix/sysv/linux/bits/sockunion.h: Likewise. * socket/Makefile (headers): Add bits/sockunion.h. * socket/sys/socket.h: Include * inet/netinet/in.h: Include rather than , to avoid getting sockaddr_union defined. * sysdeps/generic/bits/socket.h: Allow inclusion from netinet.in.h. * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/if_index.c: Remove use of SIOCGIFCOUNT (2.2.x kernels won't have it). 1998-04-06 21:21 Ulrich Drepper * sysdeps/mach/hurd/bits/ioctls.h: Allow inclusion from hurd/ioctl.h. * sysdeps/mach/hurd/dl-sysdep.c: Use __ptr_t not caddr_t. * iconv/gconv_conf.c: Define MAXPATHLEN if not available before. Patches by UCHIYAMA Yasushi . 1998-04-05 Philip Blundell * manual/socket.texi (Socket Addresses): Fix a typo. (Interface Naming): New section. 1998-04-05 23:29 Zack Weinberg * configure.in: Check for CC using $ac_tool_prefix, to handle cross-compilation. Use AC_CHECK_TOOL to find MiG. * config.make.in: Add MIG to be substituted. * mach/Machrules: Don't define MIG variable. Patch by Gordon Matzigkeit . 1998-04-05 Mark Kettenis * elf/dl-load.c (decompose_rpath): Use local_strdup instead of strdupa to copy rpath. 1998-04-05 Andreas Schwab * configure.in: Fix gcc version check. * aclocal.m4 (AC_PROG_CHECK_VER): Rewritten to make less confusing. 1998-04-05 Andreas Schwab * configure.in: Fix gcc version check. * aclocal.m4 (AC_PROG_CHECK_VER): Rewritten to make less confusing. 1998-04-05 Andreas Schwab * configure.in: Fix gcc version check. * aclocal.m4 (AC_PROG_CHECK_VER): Rewritten to make less confusing. 1998-03-31 Mark Kettenis * sysdeps/unix/bsd/unlockpt.c (unlockpt): Call __ptsname_r instead of ptsname_r. * stdlib/stdlib.h: Change prototype of ptsname_r to make it more like ttyname_r. * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Likewise. * sysdeps/generic/ptsname.c (__ptsname_r): Likewise. * sysdeps/unix/grantpt.c (grantpt): Change check of return value of __ptsname_r accordingly. * login/openpty.c (openpty): Likewise. 1998-06-04 18:47 H.J. Lu * libio/fileops.c (_IO_file_xsgetn): Adjust pointers. 1998-04-06 13:58 Andreas Schwab * Makeconfig (libtypes): Redo H.J. Lu's change of 1998-03-27. * Makerules: Readd missing rule for $(objpfx)stamp.oS. 1998-04-06 Thorsten Kukuk * nis/ypclnt.c: Don't give YPERR_RPC back, use the do_ypcall return value for better error checking. --- ChangeLog | 156 +++++++++ Makerules | 7 + aclocal.m4 | 61 ++-- bits/sockaddr.h | 5 +- bits/socket.h | 4 +- config.make.in | 1 + configure | 486 ++++++++++++++++----------- configure.in | 21 +- elf/dl-load.c | 2 +- iconv/gconv.c | 17 +- iconv/gconv_conf.c | 4 + iconv/gconv_dl.c | 12 +- iconv/gconv_int.h | 6 + iconv/gconv_simple.c | 228 +++++++++++++ inet/netinet/in.h | 2 +- libio/fileops.c | 12 +- linuxthreads/Makefile | 2 +- locale/C-ctype.c | 4 +- login/openpty.c | 2 +- mach/Machrules | 5 +- manual/filesys.texi | 14 + manual/install.texi | 19 ++ manual/libc.texinfo | 10 +- manual/socket.texi | 469 ++++++++++++++++++-------- nis/ypclnt.c | 20 +- resolv/netdb.h | 29 +- socket/Makefile | 5 +- socket/sys/socket.h | 3 + stdlib/stdlib.h | 14 +- string/string.h | 1 + string/strnlen.c | 5 +- sysdeps/generic/bits/sockaddr.h | 5 +- sysdeps/generic/bits/socket.h | 4 +- sysdeps/generic/bits/sockunion.h | 40 +++ sysdeps/generic/ptsname.c | 9 +- sysdeps/mach/hurd/bits/ioctls.h | 6 +- sysdeps/mach/hurd/dl-sysdep.c | 6 +- sysdeps/posix/mkstemp.c | 42 ++- sysdeps/posix/mktemp.c | 46 ++- sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h | 4 +- sysdeps/unix/bsd/unlockpt.c | 2 +- sysdeps/unix/grantpt.c | 4 +- sysdeps/unix/sysv/linux/Dist | 1 + sysdeps/unix/sysv/linux/Makefile | 2 +- sysdeps/unix/sysv/linux/arm/profil-counter.h | 51 ++- sysdeps/unix/sysv/linux/bits/socket.h | 7 +- sysdeps/unix/sysv/linux/bits/sockunion.h | 46 +++ sysdeps/unix/sysv/linux/if_index.c | 44 ++- sysdeps/unix/sysv/linux/mips/bits/socket.h | 2 +- sysdeps/unix/sysv/linux/ptsname.c | 84 +++-- sysdeps/unix/sysv/linux/sa_len.c | 46 +++ wcsmbs/Makefile | 9 +- wcsmbs/btowc.c | 46 ++- wcsmbs/mbrtowc.c | 144 +++----- wcsmbs/mbsnrtowcs.c | 193 +++++------ wcsmbs/mbsrtowcs.c | 172 +++++----- wcsmbs/wchar.h | 29 +- wcsmbs/wcrtomb.c | 109 +++--- wcsmbs/wcslen.c | 5 +- wcsmbs/wcsmbsload.c | 132 ++++++++ wcsmbs/wcsmbsload.h | 52 +++ wcsmbs/wcsnlen.c | 44 +++ wcsmbs/wcsnrtombs.c | 155 +++++---- wcsmbs/wcsrtombs.c | 157 +++++---- wcsmbs/wctob.c | 41 ++- 65 files changed, 2269 insertions(+), 1096 deletions(-) create mode 100644 sysdeps/generic/bits/sockunion.h create mode 100644 sysdeps/unix/sysv/linux/bits/sockunion.h create mode 100644 sysdeps/unix/sysv/linux/sa_len.c create mode 100644 wcsmbs/wcsmbsload.c create mode 100644 wcsmbs/wcsmbsload.h create mode 100644 wcsmbs/wcsnlen.c diff --git a/ChangeLog b/ChangeLog index 835f751cbb..f677d89046 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,159 @@ +1998-04-07 08:51 Ulrich Drepper + + * iconv/gconv.c: Take care for NULL arguments. + * iconv/gconv_dl.c: Make find_func function global. + * iconv/gconv_int.h: Add prototype for __gconv_find_func. + Add prototypes for ASCII conversion functions. + * iconv/gconv_simple.c: Add ASCII conversion functions. + * locale/C-ctype.c: Correct charset name. + + * wcsmbs/Makefile (distribute): Add wcsmbsload.h. + (routines): Remove wmemrtowcs and wmemrtombs, add wcsnlen and + wcsmbsload. + * wcsmbs/btowc.c: Rewrite to use iconv functionality. + * wcsmbs/mbrtowc.c: Likewise. + * wcsmbs/mbsnrtowcs.c: Likewise. + * wcsmbs/mbsrtowcs.c: Likewise. + * wcsmbs/wcrtomb.c: Likewise. + * wcsmbs/wcsnrtombs.c: Likewise. + * wcsmbs/wcsrtombs.c: Likewise. + * wcsmbs/wctob.c: Likewise. + * wcsmbs/wchar.h: Add prototype for __wcslen, wcsnlen. Remove + prototypes for wmemr*. + * wcsmbs/wcslen.c: Rename to __wcslen and make wcslen weak alias. + * wcsmbs/wcsnlen.c: New file. + * wcsmbs/wcsmbsload.c: New file. + * wcsmbs/wcsmbsload.h: New file. + + * manual/filesys.texi: Mention risks of tmpnam and mktemp. + + * manual/install.texi: Describe some more critical points. + + * string/string.h: Add prototype for __strnlen. + * string/strnlen.c: Rename to __strnlen and make strnlen weak alias. + + * sysdeps/posix/mktemp.c: Rewrite to allow many more files and + much less predictable names. + * sysdeps/posix/mkstemp.c: Likewise. + +1998-04-05 Andreas Jaeger + + * manual/libc.texinfo (Top): Change "file namespace" to "local + namespace". + + * manual/socket.texi: Change file namespace to local namespace. + (Out-of-Band Data): Remove unneeded variable link. + (Host Address Functions): Use uint32_t consequently and add a + number of clarifications for IPv4/IPv6, classless addresses. + (Internet Namespace): Added some paragraphs about IPv6. + Based on suggestions by Francesco Potorti` . + +1998-04-05 Philip Blundell + + Update for draft-ietf-ipngwg-bsd-api-new-01.txt: + + * resolv/netdb.h (getnameinfo): Use `socklen_t' not `size_t'. + (NI_NUMERICHOST, et al.): Tidy up and add comments. + (AI_NUMERICHOST): Define. + (getnodebyname): New prototype. + (AI_V4MAPPED, et al.): New constants. + + * sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h (SA_LEN): New macro.< + * sysdeps/generic/bits/sockaddr.h (SA_LEN): Likewise. + * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add sa_len + for socket. + * sysdeps/unix/sysv/linux/sa_len.c: New file. + * sysdeps/unix/sysv/linux/Dist: Add sa_len.c. + + * sysdeps/unix/sysv/linux/bits/socket.h: Make multiple #inclusion safe. + + * sysdeps/generic/bits/sockunion.h: New file, defining sockaddr_union. + * sysdeps/unix/sysv/linux/bits/sockunion.h: Likewise. + * socket/Makefile (headers): Add bits/sockunion.h. + * socket/sys/socket.h: Include + * inet/netinet/in.h: Include rather than + , to avoid getting sockaddr_union defined. + * sysdeps/generic/bits/socket.h: Allow inclusion from netinet.in.h. + * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise. + + * sysdeps/unix/sysv/linux/if_index.c: Remove use of SIOCGIFCOUNT + (2.2.x kernels won't have it). + +1998-04-06 21:21 Ulrich Drepper + + * sysdeps/mach/hurd/bits/ioctls.h: Allow inclusion from hurd/ioctl.h. + * sysdeps/mach/hurd/dl-sysdep.c: Use __ptr_t not caddr_t. + * iconv/gconv_conf.c: Define MAXPATHLEN if not available before. + Patches by UCHIYAMA Yasushi . + +1998-04-05 Philip Blundell + + * manual/socket.texi (Socket Addresses): Fix a typo. + (Interface Naming): New section. + +1998-04-05 23:29 Zack Weinberg + + * configure.in: Check for CC using $ac_tool_prefix, to handle + cross-compilation. Use AC_CHECK_TOOL to find MiG. + * config.make.in: Add MIG to be substituted. + * mach/Machrules: Don't define MIG variable. + + Patch by Gordon Matzigkeit . + +1998-04-05 Mark Kettenis + + * elf/dl-load.c (decompose_rpath): Use local_strdup instead of + strdupa to copy rpath. + +1998-04-05 Andreas Schwab + + * configure.in: Fix gcc version check. + + * aclocal.m4 (AC_PROG_CHECK_VER): Rewritten to make less confusing. + +1998-04-05 Andreas Schwab + + * configure.in: Fix gcc version check. + + * aclocal.m4 (AC_PROG_CHECK_VER): Rewritten to make less + confusing. + +1998-04-05 Andreas Schwab + + * configure.in: Fix gcc version check. + + * aclocal.m4 (AC_PROG_CHECK_VER): Rewritten to make less + confusing. + +1998-03-31 Mark Kettenis + + * sysdeps/unix/bsd/unlockpt.c (unlockpt): Call __ptsname_r instead + of ptsname_r. + + * stdlib/stdlib.h: Change prototype of ptsname_r to make it more + like ttyname_r. + * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Likewise. + * sysdeps/generic/ptsname.c (__ptsname_r): Likewise. + * sysdeps/unix/grantpt.c (grantpt): Change check of return value + of __ptsname_r accordingly. + * login/openpty.c (openpty): Likewise. + +1998-06-04 18:47 H.J. Lu + + * libio/fileops.c (_IO_file_xsgetn): Adjust pointers. + +1998-04-06 13:58 Andreas Schwab + + * Makeconfig (libtypes): Redo H.J. Lu's change of 1998-03-27. + + * Makerules: Readd missing rule for $(objpfx)stamp.oS. + +1998-04-06 Thorsten Kukuk + + * nis/ypclnt.c: Don't give YPERR_RPC back, use the do_ypcall + return value for better error checking. + 1998-04-06 Jakub Jelinek * elf/dl-runtime.c (fixup, profile_fixup): The final arg to diff --git a/Makerules b/Makerules index 094706bff2..9d0a9faa58 100644 --- a/Makerules +++ b/Makerules @@ -582,6 +582,13 @@ touch $@ endef O%-lib = $(..)$(patsubst %,$(libtype$*),c) +ifndef static-only-routines +subdir_lib: $(objpfx)stamp.oS +$(objpfx)stamp.oS: + $(make-target-directory) + rm -f $@; > $@ +endif + endif # Rules to update the $(ar-symtab-name) member with ranlib, diff --git a/aclocal.m4 b/aclocal.m4 index 1bb0b4a92c..c9a1a906f2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -34,54 +34,31 @@ dnl dnl Locate a program and check that its version is acceptable. dnl AC_PROG_CHECK_VER(var, namelist, version-switch, -dnl [version-extract-regexp], version-glob, fatal) +dnl [version-extract-regexp], version-glob [, do-if-fail]) AC_DEFUN(AC_CHECK_PROG_VER, -[# Prepare to iterate over the program-name list. -set dummy $2; shift -AC_MSG_CHECKING([for [$]1]) -AC_CACHE_VAL(ac_cv_prog_$1, [dnl -if test -n "[$]$1"; then - ac_cv_prog_$1="[$]$1" # Let the user override the test. +[AC_CHECK_PROGS([$1], [$2]) +if test -z "[$]$1"; then + ac_verc_fail=yes else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_word; do - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_$1="$ac_word" - break - fi - done - test -n "$ac_cv_prog_$1" && break - done - IFS="$ac_save_ifs" -fi])dnl -if test -z "$ac_cv_prog_$1"; then - AC_MSG_RESULT(no) - $1=: - ac_verc_fail=t; ifelse([$6],,,[ac_verc_fatal=$6]) -else -# Found it, now check the version. -ac_word=$ac_cv_prog_$1 -dnl Do this by hand to avoid "(cached) (cached)". - if test "[$]{ac_cv_prog_$1_ver+set}" != set; then + # Found it, now check the version. + AC_MSG_CHECKING([version of [$]$1]) changequote(<<,>>)dnl - ac_cv_prog_$1_ver=`$ac_word $3 2>&1 ifelse(<<$4>>,,,<<| sed -n 's/^.*$4.*$/\1/p'>>)` - fi - if test -n "$ac_cv_prog_$1_ver"; then - case $ac_cv_prog_$1_ver in - <<$5>>) ac_vers_ok=", ok"; $1=$ac_cv_prog_$1;; + ac_prog_version=`<<$>>$1 $3 2>&1 ifelse(<<$4>>,,, + <<| sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'>>)` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + <<$5>>) changequote([,])dnl - *) ac_vers_ok=", bad"; $1=: - ac_verc_fail=t; ifelse([$6],,,[ac_verc_fatal=$6]);; + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac - else - ac_vers_ok="v. ?.??, bad"; $1=: - ac_verc_fail=t; ifelse([$6],,,[ac_verc_fatal=$6]) - fi -AC_MSG_RESULT($ac_word $ac_cv_prog_$1_ver$ac_vers_ok) + AC_MSG_RESULT([$ac_prog_version]) fi -AC_SUBST($1)dnl +ifelse([$6],,, +[if test $ac_verc_fail = yes; then + $6 +fi]) ]) dnl These modifications are to allow for an empty cross compiler tree. diff --git a/bits/sockaddr.h b/bits/sockaddr.h index 73a0e26ec4..1c523444ba 100644 --- a/bits/sockaddr.h +++ b/bits/sockaddr.h @@ -1,5 +1,5 @@ /* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -37,5 +37,8 @@ typedef unsigned short int sa_family_t; #define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) +/* Return the length of a `sockaddr' structure. */ +#define SA_LEN(_x) __libc_sa_len((_x)->sa_family) +extern int __libc_sa_len __P ((sa_family_t __af)); #endif /* bits/sockaddr.h */ diff --git a/bits/socket.h b/bits/socket.h index a2858b8de8..5dc1e65370 100644 --- a/bits/socket.h +++ b/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Generic/4.3 BSD version. - Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,7 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _SYS_SOCKET_H +#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H # error "Never include directly; use instead." #endif diff --git a/config.make.in b/config.make.in index 4c989c8335..27d1e6e455 100644 --- a/config.make.in +++ b/config.make.in @@ -64,6 +64,7 @@ AR = @AR@ RANLIB = @RANLIB@ MAKEINFO = @MAKEINFO@ AS = $(CC) -c +MIG = @MIG@ # Installation tools. INSTALL = @INSTALL@ diff --git a/configure b/configure index 76bd9e6631..eba8edfc6d 100755 --- a/configure +++ b/configure @@ -1187,208 +1187,258 @@ fi # These programs are version sensitive. -# Prepare to iterate over the program-name list. -set dummy gcc cc; shift -echo $ac_n "checking for $1""... $ac_c" 1>&6 -echo "configure:1194: checking for $1" >&5 +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:1192: checking build system type" >&5 + +build_alias=$build +case "$build_alias" in +NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; +esac + +build=`$ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$build" 1>&6 + +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + +for ac_prog in ${ac_tool_prefix}gcc ${ac_tool_prefix}cc +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1220: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_word; do - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_word" - break - fi - done - test -n "$ac_cv_prog_CC" && break + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="$ac_prog" + break + fi done IFS="$ac_save_ifs" fi fi -if test -z "$ac_cv_prog_CC"; then +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else echo "$ac_t""no" 1>&6 - CC=: - ac_verc_fail=t; ac_verc_fatal=t +fi + +test -n "$CC" && break +done + +if test -z "$CC"; then + ac_verc_fail=yes else -# Found it, now check the version. -ac_word=$ac_cv_prog_CC - if test "${ac_cv_prog_CC_ver+set}" != set; then - ac_cv_prog_CC_ver=`$ac_word -v 2>&1 | sed -n 's/^.*version \([egcs0-9.-]*\).*$/\1/p'` - fi - if test -n "$ac_cv_prog_CC_ver"; then - case $ac_cv_prog_CC_ver in - egcs-2.91.*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|2.8.[1-9]*|2.9.[0-9]*) ac_vers_ok=", ok"; CC=$ac_cv_prog_CC;; - *) ac_vers_ok=", bad"; CC=: - ac_verc_fail=t; ac_verc_fatal=t;; + # Found it, now check the version. + echo $ac_n "checking version of $CC""... $ac_c" 1>&6 +echo "configure:1253: checking version of $CC" >&5 + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcst0-9.-]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + egcs-2.91.*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9.[0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac - else - ac_vers_ok="v. ?.??, bad"; CC=: - ac_verc_fail=t; ac_verc_fatal=t - fi -echo "$ac_t""$ac_word $ac_cv_prog_CC_ver$ac_vers_ok" 1>&6 + echo "$ac_t""$ac_prog_version" 1>&6 +fi +if test $ac_verc_fail = yes; then + critic_missing=t fi -# Prepare to iterate over the program-name list. -set dummy make gmake; shift -echo $ac_n "checking for $1""... $ac_c" 1>&6 -echo "configure:1241: checking for $1" >&5 +for ac_prog in make gmake +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1273: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$MAKE"; then ac_cv_prog_MAKE="$MAKE" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_word; do - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_MAKE="$ac_word" - break - fi - done - test -n "$ac_cv_prog_MAKE" && break + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_MAKE="$ac_prog" + break + fi done IFS="$ac_save_ifs" fi fi -if test -z "$ac_cv_prog_MAKE"; then +MAKE="$ac_cv_prog_MAKE" +if test -n "$MAKE"; then + echo "$ac_t""$MAKE" 1>&6 +else echo "$ac_t""no" 1>&6 - MAKE=: - ac_verc_fail=t; ac_verc_fatal=t +fi + +test -n "$MAKE" && break +done + +if test -z "$MAKE"; then + ac_verc_fail=yes else -# Found it, now check the version. -ac_word=$ac_cv_prog_MAKE - if test "${ac_cv_prog_MAKE_ver+set}" != set; then - ac_cv_prog_MAKE_ver=`$ac_word --version 2>&1 | sed -n 's/^.*version \([0-9][0-9.]*\), by.*$/\1/p'` - fi - if test -n "$ac_cv_prog_MAKE_ver"; then - case $ac_cv_prog_MAKE_ver in - 3.75 | 3.76.[2-9] | 3.7[789]* | 3.[89]*) ac_vers_ok=", ok"; MAKE=$ac_cv_prog_MAKE;; - *) ac_vers_ok=", bad"; MAKE=: - ac_verc_fail=t; ac_verc_fatal=t;; + # Found it, now check the version. + echo $ac_n "checking version of $MAKE""... $ac_c" 1>&6 +echo "configure:1306: checking version of $MAKE" >&5 + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*version \([0-9][0-9.]*\), by.*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.75 | 3.76.[1-9] | 3.7[789]* | 3.[89]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac - else - ac_vers_ok="v. ?.??, bad"; MAKE=: - ac_verc_fail=t; ac_verc_fatal=t - fi -echo "$ac_t""$ac_word $ac_cv_prog_MAKE_ver$ac_vers_ok" 1>&6 + echo "$ac_t""$ac_prog_version" 1>&6 +fi +if test $ac_verc_fail = yes; then + critic_missing=t fi -# Prepare to iterate over the program-name list. -set dummy msgfmt gmsgfmt; shift -echo $ac_n "checking for $1""... $ac_c" 1>&6 -echo "configure:1289: checking for $1" >&5 +for ac_prog in msgfmt gmsgfmt +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1327: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$MSGFMT"; then ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_word; do - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_MSGFMT="$ac_word" - break - fi - done - test -n "$ac_cv_prog_MSGFMT" && break + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_MSGFMT="$ac_prog" + break + fi done IFS="$ac_save_ifs" fi fi -if test -z "$ac_cv_prog_MSGFMT"; then +MSGFMT="$ac_cv_prog_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else echo "$ac_t""no" 1>&6 - MSGFMT=: - ac_verc_fail=t; +fi + +test -n "$MSGFMT" && break +done + +if test -z "$MSGFMT"; then + ac_verc_fail=yes else -# Found it, now check the version. -ac_word=$ac_cv_prog_MSGFMT - if test "${ac_cv_prog_MSGFMT_ver+set}" != set; then - ac_cv_prog_MSGFMT_ver=`$ac_word --version 2>&1 | sed -n 's/^.*GNU gettext.*\([0-9][0-9]*\.[0-9]*\).*$/\1/p'` - fi - if test -n "$ac_cv_prog_MSGFMT_ver"; then - case $ac_cv_prog_MSGFMT_ver in - 0.[1-9][0-9] | [1-9].*) ac_vers_ok=", ok"; MSGFMT=$ac_cv_prog_MSGFMT;; - *) ac_vers_ok=", bad"; MSGFMT=: - ac_verc_fail=t; ;; + # Found it, now check the version. + echo $ac_n "checking version of $MSGFMT""... $ac_c" 1>&6 +echo "configure:1360: checking version of $MSGFMT" >&5 + ac_prog_version=`$MSGFMT --version 2>&1 | sed -n 's/^.*GNU gettext.*\([0-9][0-9]*\.[0-9]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 0.[1-9][0-9] | [1-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac - else - ac_vers_ok="v. ?.??, bad"; MSGFMT=: - ac_verc_fail=t; - fi -echo "$ac_t""$ac_word $ac_cv_prog_MSGFMT_ver$ac_vers_ok" 1>&6 + echo "$ac_t""$ac_prog_version" 1>&6 +fi +if test $ac_verc_fail = yes; then + MSGFMT=: aux_missing=t fi -# Prepare to iterate over the program-name list. -set dummy makeinfo; shift -echo $ac_n "checking for $1""... $ac_c" 1>&6 -echo "configure:1336: checking for $1" >&5 +for ac_prog in makeinfo +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1380: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$MAKEINFO"; then ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_word; do - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_MAKEINFO="$ac_word" - break - fi - done - test -n "$ac_cv_prog_MAKEINFO" && break + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_MAKEINFO="$ac_prog" + break + fi done IFS="$ac_save_ifs" fi fi -if test -z "$ac_cv_prog_MAKEINFO"; then +MAKEINFO="$ac_cv_prog_MAKEINFO" +if test -n "$MAKEINFO"; then + echo "$ac_t""$MAKEINFO" 1>&6 +else echo "$ac_t""no" 1>&6 - MAKEINFO=: - ac_verc_fail=t; +fi + +test -n "$MAKEINFO" && break +done + +if test -z "$MAKEINFO"; then + ac_verc_fail=yes else -# Found it, now check the version. -ac_word=$ac_cv_prog_MAKEINFO - if test "${ac_cv_prog_MAKEINFO_ver+set}" != set; then - ac_cv_prog_MAKEINFO_ver=`$ac_word --version 2>&1 | sed -n 's/^.*GNU texinfo \([0-9][0-9.]*\).*$/\1/p'` - fi - if test -n "$ac_cv_prog_MAKEINFO_ver"; then - case $ac_cv_prog_MAKEINFO_ver in - 3.1[1-9] | 3.[2-9][0-9]) ac_vers_ok=", ok"; MAKEINFO=$ac_cv_prog_MAKEINFO;; - *) ac_vers_ok=", bad"; MAKEINFO=: - ac_verc_fail=t; ;; + # Found it, now check the version. + echo $ac_n "checking version of $MAKEINFO""... $ac_c" 1>&6 +echo "configure:1413: checking version of $MAKEINFO" >&5 + ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo \([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.1[1-9] | 3.[2-9][0-9]) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac - else - ac_vers_ok="v. ?.??, bad"; MAKEINFO=: - ac_verc_fail=t; - fi -echo "$ac_t""$ac_word $ac_cv_prog_MAKEINFO_ver$ac_vers_ok" 1>&6 + echo "$ac_t""$ac_prog_version" 1>&6 +fi +if test $ac_verc_fail = yes; then + MAKEINFO=: aux_missing=t fi -test -n "$ac_verc_fatal" && { echo "configure: error: +if test -n "$critic_missing"; then +{ echo "configure: error: *** Some critical program is missing or too old. *** Check the INSTALL file for required versions." 1>&2; exit 1; } +fi -test -n "$ac_verc_fail" && echo "configure: warning: +test -n "$aux_missing" && echo "configure: warning: *** An auxiliary program is missing or too old; *** some features will be disabled. *** Check the INSTALL file for required versions." 1>&2 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1392: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1442: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1401,11 +1451,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1430,7 +1480,7 @@ else cross_linkable=yes fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1434: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1484: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_cross'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1442,7 +1492,7 @@ echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1446: checking whether we are using GNU C" >&5 +echo "configure:1496: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1451,7 +1501,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1464,7 +1514,7 @@ if test $ac_cv_prog_gcc != yes; then fi echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1468: checking build system type" >&5 +echo "configure:1518: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1487,7 +1537,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1491: checking for $ac_word" >&5 +echo "configure:1541: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1518,7 +1568,7 @@ done fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1522: checking how to run the C preprocessor" >&5 +echo "configure:1572: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1533,13 +1583,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1550,13 +1600,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1589,7 +1639,7 @@ LD=`$CC -print-file-name=ld` # Determine whether we are using GNU binutils. echo $ac_n "checking whether $AS is GNU as""... $ac_c" 1>&6 -echo "configure:1593: checking whether $AS is GNU as" >&5 +echo "configure:1643: checking whether $AS is GNU as" >&5 if eval "test \"`echo '$''{'libc_cv_prog_as_gnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1607,7 +1657,7 @@ rm -f a.out gnu_as=$libc_cv_prog_as_gnu echo $ac_n "checking whether $LD is GNU ld""... $ac_c" 1>&6 -echo "configure:1611: checking whether $LD is GNU ld" >&5 +echo "configure:1661: checking whether $LD is GNU ld" >&5 if eval "test \"`echo '$''{'libc_cv_prog_ld_gnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1623,16 +1673,10 @@ fi echo "$ac_t""$libc_cv_prog_ld_gnu" 1>&6 gnu_ld=$libc_cv_prog_ld_gnu -if test $host != $build; then - ac_tool_prefix=${host_alias}- -else - ac_tool_prefix= -fi - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1636: checking for $ac_word" >&5 +echo "configure:1680: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1663,7 +1707,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1667: checking for $ac_word" >&5 +echo "configure:1711: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1694,7 +1738,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1698: checking for $ac_word" >&5 +echo "configure:1742: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1725,10 +1769,41 @@ else fi fi +# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. +set dummy ${ac_tool_prefix}mig; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1776: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$MIG"; then + ac_cv_prog_MIG="$MIG" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_MIG="${ac_tool_prefix}mig" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" +fi +fi +MIG="$ac_cv_prog_MIG" +if test -n "$MIG"; then + echo "$ac_t""$MIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + # check if ar takes S echo $ac_n "checking for ar S""... $ac_c" 1>&6 -echo "configure:1732: checking for ar S" >&5 +echo "configure:1807: checking for ar S" >&5 if eval "test \"`echo '$''{'libc_cv_ar_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1736,7 +1811,7 @@ else tmplib=lib$$.a rm -f $tmpo $tmplib touch $tmpo -if { ac_try='${AR-ar} rcuS $tmplib $tmpo > /dev/null 2>&1'; { (eval echo configure:1740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then +if { ac_try='${AR-ar} rcuS $tmplib $tmpo > /dev/null 2>&1'; { (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_ar_S=yes else libc_cv_ar_S=no @@ -1754,7 +1829,7 @@ echo "$ac_t""$libc_cv_ar_S" 1>&6 # - two terminals occur directly after each other # - the path contains an element with a dot in it echo $ac_n "checking LD_LIBRARY_PATH variable""... $ac_c" 1>&6 -echo "configure:1758: checking LD_LIBRARY_PATH variable" >&5 +echo "configure:1833: checking LD_LIBRARY_PATH variable" >&5 case ${LD_LIBRARY_PATH} in [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) ld_library_path_setting="contains current directory" @@ -1774,7 +1849,7 @@ fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1778: checking for $ac_word" >&5 +echo "configure:1853: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1816,7 +1891,7 @@ if test "$BASH" = no; then # Extract the first word of "ksh", so it can be a program name with args. set dummy ksh; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1820: checking for $ac_word" >&5 +echo "configure:1895: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1862,7 +1937,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1866: checking for $ac_word" >&5 +echo "configure:1941: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1897,7 +1972,7 @@ test -n "$PERL" || PERL="no" echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6 -echo "configure:1901: checking for signed size_t type" >&5 +echo "configure:1976: checking for signed size_t type" >&5 if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1921,12 +1996,12 @@ EOF fi echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6 -echo "configure:1925: checking for libc-friendly stddef.h" >&5 +echo "configure:2000: checking for libc-friendly stddef.h" >&5 if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_friendly_stddef=yes else @@ -1960,7 +2035,7 @@ override stddef.h = # The installed seems to be libc-friendly." fi echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6 -echo "configure:1964: checking whether we need to use -P to assemble .S files" >&5 +echo "configure:2039: checking whether we need to use -P to assemble .S files" >&5 if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1983,7 +2058,7 @@ asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives." fi echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6 -echo "configure:1987: checking for assembler global-symbol directive" >&5 +echo "configure:2062: checking for assembler global-symbol directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2013,7 +2088,7 @@ EOF fi echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6 -echo "configure:2017: checking for .set assembler directive" >&5 +echo "configure:2092: checking for .set assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2047,7 +2122,7 @@ EOF fi echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6 -echo "configure:2051: checking for .symver assembler directive" >&5 +echo "configure:2126: checking for .symver assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2066,7 +2141,7 @@ fi echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6 echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6 -echo "configure:2070: checking for ld --version-script" >&5 +echo "configure:2145: checking for ld --version-script" >&5 if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2089,7 +2164,7 @@ EOF if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o -nostartfiles -nostdlib -Wl,--version-script,conftest.map - 1>&5'; { (eval echo configure:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; + 1>&5'; { (eval echo configure:2168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_ld_version_script_option=yes else @@ -2127,7 +2202,7 @@ if test $VERSIONING = no; then fi if test $elf = yes; then echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6 -echo "configure:2131: checking for .previous assembler directive" >&5 +echo "configure:2206: checking for .previous assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2135,7 +2210,7 @@ else .section foo_section .previous EOF - if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_asm_previous_directive=yes else libc_cv_asm_previous_directive=no @@ -2151,7 +2226,7 @@ EOF else echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6 -echo "configure:2155: checking for .popsection assembler directive" >&5 +echo "configure:2230: checking for .popsection assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2159,7 +2234,7 @@ else .pushsection foo_section .popsection EOF - if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_asm_popsection_directive=yes else libc_cv_asm_popsection_directive=no @@ -2179,12 +2254,12 @@ fi if test $elf != yes; then echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6 -echo "configure:2183: checking for .init and .fini sections" >&5 +echo "configure:2258: checking for .init and .fini sections" >&5 if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_have_initfini=yes else @@ -2221,19 +2296,19 @@ if test $elf = yes; then else if test $ac_cv_prog_cc_works = yes; then echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6 -echo "configure:2225: checking for _ prefix on C symbol names" >&5 +echo "configure:2300: checking for _ prefix on C symbol names" >&5 if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* libc_cv_asm_underscores=yes else @@ -2248,17 +2323,17 @@ fi echo "$ac_t""$libc_cv_asm_underscores" 1>&6 else echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6 -echo "configure:2252: checking for _ prefix on C symbol names" >&5 +echo "configure:2327: checking for _ prefix on C symbol names" >&5 if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if grep _underscore_test conftest* >/dev/null; then rm -f conftest* libc_cv_asm_underscores=yes @@ -2290,7 +2365,7 @@ if test $elf = yes; then fi echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6 -echo "configure:2294: checking for assembler .weak directive" >&5 +echo "configure:2369: checking for assembler .weak directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2313,7 +2388,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6 if test $libc_cv_asm_weak_directive = no; then echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6 -echo "configure:2317: checking for assembler .weakext directive" >&5 +echo "configure:2392: checking for assembler .weakext directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2351,7 +2426,7 @@ EOF fi echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6 -echo "configure:2355: checking for ld --no-whole-archive" >&5 +echo "configure:2430: checking for ld --no-whole-archive" >&5 if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2362,7 +2437,7 @@ __throw () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -Wl,--no-whole-archive - -o conftest conftest.c 1>&5'; { (eval echo configure:2366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c 1>&5'; { (eval echo configure:2441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_ld_no_whole_archive=yes else libc_cv_ld_no_whole_archive=no @@ -2373,7 +2448,7 @@ fi echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6 echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6 -echo "configure:2377: checking for gcc -fno-exceptions" >&5 +echo "configure:2452: checking for gcc -fno-exceptions" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2384,7 +2459,7 @@ __throw () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -fno-exceptions - -o conftest conftest.c 1>&5'; { (eval echo configure:2388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c 1>&5'; { (eval echo configure:2463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_no_exceptions=yes else libc_cv_gcc_no_exceptions=no @@ -2396,14 +2471,14 @@ echo "$ac_t""$libc_cv_gcc_no_exceptions" 1>&6 if test "$base_machine" = alpha ; then echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6 -echo "configure:2400: checking for function ..ng prefix" >&5 +echo "configure:2475: checking for function ..ng prefix" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_alpha_ng_prefix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<\EOF foo () { } EOF -if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; +if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_alpha_ng_prefix=yes else @@ -2427,12 +2502,12 @@ fi fi echo $ac_n "checking for DWARF2 unwind info support""... $ac_c" 1>&6 -echo "configure:2431: checking for DWARF2 unwind info support" >&5 +echo "configure:2506: checking for DWARF2 unwind info support" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_dwarf2_unwind_info'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_dwarf2_unwind_info=static else libc_cv_gcc_dwarf2_unwind_info=no @@ -2467,7 +2542,7 @@ fi if test $libc_cv_gcc_dwarf2_unwind_info = no; then if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame -nostdlib -nostartfiles - -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_dwarf2_unwind_info=yes else libc_cv_gcc_dwarf2_unwind_info=no @@ -2541,7 +2616,7 @@ if test "$uname" = "sysdeps/generic"; then fi echo $ac_n "checking OS release for uname""... $ac_c" 1>&6 -echo "configure:2545: checking OS release for uname" >&5 +echo "configure:2620: checking OS release for uname" >&5 if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2563,7 +2638,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6 uname_release="$libc_cv_uname_release" echo $ac_n "checking OS version for uname""... $ac_c" 1>&6 -echo "configure:2567: checking OS version for uname" >&5 +echo "configure:2642: checking OS version for uname" >&5 if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2585,7 +2660,7 @@ else fi echo $ac_n "checking stdio selection""... $ac_c" 1>&6 -echo "configure:2589: checking stdio selection" >&5 +echo "configure:2664: checking stdio selection" >&5 case $stdio in libio) cat >> confdefs.h <<\EOF @@ -2597,7 +2672,7 @@ esac echo "$ac_t""$stdio" 1>&6 echo $ac_n "checking ldap selection""... $ac_c" 1>&6 -echo "configure:2601: checking ldap selection" >&5 +echo "configure:2676: checking ldap selection" >&5 case $add_ons in *ldap*) @@ -2660,7 +2735,7 @@ if test $static = no && test $shared = yes; then fi echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6 -echo "configure:2664: checking whether -fPIC is default" >&5 +echo "configure:2739: checking whether -fPIC is default" >&5 if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2839,21 +2914,22 @@ s%@sysnames@%$sysnames%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@LN_S@%$LN_S%g -s%@CC@%$CC%g -s%@MAKE@%$MAKE%g -s%@MSGFMT@%$MSGFMT%g -s%@MAKEINFO@%$MAKEINFO%g -s%@cross_linkable@%$cross_linkable%g s%@build@%$build%g s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g +s%@CC@%$CC%g +s%@MAKE@%$MAKE%g +s%@MSGFMT@%$MSGFMT%g +s%@MAKEINFO@%$MAKEINFO%g +s%@cross_linkable@%$cross_linkable%g s%@BUILD_CC@%$BUILD_CC%g s%@cross_compiling@%$cross_compiling%g s%@CPP@%$CPP%g s%@AR@%$AR%g s%@RANLIB@%$RANLIB%g +s%@MIG@%$MIG%g s%@libc_cv_ar_S@%$libc_cv_ar_S%g s%@BASH@%$BASH%g s%@libc_cv_have_bash2@%$libc_cv_have_bash2%g diff --git a/configure.in b/configure.in index f698710ce1..9d12825264 100644 --- a/configure.in +++ b/configure.in @@ -431,25 +431,29 @@ fi AC_PROG_LN_S # These programs are version sensitive. -AC_CHECK_PROG_VER(CC, gcc cc, -v, - [version \([egcs0-9.-]*\)], - [egcs-2.91.*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|2.8.[1-9]*|2.9.[0-9]*], t) +AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl +AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, + [version \([egcst0-9.-]*\)], + [egcs-2.91.*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9.[0-9]*], + critic_missing=t) AC_CHECK_PROG_VER(MAKE, make gmake, --version, [version \([0-9][0-9.]*\), by], - [3.75 | 3.76.[2-9] | 3.7[789]* | 3.[89]*], t) + [3.75 | 3.76.[1-9] | 3.7[789]* | 3.[89]*], critic_missing=t) AC_CHECK_PROG_VER(MSGFMT, msgfmt gmsgfmt, --version, [GNU gettext.*\([0-9][0-9]*\.[0-9]*\)], - [0.[1-9][0-9] | [1-9].*]) + [0.[1-9][0-9] | [1-9].*], MSGFMT=: aux_missing=t) AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, [GNU texinfo \([0-9][0-9.]*\)], - [3.1[1-9] | 3.[2-9][0-9]]) + [3.1[1-9] | 3.[2-9][0-9]], MAKEINFO=: aux_missing=t) -test -n "$ac_verc_fatal" && AC_MSG_ERROR([ +if test -n "$critic_missing"; then +AC_MSG_ERROR([ *** Some critical program is missing or too old. *** Check the INSTALL file for required versions.]) +fi -test -n "$ac_verc_fail" && AC_MSG_WARN([ +test -n "$aux_missing" && AC_MSG_WARN([ *** An auxiliary program is missing or too old; *** some features will be disabled. *** Check the INSTALL file for required versions.]) @@ -464,6 +468,7 @@ AC_PROG_CPP LIBC_PROG_BINUTILS AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(MIG, mig) # check if ar takes S AC_CACHE_CHECK(for ar S, libc_cv_ar_S, [dnl diff --git a/elf/dl-load.c b/elf/dl-load.c index de940b2122..edaa2cc8c5 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -280,7 +280,7 @@ decompose_rpath (const char *rpath, size_t additional_room, const char *what, const char *where) { /* Make a copy we can work with. */ - char *copy = strdupa (rpath); + char *copy = local_strdup (rpath); char *cp; struct r_search_path_elem **result; /* First count the number of necessary elements in the result array. */ diff --git a/iconv/gconv.c b/iconv/gconv.c index 71d87ae1f6..f8b7c8050d 100644 --- a/iconv/gconv.c +++ b/iconv/gconv.c @@ -1,6 +1,6 @@ /* Convert characters in input buffer using conversion descriptor to output buffer. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -34,19 +34,24 @@ __gconv (gconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, if (cd == (gconv_t) -1L) return GCONV_ILLEGAL_DESCRIPTOR; - cd->data[last_step].outbuf = *outbuf; + cd->data[last_step].outbuf = outbuf ? *outbuf : NULL; cd->data[last_step].outbufavail = 0; cd->data[last_step].outbufsize = *outbytesleft; if (converted != NULL) *converted = 0; - result = (*cd->steps->fct) (cd->steps, cd->data, *inbuf, inbytesleft, + result = (*cd->steps->fct) (cd->steps, cd->data, + inbuf ? *inbuf : NULL, inbytesleft, converted, inbuf == NULL || *inbuf == NULL); - *inbuf += oldinbytes - *inbytesleft; - *outbuf += cd->data[last_step].outbufavail; - *outbytesleft -= cd->data[last_step].outbufavail; + if (inbuf != NULL && *inbuf != NULL) + *inbuf += oldinbytes - *inbytesleft; + if (outbuf != NULL && *outbuf != NULL) + { + *outbuf += cd->data[last_step].outbufavail; + *outbytesleft -= cd->data[last_step].outbufavail; + } return result; } diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c index c448a160d2..7765efb6d5 100644 --- a/iconv/gconv_conf.c +++ b/iconv/gconv_conf.c @@ -398,6 +398,10 @@ __gconv_read_conf (void) elem = strtok_r (gconv_path, ":", &gconv_path); while (elem != NULL) { +#ifndef MAXPATHLEN + /* We define a reasonable limit. */ +# define 4096 +#endif char real_elem[MAXPATHLEN]; if (realpath (elem, real_elem) != NULL) diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c index b11e156a03..9e80158f43 100644 --- a/iconv/gconv_dl.c +++ b/iconv/gconv_dl.c @@ -108,9 +108,9 @@ get_sym (void *a) } -static void * +void * internal_function -find_func (void *handle, const char *name) +__gconv_find_func (void *handle, const char *name) { struct get_sym_args args; @@ -170,7 +170,7 @@ __gconv_find_shlib (const char *name) { if (dlerror_run (do_open, found) == 0) { - found->fct = find_func (found->handle, "gconv"); + found->fct = __gconv_find_func (found->handle, "gconv"); if (found->fct == NULL) { /* Argh, no conversion function. There is something @@ -180,8 +180,10 @@ __gconv_find_shlib (const char *name) } else { - found->init_fct = find_func (found->handle, "gconv_init"); - found->end_fct = find_func (found->handle, "gconv_end"); + found->init_fct = __gconv_find_func (found->handle, + "gconv_init"); + found->end_fct = __gconv_find_func (found->handle, + "gconv_end"); /* We have succeeded in loading the shared object. */ found->counter = 1; diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h index 5e0723ed34..35ec31a7b8 100644 --- a/iconv/gconv_int.h +++ b/iconv/gconv_int.h @@ -129,6 +129,10 @@ extern int __gconv_close_transform (struct gconv_step *__steps, extern struct gconv_loaded_object *__gconv_find_shlib (const char *__name) internal_function; +/* Find function named NAME in shared object referenced by HANDLE. */ +void *__gconv_find_func (void *handle, const char *name) + internal_function; + /* Release shared object. If no further reference is available unload the object. */ extern int __gconv_release_shlib (struct gconv_loaded_object *__handle) @@ -149,6 +153,8 @@ extern void __gconv_get_builtin_trans (const char *__name, int __do_flush) __BUILTIN_TRANS (__gconv_transform_dummy); +__BUILTIN_TRANS (__gconv_transform_ascii_ucs4); +__BUILTIN_TRANS (__gconv_transform_ucs4_ascii); __BUILTIN_TRANS (__gconv_transform_ucs4_utf8); __BUILTIN_TRANS (__gconv_transform_utf8_ucs4); __BUILTIN_TRANS (__gconv_transform_ucs2_ucs4); diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c index 197a3d1e9c..478c0dc8fe 100644 --- a/iconv/gconv_simple.c +++ b/iconv/gconv_simple.c @@ -76,6 +76,234 @@ __gconv_transform_dummy (struct gconv_step *step, struct gconv_step_data *data, } +/* Convert from ISO 646-IRV to ISO 10646/UCS4. */ +int +__gconv_transform_ascii_ucs4 (struct gconv_step *step, + struct gconv_step_data *data, const char *inbuf, + size_t *inlen, size_t *written, int do_flush) +{ + struct gconv_step *next_step = step + 1; + struct gconv_step_data *next_data = data + 1; + gconv_fct fct = next_step->fct; + size_t do_write; + int result; + + /* If the function is called with no input this means we have to reset + to the initial state. The possibly partly converted input is + dropped. */ + if (do_flush) + { + /* Clear the state. */ + memset (data->statep, '\0', sizeof (mbstate_t)); + do_write = 0; + + /* Call the steps down the chain if there are any. */ + if (data->is_last) + result = GCONV_OK; + else + { + struct gconv_step *next_step = step + 1; + struct gconv_step_data *next_data = data + 1; + + result = (*fct) (next_step, next_data, NULL, 0, written, 1); + + /* Clear output buffer. */ + data->outbufavail = 0; + } + } + else + { + int save_errno = errno; + do_write = 0; + + result = GCONV_OK; + do + { + const un