summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-06-12 21:38:55 +0000
committerUlrich Drepper <drepper@redhat.com>1997-06-12 21:38:55 +0000
commit714a562f0bf855da3835adb2dbecc245e39f8759 (patch)
tree856c801ff8bc895274a8914e5c846c86ecf37046
parentb0de3e9e30113e669ad7944579ec4e2d10163758 (diff)
downloadglibc-714a562f0bf855da3835adb2dbecc245e39f8759.tar.gz
glibc-714a562f0bf855da3835adb2dbecc245e39f8759.tar.xz
glibc-714a562f0bf855da3835adb2dbecc245e39f8759.zip
<1997-06-12 21:22  Ulrich Drepper  <drepper@cygnus.com>

	* Makefile (libc-map): Define before including Makerules.
	* Makerules (lib%.so): Depend on $(lib%-map).
	(build-shlib): Adapt rule for above change.
	(libc.so): Depend on $(libc-map).
	* db/Makefile (libcdb-map): New definition.
	* elf/Makefile (libdl-map): New definition.
	* elf/dl-lookup.c: Don't use relative include path.
	(undefined_msg): New variable.  Use single string in all functions.
	(do_lookup): Correctly recognize default version.
	Return -2 if no version information is available.
	Stop processing hash entries when string was found.
	Don't bark about missing versioned symbol in file with original
	reference if it is a weak symbol.
	(_dl_lookup_symbol): Use undefined_msg.
	(_dl_lookup_versioned_symbol): Likewise.
	Give extra information if no verdef info is available.
	* elf/dl-version.c (file_needed): Remove first argument.  We must
	seek in the whole search list.
	(match_symbol): Correct check for available verdef info.
	(_dl_check_map_versions): Correct call of find_needed.
	* locale/Makefile (libBrokenLocale-map): New definition.
	* login/Makefile (libutil-map): New definition.
	* math/Makefile (libm-map): New definition.
	* md5-crypt/Makefile (libcrypt-map): New definition.
	* nis/Makefile (libnsl-map, libnss_compat-map, libnss_nis-map,
	libnss_nisplus-map): New definition.
	* nss/Makefile (libnss_files-map, libnss_db-map): New definitions.
	* resolv/Makefile (libresolv-map, libnss_dns-map): New definitions.
	* libc.map: New file.
	* db/libdb.map: New file.
	* elf/libdl.map: New file.
	* locale/libBrokenLocale.map: New file.
	* login/libutil.map: New file.
	* math/libm.map: New file.
	* md5-crypt/libcrypt.map: New file.
	* nis/libnss_compat.map: New file.
	* nis/libnsl.map: New file.
	* nis/libnss_nis.map: New file.
	* nis/libnss_nisplus.map: New file.
	* nss/libnss_files.map: New file.
	* nss/libnss_db.map: New file.
	* resolv/libnss_dns.map: New file.
	* resolv/libresolv.map: New file.

	* sysdeps/i386/dl-machine.h (elf_machine_rel): Don't do anything
	for R_386_NONE entries.

	* Makefile (manual/dir-add.info): New rule.

	* Makerules: Add vpath definition for .x files.

	* Makerules (distinfo): Make sure target directory exists.

	* argp/argp-help.c (argp_args_usage): Don't modify `fdoc' value
	since it is used to distinguish filtered strings from unmodifed
	strings.

	* elf/dl-lookup.c (do_lookup): Optimize STT_* recognition.
	* elf/dl-reloc.c: Fix typo.

	* inet/arpa/tftp.h (struct tftphdr): Change type of tu_block to
	`unsigned short'.

	* manual/Makefile (dir-add.texi): Also emit wrapper text for
	info/install-info.
	(distribute): Add dir-add.texi and dir-add.info.
	(mostlyclean): Add dir-add.info.
	(realclean): Add dir-add.texi.
	(install): Add entries in `dir' file using install-info.

	* manual/libc.texinfo: Add @dircategory and @direntry text.
	Reported by Miles Bader <miles@gnu.ai.mit.edu>.

	* manual/pattern.texi: Correct description of GLOB_MAGCHAR and
	GLOB_NOMAGIC.  Changes by Roland McGrath <roland@gnu.ai.mit.edu>.

	* nis/nis_addmember.c: Little optimizations.
	* nis/nis_call.c: Likewise.
	* nis/nis_creategroup.c: Likewise.
	* nis/nis_defaults.c: Likewise.
	* nis/nis_destroygroup.c: Likewise.
	* nis/nis_ismember.c: Likewise.
	* nis/nis_local_names.c: Likewise.
	* nis/nis_print_group_entry.c: Likewise.
	* nis/nis_verifygroup.c: Likewise.

	* posix/unistd.h: Fix comment for getcwd.

	* stdlib/Makefile (headers): Remove inttypes.h.  It's a system
	dependent header.
	* sysdeps/wordsize-32/Dist: New file.
	* sysdeps/wordsize-32/Makefile: New file.
	* sysdeps/wordsize-64/Dist: New file.
	* sysdeps/wordsize-64/Makefile: New file.

	* sunrpc/Makefile: Adopt comment for real situation.

	* sysdeps/i386/add_n.S: Add ASM_TYPE_DIRECTIVE and AS_SIZE_DIRECTIVE.
	* sysdeps/i386/addmul_1.s: Likewise.
	* sysdeps/i386/lshist.s: Likewise.
	* sysdeps/i386/rshift.s: Likewise.
	* sysdeps/i386/sub_n.s: Likewise.
	* sysdeps/i386/submul_1.s: Likewise.

	* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
	Add .type and .size.

1997-06-12 13:32  Philip Blundell  <Philip.Blundell@pobox.com>

	* libc/sysdeps/unix/arm/brk.S: New file.
	* libc/sysdeps/unix/arm/sysdep.S: Likewise.
	* libc/sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.

1997-06-11 11:51  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

	* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_parse_spent):
	Check if we have shadow information.

1997-06-08 19:33  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

	* nis/nis_getservlist.c (nis_getservlist): Use calloc instead of
	malloc, alloc memory for nis_server struct.
	* nis/nis_getservlist.c (nis_freeservlist): Give the memory for
	the nis_server struct free, too.

	* nis/nis_removemember (nis_removemember): Fix for loop.

1997-06-12 12:45  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/i386/fpu/__math.h (__M_SQRT2): Define here since we
	cannot rely on M_SQRT2 being defined.  (log1p): Use __M_SQRT2 not
	M_SQRT2.
	* math/math.h (_Mldbl): Define even if M_* constants are not
	defined.
	Reported by corsepiu@faw.uni-ulm.de.

1997-06-12 03:08  Philip Blundell  <Philip.Blundell@pobox.com>

	* nss/getXXbyYY_r.c (do_weak_alias): Remove extra parentheses.

1997-06-11 13:22  Ulrich Drepper  <drepper@cygnus.com>

	* misc/regexp.h (compile): Allow use of macro INIT for variable
	declaration.  Add documentation for INIT.
	Reported by Robert Bihlmeyer <robbe@orcus.priv.at>.

1997-06-11 10:47  Philip Blundell  <Philip.Blundell@pobox.com>

	* sysdeps/unix/sysv/linux/net/if_arp.h: Add two new hardware types.

1997-06-10 11:31  H.J. Lu  <hjl@gnu.ai.mit.edu>

	* sysdeps/powerpc/strlen.s: Use -0x101 instead of 0xfffffeff
	for a signed 16-bit value.

1997-06-07 07:54  H.J. Lu  <hjl@gnu.ai.mit.edu>

	* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
	(_dl_sysdep_read_whole_file): Deleted.

	* sysdeps/powerpc/fenvbits.h (__FE_ALL_INVALID): Changed
	to FE_ALL_INVALID.

	* sysdeps/powerpc/fraiseexcpt.c (__FE_INVALID_SOFTWARE):
	Changed to FE_INVALID_SOFTWARE.
	(__FPSCR_STICKY_BITS): Changed to FPSCR_STICKY_BITS.

	* sysdeps/libm-ieee754/s_fmin.c: Fix a typo.

1997-06-07 18:48  H.J. Lu  <hjl@gnu.ai.mit.edu>

	* shlib-versions (.*-.*-linux.*): Set libc to 6.

1997-06-08 15:35  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

	* nis/nis_add.c (nis_add): Use nis_leaf_of_r instead of nis_name_of_r.

	* nis/nis_addmember.c (nis_addmember): Fix a lot of pointer errors.
	* nis/nis_clone.c: Likewise.
	* nis/nis_removemember.c (nis_removemember): Likewise.
	* nis/nis_table.c: Likewise.

	* nis/nss_nis/nis-hosts.c: Use addr, not p for inet_pton call.
	* nis/nss_nisplus/nisplus-hosts.c: Likewise.

	* nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Check for
	group == NULL.

1997-06-08 21:21  Mark Kettenis  <kettenis@phys.uva.nl>

	* login/login.c, login/utmp_daemon.c, login/utmp_file.c,
	login/getutent_r.c, login/utmpname.c: Cleanup `#if _LIBC' and
	`#ifndef _LIBC' fragments.

	* login/programs/utmpd.c: Define DEFAULT_USER.
	(drop_priviliges): Use it.
	(main): Set locale and text domain.

	* login/programs/utmpd-private.h: Declare proc_utmp_eq.
	* login/programs/database.c (proc_utmp_eq): Removed.
	* login/programs/request.c (proc_utmp_eq): Made global.  Only use
	ut_id field if valid.

	* login/utmp_file.c (proc_utmp_eq): Restore patch made by Miles
	Bader that was lost when adding the daemon backend; Only use ut_id
	field if valid.

1997-06-05 23:10  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/Dist: Remove netatalk/atalk.h and
	netinet/icmp.h, add netatalk/at.h.
	* sysdeps/unix/sysv/linux/powerpc/Dist: Remove termios.h.
	* sysdeps/unix/sysv/linux/sparc/Dist: Remove start.c.

1997-06-04 19:22  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* stdlib/testsort.c (compare): Fix parameter types.

1997-06-04 19:05  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* md5-crypt/Makefile (distribute): Fix name of file.

1997-06-04 19:02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* login/Makefile (utmpd-routines): Remove utmpd again, which is
	already added implicitly through $(others).

1997-06-05 13:43  Fila Kolodny  <fila@filapc.ibi.com>

	* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add netipx/ipx.h.

1997-06-05 13:25  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* md5-crypt/md5-crypt.c: Add prototype for __md5_crypt.

1997-06-05 17:08  Ulrich Drepper  <drepper@cygnus.com>

	* string/argz-addsep.c: Correct weak alias.
	Reported by Ben Pfaff <pfaffben@pilot.msu.edu>.

	* locale/setlocale.c (setlocale): Free variable with locale path
	before returning.
	(setname): Don't test for _nl_current[category] being NULL before
	freeing.
	Reported by Ben Pfaff <pfaffben@pilot.msu.edu>.

1997-06-04 12:41  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* manual/intro.texi (XPG): Correct some typos.

	* manual/libc.texinfo (Program Arguments): Menu updated.
	* nis/nis_local_names.c (nis_local_host): Fix pointer errors.
-rw-r--r--ChangeLog256
-rw-r--r--Makefile8
-rw-r--r--Makerules14
-rw-r--r--PROJECTS4
-rw-r--r--README15
-rw-r--r--argp/argp-help.c13
-rwxr-xr-xconfig.guess71
-rwxr-xr-xconfig.sub8
-rw-r--r--db/Makefile1
-rw-r--r--db/libdb.map12
-rw-r--r--elf/Makefile1
-rw-r--r--elf/dl-lookup.c48
-rw-r--r--elf/dl-reloc.c2
-rw-r--r--elf/dl-version.c23
-rw-r--r--elf/libdl.map7
-rw-r--r--elf/link.h2
-rw-r--r--inet/arpa/tftp.h20
-rw-r--r--libc.map53
-rw-r--r--locale/Makefile1
-rw-r--r--locale/libBrokenLocale.map7
-rw-r--r--locale/setlocale.c9
-rw-r--r--login/Makefile3
-rw-r--r--login/getutent_r.c8
-rw-r--r--login/libutil.map7
-rw-r--r--login/login.c3
-rw-r--r--login/programs/database.c28
-rw-r--r--login/programs/request.c7
-rw-r--r--login/programs/utmpd-private.h3
-rw-r--r--login/programs/utmpd.c15
-rw-r--r--login/utmp_daemon.c4
-rw-r--r--login/utmp_file.c9
-rw-r--r--login/utmpname.c8
-rw-r--r--manual/.cvsignore2
-rw-r--r--manual/Makefile21
-rw-r--r--manual/arith.texi2
-rw-r--r--manual/examples/argp-ex1.c9
-rw-r--r--manual/examples/argp-ex2.c25
-rw-r--r--manual/examples/argp-ex3.c100
-rw-r--r--manual/examples/argp-ex4.c144
-rw-r--r--manual/intro.texi2
-rw-r--r--manual/libc.texinfo6
-rw-r--r--manual/pattern.texi157
-rw-r--r--manual/texinfo.tex26
-rw-r--r--math/Makefile2
-rw-r--r--math/libm.map9
-rw-r--r--math/math.h9
-rw-r--r--md5-crypt/Makefile3
-rw-r--r--md5-crypt/libcrypt.map7
-rw-r--r--md5-crypt/md5-crypt.c1
-rw-r--r--misc/regexp.h8
-rw-r--r--nis/Makefile4
-rw-r--r--nis/libnsl.map14
-rw-r--r--nis/libnss_compat.map11
-rw-r--r--nis/libnss_nis.map25
-rw-r--r--nis/libnss_nisplus.map32
-rw-r--r--nis/nis_add.c2
-rw-r--r--nis/nis_addmember.c15
-rw-r--r--nis/nis_call.c18
-rw-r--r--nis/nis_clone.c48
-rw-r--r--nis/nis_creategroup.c4
-rw-r--r--nis/nis_defaults.c10
-rw-r--r--nis/nis_destroygroup.c4
-rw-r--r--nis/nis_getservlist.c11
-rw-r--r--nis/nis_ismember.c17
-rw-r--r--nis/nis_local_names.c73
-rw-r--r--nis/nis_modify.c2
-rw-r--r--nis/nis_ping.c4
-rw-r--r--nis/nis_print_group_entry.c4
-rw-r--r--nis/nis_remove.c2
-rw-r--r--nis/nis_removemember.c29
-rw-r--r--nis/nis_server.c4
-rw-r--r--nis/nis_table.c6
-rw-r--r--nis/nis_verifygroup.c4
-rw-r--r--nis/nss_nis/nis-hosts.c2
-rw-r--r--nis/nss_nis/nis-netgrp.c4
-rw-r--r--nis/nss_nisplus/nisplus-hosts.c2
-rw-r--r--nis/nss_nisplus/nisplus-spwd.c98
-rw-r--r--nss/Makefile2
-rw-r--r--nss/getXXbyYY_r.c2
-rw-r--r--nss/libnss_db.map20
-rw-r--r--nss/libnss_files.map28
-rw-r--r--posix/glob.c6
-rw-r--r--posix/glob.h8
-rw-r--r--posix/unistd.h2
-rw-r--r--resolv/Makefile2
-rw-r--r--resolv/libnss_dns.map9
-rw-r--r--resolv/libresolv.map11
-rw-r--r--shlib-versions10
-rw-r--r--stdlib/Makefile2
-rw-r--r--stdlib/testsort.c2
-rw-r--r--string/argz-addsep.c4
-rw-r--r--sunrpc/Makefile13
-rw-r--r--sysdeps/i386/add_n.S3
-rw-r--r--sysdeps/i386/addmul_1.S3
-rw-r--r--sysdeps/i386/dl-machine.h4
-rw-r--r--sysdeps/i386/fpu/__math.h6
-rw-r--r--sysdeps/i386/lshift.S3
-rw-r--r--sysdeps/i386/rshift.S3
-rw-r--r--sysdeps/i386/sub_n.S3
-rw-r--r--sysdeps/i386/submul_1.S3
-rw-r--r--sysdeps/libm-ieee754/s_fmin.c2
-rw-r--r--sysdeps/powerpc/fenvbits.h2
-rw-r--r--sysdeps/powerpc/fraiseexcpt.c4
-rw-r--r--sysdeps/powerpc/strlen.s10
-rw-r--r--sysdeps/unix/arm/brk.S43
-rw-r--r--sysdeps/unix/arm/sysdep.S49
-rw-r--r--sysdeps/unix/sysv/linux/Dist3
-rw-r--r--sysdeps/unix/sysv/linux/Makefile3
-rw-r--r--sysdeps/unix/sysv/linux/arm/sysdep.S51
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h8
-rw-r--r--sysdeps/unix/sysv/linux/net/if_arp.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/Dist1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c35
-rw-r--r--sysdeps/unix/sysv/linux/sparc/Dist1
-rw-r--r--sysdeps/wordsize-32/Dist1
-rw-r--r--sysdeps/wordsize-32/Makefile3
-rw-r--r--sysdeps/wordsize-64/Dist1
-rw-r--r--sysdeps/wordsize-64/Makefile3
118 files changed, 1590 insertions, 433 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d0fd8d049..847c417cf1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,255 @@
+<1997-06-12 21:22  Ulrich Drepper  <drepper@cygnus.com>
+
+	* Makefile (libc-map): Define before including Makerules.
+	* Makerules (lib%.so): Depend on $(lib%-map).
+	(build-shlib): Adapt rule for above change.
+	(libc.so): Depend on $(libc-map).
+	* db/Makefile (libcdb-map): New definition.
+	* elf/Makefile (libdl-map): New definition.
+	* elf/dl-lookup.c: Don't use relative include path.
+	(undefined_msg): New variable.  Use single string in all functions.
+	(do_lookup): Correctly recognize default version.
+	Return -2 if no version information is available.
+	Stop processing hash entries when string was found.
+	Don't bark about missing versioned symbol in file with original
+	reference if it is a weak symbol.
+	(_dl_lookup_symbol): Use undefined_msg.
+	(_dl_lookup_versioned_symbol): Likewise.
+	Give extra information if no verdef info is available.
+	* elf/dl-version.c (file_needed): Remove first argument.  We must
+	seek in the whole search list.
+	(match_symbol): Correct check for available verdef info.
+	(_dl_check_map_versions): Correct call of find_needed.
+	* locale/Makefile (libBrokenLocale-map): New definition.
+	* login/Makefile (libutil-map): New definition.
+	* math/Makefile (libm-map): New definition.
+	* md5-crypt/Makefile (libcrypt-map): New definition.
+	* nis/Makefile (libnsl-map, libnss_compat-map, libnss_nis-map,
+	libnss_nisplus-map): New definition.
+	* nss/Makefile (libnss_files-map, libnss_db-map): New definitions.
+	* resolv/Makefile (libresolv-map, libnss_dns-map): New definitions.
+	* libc.map: New file.
+	* db/libdb.map: New file.
+	* elf/libdl.map: New file.
+	* locale/libBrokenLocale.map: New file.
+	* login/libutil.map: New file.
+	* math/libm.map: New file.
+	* md5-crypt/libcrypt.map: New file.
+	* nis/libnss_compat.map: New file.
+	* nis/libnsl.map: New file.
+	* nis/libnss_nis.map: New file.
+	* nis/libnss_nisplus.map: New file.
+	* nss/libnss_files.map: New file.
+	* nss/libnss_db.map: New file.
+	* resolv/libnss_dns.map: New file.
+	* resolv/libresolv.map: New file.
+
+	* sysdeps/i386/dl-machine.h (elf_machine_rel): Don't do anything
+	for R_386_NONE entries.
+
+	* Makefile (manual/dir-add.info): New rule.
+
+	* Makerules: Add vpath definition for .x files.
+
+	* Makerules (distinfo): Make sure target directory exists.
+
+	* argp/argp-help.c (argp_args_usage): Don't modify `fdoc' value
+	since it is used to distinguish filtered strings from unmodifed
+	strings.
+
+	* elf/dl-lookup.c (do_lookup): Optimize STT_* recognition.
+	* elf/dl-reloc.c: Fix typo.
+
+	* inet/arpa/tftp.h (struct tftphdr): Change type of tu_block to
+	`unsigned short'.
+
+	* manual/Makefile (dir-add.texi): Also emit wrapper text for
+	info/install-info.
+	(distribute): Add dir-add.texi and dir-add.info.
+	(mostlyclean): Add dir-add.info.
+	(realclean): Add dir-add.texi.
+	(install): Add entries in `dir' file using install-info.
+
+	* manual/libc.texinfo: Add @dircategory and @direntry text.
+	Reported by Miles Bader <miles@gnu.ai.mit.edu>.
+
+	* manual/pattern.texi: Correct description of GLOB_MAGCHAR and
+	GLOB_NOMAGIC.  Changes by Roland McGrath <roland@gnu.ai.mit.edu>.
+
+	* nis/nis_addmember.c: Little optimizations.
+	* nis/nis_call.c: Likewise.
+	* nis/nis_creategroup.c: Likewise.
+	* nis/nis_defaults.c: Likewise.
+	* nis/nis_destroygroup.c: Likewise.
+	* nis/nis_ismember.c: Likewise.
+	* nis/nis_local_names.c: Likewise.
+	* nis/nis_print_group_entry.c: Likewise.
+	* nis/nis_verifygroup.c: Likewise.
+
+	* posix/unistd.h: Fix comment for getcwd.
+
+	* stdlib/Makefile (headers): Remove inttypes.h.  It's a system
+	dependent header.
+	* sysdeps/wordsize-32/Dist: New file.
+	* sysdeps/wordsize-32/Makefile: New file.
+	* sysdeps/wordsize-64/Dist: New file.
+	* sysdeps/wordsize-64/Makefile: New file.
+
+	* sunrpc/Makefile: Adopt comment for real situation.
+
+	* sysdeps/i386/add_n.S: Add ASM_TYPE_DIRECTIVE and AS_SIZE_DIRECTIVE.
+	* sysdeps/i386/addmul_1.s: Likewise.
+	* sysdeps/i386/lshist.s: Likewise.
+	* sysdeps/i386/rshift.s: Likewise.
+	* sysdeps/i386/sub_n.s: Likewise.
+	* sysdeps/i386/submul_1.s: Likewise.
+
+	* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
+	Add .type and .size.
+
+1997-06-12 13:32  Philip Blundell  <Philip.Blundell@pobox.com>
+
+	* libc/sysdeps/unix/arm/brk.S: New file.
+	* libc/sysdeps/unix/arm/sysdep.S: Likewise.
+	* libc/sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
+
+1997-06-11 11:51  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>
+
+	* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_parse_spent):
+	Check if we have shadow information.
+
+1997-06-08 19:33  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>
+
+	* nis/nis_getservlist.c (nis_getservlist): Use calloc instead of
+	malloc, alloc memory for nis_server struct.
+	* nis/nis_getservlist.c (nis_freeservlist): Give the memory for
+	the nis_server struct free, too.
+
+	* nis/nis_removemember (nis_removemember): Fix for loop.
+
+1997-06-12 12:45  Ulrich Drepper  <drepper@cygnus.com>
+
+	* sysdeps/i386/fpu/__math.h (__M_SQRT2): Define here since we
+	cannot rely on M_SQRT2 being defined.  (log1p): Use __M_SQRT2 not
+	M_SQRT2.
+	* math/math.h (_Mldbl): Define even if M_* constants are not
+	defined.
+	Reported by corsepiu@faw.uni-ulm.de.
+
+1997-06-12 03:08  Philip Blundell  <Philip.Blundell@pobox.com>
+
+	* nss/getXXbyYY_r.c (do_weak_alias): Remove extra parentheses.
+
+1997-06-11 13:22  Ulrich Drepper  <drepper@cygnus.com>
+
+	* misc/regexp.h (compile): Allow use of macro INIT for variable
+	declaration.  Add documentation for INIT.
+	Reported by Robert Bihlmeyer <robbe@orcus.priv.at>.
+
+1997-06-11 10:47  Philip Blundell  <Philip.Blundell@pobox.com>
+
+	* sysdeps/unix/sysv/linux/net/if_arp.h: Add two new hardware types.
+
+1997-06-10 11:31  H.J. Lu  <hjl@gnu.ai.mit.edu>
+
+	* sysdeps/powerpc/strlen.s: Use -0x101 instead of 0xfffffeff
+	for a signed 16-bit value.
+
+1997-06-07 07:54  H.J. Lu  <hjl@gnu.ai.mit.edu>
+
+	* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+	(_dl_sysdep_read_whole_file): Deleted.
+
+	* sysdeps/powerpc/fenvbits.h (__FE_ALL_INVALID): Changed
+	to FE_ALL_INVALID.
+
+	* sysdeps/powerpc/fraiseexcpt.c (__FE_INVALID_SOFTWARE):
+	Changed to FE_INVALID_SOFTWARE.
+	(__FPSCR_STICKY_BITS): Changed to FPSCR_STICKY_BITS.
+
+	* sysdeps/libm-ieee754/s_fmin.c: Fix a typo.
+
+1997-06-07 18:48  H.J. Lu  <hjl@gnu.ai.mit.edu>
+
+	* shlib-versions (.*-.*-linux.*): Set libc to 6.
+
+1997-06-08 15:35  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>
+
+	* nis/nis_add.c (nis_add): Use nis_leaf_of_r instead of nis_name_of_r.
+
+	* nis/nis_addmember.c (nis_addmember): Fix a lot of pointer errors.
+	* nis/nis_clone.c: Likewise.
+	* nis/nis_removemember.c (nis_removemember): Likewise.
+	* nis/nis_table.c: Likewise.
+
+	* nis/nss_nis/nis-hosts.c: Use addr, not p for inet_pton call.
+	* nis/nss_nisplus/nisplus-hosts.c: Likewise.
+
+	* nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Check for
+	group == NULL.
+
+1997-06-08 21:21  Mark Kettenis  <kettenis@phys.uva.nl>
+
+	* login/login.c, login/utmp_daemon.c, login/utmp_file.c,
+	login/getutent_r.c, login/utmpname.c: Cleanup `#if _LIBC' and
+	`#ifndef _LIBC' fragments.
+
+	* login/programs/utmpd.c: Define DEFAULT_USER.
+	(drop_priviliges): Use it.
+	(main): Set locale and text domain.
+
+	* login/programs/utmpd-private.h: Declare proc_utmp_eq.
+	* login/programs/database.c (proc_utmp_eq): Removed.
+	* login/programs/request.c (proc_utmp_eq): Made global.  Only use
+	ut_id field if valid.
+
+	* login/utmp_file.c (proc_utmp_eq): Restore patch made by Miles
+	Bader that was lost when adding the daemon backend; Only use ut_id
+	field if valid.
+
+1997-06-05 23:10  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* sysdeps/unix/sysv/linux/Dist: Remove netatalk/atalk.h and
+	netinet/icmp.h, add netatalk/at.h.
+	* sysdeps/unix/sysv/linux/powerpc/Dist: Remove termios.h.
+	* sysdeps/unix/sysv/linux/sparc/Dist: Remove start.c.
+
+1997-06-04 19:22  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* stdlib/testsort.c (compare): Fix parameter types.
+
+1997-06-04 19:05  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* md5-crypt/Makefile (distribute): Fix name of file.
+
+1997-06-04 19:02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* login/Makefile (utmpd-routines): Remove utmpd again, which is
+	already added implicitly through $(others).
+
+1997-06-05 13:43  Fila Kolodny  <fila@filapc.ibi.com>
+
+	* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add netipx/ipx.h.
+
+1997-06-05 13:25  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+	* md5-crypt/md5-crypt.c: Add prototype for __md5_crypt.
+
+1997-06-05 17:08  Ulrich Drepper  <drepper@cygnus.com>
+
+	* string/argz-addsep.c: Correct weak alias.
+	Reported by Ben Pfaff <pfaffben@pilot.msu.edu>.
+
+	* locale/setlocale.c (setlocale): Free variable with locale path
+	before returning.
+	(setname): Don't test for _nl_current[category] being NULL before
+	freeing.
+	Reported by Ben Pfaff <pfaffben@pilot.msu.edu>.
+
+1997-06-04 12:41  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+	* manual/intro.texi (XPG): Correct some typos.
+
 1997-06-04 05:09  Miles Bader  <miles@gnu.ai.mit.edu>
 
 	* argp/argp-help.c (_help): Use uparams.usage_indent instead of
@@ -36,7 +288,7 @@
 	(Parsing Program Arguments): New node.
 	(Parsing Options, Example of Getopt, Long Options, Long Option
 	Example): Nodes removed.
-	* manual/libc.texinfo: (Program Arguments): Menu updated.
+	* manual/libc.texinfo (Program Arguments): Menu updated.
 	(Parsing Program Arguments): New menu.
 
 1997-06-04 20:57  Ulrich Drepper  <drepper@cygnus.com>
@@ -3097,7 +3349,7 @@
 	* nis/nis_call.c (__do_niscall): Print message if cold start file
 	does not exist.
 	* nis/nis_file.c: Don't print error messages.
-	* nis/nis_local_name.c (nis_local_host): Fix pointer errors.
+	* nis/nis_local_names.c (nis_local_host): Fix pointer errors.
 	* nis/rpcsvc/ypclnt.h: Fix copyright and prototypes.
 	* nis/rpcsvc/nis.h: Likewise.
 	* nis/ypclnt.c: Fix prototypes.
diff --git a/Makefile b/Makefile
index a91999bb42..2d9b3b86d6 100644
--- a/Makefile
+++ b/Makefile
@@ -107,6 +107,9 @@ $(objpfx)munch-init.c: munch.awk munch-tmpl.c $(+subdir_inits)
 generated := $(generated) munch-init.c
 endif
 
+# We have a versioning file for libc.so.
+libc-map = libc.map
+
 
 include Makerules
 
@@ -131,9 +134,6 @@ ifeq (yes,$(build-shared))
 lib: $(common-objpfx)libc.so
 endif
 
-# We have a versioning file for libc.so.
-#libc-map = libc.map
-
 all-Subdirs-files = $(wildcard $(addsuffix /Subdirs, $(config-sysdirs)))
 $(objpfx)sysd-dirs: $(+sysdir_pfx)config.make $(all-Subdirs-files)
 	(echo define sysdep-subdirs;				\
@@ -315,7 +315,7 @@ makeinfo --no-validate --no-warn --no-headers $< -o $@
 endef
 INSTALL: manual/maint.texi; $(format-me)
 NOTES: manual/creature.texi; $(format-me)
-manual/dir-add.texi: FORCE
+manual/dir-add.texi manual/dir-add.info: FORCE
 	$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
 FORCE:
 
diff --git a/Makerules b/Makerules
index dc3f652113..18a17587fa 100644
--- a/Makerules
+++ b/Makerules
@@ -95,6 +95,10 @@ o-iterator = $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
 vpath %.h $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
 				      $(+sysdep_dirs) $(..)))
 
+# The same is true for RPC source files.
+vpath %.x $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
+				      $(+sysdep_dirs) $(..)))
+
 # Some sysdep makefiles use this to distinguish being included here from
 # being included individually by a subdir makefile (hurd/Makefile needs this).
 in-Makerules := yes
@@ -332,7 +336,7 @@ ifeq (yes,$(build-shared))
 # build shared libraries in place from the installed *_pic.a files.
 # $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
 # on other shared objects.
-lib%.so: lib%_pic.a; $(build-shlib)
+lib%.so: lib%_pic.a $(lib%-map); $(build-shlib)
 
 ifeq ($(have-no-whole-archive),yes)
 no-whole-archive = -Wl,--no-whole-archive
@@ -361,8 +365,8 @@ $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS)  \
 	  -Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
 	  $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
 	  -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
-	  -Wl,--whole-archive $^ $(no-whole-archive) \
-	  $(LDLIBS-$(@F:lib%.so=%).so)
+	  -Wl,--whole-archive $(filter-out $($(@F:%.so=%-map)),$^) \
+	  $(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
 	  test -z "$($(@F)-version)" || \
 	    (rm -f $@$($(@F)-version); $(LN_S) $(@F) $@$($(@F)-version))
 endef
@@ -378,7 +382,8 @@ LDFLAGS-c.so += -e __libc_main
 # Use our own special initializer and finalizer files for libc.so.
 $(common-objpfx)libc.so: $(elfobjdir)/soinit.so \
 			 $(common-objpfx)libc_pic.a \
-			 $(elfobjdir)/sofini.so $(elfobjdir)/ld.so
+			 $(elfobjdir)/sofini.so $(elfobjdir)/ld.so \
+			 $(libc-map)
 	$(build-shlib)
 endif
 
@@ -910,6 +915,7 @@ dist: $(filter-out %.c %.S %.s,$(distribute))
 # the sub-make that makes the distribution (above).
 $(objpfx)distinfo: Makefile $(..)Makerules \
 		   $(wildcard $(foreach dir,$(sysdirs),$(dir)/Makefile))
+	$(make-target-directory)
 	$(distinfo-vars)
 	mv -f $@.new $@
 .PHONY: subdir_distinfo
diff --git a/PROJECTS b/PROJECTS
index 59b3d8a0f5..f4cadfdeb4 100644
--- a/PROJECTS
+++ b/PROJECTS
@@ -96,10 +96,8 @@ contact <bug-glibc@prep.ai.mit.edu>
 
      + tcgetid() and waitid()			from XPG4.2
      + grantpt(), ptsname(), unlockpt()		from XPG4.2
-     + getdate()				from XPG4.2
-	*** Probably underway
 
-     More information are available on request.
+     More information is available on request.
 
 
 [14] We need to write a library for on-the-fly transformation of streams
diff --git a/README b/README
index 83cf531d28..d3439ed84b 100644
--- a/README
+++ b/README
@@ -1,11 +1,11 @@
-This directory contains the version 2.0.1 test release of the GNU C Library.
+This directory contains the version 2.0.90 test release of the GNU C Library.
 Many bugs have been fixed since the last release.
 Some bugs surely remain.
 
 As of this release, the GNU C library is known to run on the following
 configurations:
 
-		*-*-gnu			GNU Hurd
+		i[3456]86-*-gnu		GNU Hurd
 		i[3456]86-*-linux-gnu	Linux-2.0 on Intel
 		m68k-*-linux-gnu	Linux-2.0 on Motorola 680x0
 		alpha-*-linux-gnu	Linux-2.0 on DEC Alpha
@@ -36,17 +36,18 @@ versions) used to run on the following configurations:
 		sparc-sun-solaris2
 		sparc-sun-sunos4
 
-Whether this is still true for this release is unknown.  Porting the
-library is not hard.  If you are interested in doing a port, please
-get on the mailing list by sending electronic mail to
-<bug-glibc-request@prep.ai.mit.edu>.
+Since no one has volunteered to test and fix the above configurations,
+these are not supported at the moment.  It's expected that these don't
+work anymore.  Porting the library is not hard.  If you are interested
+in doing a port, please contact the glibc maintainers by sending
+electronic mail to <bug-glibc@prep.ai.mit.edu>.
 
 The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
 provides the Unix `crypt' function, plus some other entry points.
 Because of the United States export restriction on DES implementations,
 we are distributing this code separately from the rest of the C
 library.  There is an extra distribution tar file just for crypt; it is
-called `glibc-crypt-2.0.1.tar.gz'.  You can just unpack the crypt
+called `glibc-crypt-2.0.90.tar.gz'.  You can just unpack the crypt
 distribution along with the rest of the C library and build; you can
 also build the library without getting crypt.  Users outside the USA
 can get the crypt distribution via anonymous FTP from ftp.ifi.uio.no
diff --git a/argp/argp-help.c b/argp/argp-help.c
index 0d944414cb..f0e86d9ca2 100644
--- a/argp/argp-help.c
+++ b/argp/argp-help.c
@@ -922,7 +922,7 @@ filter_doc (const char *doc, int key, const struct argp *argp,
     }
   else
     /* No filter.  */
-    return (char *)doc;
+    return doc;
 }
 
 /* Prints STR as a header line, with the margin lines set appropiately, and
@@ -1319,7 +1319,8 @@ argp_args_usage (const struct argp *argp, const struct argp_state *state,
 
   if (fdoc)
     {
-      nl = strchr (fdoc, '\n');
+      const char *cp = fdoc;
+      nl = strchr (cp, '\n');
       if (nl)
 	/* This is a `multi-level' args doc; advance to the correct position
 	   as determined by our state in LEVELS, and update LEVELS.  */
@@ -1327,17 +1328,17 @@ argp_args_usage (const struct argp *argp, const struct argp_state *state,
 	  int i;
 	  multiple = 1;
 	  for (i = 0; i < *our_level; i++)
-	    fdoc = nl + 1, nl = strchr (fdoc, '\n');
+	    cp = nl + 1, nl = strchr (cp, '\n');
 	  (*levels)++;
 	}
       if (! nl)
-	nl = fdoc + strlen (fdoc);
+	nl = cp + strlen (cp);
 
       /* Manually do line wrapping so that it (probably) won't get wrapped at
 	 any embedded spaces.  */
-      space (stream, 1 + nl - fdoc);
+      space (stream, 1 + nl - cp);
 
-      __argp_fmtstream_write (stream, fdoc, nl - fdoc);
+      __argp_fmtstream_write (stream, cp, nl - cp);
     }
   if (fdoc && fdoc != tdoc)
     free ((char *)fdoc);	/* Free user's modified doc string.  */
diff --git a/config.guess b/config.guess
index ea44a2a9ca..c4bca5f251 100755
--- a/config.guess
+++ b/config.guess
@@ -436,27 +436,27 @@ EOF
 	# The BFD linker knows what the default object file format is, so
 	# first see if it will tell us.
 	ld_help_string=`ld --help 2>&1`
-	if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
-	  echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
-	  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
-	  echo "powerpc-unknown-linux-gnu" ; exit 0
-	elif test "${UNAME_MACHINE}" = "alpha" ; then
+	ld_supported_emulations=`echo $ld_help_string \
+			 | sed -ne '/supported emulations:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported emulations: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_emulations" in
+	  i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
+	  i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
+	  sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+	  m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+	  elf32ppc)   echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
+	esac
+
+	if test "${UNAME_MACHINE}" = "alpha" ; then
 	  echo alpha-unknown-linux-gnu ; exit 0
-	elif test "${UNAME_MACHINE}" = "sparc" ; then
-	  echo sparc-unknown-linux-gnu ; exit 0
 	elif test "${UNAME_MACHINE}" = "mips" ; then
 	  cat >dummy.c <<EOF
 main(argc, argv)
-int argc;
-char *argv[];
+     int argc;
+     char *argv[];
 {
 #ifdef __MIPSEB__
   printf ("%s-unknown-linux-gnu\n", argv[1]);
@@ -470,20 +470,41 @@ EOF
 	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
 	  rm -f dummy.c dummy
 	else
-	  # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
-	  # useful --help.  Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
-	  test ! -d /usr/lib/ldscripts/. \
-	    && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+	  # Either a pre-BFD a.out linker (linux-gnuoldld)
+	  # or one that does not give us useful --help.
+	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+	  # If ld does not provide *any* "supported emulations:"
+	  # that means it is gnuoldld.
+	  echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+	  test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+	  case "${UNAME_MACHINE}" in
+	  i?86)
+	    VENDOR=pc;
+	    ;;
+	  *)
+	    VENDOR=unknown;
+	    ;;
+	  esac
 	  # Determine whether the default compiler is a.out or elf
 	  cat >dummy.c <<EOF
+#include <features.h>
 main(argc, argv)
-int argc;
-char *argv[];
+     int argc;
+     char *argv[];
 {
 #ifdef __ELF__
-  printf ("%s-pc-linux-gnu\n", argv[1]);
+# ifdef __GLIBC__
+#  if __GLIBC__ >= 2
+    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+#  else
+    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+#  endif
+# else
+   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
 #else
-  printf ("%s-pc-linux-gnuaout\n", argv[1]);
+  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
 #endif
   return 0;
 }
diff --git a/config.sub b/config.sub
index cd34253540..5b75f25cdf 100755
--- a/config.sub
+++ b/config.sub
@@ -391,11 +391,11 @@ case $basic_machine in
 		;;
 	mipsel*-linux*)
 		basic_machine=mipsel-unknown
-		os=-linux
+		os=-linux-gnu
 		;;
 	mips*-linux*)
 		basic_machine=mips-unknown
-		os=-linux
+		os=-linux-gnu
 		;;
 	mips3*-*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
@@ -585,7 +585,7 @@ case $basic_machine in
 		basic_machine=vax-dec
 		os=-vms
 		;;
-       vpp*|vx|vx-*)
+	vpp*|vx|vx-*)
                basic_machine=f301-fujitsu
                ;;
 	vxworks960)
@@ -615,7 +615,7 @@ case $basic_machine in
 # Here we handle the default manufacturer of certain CPU types.  It is in
 # some cases the only manufacturer, in others, it is the most popular.
 	mips)
-		if [ x$os = x-linux ]; then
+		if [ x$os = x-linux-gnu ]; then
 			basic_machine=mips-unknown
 		else
 			basic_machine=mips-mips
diff --git a/db/Makefile b/db/Makefile
index 331c8b1d74..9f45e9fea2 100644
--- a/db/Makefile
+++ b/db/Makefile
@@ -19,6 +19,7 @@ libdb-routines := bt_close bt_conv bt_debug bt_delete bt_get \
 		  mpool \
 		  rec_close rec_delete rec_get rec_open rec_put rec_search \
 		  rec_seq rec_utils
+libdb-map	:= libdb.map
 
 headers		:= db.h mpool.h ndbm.h
 distribute	:= compat.h					\
diff --git a/db/libdb.map b/db/libdb.map
new file mode 100644
index 0000000000..5be731cdea
--- /dev/null
+++ b/db/libdb.map
@@ -0,0 +1,12 @@
+GLIBC_2.0 {
+  global:
+    # the real DB entry point.
+    dbopen;
+
+    # The compatibility functions.
+    dbm_clearerr; dbm_close; dbm_delete; dbm_dirfno; dbm_error;
+    dbm_fetch; dbm_firstkey; dbm_nextkey; dbm_open; dbm_store;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/elf/Makefile b/elf/Makefile
index ae7dda9638..33d57ed70f 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -40,6 +40,7 @@ distribute	= $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
 extra-libs	 = libdl
 extra-libs-others = $(extra-libs)
 libdl-routines	:= dlopen dlclose dlsym dlvsym dlerror dladdr
+libdl-map	:= libdl.map
 
 before-compile = $(objpfx)trusted-dirs.h
 
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 294dfb951f..f2ce4c9c3c 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -25,10 +25,14 @@
 
 #include "dl-hash.h"
 #include <dl-machine.h>
-#include "../stdio-common/_itoa.h"
+#include <stdio-common/_itoa.h>
 
 #define VERSTAG(tag)	(DT_NUM + DT_PROCNUM + DT_VERSIONTAGIDX (tag))
 
+/* We need this string more than once.  */
+static const char undefined_msg[] = "undefined symbol: ";
+
+
 struct sym_val
   {
     ElfW(Addr) a;
@@ -105,16 +109,10 @@ do_lookup (const char *undef_name, unsigned long int hash,
 	       && sym->st_shndx == SHN_UNDEF))
 	    continue;
 
-	  switch (ELFW(ST_TYPE) (sym->st_info))
-	    {
-	    case STT_NOTYPE:
-	    case STT_FUNC:
-	    case STT_OBJECT:
-	      break;
-	    default:
-	      /* Not a code/data definition.  */
-	      continue;
-	    }
+	  if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC)
+	    /* Ignore all but STT_NOTYPE, STT_OBJECT and STT_FUNC entries
+	       since these are no code/data definitions.  */
+	    continue;
 
 	  if (sym != ref && strcmp (strtab + sym->st_name, undef_name))
 	    /* Not the symbol we are looking for.  */
@@ -129,7 +127,7 @@ do_lookup (const char *undef_name, unsigned long int hash,
 	      if (verstab != NULL)
 		{
 		  ElfW(Half) ndx = verstab[symidx] & 0x7fff;
-		  if (map->l_versions[ndx].hash != 0)
+		  if (ndx > 2) /* map->l_versions[ndx].hash != 0) */
 		    continue;
 		}
 	    }
@@ -143,7 +141,7 @@ do_lookup (const char *undef_name, unsigned long int hash,
 		     symbol must not simply disappear.  */
 		  if (version->filename != NULL
 		      && _dl_name_match_p (version->filename, map))
-		    return -1;
+		    return -2;
 		  /* Otherwise we accept the symbol.  */
 		}
 	      else
@@ -177,11 +175,14 @@ do_lookup (const char *undef_name, unsigned long int hash,
 	      /* Local symbols are ignored.  */
 	      break;
 	    }
+
+	  /* There cannot be another entry for this symbol so stop here.  */
+	  break;
 	}
 
-      /* If this current is the one mentioned in the verneed entry it
-	 is a bug.  */
-      if (version != NULL && version->filename != NULL
+      /* If this current map is the one mentioned in the verneed entry
+	 and we have not found a weak entry, it is a bug.  */
+      if (symidx == STN_UNDEF && version != NULL && version->filename != NULL
 	  && _dl_name_match_p (version->filename, map))
 	return -1;
     }
@@ -214,7 +215,7 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
       (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
     /* We could find no value for a strong reference.  */
     _dl_signal_error (0, reference_name,
-		      make_string ("undefined symbol: ", undef_name));
+		      make_string (undefined_msg, undef_name));
 
   *ref = current_value.s;
   return current_value.a;
@@ -289,14 +290,16 @@ _dl_lookup_versioned_symbol (const char *undef_name, const ElfW(Sym) **ref,
 				       version->name,
 				       " not defined in file ",
 				       version->filename,
-				       " with link time reference"));
+				       " with link time reference",
+				       res == -2
+				       ? " (no version symbols)" : ""));
     }
 
   if (current_value.s == NULL &&
       (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
     /* We could find no value for a strong reference.  */
     _dl_signal_error (0, reference_name,
-		      make_string ("undefined symbol: ", undef_name,
+		      make_string (undefined_msg, undef_name,
 				   ", version ", version->name ?: NULL));
 
   *ref = current_value.s;
@@ -337,11 +340,10 @@ _dl_lookup_versioned_symbol_skip (const char *undef_name,
       (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
     {
       /* We could find no value for a strong reference.  */
-      static const char msg[] = "undefined symbol: ";
       const size_t len = strlen (undef_name);
-      char buf[sizeof msg + len];
-      memcpy (buf, msg, sizeof msg - 1);
-      memcpy (&buf[sizeof msg - 1], undef_name, len + 1);
+      char buf[sizeof undefined_msg + len];
+      memcpy (buf, undefined_msg, sizeof undefined_msg - 1);
+      memcpy (&buf[sizeof undefined_msg - 1], undef_name, len + 1);
       _dl_signal_error (0, reference_name, buf);
     }
 
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index bec5881d0e..5b22a506da 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -68,7 +68,7 @@ _dl_relocate_object (struct link_map *l, struct link_map *scope[], int lazy)
     ELF_DYNAMIC_RELOCATE (l, lazy);
   }
 
-  /* Mark the object so we know ths work has been done.  */
+  /* Mark the object so we know this work has been done.  */
   l->l_relocated = 1;
 
   if (l->l_info[DT_TEXTREL])
diff --git a/elf/dl-version.c b/elf/dl-version.c
index 71eff0d962..f7df9805b3 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -25,7 +25,7 @@
 #include <string.h>
 #include <assert.h>
 
-#include "../stdio-common/_itoa.h"
+#include <stdio-common/_itoa.h>
 
 
 /* Set in rtld.c at startup.  */
@@ -53,13 +53,13 @@ extern char **_dl_argv;
 
 
 static inline struct link_map *
-find_needed (struct link_map *map, const char *name)
+find_needed (const char *name)
 {
   unsigned int n;
 
-  for (n = 0; n < map->l_nsearchlist; ++n)
-    if (_dl_name_match_p (name, map->l_searchlist[n]))
-      return map->l_searchlist[n];
+  for (n = 0; n < _dl_loaded->l_nsearchlist; ++n)
+    if (_dl_name_match_p (name, _dl_loaded->l_searchlist[n]))
+      return _dl_loaded->l_searchlist[n];
 
   /* Should never happen.  */
   return NULL;
@@ -72,10 +72,10 @@ match_symbol (const char *name, ElfW(Word) hash, const char *string,
 {
   const char *strtab = (const char *) (map->l_addr
 				       + map->l_info[DT_STRTAB]->d_un.d_ptr);
-  ElfW(Addr) def_offset = map->l_info[VERSTAG (DT_VERDEF)]->d_un.d_ptr;
+  ElfW(Addr) def_offset;
   ElfW(Verdef) *def;
 
-  if (def_offset == 0)
+  if (map->l_info[VERSTAG (DT_VERDEF)] == NULL)
     {
       /* The file has no symbol versioning.  I.e., the dependent
 	 object was linked against another version of this file.  We
@@ -87,7 +87,10 @@ no version information available (required by ",
       return 0;
     }
 
-  def = (ElfW(Verdef) *) (map->l_addr + def_offset);
+  def_offset = map->l_info[VERSTAG (DT_VERDEF)]->d_un.d_ptr;
+  assert (def_offset != 0);
+
+  def = (ElfW(Verdef) *) ((char *) map->l_addr + def_offset);
   while (1)
     {
       /* Currently the version number of the definition entry is 1.
@@ -179,7 +182,7 @@ _dl_check_map_versions (struct link_map *map, int verbose)
       while (1)
 	{
 	  ElfW(Vernaux) *aux;
-	  struct link_map *needed = find_needed (map, strtab + ent->vn_file);
+	  struct link_map *needed = find_needed (strtab + ent->vn_file);
 
 	  /* If NEEDED is NULL this means a dependency was not found
 	     and no stub entry was created.  This should never happen.  */
@@ -227,7 +230,7 @@ _dl_check_map_versions (struct link_map *map, int verbose)
   if (def != NULL)
     {
       ElfW(Verdef) *ent;
-      ent = (ElfW(Verdef)  *) (map->l_addr + def->d_un.d_ptr);
+      ent = (ElfW(Verdef) *) (map->l_addr + def->d_un.d_ptr);
       while (1)
 	{
 	  if ((unsigned int) (ent->vd_ndx & 0x7fff) > ndx_high)
diff --git a/elf/libdl.map b/elf/libdl.map
new file mode 100644
index 0000000000..d950382346
--- /dev/null
+++ b/elf/libdl.map
@@ -0,0 +1,7 @@
+GLIBC_2.0 {
+  global:
+    dladdr; dlclose; dlerror; dlopen; dlsym; dlvsym;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/elf/link.h b/elf/link.h
index 0e58996b04..c894540e5e 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -255,7 +255,7 @@ extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *),
 
 /* Helper function for <dlfcn.h> functions.  Runs the OPERATE function via
    _dl_catch_error.  Returns zero for success, nonzero for failure; and
-   arranges for `dlerror' to return the error details.  
+   arranges for `dlerror' to return the error details.
    ARGS is passed as argument to OPERATE.  */
 extern int _dlerror_run (void (*operate) (void *), void *args);
 
diff --git a/inet/arpa/tftp.h b/inet/arpa/tftp.h
index 036720011f..e2651a5019 100644
--- a/inet/arpa/tftp.h
+++ b/inet/arpa/tftp.h
@@ -44,20 +44,20 @@
 /*
  * Packet types.
  */
-#define	RRQ	01			/* read request */
-#define	WRQ	02			/* write request */
-#define	DATA	03			/* data packet */
-#define	ACK	04			/* acknowledgement */
-#define	ERROR	05			/* error code */
+#define	RRQ	01				/* read request */
+#define	WRQ	02				/* write request */
+#define	DATA	03				/* data packet */
+#define	ACK	04				/* acknowledgement */
+#define	ERROR	05				/* error code */
 
 struct	tftphdr {
-	short	th_opcode;		/* packet type */
+	short	th_opcode;			/* packet type */
 	union {
-		short	tu_block;	/* block # */
-		short	tu_code;	/* error code */
-		char	tu_stuff[1];	/* request packet stuff */
+		unsigned short	tu_block;	/* block # */
+		short	tu_code;		/* error code */
+		char	tu_stuff[1];		/* request packet stuff */
 	} th_u;
-	char	th_data[1];		/* data or error string */
+	char	th_data[1];			/* data or error string */
 };
 
 #define	th_block	th_u.tu_block
diff --git a/libc.map b/libc.map
new file mode 100644
index 0000000000..0817685c7b
--- /dev/null
+++ b/libc.map
@@ -0,0 +1,53 @@
+GLIBC_2.0 {
+  global:
+    # global variables
+    _errno; _itoa_lower_digits; _itoa_upper_digits;
+    __ctype_b; __ctype_tolower; __ctype_toupper;
+    _IO_stderr_; _IO_stdin_; _IO_stdout_;
+    _nl_msg_cat_cntr; __environ; _environ;
+
+#  __libc_multiple_libcs; __libc_argc; __libc_argv; _dl_starting_up; __exit_funcs;
+
+    # helper functions
+    __errno_location; __libc_init_first;
+
+    # functions with special/multiple interfaces
+    __sigsetjmp; _setjmp; __sigaddset; __sigdelset; __sigismember;
+    __sysv_signal; __bsd_getpgrp;
+
+    # functions which have an additional interface since they are
+    # are cancelable.
+    __libc_wait; __libc_waitpid; __libc_pause; __libc_nanosleep;
+    __libc_open; __libc_close; __libc_read; __libc_write;
+    __libc_lseek; __libc_fcntl; __libc_tcdrain; __libc_fsync;
+    __libc_msync; __libc_system;
+
+    # interface of malloc functions
+    __libc_calloc; __libc_free; __libc_mallinfo; __libc_malloc;
+    __libc_mallopt; __libc_memalign; __libc_pvalloc; __libc_realloc;
+    __libc_valloc;
+
+    # functions with required interface outside normal name space
+    _exit; __ivaliduser;
+
+    # functions from the experimental locale implementation
+    __*_l; __newlocale; __duplocale; __freelocale;
+
+    # functions used in inline functions or macros
+    __strto*_internal; __wcsto*_internal; __getdelim;
+    __isnan; __isnanf; __isnanl; __finite; __finitef; __finitel;
+    __signbit; __signbitf; __signbitl; __cmsg_nxthdr;
+    _obstack_allocated_p; _obstack_begin; _obstack_begin_1;
+    _obstack_free; _obstack_memory_used; _obstack_newchunk;
+    __assert_fail; __assert_perror_fail;
+
+    # functions used in other libraries
+    __printf_fp;
+
+    # all functions and variables in the normal name space
+    a*; b*; c*; d*; e*; f*; g*; h*; i*; j*; k*; l*; m*;
+    n*; o*; p*; q*; r*; s*; t*; u*; v*; w*; x*; y*; z*;
+
+  local:
+    *;
+};
diff --git a/locale/Makefile b/locale/Makefile
index 7acef573d6..90b218130d 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -45,6 +45,7 @@ extra-libs	= libBrokenLocale
 extra-libs-others = $(extra-libs)
 
 libBrokenLocale-routines = broken_cur_max
+libBrokenLocale-map = libBrokenLocale.map
 
 subdir-dirs	= programs
 vpath %.c programs
diff --git a/locale/libBrokenLocale.map b/locale/libBrokenLocale.map
new file mode 100644
index 0000000000..09752759f7
--- /dev/null
+++ b/locale/libBrokenLocale.map
@@ -0,0 +1,7 @@
+GLIBC_2.0 {
+  global:
+    __ctype_get_mb_cur_max;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/locale/setlocale.c b/locale/setlocale.c
index ff7192f45d..3e63b25ac2 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -204,8 +204,7 @@ new_composite_name (int category, const char *newnames[LC_ALL])
 static inline void
 setname (int category, const char *name)
 {
-  if (_nl_current[category] == NULL
-      && _nl_current_names[category] != _nl_C_name)
+  if (_nl_current_names[category] != _nl_C_name)
     free ((void *) _nl_current_names[category]);
 
   _nl_current_names[category] = name;
@@ -351,6 +350,9 @@ setlocale (int category, const char *locale)
       /* Critical section left.  */
       __libc_lock_unlock (__libc_setlocale_lock);
 
+      /* Free the resources (the locale path variable.  */
+      free (locale_path);
+
       return composite;
     }
   else
@@ -395,6 +397,9 @@ setlocale (int category, const char *locale)
       /* Critical section left.  */
       __libc_lock_unlock (__libc_setlocale_lock);
 
+      /* Free the resources (the locale path variable.  */
+      free (locale_path);
+
       return (char *) newname;
     }
 }
diff --git a/login/Makefile b/login/Makefile
index a94c5cb14d..f75632a023 100644
--- a/login/Makefile
+++ b/login/Makefile
@@ -29,7 +29,7 @@ routines := getutent getutent_r getutid getutline getutid_r getutline_r \
 
 others = utmpd
 install-sbin = utmpd
-utmpd-routines := utmpd connection database error request xtmp
+utmpd-routines := connection database error request xtmp
 extra-objs := $(utmpd-routines:=.o)
 
 distribute := utmp-private.h programs/xtmp.h programs/utmpd.h \
@@ -43,6 +43,7 @@ extra-libs      := libutil
 extra-libs-others := $(extra-libs)
 
 libutil-routines:= login login_tty logout logwtmp pty updwtmp
+libutil-map	:= libutil.map
 
 include ../Rules
 
diff --git a/login/getutent_r.c b/login/getutent_r.c
index 3cc46da96c..9e1d4e8768 100644
--- a/login/getutent_r.c
+++ b/login/getutent_r.c
@@ -19,15 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <assert.h>
-#if _LIBC
 #include <libc-lock.h>
-#else
-#define __libc_lock_lock(lock)		((void) 0)
-#define __libc_lock_unlock(lock)	((void) 0)
-#define __libc_lock_define_initialized(CLASS,NAME)
-#define weak_alias(name, aliasname) \
-  extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); 
-#endif
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/login/libutil.map b/login/libutil.map
new file mode 100644
index 0000000000..46064a63a3
--- /dev/null
+++ b/login/libutil.map
@@ -0,0 +1,7 @@
+GLIBC_2.0 {
+  global:
+    forkpty; login; login_tty; logout; logwtmp; openpty; updwtmp;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/login/login.c b/login/login.c
index 6bd0e6eaef..c148893c88 100644
--- a/login/login.c
+++ b/login/login.c
@@ -24,9 +24,6 @@
 #include <stdlib.h>
 #include <utmp.h>
 
-#ifndef _LIBC
-#define __set_errno(val) errno = (val)
-#endif
 
 /* Return the result of ttyname in the buffer pointed to by TTY, which should
    be of length BUF_LEN.  If it is too long to fit in this buffer, a
diff --git a/login/programs/database.c b/login/programs/database.c
index e31e0d9dae..3138ae605c 100644
--- a/login/programs/database.c
+++ b/login/programs/database.c
@@ -42,7 +42,6 @@ static int replace_entry (utmp_database *database, int old_position,
 			  int new_position, const struct utmp *entry);
 static int store_entry (utmp_database *database, int position,
 			const struct utmp *entry);
-static int proc_utmp_eq (const struct utmp *entry, const struct utmp *match);
 static int get_mtime (const char *file, time_t *timer);
 
 
@@ -473,33 +472,6 @@ store_entry (utmp_database *database, int position,
 }
 
 
-/* This function is identical to the one in login/utmp_file.c.  */
-static int
-proc_utmp_eq (const struct utmp *entry, const struct utmp *match)
-{
-  return
-    (
-#if _HAVE_UT_TYPE - 0
-     (entry->ut_type == INIT_PROCESS
-      || entry->ut_type == LOGIN_PROCESS
-      || entry->ut_type == USER_PROCESS
-      || entry->ut_type == DEAD_PROCESS)
-     &&
-     (match->ut_type == INIT_PROCESS
-      || match->ut_type == LOGIN_PROCESS
-      || match->ut_type == USER_PROCESS
-      || match->ut_type == DEAD_PROCESS)
-     &&
-#endif
-#if _HAVE_UT_ID - 0
-     strncmp (entry->ut_id, match->ut_id, sizeof match->ut_id) == 0
-#else
-     strncmp (entry->ut_line, match->ut_line, sizeof match->ut_line) == 0
-#endif
-     );
-}
-
-
 /* Get modification time of FILE and put it in TIMER.  returns 0 if
    successful, -1 if not.  */
 static int
diff --git a/login/programs/request.c b/login/programs/request.c
index 0f68b8ae79..d2c12e68cf 100644
--- a/login/programs/request.c
+++ b/login/programs/request.c
@@ -39,7 +39,6 @@ static int do_getutid (client_connection *connection);
 static int do_pututline (client_connection *connection);
 static int do_updwtmp (client_connection *connection);
 
-static int proc_utmp_eq (const struct utmp *entry, const struct utmp *match);
 static int internal_getut_r (client_connection *connection,
 			     const struct utmp *id, struct utmp *buffer);
 
@@ -571,7 +570,7 @@ return_error:
 
 
 /* This function is identical to the one in login/utmp_file.c.  */
-static int
+int
 proc_utmp_eq (const struct utmp *entry, const struct utmp *match)
 {
   return
@@ -589,7 +588,9 @@ proc_utmp_eq (const struct utmp *entry, const struct utmp *match)
      &&
 #endif
 #if _HAVE_UT_ID - 0
-     strncmp (entry->ut_id, match->ut_id, sizeof match->ut_id) == 0
+     (entry->ut_id[0] && match->ut_id[0]
+      ? strncmp (entry->ut_id, match->ut_id, sizeof match->ut_id) == 0
+      : strncmp (entry->ut_line, match->ut_line, sizeof match->ut_line) == 0)
 #else
      strncmp (entry->ut_line, match->ut_line, sizeof match->ut_line) == 0
 #endif
diff --git a/login/programs/utmpd-private.h b/login/programs/utmpd-private.h
index 4a9cdb921e..b22e58f700 100644
--- a/login/programs/utmpd-private.h
+++ b/login/programs/utmpd-private.h
@@ -100,8 +100,11 @@ void close_connection (client_connection *connection);
 int read_data (client_connection *connection);
 int write_data (client_connection *connection);
 
+int proc_utmp_eq (const struct utmp *entry, const struct utmp *match);
+
 void error (int status, int errnum, const char *message, ...);
 void warning (int errnum, const char *message, ...);
 
+
 #endif /* utmpd-private.h  */
 
diff --git a/login/programs/utmpd.c b/login/programs/utmpd.c
index e11218151c..ca310a21de 100644
--- a/login/programs/utmpd.c
+++ b/login/programs/utmpd.c
@@ -21,6 +21,7 @@
 #include <fcntl.h>
 #include <getopt.h>
 #include <libintl.h>
+#include <locale.h>
 #include <pwd.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -38,10 +39,14 @@
 #include "utmpd.h"
 #include "utmpd-private.h"
 
+#ifndef DEFAULT_USER
+#define DEFAULT_USER	"daemon"
+#endif
+
 /* Get libc version number.  */
 #include "../../version.h"
 
-#define PACKAGE "libc"
+#define PACKAGE _libc_intl_domainname
 
 /* Long options.  */
 static const struct option long_options[] =
@@ -81,6 +86,12 @@ main (int argc, char *argv[])
   int do_version;
   int opt;
 
+  /* Set locale via LC_ALL.  */
+  setlocale (LC_ALL, "");
+
+  /* Set the text message domain.  */
+  textdomain (PACKAGE);
+  
   /* Initialize local variables.  */
   debug = 0;
   do_help = 0;
@@ -197,7 +208,7 @@ drop_priviliges (void)
 {
   struct passwd *pw;
 
-  pw = getpwnam ("daemon");
+  pw = getpwnam (DEFAULT_USER);
   if (pw)
     {
       seteuid (pw->pw_uid);
diff --git a/login/utmp_daemon.c b/login/utmp_daemon.c
index 9e02f24524..705c8b3de9 100644
--- a/login/utmp_daemon.c
+++ b/login/utmp_daemon.c
@@ -29,10 +29,6 @@
 #include "utmp-private.h"
 #include "programs/utmpd.h"
 
-#ifndef _LIBC
-#define __set_errno(val) errno = (val)
-#endif
-
 
 /* Descriptor for the socket.  */
 static int daemon_sock = INT_MIN;
diff --git a/login/utmp_file.c b/login/utmp_file.c
index 1366f38d75..2026070f14 100644
--- a/login/utmp_file.c
+++ b/login/utmp_file.c
@@ -31,11 +31,6 @@
 
 #include "utmp-private.h"
 
-#ifndef _LIBC
-#define _(msg) (msg)
-#define __set_errno(val) errno = (val)
-#endif
-
 
 /* Descriptor for the file and position.  */
 static int file_fd = INT_MIN;
@@ -230,7 +225,9 @@ proc_utmp_eq (const struct utmp *entry, const struct utmp *match)
      &&
 #endif
 #if _HAVE_UT_ID - 0
-     strncmp (entry->ut_id, match->ut_id, sizeof match->ut_id) == 0
+     (entry->ut_id[0] && match->ut_id[0]
+      ? strncmp (entry->ut_id, match->ut_id, sizeof match->ut_id) == 0
+      : strncmp (entry->ut_line, match->ut_line, sizeof match->ut_line) == 0)
 #else
      strncmp (entry->ut_line, match->ut_line, sizeof match->ut_line) == 0
 #endif
diff --git a/login/utmpname.c b/login/utmpname.c
index 81e857a2bc..2692b71ff9 100644
--- a/login/utmpname.c
+++ b/login/utmpname.c
@@ -17,15 +17,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#if _LIBC
 #include <libc-lock.h>
-#else
-#define __libc_lock_lock(NAME)		((void) 0)
-#define __libc_lock_unlock(NAME)	((void) 0)
-#define __libc_lock_define(CLASS,NAME)
-#define weak_alias(name, aliasname) \
-  extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); 
-#endif
 #include <stdlib.h>
 #include <string.h>
 #include <utmp.h>
diff --git a/manual/.cvsignore b/manual/.cvsignore
index 51a9a04ef2..7c305176da 100644
--- a/manual/.cvsignore
+++ b/manual/.cvsignore
@@ -9,4 +9,4 @@ glibc-*
 *.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
 
 chapters chapters-incl1 chapters-incl2 summary.texi stamp-*
-distinfo
+distinfo dir-add.texi
diff --git a/manual/Makefile b/manual/Makefile
index 5f05524049..80ab3dc30a 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -34,7 +34,7 @@ ifneq (,$(wildcard ../Makeconfig))
 include ../Makeconfig
 endif
 
-# Set chapters and chapters-incl.
+# Set chapters and chapters-incl[12].
 -include chapters
 chapters: libc.texinfo
 	$(find-includes)
@@ -76,7 +76,10 @@ stamp-summary: summary.awk $(chapters) $(chapters-incl)
 # access to the documentation of the function, variables, and other
 # definitions.
 dir-add.texi: xtract-typefun.awk $(chapters)
-	$(GAWK) -f $^ | sort > $@.new;
+	(echo "@dircategory GNU C library functions";			\
+	 echo "@direntry";						\
+	 $(GAWK) -f $^ | sort;						\
+	 echo "@end direntry";) > $@.new
 	mv -f $@.new $@
 
 # Generate Texinfo files from the C source for the example programs.
@@ -97,8 +100,8 @@ distribute = $(minimal-dist)	       					\
 	     $(patsubst examples/%.c,%.c.texi,$(filter examples/%.c,	\
 			$(minimal-dist)))				\
 	     libc.info* libc.?? libc.??s texinfo.tex summary.texi	\
-	     stamp-summary chapters chapters-incl			\
-	     xtract-typefun.awk
+	     stamp-summary chapters chapters-incl1 chapters-incl2	\
+	     xtract-typefun.awk dir-add.texi dir-add.info
 export distribute := $(distribute)
 
 tar-it = tar chovf $@ $^
@@ -127,18 +130,22 @@ glibc-doc-$(edition).tar: $(doc-only-dist) $(distribute)
 
 .PHONY: mostlyclean distclean realclean clean
 mostlyclean:
-	-rm -f libc.dvi libc.info*
+	-rm -f libc.dvi libc.info* dir-add.info
 clean: mostlyclean
 distclean: clean
 indices = cp fn pg tp vr ky
 realclean: distclean
 	-rm -f chapters chapters-incl summary.texi stamp-summary *.c.texi
 	-rm -f $(foreach index,$(indices),libc.$(index) libc.$(index)s)
-	-rm -f libc.log libc.aux libc.toc
+	-rm -f libc.log libc.aux libc.toc dir-add.texi
 
 .PHONY: install subdir_install installdirs install-data
 install-data subdir_install: install
-install: $(inst_infodir)/libc.info
+install: $(inst_infodir)/libc.info dir-add.info
+	@if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+	  install-info --info-dir=$(inst_infodir) $(inst_infodir)/libc.info;\
+	  install-info --info-dir=$(inst_infodir) dir-add.info;\
+	else : ; fi
 # Catchall implicit rule for other installation targets from the parent.
 install-%: ;
 
diff --git a/manual/arith.texi b/manual/arith.texi
index efe0489e40..1268e37e31 100644
--- a/manual/arith.texi
+++ b/manual/arith.texi
@@ -196,7 +196,7 @@ extensions.
 @section Floating-Point Number Classification Functions
 
 Instead of using the BSD specific functions from the last section it is
-better to use those in this section will are introduced in the @w{ISO C
+better to use those in this section which are introduced in the @w{ISO C
 9X} standard and are therefore widely available.
 
 @comment math.h
diff --git a/manual/examples/argp-ex1.c b/manual/examples/argp-ex1.c
new file mode 100644
index 0000000000..c87ebbb532
--- /dev/null
+++ b/manual/examples/argp-ex1.c
@@ -0,0 +1,9 @@
+/* Argp example #1 -- a minimal program using argp */
+
+#include <argp.h>
+
+int main (int argc, char **argv)
+{
+  argp_parse (0, argc, argv, 0, 0, 0);
+  exit (0);
+}
diff --git a/manual/examples/argp-ex2.c b/manual/examples/argp-ex2.c
new file mode 100644
index 0000000000..d1b149b494
--- /dev/null
+++ b/manual/examples/argp-ex2.c
@@ -0,0 +1,25 @@
+/* Argp example #2 -- a pretty minimal program using argp */
+
+#include <argp.h>
+
+const char *argp_program_version =
+  "argp-ex2 1.0";
+const char *argp_program_bug_address =
+  "<bug-gnu-utils@@prep.ai.mit.edu>";
+
+/* Program documentation.  */
+static char doc[] =
+  "Argp example #2 -- a pretty minimal program using argp";
+
+/* Our argpument parser.  The @code{options}, @code{parser}, and
+   @code{args_doc} fields are zero because we have neither options or
+   arguments; @code{doc} and @code{argp_program_bug_address} will be
+   used in the output for @samp{--help}, and the @samp{--version}
+   option will print out @code{argp_program_version}.  */
+static struct argp argp = { 0, 0, 0, doc };
+
+int main (int argc, char **argv)
+{
+  argp_parse (&argp, argc, argv, 0, 0, 0);
+  exit (0);
+}
diff --git a/manual/examples/argp-ex3.c b/manual/examples/argp-ex3.c
new file mode 100644
index 0000000000..363ee59e11
--- /dev/null
+++ b/manual/examples/argp-ex3.c
@@ -0,0 +1,100 @@
+/* Argp example #3 -- a program with options and arguments using argp */
+
+#include <argp.h>
+
+const char *argp_program_version =
+  "argp-ex3 1.0";
+const char *argp_program_bug_address =
+  "<bug-gnu-utils@@prep.ai.mit.edu>";
+
+/* Program documentation.  */
+static char doc[] =
+  "Argp example #3 -- a program with options and arguments using argp";
+
+/* A description of the arguments we accept.  */
+static char args_doc[] = "ARG1 ARG2";
+
+/* The options we understand.  */
+static struct argp_option options[] = {
+  {"verbose",  'v', 0,      0,  "Produce verbose output" },
+  {"quiet",    'q', 0,      0,  "Don't produce any output" },
+  {"silent",   's', 0,      OPTION_ALIAS },
+  {"output",   'o', "FILE", 0,
+   "Output to FILE instead of standard output" },
+  { 0 }
+};
+
+/* Used by @code{main} to communicate with @code{parse_opt}.  */
+struct arguments
+{
+  char *args[2];		/* @var{arg1} & @var{arg2} */
+  int silent, verbose;
+  char *output_file;
+};
+
+/* Parse a single option.  */
+static error_t
+parse_opt (int key, char *arg, struct argp_state *state)
+{
+  /* Get the @var{input} argument from @code{argp_parse}, which we
+     know is a pointer to our arguments structure.  */
+  struct arguments *arguments = state->input;
+
+  switch (key)
+    {
+    case 'q': case 's':
+      arguments->silent = 1;
+      break;
+    case 'v':
+      arguments->verbose = 1;
+      break;
+    case 'o':
+      arguments->output_file = arg;
+      break;
+
+    case ARGP_KEY_ARG:
+      if (state->arg_num >= 2)
+	/* Too many arguments.  */
+	argp_usage (state);
+
+      arguments->args[state->arg_num] = arg;
+
+      break;
+
+    case ARGP_KEY_END:
+      if (state->arg_num < 2)
+	/* Not enough arguments.  */
+	argp_usage (state);
+      break;
+
+    default:
+      return ARGP_ERR_UNKNOWN;
+    }
+  return 0;
+}
+
+/* Our argp parser.  */
+static struct argp argp = { options, parse_opt, args_doc, doc };
+
+int main (int argc, char **argv)
+{
+  struct arguments arguments;
+
+  /* Default values.  */
+  arguments.silent = 0;
+  arguments.verbose = 0;
+  arguments.output_file = "-";
+
+  /* Parse our arguments; every option seen by @code{parse_opt} will
+     be reflected in @code{arguments}.  */
+  argp_parse (&argp, argc, argv, 0, 0, &arguments);
+
+  printf ("ARG1 = %s\nARG2 = %s\nOUTPUT_FILE = %s\n"
+	  "VERBOSE = %s\nSILENT = %s\n",
+	  arguments.args[0], arguments.args[1],
+	  arguments.output_file,
+	  arguments.verbose ? "yes" : "no",
+	  arguments.silent ? "yes" : "no");
+
+  exit (0);
+}
diff --git a/manual/examples/argp-ex4.c b/manual/examples/argp-ex4.c
new file mode 100644
index 0000000000..24dd417a81
--- /dev/null
+++ b/manual/examples/argp-ex4.c
@@ -0,0 +1,144 @@
+/* Argp example #4 -- a program with somewhat more complicated options */
+
+#include <stdlib.h>
+#include <error.h>
+#include <argp.h>
+
+const char *argp_program_version =
+  "argp-ex4 1.0";
+const char *argp_program_bug_address =
+  "<bug-gnu-utils@@prep.ai.mit.edu>";
+
+/* Program documentation.  */
+static char doc[] =
+  "Argp example #4 -- a program with somewhat more complicated\
+options\
+\vThis part of the documentation comes *after* the options;\
+ note that the text is automatically filled, but it's possible\
+ to force a line-break, e.g.\n<-- here.";
+
+/* A description of the arguments we accept.  */
+static char args_doc[] = "ARG1 [STRING...]";
+
+/* Keys for options without short-options.  */
+#define OPT_ABORT  1		/* --abort */
+
+/* The options we understand.  */
+static struct argp_option options[] = {
+  {"verbose",  'v', 0,       0, "Produce verbose output" },
+  {"quiet",    'q', 0,       0, "Don't produce any output" },
+  {"silent",   's', 0,       OPTION_ALIAS },
+  {"output",   'o', "FILE",  0,
+   "Output to FILE instead of standard output" },
+
+  {0,0,0,0, "The following options should be grouped together:" },
+  {"repeat",   'r', "COUNT", OPTION_ARG_OPTIONAL,
+   "Repeat the output COUNT (default 10) times"},
+  {"abort",    OPT_ABORT, 0, 0, "Abort before showing any output"},
+
+  { 0 }
+};
+
+/* Used by @code{main} to communicate with @code{parse_opt}.  */
+struct arguments
+{
+  char *arg1;			/* @var{arg1} */
+  char **strings;		/* [@var{string}@dots{}] */
+  int silent, verbose, abort;	/* @samp{-s}, @samp{-v}, @samp{--abort} */
+  char *output_file;		/* @var{file} arg to @samp{--output} */
+  int repeat_count;		/* @var{count} arg to @samp{--repeat} */
+};
+
+/* Parse a single option.  */
+static error_t
+parse_opt (int key, char *arg, struct argp_state *state)
+{
+  /* Get the @code{input} argument from @code{argp_parse}, which we
+     know is a pointer to our arguments structure.  */
+  struct arguments *arguments = state->input;
+
+  switch (key)
+    {
+    case 'q': case 's':
+      arguments->silent = 1;
+      break;
+    case 'v':
+      arguments->verbose = 1;
+      break;
+    case 'o':
+      arguments->output_file = arg;
+      break;
+    case 'r':
+      arguments->repeat_count = arg ? atoi (arg) : 10;
+      break;
+    case OPT_ABORT:
+      arguments->abort = 1;
+      break;
+
+    case ARGP_KEY_NO_ARGS:
+      argp_usage (state);
+
+    case ARGP_KEY_ARG:
+      /* Here we know that @code{state->arg_num == 0}, since we
+	 force argument parsing to end before any more arguments can
+	 get here.  */
+      arguments->arg1 = arg;
+
+      /* Now we consume all the rest of the arguments.
+	 @code{state->next} is the index in @code{state->argv} of the
+	 next argument to be parsed, which is the first @var{string}
+	 we're interested in, so we can just use
+	 @code{&state->argv[state->next]} as the value for
+	 arguments->strings.
+
+	 @emph{In addition}, by setting @code{state->next} to the end
+	 of the arguments, we can force argp to stop parsing here and
+	 return.  */
+      arguments->strings = &state->argv[state->next];
+      state->next = state->argc;
+
+      break;
+
+    default:
+      return ARGP_ERR_UNKNOWN;
+    }
+  return 0;
+}
+
+/* Our argp parser.  */
+static struct argp argp = { options, parse_opt, args_doc, doc };
+
+int main (int argc, char **argv)
+{
+  int i, j;
+  struct arguments arguments;
+
+  /* Default values.  */
+  arguments.silent = 0;
+  arguments.verbose = 0;
+  arguments.output_file = "-";
+  arguments.repeat_count = 1;
+  arguments.abort = 0;
+
+  /* Parse our arguments; every option seen by @code{parse_opt} will be
+     reflected in @code{arguments}.  */
+  argp_parse (&argp, argc, argv, 0, 0, &arguments);
+
+  if (arguments.abort)
+    error (10, 0, "ABORTED");
+
+  for (i = 0; i < arguments.repeat_count; i++)
+    {
+      printf ("ARG1 = %s\n", arguments.arg1);
+      printf ("STRINGS = ");
+      for (j = 0; arguments.strings[j]; j++)
+	printf (j == 0 ? "%s" : ", %s", arguments.strings[j]);
+      printf ("\n");
+      printf ("OUTPUT_FILE = %s\nVERBOSE = %s\nSILENT = %s\n",
+	      arguments.output_file,
+	      arguments.verbose ? "yes" : "no",
+	      arguments.silent ? "yes" : "no");
+    }
+
+  exit (0);
+}
diff --git a/manual/intro.texi b/manual/intro.texi
index b8f4c8c6ba..7597807274 100644
--- a/manual/intro.texi
+++ b/manual/intro.texi
@@ -222,7 +222,7 @@ the XPG specifies the requirements for systems which are intended to be
 a Unix system.
 
 The GNU C library complies to the X/Open Portability Guide, Issue 4.2,
-with the with all extensions common to XSI (X/Open System Interface)
+with all extensions common to XSI (X/Open System Interface)
 compliant systems and also all X/Open UNIX extensions.
 
 The additions on top of POSIX are mainly derived from functionality
diff --git a/manual/libc.texinfo b/manual/libc.texinfo
index e821807a17..2951f66fcc 100644
--- a/manual/libc.texinfo
+++ b/manual/libc.texinfo
@@ -4,6 +4,12 @@
 @settitle The GNU C Library
 @setchapternewpage odd
 
+@comment Tell install-info what to do.
+@dircategory GNU libraries
+@direntry
+* Libc: (libc).                 C library.
+@end direntry
+
 @c This tells texinfo.tex to use the real section titles in xrefs in
 @c place of the node name, when no section title is explicitly given.
 @set xref-automatic-section-title
diff --git a/manual/pattern.texi b/manual/pattern.texi
index 6ac481ab6e..020a40e7da 100644
--- a/manual/pattern.texi
+++ b/manual/pattern.texi
@@ -118,8 +118,9 @@ of wildcards convenient.  @code{glob} and the other symbols in this
 section are declared in @file{glob.h}.
 
 @menu
-* Calling Glob::        Basic use of @code{glob}.
-* Flags for Globbing::  Flags that enable various options in @code{glob}.
+* Calling Glob::             Basic use of @code{glob}.
+* Flags for Globbing::       Flags that enable various options in @code{glob}.
+* More Flags for Globbing::  GNU specific extensions to @code{glob}.
 @end menu
 
 @node Calling Glob
@@ -134,7 +135,9 @@ it fills in the structure's fields to tell you about the results.
 @comment POSIX.2
 @deftp {Data Type} glob_t
 This data type holds a pointer to a word vector.  More precisely, it
-records both the address of the word vector and its size.
+records both the address of the word vector and its size.  The GNU
+implementation contains some more fields which are non-standard
+extensions.
 
 @table @code
 @item gl_pathc
@@ -156,6 +159,47 @@ The @code{gl_offs} field is meaningful only if you use the
 @code{GLOB_DOOFFS} flag.  Otherwise, the offset is always zero
 regardless of what is in this field, and the first real element comes at
 the beginning of the vector.
+
+@item gl_closedir
+The address of an alternative implementation of the @code{closedir}
+function.  It is used if the @code{GLOB_ALTDIRFUNC} bit is set in
+the flag parameter.  The type of this field is
+@w{@code{void (*) (void *)}}.
+
+This is a GNU extension.
+
+@item gl_readdir
+The address of an alternative implementation of the @code{readdir}
+function used to read the contents of a directory.  It is used if the
+@code{GLOB_ALTDIRFUNC} bit is set in the flag parameter.  The type of
+this field is @w{@code{struct dirent *(*) (void *)}}.
+
+This is a GNU extension.
+
+@item gl_opendir
+The address of an alternative implementation of the @code{opendir}
+function.  It is used if the @code{GLOB_ALTDIRFUNC} bit is set in
+the flag parameter.  The type of this field is
+@w{@code{void *(*) (const char *)}}.
+
+This is a GNU extension.
+
+@item gl_stat
+The address of an alternative implementation of the @code{stat} function
+to get information about an object in the filesystem.  It is used if the
+@code{GLOB_ALTDIRFUNC} bit is set in the flag parameter.  The type of
+this field is @w{@code{int (*) (const char *, struct stat *)}}.
+
+This is a GNU extension.
+
+@item gl_lstat
+The address of an alternative implementation of the @code{lstat}
+function to get information about an object in the filesystems, not
+following symbolic links.  It is used if the @code{GLOB_ALTDIRFUNC} bit
+is set in the flag parameter.  The type of this field is @w{@code{int
+(*) (const char *, struct stat *)}}.
+
+This is a GNU extension.
 @end table
 @end deftp
 
@@ -318,6 +362,113 @@ repeatedly.  It handles the flag @code{GLOB_NOESCAPE} by turning on the
 @code{FNM_NOESCAPE} flag in calls to @code{fnmatch}.
 @end table
 
+@node More Flags for Globbing
+@subsection More Flags for Globbing
+
+Beside the flags descibed in the last section, the GNU implementation of
+@code{glob} allows a few more flags which are also defined in the
+@file{glob.h} file.  Some of the extensions implement functionality
+which is available in modern shell implementations.
+
+@table @code
+@comment glob.h
+@comment GNU
+@item GLOB_PERIOD
+The @code{.} character (period) is treated special.  It cannot be
+matched by wildcards.  @xref{Wildcard Matching}, @code{FNM_PERIOD}.
+
+@comment glob.h
+@comment GNU
+@item GLOB_MAGCHAR
+The @code{GLOB_MAGCHAR} value is not to be given to @code{glob} in the
+@var{flags} parameter.  Instead, @code{glob} sets this bit in the
+@var{gl_flags} element of the @var{glob_t} structure provided as the
+result if the pattern used for matching contains any wildcard character.
+
+@comment glob.h
+@comment GNU
+@item GLOB_ALTDIRFUNC
+Instead of the using the using the normal functions for accessing the
+filesystem the @code{glob} implementation uses the user-supplied
+functions specified in the structure pointed to by @var{pglob}
+parameter.  For more information about the functions refer to the
+sections about directory handling @ref{Accessing Directories} and
+@ref{Reading Attributes}.
+
+@comment glob.h
+@comment GNU
+@item GLOB_BRACE
+If this flag is given the handling of braces in the pattern is changed.
+It is now required that braces appear correctly grouped.  I.e., for each
+opening brace there must be a closing one.  Braces can be used
+recursively.  So it is possible to define one brace expression in
+another one.  It is important to note that the range of each brace
+expression is completely contained in the outer brace expression (if
+there is one).
+
+The string between the mathing braces is separated into single
+expressions by splitting at @code{,} (comma) characters.  The commas
+themself are discarded.  Please note what we said above about recursive
+brace expressions.  The commas used to separate the subexpressions must
+be at the same level.  Commas in brace subexpressions are not matched.
+They are used during expansion of the brace expression of the deeper
+level.  The example below shows this
+
+@smallexample
+glob ("@{foo/@{,bar,biz@},baz@}", GLOB_BRACE, NULL, &result)
+@end smallexample
+
+@noindent
+is equivalent to the sequence
+
+@smallexample
+glob ("foo/", GLOB_BRACE, NULL, &result)
+glob ("foo/bar", GLOB_BRACE|GLOB_APPEND, NULL, &result)
+glob ("foo/biz", GLOB_BRACE|GLOB_APPEND, NULL, &result)
+glob ("baz", GLOB_BRACE|GLOB_APPEND, NULL, &result)
+@end smallexample
+
+@noindent
+if we leave aside error handling.
+
+@comment glob.h
+@comment GNU
+@item GLOB_NOMAGIC
+If the pattern contains no wildcard constructs (it is a literal file name),
+return it as the sole ``matching'' word, even if no file exists by that name.
+
+@comment glob.h
+@comment GNU
+@item GLOB_TILDE
+If this flag is used the character @code{~} (tilde) is handled special
+if it appears at the beginning of the pattern.  Instead of being taken
+verbatim it is used to represent the home directory of a known user.
+
+If @code{~} is the only character in pattern or it is followed by a
+@code{/} (slash), the home directory of the process owner is
+substituted.  Using @code{getlogin} and @code{getpwnam} the information
+is read from the system databases.  As an example take user @code{bart}
+with his home directory at @file{/home/bart}.  For him a call like
+
+@smallexample
+glob ("~/bin/*", GLOB_TILDE, NULL, &result)
+@end smallexample
+
+@noindent
+would return the contents of the directory @file{/home/bart/bin}.
+Instead of referring to the own home directory it is also possible to
+name the home directory of other users.  To do so one has to append the
+user name after the tilde character.  So the contents of user
+@code{homer}'s @file{bin} directory can be retrieved by
+
+@smallexample
+glob ("~homer/bin/*", GLOB_TILDE, NULL, &result)
+@end smallexample
+
+This functionality is equivalent to what is available in C-shells.
+@end table
+
+
 @node Regular Expressions
 @section Regular Expression Matching
 
diff --git a/manual/texinfo.tex b/manual/texinfo.tex
index 95c825389d..e1dfbcbd53 100644
--- a/manual/texinfo.tex
+++ b/manual/texinfo.tex
@@ -1,5 +1,5 @@
 %% TeX macros to handle Texinfo files.
-%% $Id: texinfo.tex,v 2.201 1997/06/05 11:28:54 drepper Exp $
+%% $Id: texinfo.tex,v 2.202 1997/06/12 20:07:10 drepper Exp $
 
 %  Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
 %                94, 95, 96, 97 Free Software Foundation, Inc.
@@ -36,7 +36,7 @@
 
 % This automatically updates the version number based on RCS.
 \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
-\deftexinfoversion$Revision: 2.201 $
+\deftexinfoversion$Revision: 2.202 $
 \message{Loading texinfo package [Version \texinfoversion]:}
 
 % If in a .fmt file, print the version number
@@ -120,7 +120,7 @@
 
 % For @cropmarks command.
 % Do @cropmarks to get crop marks.
-%
+% 
 \newif\ifcropmarks
 \let\cropmarks = \cropmarkstrue
 %
@@ -1338,13 +1338,25 @@ where each line of input produces a line of output.}
 \else{\tclose{\ttsl\look}}\fi
 \else{\tclose{\ttsl\look}}\fi}
 
-% @url, @uref, @email.  Quotes do not seem necessary.
+% @url, @email.  Quotes do not seem necessary.
 \let\url=\code % perhaps include a hypertex \special eventually
-\let\uref=\code
 % rms does not like the angle brackets --karl, 17may97.
 %\def\email#1{$\langle${\tt #1}$\rangle$}
 \let\email=\code
 
+% @uref (abbreviation for `urlref') takes an optional second argument
+% specifying the text to display.  First (mandatory) arg is the url.
+% 
+\def\uref#1{\urefxxx #1,,\finish}
+\def\urefxxx#1,#2,#3\finish{%
+  \setbox0 = \hbox{\ignorespaces #2}%
+  \ifdim\wd0 > 0pt
+    \unhbox0\ (\code{#1})%
+  \else
+    \code{#1}%
+  \fi
+}
+
 % Check if we are currently using a typewriter font.  Since all the
 % Computer Modern typewriter fonts have zero interword stretch (and
 % shrink), and it is reasonable to expect all typewriter fonts to have
@@ -2089,7 +2101,7 @@ July\or August\or September\or October\or November\or December\fi
 \global\colcount=0\relax}}
 }
 
-\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
+\def\setultitablespacing{% test to see if user has set \multitablelinespace.
 % If so, do nothing. If not, give it an appropriate dimension based on
 % current baselineskip.
 \ifdim\multitablelinespace=0pt
@@ -2557,7 +2569,7 @@ width0pt\relax} \fi
 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
   % Grab any single-column material above us.
   \output = {\global\setbox\partialpage = \vbox{%
-    %
+    % 
     % Here is a possibility not foreseen in manmac: if we accumulate a
     % whole lot of material, we might end up calling this \output
     % routine twice in a row (see the doublecol-lose test, which is
diff --git a/math/Makefile b/math/Makefile
index e0c295b123..fbbcad6ea9 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -36,6 +36,8 @@ aux		:= fpu_control setfpucw
 extra-libs	:= libm
 extra-libs-others = $(extra-libs)
 
+libm-map	:= libm.map
+
 libm-support = k_standard s_lib_version s_matherr s_signgam		\
 	       s_rinttol s_rinttoll s_roundtol s_roundtoll		\
 	       fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg		\
diff --git a/math/libm.map b/math/libm.map
new file mode 100644
index 0000000000..205578d2c2
--- /dev/null
+++ b/math/libm.map
@@ -0,0 +1,9 @@
+GLIBC_2.0 {
+  global:
+    # all functions and variables in the normal name space
+    a*; b*; c*; d*; e*; f*; g*; h*; i*; j*; k*; l*; m*;
+    n*; o*; p*; q*; r*; s*; t*; u*; v*; w*; x*; y*; z*;
+
+  local:
+    *;
+};
diff --git a/math/math.h b/math/math.h
index bf3ef9bcee..5229a020e0 100644
--- a/math/math.h
+++ b/math/math.h
@@ -300,17 +300,20 @@ extern int matherr __P ((struct exception *));
 #define	M_SQRT2		_Mldbl(1.41421356237309504880)	/* sqrt(2) */
 #define	M_SQRT1_2	_Mldbl(0.70710678118654752440)	/* 1/sqrt(2) */
 
+#endif
+
 /* Our constants might specify more precision than `double' can represent.
    Use `long double' constants in standard and GNU C, where they are
-   supported and the cast to `double'.  */
+   supported and the cast to `double'.
+
+   Please not we define the macro even if the constants are not defined.
+   This helps us to use the macros in other places.  */
 #if __STDC__ - 0 || __GNUC__ - 0
 #define _Mldbl(x) x##L
 #else	/* Traditional C.  */
 #define _Mldbl(x) x
 #endif	/* Standard or GNU C.  */
 
-#endif
-
 
 /* Get machine-dependent inline versions (if there are any).  */
 #if (!defined __NO_MATH_INLINES && defined __OPTIMIZE__) \
diff --git a/md5-crypt/Makefile b/md5-crypt/Makefile
index 84ec20c5a3..aae6e8c216 100644
--- a/md5-crypt/Makefile
+++ b/md5-crypt/Makefile
@@ -32,9 +32,10 @@ extra-libs-others := $(extra-libs)
 
 md5-routines := crypt-entry md5-crypt md5
 libcrypt-routines := $(md5-routines)
+libcrypt-map := libcrypt.map
 
 onlymd5-routines := onlymd5-entry md5-crypt md5
-distribute += onlymd5-entry
+distribute += onlymd5-entry.c
 
 include ../Makeconfig
 
diff --git a/md5-crypt/libcrypt.map b/md5-crypt/libcrypt.map
new file mode 100644
index 0000000000..a3128da2e9
--- /dev/null
+++ b/md5-crypt/libcrypt.map
@@ -0,0 +1,7 @@
+GLIBC_2.0 {
+  global:
+    crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/md5-crypt/md5-crypt.c b/md5-crypt/md5-crypt.c
index dd9d413c42..6dd6740671 100644
--- a/md5-crypt/md5-crypt.c
+++ b/md5-crypt/md5-crypt.c
@@ -41,6 +41,7 @@ extern char *__md5_crypt_r __P ((const char *key, const char *salt,
 				 char *buffer, int buflen));
 extern char *md5_crypt_r __P ((const char *key, const char *salt,
 			       char *buffer, int buflen));
+extern char *__md5_crypt __P ((const char *key, const char *salt));
 extern char *md5_crypt __P ((const char *key, const char *salt));
 
 
diff --git a/misc/regexp.h b/misc/regexp.h
index 9ab25499a6..04da70a534 100644
--- a/misc/regexp.h
+++ b/misc/regexp.h
@@ -38,9 +38,12 @@
    for the here included function is weird (this really is a harmless
    word).
 
-   The user has to provide five macros before this header file can be
+   The user has to provide six macros before this header file can be
    included:
 
+   INIT		Declarations vor variables which can be used by the
+		other macros.
+
    GETC()	Return the value of the next character in the regular
 		expression pattern.  Successive calls should return
 		successive characters.
@@ -98,9 +101,10 @@ compile (char *__instring, char *__expbuf, __const char *__endbuf, int __eof)
 {
   char *__input_buffer = NULL;
   size_t __input_size = 0;
-  size_t __current_size;
+  size_t __current_size = 0;
   int __ch;
   int __error;
+  INIT
 
   /* Align the expression buffer according to the needs for an object
      of type `regex_t'.  Then check for minimum size of the buffer for
diff --git a/nis/Makefile b/nis/Makefile
index a6d14d0875..770f3b8283 100644
--- a/nis/Makefile
+++ b/nis/Makefile
@@ -50,15 +50,19 @@ libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
 		  nis_removemember nis_creategroup nis_destroygroup\
 		  nis_print_group_entry nis_domain_of nis_domain_of_r\
 		  nis_modify nis_remove nis_add nis_defaults
+libnsl-map	= libnsl.map
 
 libnss_compat-routines	:= $(addprefix compat-,grp pwd spwd)
 libnss_compat-inhibit-o	= $(filter-out .so,$(object-suffixes))
+libnss_compat-map	:= libnss_compat.map
 
 libnss_nis-routines	:= $(addprefix nis-,$(databases))
 libnss_nis-inhibit-o	= $(filter-out .so,$(object-suffixes))
+libnss_nis-map		:= libnss_nis.map
 
 libnss_nisplus-routines	:= $(addprefix nisplus-,$(databases))
 libnss_nisplus-inhibit-o = $(filter-out .so,$(object-suffixes))
+libnss_nisplus-map	:= libnss_nisplus.map
 
 include ../Rules
 
diff --git a/nis/libnsl.map b/nis/libnsl.map
new file mode 100644
index 0000000000..5cb3bc30f7
--- /dev/null
+++ b/nis/libnsl.map
@@ -0,0 +1,14 @@
+GLIBC_2.0 {
+  global:
+    nis_add; nis_add_entry; nis_addmember; nis_checkpoint; nis_clone_directory;
+    nis_clone_entry; nis_clone_group; nis_clone_link; nis_clone_nis_attr;
+    nis_clone_objdata; nis_clone_object; nis_clone_result; nis_clone_table;
+    nis_creategroup; nis_destroy_object; nis_destroygroup; nis_dir_cmp;
+    nis_domain_of; nis_domain_of_r; nis_first_entry; nis_free_attr;
+    nis_free_directory; nis_free_endpoints; nis_free_entry; nis_free_group;
+    nis_free_link; nis_free_object; nis_free_request; nis_free_servers;
+    nis_free_table;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/nis/libnss_compat.map b/nis/libnss_compat.map
new file mode 100644
index 0000000000..55d6f4745f
--- /dev/null
+++ b/nis/libnss_compat.map
@@ -0,0 +1,11 @@
+GLIBC_2.0 {
+  global:
+    _nss_compat_endgrent; _nss_compat_endpwent; _nss_compat_endspent;
+    _nss_compat_getgrent_r; _nss_compat_getgrgid_r; _nss_compat_getgrnam_r;
+    _nss_compat_getpwent_r; _nss_compat_getpwnam_r; _nss_compat_getpwuid_r;
+    _nss_compat_getspent_r; _nss_compat_getspnam_r; _nss_compat_setgrent;
+    _nss_compat_setpwent; _nss_compat_setspent;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/nis/libnss_nis.map b/nis/libnss_nis.map
new file mode 100644
index 0000000000..2773fca29b
--- /dev/null
+++ b/nis/libnss_nis.map
@@ -0,0 +1,25 @@
+GLIBC_2.0 {
+  global:
+    _nss_nis_endaliasent; _nss_nis_endetherent; _nss_nis_endgrent;
+    _nss_nis_endhostent; _nss_nis_endnetent; _nss_nis_endnetgrent;
+    _nss_nis_endprotoent; _nss_nis_endpwent; _nss_nis_endrpcent;
+    _nss_nis_endservent; _nss_nis_endspent; _nss_nis_getaliasbyname_r;
+    _nss_nis_getaliasent_r; _nss_nis_getetherent_r; _nss_nis_getgrent_r;
+    _nss_nis_getgrgid_r; _nss_nis_getgrnam_r; _nss_nis_gethostbyaddr_r;
+    _nss_nis_gethostbyname2_r; _nss_nis_gethostbyname_r; _nss_nis_gethostent_r;
+    _nss_nis_gethostton_r; _nss_nis_getnetbyaddr_r; _nss_nis_getnetbyname_r;
+    _nss_nis_getnetent_r; _nss_nis_getnetgrent_r; _nss_nis_getntohost_r;
+    _nss_nis_getprotobyname_r; _nss_nis_getprotobynumber_r;
+    _nss_nis_getprotoent_r; _nss_nis_getpublickey; _nss_nis_getpwent_r;
+    _nss_nis_getpwnam_r; _nss_nis_getpwuid_r; _nss_nis_getrpcbyname_r;
+    _nss_nis_getrpcbynumber_r; _nss_nis_getrpcent_r; _nss_nis_getsecretkey;
+    _nss_nis_getservbyname_r; _nss_nis_getservbyport_r; _nss_nis_getservent_r;
+    _nss_nis_getspent_r; _nss_nis_getspnam_r; _nss_nis_netname2user;
+    _nss_nis_setaliasent; _nss_nis_setetherent; _nss_nis_setgrent;
+    _nss_nis_sethostent; _nss_nis_setnetent; _nss_nis_setnetgrent;
+    _nss_nis_setprotoent; _nss_nis_setpwent; _nss_nis_setrpcent;
+    _nss_nis_setservent; _nss_nis_setspent;
+
+  local:
+    *;
+};
diff --git a/nis/libnss_nisplus.map b/nis/libnss_nisplus.map
new file mode 100644
index 0000000000..b178c02552
--- /dev/null
+++ b/nis/libnss_nisplus.map
@@ -0,0 +1,32 @@
+GLIBC_2.0 {
+  global:
+    _nss_nisplus_endaliasent; _nss_nisplus_endetherent; _nss_nisplus_endgrent;
+    _nss_nisplus_endhostent; _nss_nisplus_endnetent; _nss_nisplus_endnetgrent;
+    _nss_nisplus_endprotoent; _nss_nisplus_endpwent; _nss_nisplus_endrpcent;
+    _nss_nisplus_endservent; _nss_nisplus_endspent;
+    _nss_nisplus_getaliasbyname_r; _nss_nisplus_getaliasent_r;
+    _nss_nisplus_getetherent_r; _nss_nisplus_getgrent_r;
+    _nss_nisplus_getgrgid_r; _nss_nisplus_getgrnam_r;
+    _nss_nisplus_gethostbyaddr_r; _nss_nisplus_gethostbyname2_r;
+    _nss_nisplus_gethostbyname_r; _nss_nisplus_gethostent_r;
+    _nss_nisplus_gethostton_r; _nss_nisplus_getnetbyaddr_r;
+    _nss_nisplus_getnetbyname_r; _nss_nisplus_getnetent_r;
+    _nss_nisplus_getnetgrent_r; _nss_nisplus_getntohost_r;
+    _nss_nisplus_getprotobyname_r; _nss_nisplus_getprotobynumber_r;
+    _nss_nisplus_getprotoent_r; _nss_nisplus_getpublickey;
+    _nss_nisplus_getpwent_r; _nss_nisplus_getpwnam_r; _nss_nisplus_getpwuid_r;
+    _nss_nisplus_getrpcbyname_r; _nss_nisplus_getrpcbynumber_r;
+    _nss_nisplus_getrpcent_r; _nss_nisplus_getsecretkey;
+    _nss_nisplus_getservbyname_r; _nss_nisplus_getservbynumber_r;
+    _nss_nisplus_getservent_r; _nss_nisplus_getspent_r;
+    _nss_nisplus_getspnam_r; _nss_nisplus_netname2user;
+    _nss_nisplus_parse_grent; _nss_nisplus_parse_pwent;
+    _nss_nisplus_parse_spent; _nss_nisplus_setaliasent;
+    _nss_nisplus_setetherent; _nss_nisplus_setgrent; _nss_nisplus_sethostent;
+    _nss_nisplus_setnetent; _nss_nisplus_setnetgrent; _nss_nisplus_setprotoent;
+    _nss_nisplus_setpwent; _nss_nisplus_setrpcent; _nss_nisplus_setservent;
+    _nss_nisplus_setspent;
+
+  local:
+    *;
+};
diff --git a/nis/nis_add.c b/nis/nis_add.c
index 6e11f17ff6..e358ea4987 100644
--- a/nis/nis_add.c
+++ b/nis/nis_add.c
@@ -41,7 +41,7 @@ nis_add (const_nis_name name, const nis_object *obj)
 
   p1 = req.ns_object.ns_object_val[0].zo_name;
   req.ns_object.ns_object_val[0].zo_name =
-    nis_name_of_r (name, buf1, sizeof (buf1));
+    nis_leaf_of_r (name, buf1, sizeof (buf1));
 
   p2 = req.ns_object.ns_object_val[0].zo_owner;
   if (p2 == NULL || strlen (p2) == 0)
diff --git a/nis/nis_addmember.c b/nis/nis_addmember.c
index 2eee9cc8bf..8fd7e12a58 100644
--- a/nis/nis_addmember.c
+++ b/nis/nis_addmember.c
@@ -26,7 +26,7 @@ nis_addmember (const_nis_name member, const_nis_name group)
 {
   if (group != NULL && strlen (group) > 0)
     {
-      char buf[strlen (group) + 50];
+      char buf[strlen (group) + 14 + NIS_MAXNAMELEN];
       char leafbuf[strlen (group) + 2];
       char domainbuf[strlen (group) + 2];
       nis_result *res, *res2;
@@ -38,8 +38,8 @@ nis_addmember (const_nis_name member, const_nis_name group)
       cp2 = nis_domain_of_r (group, domainbuf, sizeof (domainbuf) - 1);
       if (cp2 != NULL && strlen (cp2) > 0)
         {
-          cp = stpcpy (cp, ".");
-          strcpy (cp, cp2);
+	  *cp++ = '.';
+          stpcpy (cp, cp2);
         }
       res = nis_lookup (buf, FOLLOW_LINKS|EXPAND_NAME);
       if (res->status != NIS_SUCCESS)
@@ -53,10 +53,15 @@ nis_addmember (const_nis_name member, const_nis_name group)
         return NIS_INVALIDOBJ;
 
       res->objects.objects_val[0].GR_data.gr_members.gr_members_val
-	= realloc (res->objects.objects_val[0].GR_data.gr_members.gr_members_val, res->objects.objects_val[0].GR_data.gr_members.gr_members_len + 1);
-      ++res->objects.objects_val[0].GR_data.gr_members.gr_members_len;
+	= realloc (res->objects.objects_val[0].GR_data.gr_members.gr_members_val,
+		   (res->objects.objects_val[0].GR_data.gr_members.gr_members_len + 1)
+		   * sizeof (char *));
       res->objects.objects_val[0].GR_data.gr_members.gr_members_val[res->objects.objects_val[0].GR_data.gr_members.gr_members_len] = strdup (member);
+      ++res->objects.objects_val[0].GR_data.gr_members.gr_members_len;
 
+      cp = stpcpy (buf, res->objects.objects_val->zo_name);
+      *cp++ = '.';
+      strncpy (cp, res->objects.objects_val->zo_domain, NIS_MAXNAMELEN);
       res2 = nis_modify (buf, res->objects.objects_val);
       status = res2->status;
       nis_freeresult (res);
diff --git a/nis/nis_call.c b/nis/nis_call.c
index 17f67abbde..08a20acd73 100644
--- a/nis/nis_call.c
+++ b/nis/nis_call.c
@@ -65,12 +65,12 @@ __nis_dobind (const nis_server *server, u_long flags)
   clnt_saddr.sin_family = AF_INET;
   for (i = 0; i < server->ep.ep_len; i++)
     {
-      if (strcmp (server->ep.ep_val[i].family,"loopback") == 0)
+      if (strcmp (server->ep.ep_val[i].family, "loopback") == 0)
 	{
 	  if (server->ep.ep_val[i].uaddr[i] == '-')
 	    clnt_saddr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
 	  else
-	    if (strcmp (server->ep.ep_val[i].proto,"udp") == 0)
+	    if (strcmp (server->ep.ep_val[i].proto, "udp") == 0)
 	      {
 		if ((flags & USE_DGRAM) == USE_DGRAM)
 		  clnt_saddr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
@@ -78,7 +78,7 @@ __nis_dobind (const nis_server *server, u_long flags)
 		  continue;
 	      }
 	    else
-	      if (strcmp (server->ep.ep_val[i].proto,"tcp") == 0)
+	      if (strcmp (server->ep.ep_val[i].proto, "tcp") == 0)
 		{
 		  if ((flags & USE_DGRAM) == USE_DGRAM)
 		    continue;
@@ -87,13 +87,13 @@ __nis_dobind (const nis_server *server, u_long flags)
 		}
 	}
       else
-	if (strcmp (server->ep.ep_val[i].family,"inet") == 0)
+	if (strcmp (server->ep.ep_val[i].family, "inet") == 0)
 	  {
 	    if (server->ep.ep_val[i].uaddr[i] == '-')
 	      clnt_saddr.sin_addr.s_addr =
 		inetstr2int (server->ep.ep_val[i].uaddr);
 	    else
-	      if (strcmp (server->ep.ep_val[i].proto,"udp") == 0)
+	      if (strcmp (server->ep.ep_val[i].proto, "udp") == 0)
 		{
 		  if ((flags & USE_DGRAM) == USE_DGRAM)
 		    clnt_saddr.sin_addr.s_addr =
@@ -102,7 +102,7 @@ __nis_dobind (const nis_server *server, u_long flags)
 		    continue;
 		}
 	      else
-		if (strcmp (server->ep.ep_val[i].proto,"tcp") == 0)
+		if (strcmp (server->ep.ep_val[i].proto, "tcp") == 0)
 		  {
 		    if ((flags & USE_DGRAM) == USE_DGRAM)
 		      continue;
@@ -310,6 +310,7 @@ rec_dirsearch (const_nis_name name, directory_obj *dir, u_long flags)
 	char leaf [strlen (name) + 3];
 	char ndomain [strlen (name) + 3];
 	u_int i;
+	char *cp;
 
 	do
 	  {
@@ -323,8 +324,9 @@ rec_dirsearch (const_nis_name name, directory_obj *dir, u_long flags)
 	    strcpy (domain, ndomain);
 	  }
 	while (nis_dir_cmp (domain, dir->do_name) != SAME_NAME);
-	strcat (leaf, ".");
-	strcat (leaf, domain);
+	cp = strchr (leaf, '\0');
+	*cp++ = '.';
+	strcpy (cp, domain);
 
 	for (i = 0; i < dir->do_servers.do_servers_len; ++i)
 	  {
diff --git a/nis/nis_clone.c b/nis/nis_clone.c
index 860abb386c..e4dc87d4c9 100644
--- a/nis/nis_clone.c
+++ b/nis/nis_clone.c
@@ -264,7 +264,7 @@ nis_clone_entry (const entry_obj *src, entry_obj *dest)
   if (res->en_cols.en_cols_val == NULL && src->en_cols.en_cols_len > 0)
     {
       res->en_cols.en_cols_val =
-	malloc (src->en_cols.en_cols_len * sizeof (entry_col));
+	calloc (1, src->en_cols.en_cols_len * sizeof (entry_col));
       if (res->en_cols.en_cols_val == NULL)
 	return NULL;
     }
@@ -374,8 +374,13 @@ nis_clone_link (const link_obj *src, link_obj *dest)
 		       res->li_attrs.li_attrs_val,
 		       src->li_attrs.li_attrs_len);
 
-  if ((res->li_name = strdup (src->li_name)) == NULL)
-    return NULL;
+  if (src->li_name)
+    {
+      if ((res->li_name = strdup (src->li_name)) == NULL)
+	return NULL;
+    }
+  else
+    res->li_name = NULL;
 
   return res;
 }
@@ -477,15 +482,34 @@ nis_clone_object (const nis_object *src, nis_object *dest)
 
   res->zo_oid = src->zo_oid;
 
-  if ((res->zo_name = strdup (src->zo_name)) == NULL)
-    return NULL;
-  if ((res->zo_owner = strdup (src->zo_owner)) == NULL)
-    return NULL;
-  if ((res->zo_group = strdup (src->zo_group)) == NULL)
-    return NULL;
-  if ((res->zo_domain = strdup (src->zo_domain)) == NULL)
-    return NULL;
-
+  if (src->zo_name)
+    {
+      if ((res->zo_name = strdup (src->zo_name)) == NULL)
+	return NULL;
+    }
+  else
+    res->zo_name = NULL;
+  if (src->zo_owner)
+    {
+      if ((res->zo_owner = strdup (src->zo_owner)) == NULL)
+	return NULL;
+    }
+  else
+    res->zo_owner = NULL;
+  if (src->zo_group)
+    {
+      if ((res->zo_group = strdup (src->zo_group)) == NULL)
+	return NULL;
+    }
+  else
+    res->zo_group = NULL;
+  if (src->zo_domain)
+    {
+      if ((res->zo_domain = strdup (src->zo_domain)) == NULL)
+	return NULL;
+    }
+  else
+    res->zo_domain = NULL;
   res->zo_access = src->zo_access;
   res->zo_ttl = src->zo_ttl;
 
diff --git a/nis/nis_creategroup.c b/nis/nis_creategroup.c
index c62b039b5e..d1de08c08d 100644
--- a/nis/nis_creategroup.c
+++ b/nis/nis_creategroup.c
@@ -39,8 +39,8 @@ nis_creategroup (const_nis_name group, u_long flags)
       cp2 = nis_domain_of_r (group, domainbuf, sizeof (domainbuf) - 1);
       if (cp2 != NULL && strlen (cp2) > 0)
         {
-          cp = stpcpy (cp, ".");
-          strcpy (cp, cp2);
+	  *cp++ = '.';
+          stpcpy (cp, cp2);
         }
       else
 	return NIS_BADNAME;
diff --git a/nis/nis_defaults.c b/nis/nis_defaults.c
index 9d152d1f11..53a585b516 100644
--- a/nis/nis_defaults.c
+++ b/nis/nis_defaults.c
@@ -46,11 +46,9 @@ searchgroup (char *str)
   while (cptr[i] != '\0' && cptr[i] != ':')
     i++;
   if (i == 0)			/* only "group=" ? */
-    return (nis_name)"";
-
-  strncpy (default_group, cptr, i);
+    return (nis_name) "";
 
-  return default_group;
+  return strncpy (default_group, cptr, i);
 }
 
 static nis_name
@@ -71,9 +69,7 @@ searchowner (char *str)
   if (i == 0)			/* only "owner=" ? */
     return (nis_name)"";
 
-  strncpy (default_owner, cptr, i);
-
-  return default_owner;
+  return strncpy (default_owner, cptr, i);
 }
 
 static u_long
diff --git a/nis/nis_destroygroup.c b/nis/nis_destroygroup.c
index 524e0776ac..6ece45345d 100644
--- a/nis/nis_destroygroup.c
+++ b/nis/nis_destroygroup.c
@@ -38,8 +38,8 @@ nis_destroygroup (const_nis_name group)
       cp2 = nis_domain_of_r (group, domainbuf, sizeof (domainbuf) - 1);
       if (cp2 != NULL && strlen (cp2) > 0)
 	{
-	  cp = stpcpy (cp, ".");
-	  strcpy (cp, cp2);
+	  *cp++ = '.';
+	  stpcpy (cp, cp2);
 	}
       res = nis_remove (buf, NULL);
       status = res->status;
diff --git a/nis/nis_getservlist.c b/nis/nis_getservlist.c
index 0c9fbfb60d..b30b70b584 100644
--- a/nis/nis_getservlist.c
+++ b/nis/nis_getservlist.c
@@ -35,7 +35,7 @@ nis_getservlist (const_nis_name dir)
       unsigned long i;
       nis_server *server;
 
-      serv = malloc (sizeof (nis_server *) *
+      serv = calloc (1, sizeof (nis_server *) *
 		     (res->objects.objects_val->DI_data.do_servers.do_servers_len + 1));
       if (serv == NULL)
 	return NULL;
@@ -43,10 +43,9 @@ nis_getservlist (const_nis_name dir)
 	{
 	  server =
 	    &res->objects.objects_val->DI_data.do_servers.do_servers_val[i];
+	  serv[i] = calloc (1, sizeof (nis_server));
 	  if (server->name != NULL)
             serv[i]->name = strdup (server->name);
-          else
-            serv[i]->name = NULL;
 
           serv[i]->ep.ep_len = server->ep.ep_len;
           if (serv[i]->ep.ep_len > 0)
@@ -110,6 +109,10 @@ nis_freeservlist (nis_server **serv)
 
   i = 0;
   while (serv[i] != NULL)
-    nis_free_servers (serv[i], 1);
+    {
+      nis_free_servers (serv[i], 1);
+      free (serv[i]);
+      ++i;
+    }
   free (serv);
 }
diff --git a/nis/nis_ismember.c b/nis/nis_ismember.c
index f0d087ca51..85c401531e 100644
--- a/nis/nis_ismember.c
+++ b/nis/nis_ismember.c
@@ -42,7 +42,7 @@ internal_ismember (const_nis_name principal, const_nis_name group)
       cp2 = nis_domain_of_r (group, domainbuf, sizeof (domainbuf) - 1);
       if (cp2 != NULL && strlen (cp2) > 0)
         {
-          cp = stpcpy (cp, ".");
+	  *cp++ = '.';
           strcpy (cp, cp2);
 	}
       res = nis_lookup (buf, EXPAND_NAME|FOLLOW_LINKS);
@@ -112,9 +112,8 @@ internal_ismember (const_nis_name principal, const_nis_name group)
 		    char buf1[strlen (principal) + 2];
 		    char buf2[strlen (cp) + 2];
 
-		    strcpy (buf1, nis_domain_of (principal));
-		    strcpy (buf2, nis_domain_of (cp));
-		    if (strcmp (buf1, buf2) == 0)
+		    if (strcmp (nis_domain_of_r (principal, buf1, sizeof buf1),
+				nis_domain_of_r (cp, buf2, sizeof buf2)) == 0)
 		      return 1;
 		  }
 	    }
@@ -128,15 +127,7 @@ bool_t
 nis_ismember (const_nis_name principal, const_nis_name group)
 {
   if (group != NULL && strlen (group) > 0)
-    {
-      int status;
-
-      status = internal_ismember (principal, group);
-      if (status == 1)
-	return TRUE;
-      else
-	return FALSE;
-    }
+    return internal_ismember (principal, group) == 1 ? TRUE : FALSE;
   else
     return FALSE;
 }
diff --git a/nis/nis_local_names.c b/nis/nis_local_names.c
index e760f433b2..348c7534a3 100644
--- a/nis/nis_local_names.c
+++ b/nis/nis_local_names.c
@@ -31,6 +31,7 @@ nis_local_group (void)
   if (__nisgroup[0] == '\0')
     {
       char *cptr;
+      char *cp;
 
       if ((cptr = getenv ("NIS_GROUP")) == NULL)
 	return __nisgroup;
@@ -38,21 +39,18 @@ nis_local_group (void)
       if (strlen (cptr) >= NIS_MAXNAMELEN)
 	return __nisgroup;
 
-      strcpy (__nisgroup, cptr);
+      cp = stpcpy (__nisgroup, cptr);
 
-      if (__nisgroup[strlen (__nisgroup) - 1] != '.')
+      if (cp[-1] != '.')
 	{
 	  cptr = nis_local_directory ();
-	  if (strlen (__nisgroup) + strlen (cptr) + 1 < NIS_MAXNAMELEN)
+	  if ((cp - __nisgroup) + strlen (cptr) + 1 < NIS_MAXNAMELEN)
 	    {
-	      strcat (__nisgroup, ".");
-	      strcat (__nisgroup, cptr);
+	      *cp++ = '.';
+	      strcpy (cp, cptr);
 	    }
 	  else
-	    {
-	      __nisgroup[0] = '\0';
-	      return __nisgroup;
-	    }
+	    __nisgroup[0] = '\0';
 	}
     }
 
@@ -64,21 +62,20 @@ nis_name
 nis_local_directory (void)
 {
   static char __nisdomainname[NIS_MAXNAMELEN + 1];
-  int len;
 
   if (__nisdomainname[0] == '\0')
     {
       if (getdomainname (__nisdomainname, NIS_MAXNAMELEN) < 0)
-	strcpy (__nisdomainname, "\0");
+	__nisdomainname[0] = '\0';
       else
 	{
-	  len = strlen (__nisdomainname);
+	  char *cp = strchr (__nisdomainname, '\0');
 
 	  /* Missing trailing dot? */
-	  if (__nisdomainname[len - 1] != '.')
+	  if (cp[-1] != '.')
 	    {
-	      __nisdomainname[len] = '.';
-	      __nisdomainname[len + 1] = '\0';
+	      *cp++ = '.';
+	      *cp = '\0';
 	    }
 	}
     }
@@ -99,28 +96,32 @@ nis_local_principal (void)
 
       if (uid != 0)
 	{
-	  snprintf (buf, NIS_MAXNAMELEN - 1,
-		    "[auth_name=%d,auth_type=LOCAL],cred.org_dir.%s",
-		    uid, nis_local_directory ());
+	  int len = snprintf (buf, NIS_MAXNAMELEN - 1,
+			      "[auth_name=%d,auth_type=LOCAL],cred.org_dir.%s",
+			      uid, nis_local_directory ());
+
+	  if (len >= NIS_MAXNAMELEN - 1)
+	    /* XXX The buffer is too small.  Can this happen???  */
+	    return strcpy (__principal, "nobody");
 
-	  if (buf[strlen (buf) - 1] != '.')
-	    strcat (buf, ".");
+	  if (buf[len - 1] != '.')
+	    {
+	      buf[len++] = '.';
+	      buf[len] = '\0';
+	    }
 
 	  res = nis_list (buf, USE_DGRAM + NO_AUTHINFO + FOLLOW_LINKS +
 			  FOLLOW_PATH, NULL, NULL);
 
 	  if (res == NULL)
-	    {
-	      strcpy (__principal, "nobody");
-	      return __principal;
-	    }
+	    return strcpy (__principal, "nobody");
 
 	  if (res->status == NIS_SUCCESS)
 	    {
 	      if (res->objects.objects_len > 1)
 		{
 		  /* More than one principal with same uid?  something
-		     wrong with cred table. Should be unique Warn user
+		     wrong with cred table.  Should be unique.  Warn user
 		     and continue.  */
 		  printf (_("\
 LOCAL entry for UID %d in directory %s not unique\n"),
@@ -133,19 +134,14 @@ LOCAL entry for UID %d in directory %s not unique\n"),
 	  else
 	    {
 	      nis_freeresult (res);
-	      strcpy (__principal, "nobody");
-	      return __principal;
+	      return strcpy (__principal, "nobody");
 	    }
 	}
       else
-	{
-	  strcpy (__principal, nis_local_host ());
-	  return __principal;
-	}
+	return strcpy (__principal, nis_local_host ());
 
       /* Should be never reached */
-      strcpy (__principal, "nobody");
-      return __principal;
+      return strcpy (__principal, "nobody");
     }
   return __principal;
 }
@@ -154,7 +150,6 @@ nis_name
 nis_local_host (void)
 {
   static char __nishostname[NIS_MAXNAMELEN + 1];
-  int len;
 
   if (__nishostname[0] == '\0')
     {
@@ -162,21 +157,19 @@ nis_local_host (void)
 	__nishostname[0] = '\0';
       else
 	{
-	  char *cp;
-	  len = strlen(__nishostname);
+	  char *cp = strchr (__nishostname, '\0');
+	  int len = cp - __nishostname;
 
 	  /* Hostname already fully qualified? */
-	  if (__nishostname[len - 1] == '.')
+	  if (cp[-1] == '.')
 	    return __nishostname;
 
-	  if ((strlen (__nishostname) + strlen (nis_local_directory ()) + 1) >
-	      NIS_MAXNAMELEN)
+	  if (len + strlen (nis_local_directory ()) + 1 > NIS_MAXNAMELEN)
 	    {
 	      __nishostname[0] = '\0';
 	      return __nishostname;
 	    }
 
-	  cp = &__nishostname[len];
 	  *cp++ = '.';
 	  strncpy (cp, nis_local_directory (), NIS_MAXNAMELEN - len -1);
 	  __nishostname[NIS_MAXNAMELEN] = '\0';
diff --git a/nis/nis_modify.c b/nis/nis_modify.c
index 9c5aad7913..e68bf2a954 100644
--- a/nis/nis_modify.c
+++ b/nis/nis_modify.c
@@ -31,7 +31,7 @@ nis_modify (const_nis_name name, const nis_object *obj)
 
   res = calloc (1, sizeof (nis_result));
 
-  req.ns_name = (char *)name;
+  req.ns_name = (char *) name;
 
   req.ns_object.ns_object_len = 1;
   req.ns_object.ns_object_val = nis_clone_object (obj, NULL);
diff --git a/nis/nis_ping.c b/nis/nis_ping.c
index 610cf03ea5..941adfbda4 100644
--- a/nis/nis_ping.c
+++ b/nis/nis_ping.c
@@ -40,7 +40,7 @@ nis_ping (const_nis_name dirname, u_long utime, const nis_object *dirobj)
       obj = res->objects.objects_val;
     }
   else
-    obj = (nis_object *)dirobj;
+    obj = (nis_object *) dirobj;
 
   /* Check if obj is really a diryectory object */
   if (obj->zo_data.zo_type != DIRECTORY_OBJ)
@@ -49,7 +49,7 @@ nis_ping (const_nis_name dirname, u_long utime, const nis_object *dirobj)
   if (dirname == NULL)
     args.dir = obj->DI_data.do_name;
   else
-    args.dir = (char *)dirname;
+    args.dir = (char *) dirname;
   args.stamp = utime;
 
   for (i = 0; i < obj->DI_data.do_servers.do_servers_len; ++i)
diff --git a/nis/nis_print_group_entry.c b/nis/nis_print_group_entry.c
index e7c866cbe2..1063ef8411 100644
--- a/nis/nis_print_group_entry.c
+++ b/nis/nis_print_group_entry.c
@@ -38,8 +38,8 @@ nis_print_group_entry (const_nis_name group)
       cp2 = nis_domain_of_r (group, domainbuf, sizeof (domainbuf) - 1);
       if (cp2 != NULL && strlen (cp2) > 0)
 	{
-	  cp = stpcpy (cp, ".");
-	  strcpy (cp, cp2);
+	  *cp++ = '.';
+	  stpcpy (cp, cp2);
 	}
       res = nis_lookup (buf, FOLLOW_LINKS|EXPAND_NAME);
 
diff --git a/nis/nis_remove.c b/nis/nis_remove.c
index 3ffd66dfe0..e6aed00393 100644
--- a/nis/nis_remove.c
+++ b/nis/nis_remove.c
@@ -31,7 +31,7 @@ nis_remove (const_nis_name name, const nis_object *obj)
 
   res = calloc (1, sizeof (nis_result));
 
-  req.ns_name = (char *)name;
+  req.ns_name = (char *) name;
 
   if (obj != NULL)
     {
diff --git a/nis/nis_removemember.c b/nis/nis_removemember.c
index 473438ba5c..8ed67caf98 100644
--- a/nis/nis_removemember.c
+++ b/nis/nis_removemember.c
@@ -26,14 +26,14 @@ nis_removemember (const_nis_name member, const_nis_name group)
 {
   if (group != NULL && strlen (group) > 0)
     {
-      char buf[strlen (group) + 50];
+      char buf[strlen (group) + 14 + NIS_MAXNAMELEN];
       char leafbuf[strlen (group) + 2];
       char domainbuf[strlen (group) + 2];
       nis_name *newmem;
       nis_result *res, *res2;
       nis_error status;
       char *cp, *cp2;
-      u_int i, j;
+      unsigned long int i, j, k;
 
       cp = stpcpy (buf, nis_leaf_of_r (group, leafbuf, sizeof (leafbuf) - 1));
       cp = stpcpy (cp, ".groups_dir");
@@ -41,7 +41,7 @@ nis_removemember (const_nis_name member, const_nis_name group)
       if (cp2 != NULL && strlen (cp2) > 0)
         {
           cp = stpcpy (cp, ".");
-          strcpy (cp, cp2);
+          stpcpy (cp, cp2);
         }
       res = nis_lookup (buf, FOLLOW_LINKS|EXPAND_NAME);
       if (res->status != NIS_SUCCESS)
@@ -54,20 +54,35 @@ nis_removemember (const_nis_name member, const_nis_name group)
           (res->objects.objects_val[0].zo_data.zo_type != GROUP_OBJ))
         return NIS_INVALIDOBJ;
 
-      newmem = malloc (res->objects.objects_val[0].GR_data.gr_members.gr_members_len);
 
+      newmem = calloc (1, res->objects.objects_val[0].GR_data.gr_members.gr_members_len *
+		       sizeof (char *));
+
+      k = res->objects.objects_val[0].GR_data.gr_members.gr_members_len;
       j = 0;
-      for (i = 0; i < res->objects.objects_val[0].GR_data.gr_members.gr_members_len - 1; ++i)
+      for (i = 0; i < res->objects.objects_val[0].GR_data.gr_members.gr_members_len;
+	   ++i)
 	{
-	  if (strcmp (res->objects.objects_val[0].GR_data.gr_members.gr_members_val[j], member) != 0)
+	  if (strcmp (res->objects.objects_val[0].GR_data.gr_members.gr_members_val[i],
+		      member) != 0)
 	    {
 	      newmem[j] = res->objects.objects_val[0].GR_data.gr_members.gr_members_val[i];
 	      ++j;
 	    }
+	  else
+	    {
+	      free (res->objects.objects_val[0].GR_data.gr_members.gr_members_val[i]);
+	      --k;
+	    }
 	}
-      --res->objects.objects_val[0].GR_data.gr_members.gr_members_len;
       free (res->objects.objects_val[0].GR_data.gr_members.gr_members_val);
+      newmem = realloc (newmem, k * sizeof (char*));
       res->objects.objects_val[0].GR_data.gr_members.gr_members_val = newmem;
+      res->objects.objects_val[0].GR_data.gr_members.gr_members_len = k;
+
+      cp = stpcpy (buf, res->objects.objects_val->zo_name);
+      *cp++ = '.';
+      strncpy (cp, res->objects.objects_val->zo_domain, NIS_MAXNAMELEN);
       res2 = nis_modify (buf, res->objects.objects_val);
       status = res2->status;
       nis_freeresult (res);
diff --git a/nis/nis_server.c b/nis/nis_server.c
index 4d6b1c1100..5274a3bfc4 100644
--- a/nis/nis_server.c
+++ b/nis/nis_server.c
@@ -33,7 +33,7 @@ nis_servstate (const nis_server *serv, const nis_tag *tags,
   tagres.tags.tags_val = NULL;
   *result = NULL;
   taglist.tags.tags_len = numtags;
-  taglist.tags.tags_val = (nis_tag *)tags;
+  taglist.tags.tags_val = (nis_tag *) tags;
 
   if (serv == NULL)
     {
@@ -80,7 +80,7 @@ nis_stats (const nis_server *serv, const nis_tag *tags,
   tagres.tags.tags_val = NULL;
   *result = NULL;
   taglist.tags.tags_len = numtags;
-  taglist.tags.tags_val = (nis_tag *)tags;
+  taglist.tags.tags_val = (nis_tag *) tags;
 
   if (serv == NULL)
     {
diff --git a/nis/nis_table.c b/nis/nis_table.c
index 5fa3c89e0b..e9e35abf3b 100644
--- a/nis/nis_table.c
+++ b/nis/nis_table.c
@@ -78,7 +78,7 @@ splitname (const_nis_name name, nis_name *ibr_name, int *srch_len,
       if (!val)
 	{
 	  free (cptr);
-	  *srch_val = malloc (sizeof (char *));
+	  *srch_val = malloc (sizeof (nis_attr));
 	  if (*srch_val == NULL)
 	    {
 	      free (cptr);
@@ -86,8 +86,8 @@ splitname (const_nis_name name, nis_name *ibr_name, int *srch_len,
 	      *ibr_name = NULL;
 	      return;
 	    }
-	  (*srch_val)[*srch_len].zattr_val.zattr_val_len = 0;
-	  (*srch_val)[*srch_len].zattr_val.zattr_val_val = NULL;
+	  (*srch_val)[0].zattr_val.zattr_val_len = 0;
+	  (*srch_val)[0].zattr_val.zattr_val_val = NULL;
 	  return;
 	}
 
diff --git a/nis/nis_verifygroup.c b/nis/nis_verifygroup.c
index e57f16589a..6a8ab01bd7 100644
--- a/nis/nis_verifygroup.c
+++ b/nis/nis_verifygroup.c
@@ -38,8 +38,8 @@ nis_verifygroup (const_nis_name group)
       cp2 = nis_domain_of_r (group, domainbuf, sizeof (domainbuf) - 1);
       if (cp2 != NULL && strlen (cp2) > 0)
 	{
-	  cp = stpcpy (cp, ".");
-	  strcpy (cp, cp2);
+	  *cp++ = '.';
+	  stpcpy (cp, cp2);
 	}
       res = nis_lookup (buf, 0);
       status = res->status;
diff --git a/nis/nss_nis/nis-hosts.c b/nis/nss_nis/nis-hosts.c
index 91d30c8149..5823c71a80 100644
--- a/nis/nss_nis/nis-hosts.c
+++ b/nis/nss_nis/nis-hosts.c
@@ -55,7 +55,7 @@ LINE_PARSER
    STRING_FIELD (addr, isspace, 1);
 
    /* Parse address.  */
-   if (inet_pton (AF_INET6, p, entdata->host_addr) > 0)
+   if (inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
      {
        result->h_addrtype = AF_INET6;
        result->h_length = IN6ADDRSZ;
diff --git a/nis/nss_nis/nis-netgrp.c b/nis/nss_nis/nis-netgrp.c
index 7609ea08ed..aa51c2f0df 100644
--- a/nis/nss_nis/nis-netgrp.c
+++ b/nis/nss_nis/nis-netgrp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -52,7 +52,7 @@ _nss_nis_setnetgrent (char *group)
 
   status = NSS_STATUS_SUCCESS;
 
-  if (group[0] == '\0')
+  if (group == NULL || group[0] == '\0')
     return NSS_STATUS_UNAVAIL;
 
   if (yp_get_default_domain (&domain))
diff --git a/nis/nss_nisplus/nisplus-hosts.c b/nis/nss_nisplus/nisplus-hosts.c
index 0a005406d1..e6d584dac8 100644
--- a/nis/nss_nisplus/nisplus-hosts.c
+++ b/nis/nss_nisplus/nisplus-hosts.c
@@ -66,7 +66,7 @@ LINE_PARSER
    STRING_FIELD (addr, isspace, 1);
 
    /* Parse address.  */
-   if (inet_pton (AF_INET6, p, entdata->host_addr) > 0)
+   if (inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
      {
        result->h_addrtype = AF_INET6;
        result->h_length = IN6ADDRSZ;
diff --git a/nis/nss_nisplus/nisplus-spwd.c b/nis/nss_nisplus/nisplus-spwd.c
index d426d28684..568a1c4006 100644
--- a/nis/nss_nisplus/nisplus-spwd.c
+++ b/nis/nss_nisplus/nisplus-spwd.c
@@ -44,7 +44,6 @@ _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp,
 {
   char *first_unused = buffer;
   size_t room_left = buflen;
-  char *line, *cp;
 
   if (result == NULL)
     return 0;
@@ -85,52 +84,57 @@ _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp,
   sp->sp_lstchg = sp->sp_min = sp->sp_max = sp->sp_warn = sp->sp_inact =
     sp->sp_expire = sp->sp_flag = -1;
 
-  line = NISENTRYVAL (0, 7, result);
-  cp = strchr (line, ':');
-  if (cp == NULL)
-    return 0;
-  *cp++ = '\0';
-  sp->sp_lstchg = atol (line);
-
-  line = cp;
-  cp = strchr (line, ':');
-  if (cp == NULL)
-    return 0;
-  *cp++ = '\0';
-  sp->sp_min = atol(line);
-
-  line = cp;
-  cp = strchr (line, ':');
-  if (cp == NULL)
-    return 0;
-  *cp++ = '\0';
-  sp->sp_max = atol(line);
-
-  line = cp;
-  cp = strchr (line, ':');
-  if (cp == NULL)
-    return 0;
-  *cp++ = '\0';
-  sp->sp_warn = atol(line);
-
-  line = cp;
-  cp = strchr (line, ':');
-  if (cp == NULL)
-    return 0;
-  *cp++ = '\0';
-  sp->sp_inact = atol(line);
-
-  line = cp;
-  cp = strchr (line, ':');
-  if (cp == NULL)
-    return 0;
-  *cp++ = '\0';
-  sp->sp_expire = atol(line);
-
-  line = cp;
-  if (line == NULL)
-    return 0;
-  sp->sp_flag = atol(line);
+  if (NISENTRYVAL (0, 7, result) > 0)
+    {
+      char *line, *cp;
+
+      line = NISENTRYVAL (0, 7, result);
+      cp = strchr (line, ':');
+      if (cp == NULL)
+	return 0;
+      *cp++ = '\0';
+      sp->sp_lstchg = atol (line);
+
+      line = cp;
+      cp = strchr (line, ':');
+      if (cp == NULL)
+	return 0;
+      *cp++ = '\0';
+      sp->sp_min = atol(line);
+
+      line = cp;
+      cp = strchr (line, ':');
+      if (cp == NULL)
+	return 0;
+      *cp++ = '\0';
+      sp->sp_max = atol(line);
+
+      line = cp;
+      cp = strchr (line, ':');
+      if (cp == NULL)
+	return 0;
+      *cp++ = '\0';
+      sp->sp_warn = atol(line);
+
+      line = cp;
+      cp = strchr (line, ':');
+      if (cp == NULL)
+	return 0;
+      *cp++ = '\0';
+      sp->sp_inact = atol(line);
+
+      line = cp;
+      cp = strchr (line, ':');
+      if (cp == NULL)
+	return 0;
+      *cp++ = '\0';
+      sp->sp_expire = atol(line);
+
+      line = cp;
+      if (line == NULL)
+	return 0;
+      sp->sp_flag = atol(line);
+    }
 
   return 1;
 }
diff --git a/nss/Makefile b/nss/Makefile
index 6f555af469..02af5009bc 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -49,10 +49,12 @@ vpath %.c $(subdir-dirs)
 
 
 libnss_files-routines	:= $(addprefix files-,$(filter-out key, $(databases)))
+libnss_files-map	:= libnss_files.map
 distribute		+= files-XXX.c files-parse.c
 
 libnss_db-routines	:= $(addprefix db-,$(filter-out hosts network key,\
 							$(databases)))
+libnss_db-map		:= libnss_db.map
 generated		+= $(filter-out db-alias.c db-netgrp.c, \
 					$(addsuffix .c,$(libnss_db-routines)))
 distribute		+= db-XXX.c
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 371b2e36f5..988f46c88e 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -140,5 +140,5 @@ done:
   return status == NSS_STATUS_SUCCESS ? 0 : -1;
 }
 
-#define do_weak_alias(n1, n2) weak_alias ((n1), (n2))
+#define do_weak_alias(n1, n2) weak_alias (n1, (n2))
 do_weak_alias (INTERNAL (REENTRANT_NAME), REENTRANT_NAME)
diff --git a/nss/libnss_db.map b/nss/libnss_db.map
new file mode 100644
index 0000000000..9248107747
--- /dev/null
+++ b/nss/libnss_db.map
@@ -0,0 +1,20 @@
+GLIBC_2.0 {
+  global:
+    _nss_db_endaliasent; _nss_db_endetherent; _nss_db_endgrent;
+    _nss_db_endnetgrent; _nss_db_endprotoent; _nss_db_endpwent;
+    _nss_db_endrpcent; _nss_db_endservent; _nss_db_endspent;
+    _nss_db_getaliasbyname_r; _nss_db_getaliasent_r; _nss_db_getetherent_r;
+    _nss_db_getgrent_r; _nss_db_getgrgid_r; _nss_db_getgrnam_r;
+    _nss_db_gethostton_r; _nss_db_getnetgrent_r; _nss_db_getntohost_r;
+    _nss_db_getprotobyname_r; _nss_db_getprotobynumber_r;
+    _nss_db_getprotoent_r; _nss_db_getpwent_r; _nss_db_getpwnam_r;
+    _nss_db_getpwuid_r; _nss_db_getrpcbyname_r; _nss_db_getrpcbynumber_r;
+    _nss_db_getrpcent_r; _nss_db_getservbyname_r; _nss_db_getservbyport_r;
+    _nss_db_getservent_r; _nss_db_getspent_r; _nss_db_getspnam_r;
+    _nss_db_setaliasent; _nss_db_setetherent; _nss_db_setgrent;
+    _nss_db_setnetgrent; _nss_db_setprotoent; _nss_db_setpwent;
+    _nss_db_setrpcent; _nss_db_setservent; _nss_db_setspent;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/nss/libnss_files.map b/nss/libnss_files.map
new file mode 100644
index 0000000000..8ec5e0ee32
--- /dev/null
+++ b/nss/libnss_files.map
@@ -0,0 +1,28 @@
+GLIBC_2.0 {
+  global:
+    _nss_files_endaliasent; _nss_files_endetherent; _nss_files_endgrent;
+    _nss_files_endhostent; _nss_files_endnetent; _nss_files_endnetgrent;
+    _nss_files_endprotoent; _nss_files_endpwent; _nss_files_endrpcent;
+    _nss_files_endservent; _nss_files_endspent; _nss_files_getaliasbyname_r;
+    _nss_files_getaliasent_r; _nss_files_getetherent_r; _nss_files_getgrent_r;
+    _nss_files_getgrgid_r; _nss_files_getgrnam_r; _nss_files_gethostbyaddr_r;
+    _nss_files_gethostbyname2_r; _nss_files_gethostbyname_r;
+    _nss_files_gethostent_r; _nss_files_gethostton_r;
+    _nss_files_getnetbyaddr_r; _nss_files_getnetbyname_r;
+    _nss_files_getnetent_r; _nss_files_getnetgrent_r; _nss_files_getntohost_r;
+    _nss_files_getprotobyname_r; _nss_files_getprotobynumber_r;
+    _nss_files_getprotoent_r; _nss_files_getpwent_r; _nss_files_getpwnam_r;
+    _nss_files_getpwuid_r; _nss_files_getrpcbyname_r;
+    _nss_files_getrpcbynumber_r; _nss_files_getrpcent_r;
+    _nss_files_getservbyname_r; _nss_files_getservbyport_r;
+    _nss_files_getservent_r; _nss_files_getspent_r; _nss_files_getspnam_r;
+    _nss_files_parse_etherent; _nss_files_parse_netent;
+    _nss_files_parse_protoent; _nss_files_parse_rpcent;
+    _nss_files_parse_servent; _nss_files_setaliasent; _nss_files_setetherent;
+    _nss_files_setgrent; _nss_files_sethostent; _nss_files_setnetent;
+    _nss_files_setnetgrent; _nss_files_setprotoent; _nss_files_setpwent;
+    _nss_files_setrpcent; _nss_files_setservent; _nss_files_setspent;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/posix/glob.c b/posix/glob.c
index 44e548493c..6d9af102f8 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -307,7 +307,7 @@ next_brace_sub (const char *begin)
    If a directory cannot be opened or read and ERRFUNC is not nil,
    it is called with the pathname that caused the error, and the
    `errno' value from the failing call; if it returns non-zero
-   `glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
+   `glob' returns GLOB_ABORTED; if it returns zero, the error is ignored.
    If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
    Otherwise, `glob' returns zero.  */
 int
@@ -647,7 +647,7 @@ glob (pattern, flags, errfunc, pglob)
 	      {
 		globfree (&dirs);
 		globfree (&files);
-		return GLOB_ABEND;
+		return GLOB_ABORTED;
 	      }
 	  }
 #endif /* SHELL.  */
@@ -918,7 +918,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
 	{
 	  if ((errfunc != NULL && (*errfunc) (directory, errno)) ||
 	      (flags & GLOB_ERR))
-	    return GLOB_ABEND;
+	    return GLOB_ABORTED;
 	}
       else
 	while (1)
diff --git a/posix/glob.h b/posix/glob.h
index 49a7b7cfe6..bfe1c9cd01 100644
--- a/posix/glob.h
+++ b/posix/glob.h
@@ -65,9 +65,15 @@ extern "C"
 
 /* Error returns from `glob'.  */
 #define	GLOB_NOSPACE	1	/* Ran out of memory.  */
-#define	GLOB_ABEND	2	/* Read error.  */
+#define	GLOB_ABORTED	2	/* Read error.  */
 #define	GLOB_NOMATCH	3	/* No matches found.  */
 
+#ifdef _GNU_SOURCE
+/* Previous versions of this file defined GLOB_ABEND instead of
+   GLOB_ABORTED.  Provide a compatibility definition here.  */
+# define GLOB_ABEND GLOB_ABORTED
+#endif
+
 /* Structure describing a globbing run.  */
 #if !defined (_AMIGA) && !defined (VMS) /* Buggy compiler.   */
 struct stat;
diff --git a/posix/unistd.h b/posix/unistd.h
index b550d2c6f4..8f1dd35ce1 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -297,7 +297,7 @@ extern int fchdir __P ((int __fd));
    directory couldn't be determined or SIZE was too small.
    If successful, returns BUF.  In GNU, if BUF is NULL,
    an array is allocated with `malloc'; the array is SIZE
-   bytes long, unless SIZE <= 0, in which case it is as
+   bytes long, unless SIZE == 0, in which case it is as
    big as necessary.  */
 extern char *__getcwd __P ((char *__buf, size_t __size));
 extern char *getcwd __P ((char *__buf, size_t __size));
diff --git a/resolv/Makefile b/resolv/Makefile
index 7b99aee550..4d11b4d366 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -32,11 +32,13 @@ extra-libs-others = $(extra-libs)
 libresolv-routines := gethnamaddr res_comp res_debug	\
 		      res_data res_mkquery res_query res_send		\
 		      inet_net_ntop inet_net_pton inet_neta base64
+libresolv-map := libresolv.map
 
 subdir-dirs = nss_dns
 vpath %.c nss_dns
 
 libnss_dns-routines	:= dns-host dns-network
+libnss_dns-map		:= libnss_dns.map
 libnss_dns-inhibit-o	= $(filter-out .so,$(object-suffixes))
 
 include ../Rules
diff --git a/resolv/libnss_dns.map b/resolv/libnss_dns.map
new file mode 100644
index 0000000000..359ddc1d15
--- /dev/null
+++ b/resolv/libnss_dns.map
@@ -0,0 +1,9 @@
+GLIBC_2.0 {
+  global:
+    _nss_dns_gethostbyaddr_r; _nss_dns_gethostbyname2_r;
+    _nss_dns_gethostbyname_r; _nss_dns_getnetbyaddr_r;
+    _nss_dns_getnetbyname_r;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/resolv/libresolv.map b/resolv/libresolv.map
new file mode 100644
index 0000000000..79d70539c2
--- /dev/null
+++ b/resolv/libresolv.map
@@ -0,0 +1,11 @@
+GLIBC_2.0 {
+  global:
+    _gethtbyaddr; _gethtbyname; _gethtbyname2; _gethtent; _getlong;
+    _getshort; _res_opcodes; _res_resultcodes; _sethtent; dn_expand;
+    inet_net_ntop; inet_net_pton; inet_neta; res_gethostbyaddr;
+    res_gethostbyname; res_gethostbyname2; res_mkquery; res_query;
+    res_querydomain; res_search; res_send_setqhook; res_send_setrhook;
+
+  local:
+    *;
+};
\ No newline at end of file
diff --git a/shlib-versions b/shlib-versions
index d4f8cdfdc9..ac9ef78c62 100644
--- a/shlib-versions
+++ b/shlib-versions
@@ -8,18 +8,18 @@
 # Configuration		Library versions
 # -------------		------- --------
 
-# The interface to -lm depends only on cpu, not on operating system.
+# The interface to -lm depends mostly only on cpu, not on operating system.
 i.86-.*-.*		libm=6
 m68k-.*-.*		libm=6
-sparc-.*-linux.*	libm=6
+sparc-.*-.*		libm=6
 alpha-.*-linux.*	libm=6.1
 alpha-.*-.*		libm=6
+powerpc-.*-.*		libm=6
+mips-.*-.*		libm=6
 
 # We provide libc.so.6 for Linux kernel versions 2.0 and later.
-i.86-.*-linux.*		libc=6
-m68k-.*-linux.*		libc=6
-sparc-.*-linux.*	libc=6
 alpha-.*-linux.*	libc=6.1
+.*-.*-linux.*		libc=6
 
 # libmachuser.so.1 corresponds to mach/*.defs as of Utah's UK22 release.
 .*-.*-gnu-gnu.*		libmachuser=1
diff --git a/stdlib/Makefile b/stdlib/Makefile
index b5a38bd965..2eb1843a4a 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -21,7 +21,7 @@
 #
 subdir	:= stdlib
 
-headers	:= stdlib.h alloca.h monetary.h inttypes.h fmtmsg.h
+headers	:= stdlib.h alloca.h monetary.h fmtmsg.h
 
 routines	:=							      \
 	atof atoi atol atoll						      \
diff --git a/stdlib/testsort.c b/stdlib/testsort.c
index 3ae55b14b9..a9a43c76ea 100644
--- a/stdlib/testsort.c
+++ b/stdlib/testsort.c
@@ -3,7 +3,7 @@
 #include <stdio.h>
 
 int
-compare (const char *a, const char *b)
+compare (const void *a, const void *b)
 {
   return strcmp (*(char **) a, *(char **) b);
 }
diff --git a/string/argz-addsep.c b/string/argz-addsep.c
index 7405e9ad1a..38f3138ec1 100644
--- a/string/argz-addsep.c
+++ b/string/argz-addsep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
 
@@ -56,4 +56,4 @@ __argz_add_sep (char **argz, size_t *argz_len, const char *string, int delim)
 
   return 0;
 }
-weak_alias (__argz_create_sep, argz_create_sep)
+weak_alias (__argz_add_sep, argz_add_sep)
diff --git a/sunrpc/Makefile b/sunrpc/Makefile
index b5ed91dc3f..ee66e532f1 100644
--- a/sunrpc/Makefile
+++ b/sunrpc/Makefile
@@ -23,13 +23,12 @@ subdir	:= sunrpc
 
 # The code in this subdirectory is taken from Sun's RPCSRC-4.0
 # distribution with some additional changes from the TI-RPC package
-# which is also available from Sun.  A few files needed trivial
-# modifications to compile in the GNU environment; these changes are
-# marked by comments that say `roland@gnu'.  All the code from Sun's
-# rpc, etc, and rpcgen subdirectories is in this directory; the rpc
-# subdirectory contains only the header files.  Other than that,
-# several files were renamed so as not to exceed 14-character file
-# name limits:
+# which is also available from Sun.  The files are heavily changed to
+# compile cleanly and to fit in the GNU environment.  All the code
+# from Sun's rpc, etc, and rpcgen subdirectories is in this directory;
+# the rpc subdirectory contains only the header files.  Other than
+# that, several files were renamed so as not to exceed 14-character
+# file name limits:
 #
 #	authunix_prot.c -> authuxprot.c
 #	bindresvport.c -> bindrsvprt.c
diff --git a/sysdeps/i386/add_n.S b/sysdeps/i386/add_n.S
index a68fe2ed39..55c5dda446 100644
--- a/sysdeps/i386/add_n.S
+++ b/sysdeps/i386/add_n.S
@@ -32,6 +32,7 @@
 .text
 	ALIGN (3)
 	.globl C_SYMBOL_NAME(__mpn_add_n)
+	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_add_n),@function)
 C_SYMBOL_NAME(__mpn_add_n:)
 	pushl %edi
 	pushl %esi
@@ -102,3 +103,5 @@ L(oop):	movl	(%esi),%eax
 	popl %esi
 	popl %edi
 	ret
+
+	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_add_n))
\ No newline at end of file
diff --git a/sysdeps/i386/addmul_1.S b/sysdeps/i386/addmul_1.S
index 3e2c5cd616..8194ec495e 100644
--- a/sysdeps/i386/addmul_1.S
+++ b/sysdeps/i386/addmul_1.S
@@ -37,6 +37,7 @@
 	TEXT
 	ALIGN (3)
 	GLOBL	C_SYMBOL_NAME(__mpn_addmul_1)
+	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_addmul_1),@function)
 C_SYMBOL_NAME(__mpn_addmul_1:)
 
 	INSN1(push,l	,R(edi))
@@ -72,3 +73,5 @@ L(oop):
 	INSN1(pop,l	,R(esi))
 	INSN1(pop,l	,R(edi))
 	ret
+
+	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_addmul_1))
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 3e0f9b126c..6efa32bcd1 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -253,7 +253,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 #endif
 	*reloc_addr += map->l_addr;
     }
-  else
+  else if (ELF32_R_TYPE (reloc->r_info) != R_386_NONE)
     {
       const Elf32_Sym *const refsym = sym;
       Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
@@ -305,8 +305,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	case R_386_PC32:
 	  *reloc_addr += (value - (Elf32_Addr) reloc_addr);
 	  break;
-	case R_386_NONE:		/* Alright, Wilbur.  */
-	  break;
 	default:
 	  assert (! "unexpected dynamic reloc type");
 	  break;
diff --git a/sysdeps/i386/fpu/__math.h b/sysdeps/i386/fpu/__math.h
index d5945e8ca2..9e1c23cec0 100644
--- a/sysdeps/i386/fpu/__math.h
+++ b/sysdeps/i386/fpu/__math.h
@@ -382,13 +382,17 @@ hypot (double __x, double __y)
   return sqrt (__x * __x + __y * __y);
 }
 
+/* We cannot rely on M_SQRT being defined.  So we do it for ourself
+   here.  */
+#define __M_SQRT2	_Mldbl(1.41421356237309504880)	/* sqrt(2) */
+
 __MATH_INLINE double log1p (double __x);
 __MATH_INLINE double
 log1p (double __x)
 {
   register double __value;
 
-  if (fabs (__x) >= 1.0 - 0.5 * M_SQRT2)
+  if (fabs (__x) >= 1.0 - 0.5 * __M_SQRT2)
     __value = log (1.0 + __x);
   else
     __asm __volatile__
diff --git a/sysdeps/i386/lshift.S b/sysdeps/i386/lshift.S
index cd6d95b62e..2f629b0303 100644
--- a/sysdeps/i386/lshift.S
+++ b/sysdeps/i386/lshift.S
@@ -31,6 +31,7 @@
 .text
 	ALIGN (3)
 	.globl C_SYMBOL_NAME(__mpn_lshift)
+	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_lshift),@function)
 C_SYMBOL_NAME(__mpn_lshift:)
 	pushl	%edi
 	pushl	%esi
@@ -81,3 +82,5 @@ L(end):	shll	%cl,%ebx		/* compute least significant limb */
 	popl	%esi
 	popl	%edi
 	ret
+
+	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_lshift))
\ No newline at end of file
diff --git a/sysdeps/i386/rshift.S b/sysdeps/i386/rshift.S
index f00f9d59f2..a0382672de 100644
--- a/sysdeps/i386/rshift.S
+++ b/sysdeps/i386/rshift.S
@@ -31,6 +31,7 @@
 .text
 	ALIGN (3)
 	.globl C_SYMBOL_NAME(__mpn_rshift)
+	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_rshift),@function)
 C_SYMBOL_NAME(__mpn_rshift:)
 	pushl	%edi
 	pushl	%esi
@@ -83,3 +84,5 @@ L(end):	shrl	%cl,%ebx		/* compute most significant limb */
 	popl	%esi
 	popl	%edi
 	ret
+
+	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_rshift))
\ No newline at end of file
diff --git a/sysdeps/i386/sub_n.S b/sysdeps/i386/sub_n.S
index 229734c2e9..c41c9a6408 100644
--- a/sysdeps/i386/sub_n.S
+++ b/sysdeps/i386/sub_n.S
@@ -32,6 +32,7 @@
 .text
 	ALIGN (3)
 	.globl C_SYMBOL_NAME(__mpn_sub_n)
+	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_sub_n),@function)
 C_SYMBOL_NAME(__mpn_sub_n:)
 	pushl %edi
 	pushl %esi
@@ -102,3 +103,5 @@ L(oop):	movl	(%esi),%eax
 	popl %esi
 	popl %edi
 	ret
+
+	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_sub_n))
\ No newline at end of file
diff --git a/sysdeps/i386/submul_1.S b/sysdeps/i386/submul_1.S
index 8efef7609f..6bba494417 100644
--- a/sysdeps/i386/submul_1.S
+++ b/sysdeps/i386/submul_1.S
@@ -37,6 +37,7 @@
 	TEXT
 	ALIGN (3)
 	GLOBL	C_SYMBOL_NAME(__mpn_submul_1)
+	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_submul_1),@function)
 C_SYMBOL_NAME(__mpn_submul_1:)
 
 	INSN1(push,l	,R(edi))
@@ -72,3 +73,5 @@ L(oop):
 	INSN1(pop,l	,R(esi))
 	INSN1(pop,l	,R(edi))
 	ret
+
+	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_addmul_1))
diff --git a/sysdeps/libm-ieee754/s_fmin.c b/sysdeps/libm-ieee754/s_fmin.c
index f9a937c850..b79e6eca5a 100644
--- a/sysdeps/libm-ieee754/s_fmin.c
+++ b/sysdeps/libm-ieee754/s_fmin.c
@@ -28,6 +28,6 @@ __fmin (double x, double y)
 }
 weak_alias (__fmin, fmin)
 #ifdef NO_LONG_DOUBLE
-strong_alias (__fmim, __fminl)
+strong_alias (__fmin, __fminl)
 weak_alias (__fmin, fminl)
 #endif
diff --git a/sysdeps/powerpc/fenvbits.h b/sysdeps/powerpc/fenvbits.h
index 867ea5f5b4..8acd0ab8a4 100644
--- a/sysdeps/powerpc/fenvbits.h
+++ b/sysdeps/powerpc/fenvbits.h
@@ -85,7 +85,7 @@ enum
     FE_INVALID_INTEGER_CONVERSION = 1 << 31-23,
 #define FE_INVALID_INTEGER_CONVERSION	FE_INVALID_INTEGER_CONVERSION
 
-#define __FE_ALL_INVALID \
+#define FE_ALL_INVALID \
         (FE_INVALID_SNAN | FE_INVALID_ISI | FE_INVALID_IDI | FE_INVALID_ZDZ \
 	 | FE_INVALID_IMZ | FE_INVALID_COMPARE | FE_INVALID_SOFTWARE \
 	 | FE_INVALID_SQRT | FE_INVALID_INTEGER_CONVERSION)
diff --git a/sysdeps/powerpc/fraiseexcpt.c b/sysdeps/powerpc/fraiseexcpt.c
index aa8f1fcdc6..4305c3dcd2 100644
--- a/sysdeps/powerpc/fraiseexcpt.c
+++ b/sysdeps/powerpc/fraiseexcpt.c
@@ -34,9 +34,9 @@ feraiseexcept (int excepts)
 
   /* Add the exceptions */
   u.l[1] = (u.l[1]
-	    | excepts & __FPSCR_STICKY_BITS
+	    | excepts & FPSCR_STICKY_BITS
 	    /* Turn FE_INVALID into FE_INVALID_SOFTWARE.  */
-	    | excepts << (31 - 21) - (31 - 24)  &  __FE_INVALID_SOFTWARE);
+	    | excepts << (31 - 21) - (31 - 24) & FE_INVALID_SOFTWARE);
 
   /* Store the new status word (along with the rest of the environment),
      triggering any appropriate exceptions.  */
diff --git a/sysdeps/powerpc/strlen.s b/sysdeps/powerpc/strlen.s
index fa1c670912..9d671cabc3 100644
--- a/sysdeps/powerpc/strlen.s
+++ b/sysdeps/powerpc/strlen.s
@@ -100,8 +100,8 @@ strlen:
 	bne   done0
  # Handle second word of pair. Put addi between branches to avoid hurting
  # branch prediction.
-	addi  %r6,%r6,0xfffffeff
-	
+	addi  %r6,%r6,-0x101
+
 	bne   %cr1,loop
 	lwzu  %r8,4(%r4)
 	and   %r0,%r7,%r8
@@ -111,7 +111,7 @@ strlen:
 	bne   done0
 
  # The loop.
-	
+
 loop:	lwz   %r8,4(%r4)
 	lwzu  %r9,8(%r4)
 	add   %r0,%r6,%r8
@@ -127,12 +127,12 @@ loop:	lwz   %r8,4(%r4)
 	add   %r0,%r0,%r7
 	andc  %r8,%r12,%r0
 	b     done0
-	
+
 done1:	and   %r0,%r7,%r8
 	subi  %r4,%r4,4
 	add   %r0,%r0,%r7
 	andc  %r8,%r10,%r0
-	
+
  # When we get to here, r4 points to the first word in the string that
  # contains a zero byte, and the most significant set bit in r8 is in that
  # byte.
diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S
new file mode 100644
index 0000000000..a801674283
--- /dev/null
+++ b/sysdeps/unix/arm/brk.S
@@ -0,0 +1,43 @@
+/* Copyright (C) 1991, 1992, 1993, 1995 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
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB.  If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA.  */
+
+#include <sysdep.h>
+
+#ifndef	SYS_brk
+#define	SYS_brk	17
+#endif
+
+.data
+.globl C_SYMBOL_NAME(__curbrk)
+C_LABEL(__curbrk)
+#ifdef	HAVE_GNU_LD
+	.long C_SYMBOL_NAME(_end)
+#else
+	.long C_SYMBOL_NAME(end)
+#endif
+
+.text
+SYSCALL__ (brk, 1)
+	ldr r1, _cb_addr
+	str r0, [r1]
+	mov r0, $0
+	RETINSTR(mov, pc, r14)
+_cb_addr:	.long C_SYMBOL_NAME(__curbrk)
+	
+	
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S
new file mode 100644
index 0000000000..5d3ad551c6
--- /dev/null
+++ b/sysdeps/unix/arm/sysdep.S
@@ -0,0 +1,49 @@
+/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <sysdep.h>
+#define _ERRNO_H
+#include <errnos.h>
+
+.globl C_SYMBOL_NAME(errno)
+.globl syscall_error
+
+_errno_loc:	.long C_SYMBOL_NAME(errno)
+	
+#undef syscall_error
+#ifdef NO_UNDERSCORES
+__syscall_error:
+#else
+syscall_error:
+#endif
+#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
+	/* We translate the system's EWOULDBLOCK error into EAGAIN.
+	   The GNU C library always defines EWOULDBLOCK==EAGAIN.
+	   EWOULDBLOCK_sys is the original number.  */
+	cmp r0, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK?  */
+	moveq r0, $EAGAIN	/* Yes; translate it to EAGAIN.  */
+#endif
+#ifndef	PIC
+	ldr r1, _errno_loc	
+	str r0, [r1]
+#endif
+	mvn r0, $0
+	RETINSTR(mov, pc, r14)
+
+#undef	__syscall_error
+END (__syscall_error)
diff --git a/sysdeps/unix/sysv/linux/Dist b/sysdeps/unix/sysv/linux/Dist
index d4b6bac217..fc403871f3 100644
--- a/sysdeps/unix/sysv/linux/Dist
+++ b/sysdeps/unix/sysv/linux/Dist
@@ -13,8 +13,7 @@ net/if_ppp.h
 net/ppp-comp.h
 net/ppp_defs.h
 net/route.h
-netatalk/atalk.h
-netinet/icmp.h
+netatalk/at.h
 netinet/if_fddi.h
 netinet/if_tr.h
 netinet/igmp.h
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 4e698ce1d8..c61904a3b8 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -55,7 +55,8 @@ endif
 ifeq ($(subdir),inet)
 sysdep_headers += netinet/in_systm.h netinet/udp.h \
 		  netinet/if_fddi.h netinet/if_tr.h netinet/igmp.h \
-		  netinet/ip_fw.h  netinet/ip_icmp.h sys/socketvar.h
+		  netinet/ip_fw.h  netinet/ip_icmp.h netipx/ipx.h \
+		  sys/socketvar.h
 endif
 
 # Don't compile the ctype glue code, since there is no old non-GNU C library.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
new file mode 100644
index 0000000000..a71181c911
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -0,0 +1,51 @@
+/* Copyright (C) 1995, 1996, 1997 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
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <sysdep.h>
+
+/* We define errno here, to be consistent with Linux/i386.  */
+	.bss
+	.globl errno
+	.type errno,@object
+	.size errno,4
+errno:	.zero 4
+	.globl _errno
+	.type _errno,@object
+_errno = errno	/* This name is expected by hj's libc.so.5 startup code.  */
+	.text
+
+/* The following code is only used in the shared library when we
+   compile the reentrant version.  Otherwise each system call defines
+   each own version.  */
+
+#ifndef PIC
+
+/* The syscall stubs jump here when they detect an error.
+   The code for Linux is almost identical to the canonical Unix/i386
+   code, except that the error number in %eax is negated.  */
+
+#undef CALL_MCOUNT
+#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax.  */
+
+ENTRY (__syscall_error)
+	mvn r0, r0
+
+#define __syscall_error __syscall_error_1
+#include <sysdeps/unix/arm/sysdep.S>
+
+#endif	/* !PIC */
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index a38e4b3531..66fbeca73e 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -62,6 +62,7 @@
 /* Store (- %eax) into errno through the GOT.  */
 #ifdef _LIBC_REENTRANT
 #define SYSCALL_ERROR_HANDLER						      \
+  .type syscall_error,@function;					      \
 syscall_error:								      \
   pushl %ebx;								      \
   call 0f;								      \
@@ -77,11 +78,13 @@ syscall_error:								      \
   popl %ebx;								      \
   movl %ecx, (%eax);							      \
   movl $-1, %eax;							      \
-  ret;
+  ret;									      \
+  .size syscall_error,.-syscall_error;
 /* A quick note: it is assumed that the call to `__errno_location' does
    not modify the stack!  */
 #else
 #define SYSCALL_ERROR_HANDLER						      \
+  .type syscall_error,@function;					      \
 syscall_error:								      \
   call 0f;								      \
 0:popl %ecx;								      \
@@ -91,7 +94,8 @@ syscall_error:								      \
   movl errno@GOT(%ecx), %ecx;						      \
   movl %edx, (%ecx);							      \
   movl $-1, %eax;							      \
-  ret;
+  ret;									      \
+  .size syscall_error,.-syscall_error;
 #endif	/* _LIBC_REENTRANT */
 #endif	/* PIC */
 
diff --git a/sysdeps/unix/sysv/linux/net/if_arp.h b/sysdeps/unix/sysv/linux/net/if_arp.h
index b1cd18360e..d784f0cfc7 100644
--- a/sysdeps/unix/sysv/linux/net/if_arp.h
+++ b/sysdeps/unix/sysv/linux/net/if_arp.h
@@ -90,6 +90,8 @@ struct arphdr
 #define ARPHRD_ROSE	270
 #define ARPHRD_X25	271		/* CCITT X.25.  */
 #define ARPHRD_PPP	512
+#define ARPHRD_HDLC	513		/* (Cisco) HDLC.  */
+#define ARPHRD_LAPB	516		/* LAPB.  */
 
 #define ARPHRD_TUNNEL	768		/* IPIP tunnel.  */
 #define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel.  */
diff --git a/sysdeps/unix/sysv/linux/powerpc/Dist b/sysdeps/unix/sysv/linux/powerpc/Dist
index c8c265c474..27a951f169 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Dist
+++ b/sysdeps/unix/sysv/linux/powerpc/Dist
@@ -1,7 +1,6 @@
 clone.S
 ioctl-types.h
 termbits.h
-termios.h
 kernel_stat.h
 kernel_termios.h
 sys/kernel_termios.h
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
index 1c79f6a93c..7280315933 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
@@ -149,38 +149,3 @@ _dl_sysdep_open_zero_fill (void)
   return __open ("/dev/zero", O_RDONLY);
 }
 #endif
-
-/* Read the whole contents of FILE into new mmap'd space with given
-   protections.  *SIZEP gets the size of the file.  */
-
-void *
-_dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
-{
-  void *result;
-  struct stat st;
-  int fd = __open (file, O_RDONLY);
-  if (fd < 0)
-    return NULL;
-  if (__fstat (fd, &st) < 0)
-    result = NULL;
-  else
-    {
-      /* Map a copy of the file contents.  */
-      result = __mmap (0, st.st_size, prot,
-#ifdef MAP_COPY
-		       MAP_COPY
-#else
-		       MAP_PRIVATE
-#endif
-#ifdef MAP_FILE
-		       | MAP_FILE
-#endif
-		       , fd, 0);
-      if (result == (void *) -1)
-	result = NULL;
-      else
-	*sizep = st.st_size;
-    }
-  __close (fd);
-  return result;
-}
diff --git a/sysdeps/unix/sysv/linux/sparc/Dist b/sysdeps/unix/sysv/linux/sparc/Dist
index ab22392c04..c31f140137 100644
--- a/sysdeps/unix/sysv/linux/sparc/Dist
+++ b/sysdeps/unix/sysv/linux/sparc/Dist
@@ -1,6 +1,5 @@
 __sigtrampoline.S
 clone.S
-start.c
 pipe.S
 fork.S
 kernel_stat.h
diff --git a/sysdeps/wordsize-32/Dist b/sysdeps/wordsize-32/Dist
new file mode 100644
index 0000000000..625e4d0fc7
--- /dev/null
+++ b/sysdeps/wordsize-32/Dist
@@ -0,0 +1 @@
+inttypes.h
\ No newline at end of file
diff --git a/sysdeps/wordsize-32/Makefile b/sysdeps/wordsize-32/Makefile
new file mode 100644
index 0000000000..73b64ed054
--- /dev/null
+++ b/sysdeps/wordsize-32/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),stdlib)
+sysdep_headers += inttypes.h
+endif
\ No newline at end of file
diff --git a/sysdeps/wordsize-64/Dist b/sysdeps/wordsize-64/Dist
new file mode 100644
index 0000000000..625e4d0fc7
--- /dev/null
+++ b/sysdeps/wordsize-64/Dist
@@ -0,0 +1 @@
+inttypes.h
\ No newline at end of file
diff --git a/sysdeps/wordsize-64/Makefile b/sysdeps/wordsize-64/Makefile
new file mode 100644
index 0000000000..73b64ed054
--- /dev/null
+++ b/sysdeps/wordsize-64/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),stdlib)
+sysdep_headers += inttypes.h
+endif
\ No newline at end of file