From 714a562f0bf855da3835adb2dbecc245e39f8759 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Jun 1997 21:38:55 +0000 Subject: Update. <1997-06-12 21:22 Ulrich Drepper * 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 . * manual/pattern.texi: Correct description of GLOB_MAGCHAR and GLOB_NOMAGIC. Changes by Roland McGrath . * 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 * 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 * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_parse_spent): Check if we have shadow information. 1997-06-08 19:33 Thorsten Kukuk * 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 * 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 * nss/getXXbyYY_r.c (do_weak_alias): Remove extra parentheses. 1997-06-11 13:22 Ulrich Drepper * misc/regexp.h (compile): Allow use of macro INIT for variable declaration. Add documentation for INIT. Reported by Robert Bihlmeyer . 1997-06-11 10:47 Philip Blundell * sysdeps/unix/sysv/linux/net/if_arp.h: Add two new hardware types. 1997-06-10 11:31 H.J. Lu * sysdeps/powerpc/strlen.s: Use -0x101 instead of 0xfffffeff for a signed 16-bit value. 1997-06-07 07:54 H.J. Lu * 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 * shlib-versions (.*-.*-linux.*): Set libc to 6. 1997-06-08 15:35 Thorsten Kukuk * 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 * 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 * 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 * stdlib/testsort.c (compare): Fix parameter types. 1997-06-04 19:05 Andreas Schwab * md5-crypt/Makefile (distribute): Fix name of file. 1997-06-04 19:02 Andreas Schwab * login/Makefile (utmpd-routines): Remove utmpd again, which is already added implicitly through $(others). 1997-06-05 13:43 Fila Kolodny * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add netipx/ipx.h. 1997-06-05 13:25 Andreas Jaeger * md5-crypt/md5-crypt.c: Add prototype for __md5_crypt. 1997-06-05 17:08 Ulrich Drepper * string/argz-addsep.c: Correct weak alias. Reported by Ben Pfaff . * 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 . 1997-06-04 12:41 Andreas Jaeger * 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. --- ChangeLog | 256 +++++++++++++++++++++++++++- Makefile | 8 +- Makerules | 14 +- PROJECTS | 4 +- README | 15 +- argp/argp-help.c | 13 +- config.guess | 71 +++++--- config.sub | 8 +- db/Makefile | 1 + db/libdb.map | 12 ++ elf/Makefile | 1 + elf/dl-lookup.c | 48 +++--- elf/dl-reloc.c | 2 +- elf/dl-version.c | 23 +-- elf/libdl.map | 7 + elf/link.h | 2 +- inet/arpa/tftp.h | 20 +-- libc.map | 53 ++++++ locale/Makefile | 1 + locale/libBrokenLocale.map | 7 + locale/setlocale.c | 9 +- login/Makefile | 3 +- login/getutent_r.c | 8 - login/libutil.map | 7 + login/login.c | 3 - login/programs/database.c | 28 --- login/programs/request.c | 7 +- login/programs/utmpd-private.h | 3 + login/programs/utmpd.c | 15 +- login/utmp_daemon.c | 4 - login/utmp_file.c | 9 +- login/utmpname.c | 8 - manual/.cvsignore | 2 +- manual/Makefile | 21 ++- manual/arith.texi | 2 +- manual/examples/argp-ex1.c | 9 + manual/examples/argp-ex2.c | 25 +++ manual/examples/argp-ex3.c | 100 +++++++++++ manual/examples/argp-ex4.c | 144 ++++++++++++++++ manual/intro.texi | 2 +- manual/libc.texinfo | 6 + manual/pattern.texi | 157 ++++++++++++++++- manual/texinfo.tex | 26 ++- math/Makefile | 2 + math/libm.map | 9 + math/math.h | 9 +- md5-crypt/Makefile | 3 +- md5-crypt/libcrypt.map | 7 + md5-crypt/md5-crypt.c | 1 + misc/regexp.h | 8 +- nis/Makefile | 4 + nis/libnsl.map | 14 ++ nis/libnss_compat.map | 11 ++ nis/libnss_nis.map | 25 +++ nis/libnss_nisplus.map | 32 ++++ nis/nis_add.c | 2 +- nis/nis_addmember.c | 15 +- nis/nis_call.c | 18 +- nis/nis_clone.c | 48 ++++-- nis/nis_creategroup.c | 4 +- nis/nis_defaults.c | 10 +- nis/nis_destroygroup.c | 4 +- nis/nis_getservlist.c | 11 +- nis/nis_ismember.c | 17 +- nis/nis_local_names.c | 73 ++++---- nis/nis_modify.c | 2 +- nis/nis_ping.c | 4 +- nis/nis_print_group_entry.c | 4 +- nis/nis_remove.c | 2 +- nis/nis_removemember.c | 29 +++- nis/nis_server.c | 4 +- nis/nis_table.c | 6 +- nis/nis_verifygroup.c | 4 +- nis/nss_nis/nis-hosts.c | 2 +- nis/nss_nis/nis-netgrp.c | 4 +- nis/nss_nisplus/nisplus-hosts.c | 2 +- nis/nss_nisplus/nisplus-spwd.c | 98 ++++++----- nss/Makefile | 2 + nss/getXXbyYY_r.c | 2 +- nss/libnss_db.map | 20 +++ nss/libnss_files.map | 28 +++ posix/glob.c | 6 +- posix/glob.h | 8 +- posix/unistd.h | 2 +- resolv/Makefile | 2 + resolv/libnss_dns.map | 9 + resolv/libresolv.map | 11 ++ shlib-versions | 10 +- stdlib/Makefile | 2 +- stdlib/testsort.c | 2 +- string/argz-addsep.c | 4 +- sunrpc/Makefile | 13 +- sysdeps/i386/add_n.S | 3 + sysdeps/i386/addmul_1.S | 3 + sysdeps/i386/dl-machine.h | 4 +- sysdeps/i386/fpu/__math.h | 6 +- sysdeps/i386/lshift.S | 3 + sysdeps/i386/rshift.S | 3 + sysdeps/i386/sub_n.S | 3 + sysdeps/i386/submul_1.S | 3 + sysdeps/libm-ieee754/s_fmin.c | 2 +- sysdeps/powerpc/fenvbits.h | 2 +- sysdeps/powerpc/fraiseexcpt.c | 4 +- sysdeps/powerpc/strlen.s | 10 +- sysdeps/unix/arm/brk.S | 43 +++++ sysdeps/unix/arm/sysdep.S | 49 ++++++ sysdeps/unix/sysv/linux/Dist | 3 +- sysdeps/unix/sysv/linux/Makefile | 3 +- sysdeps/unix/sysv/linux/arm/sysdep.S | 51 ++++++ sysdeps/unix/sysv/linux/i386/sysdep.h | 8 +- sysdeps/unix/sysv/linux/net/if_arp.h | 2 + sysdeps/unix/sysv/linux/powerpc/Dist | 1 - sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c | 35 ---- sysdeps/unix/sysv/linux/sparc/Dist | 1 - sysdeps/wordsize-32/Dist | 1 + sysdeps/wordsize-32/Makefile | 3 + sysdeps/wordsize-64/Dist | 1 + sysdeps/wordsize-64/Makefile | 3 + 118 files changed, 1590 insertions(+), 433 deletions(-) create mode 100644 db/libdb.map create mode 100644 elf/libdl.map create mode 100644 libc.map create mode 100644 locale/libBrokenLocale.map create mode 100644 login/libutil.map create mode 100644 manual/examples/argp-ex1.c create mode 100644 manual/examples/argp-ex2.c create mode 100644 manual/examples/argp-ex3.c create mode 100644 manual/examples/argp-ex4.c create mode 100644 math/libm.map create mode 100644 md5-crypt/libcrypt.map create mode 100644 nis/libnsl.map create mode 100644 nis/libnss_compat.map create mode 100644 nis/libnss_nis.map create mode 100644 nis/libnss_nisplus.map create mode 100644 nss/libnss_db.map create mode 100644 nss/libnss_files.map create mode 100644 resolv/libnss_dns.map create mode 100644 resolv/libresolv.map create mode 100644 sysdeps/unix/arm/brk.S create mode 100644 sysdeps/unix/arm/sysdep.S create mode 100644 sysdeps/unix/sysv/linux/arm/sysdep.S create mode 100644 sysdeps/wordsize-32/Dist create mode 100644 sysdeps/wordsize-32/Makefile create mode 100644 sysdeps/wordsize-64/Dist create mode 100644 sysdeps/wordsize-64/Makefile 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 + + * 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 . + + * manual/pattern.texi: Correct description of GLOB_MAGCHAR and + GLOB_NOMAGIC. Changes by Roland McGrath . + + * 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 + + * 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 + + * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_parse_spent): + Check if we have shadow information. + +1997-06-08 19:33 Thorsten Kukuk + + * 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 + + * 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 + + * nss/getXXbyYY_r.c (do_weak_alias): Remove extra parentheses. + +1997-06-11 13:22 Ulrich Drepper + + * misc/regexp.h (compile): Allow use of macro INIT for variable + declaration. Add documentation for INIT. + Reported by Robert Bihlmeyer . + +1997-06-11 10:47 Philip Blundell + + * sysdeps/unix/sysv/linux/net/if_arp.h: Add two new hardware types. + +1997-06-10 11:31 H.J. Lu + + * sysdeps/powerpc/strlen.s: Use -0x101 instead of 0xfffffeff + for a signed 16-bit value. + +1997-06-07 07:54 H.J. Lu + + * 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 + + * shlib-versions (.*-.*-linux.*): Set libc to 6. + +1997-06-08 15:35 Thorsten Kukuk + + * 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 + + * 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 + + * 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 + + * stdlib/testsort.c (compare): Fix parameter types. + +1997-06-04 19:05 Andreas Schwab + + * md5-crypt/Makefile (distribute): Fix name of file. + +1997-06-04 19:02 Andreas Schwab + + * login/Makefile (utmpd-routines): Remove utmpd again, which is + already added implicitly through $(others). + +1997-06-05 13:43 Fila Kolodny + + * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add netipx/ipx.h. + +1997-06-05 13:25 Andreas Jaeger + + * md5-crypt/md5-crypt.c: Add prototype for __md5_crypt. + +1997-06-05 17:08 Ulrich Drepper + + * string/argz-addsep.c: Correct weak alias. + Reported by Ben Pfaff . + + * 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 . + +1997-06-04 12:41 Andreas Jaeger + + * manual/intro.texi (XPG): Correct some typos. + 1997-06-04 05:09 Miles Bader * 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 @@ -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 + 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 -. +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 . 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 </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 < 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 -#include "../stdio-common/_itoa.h" +#include #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 #include -#include "../stdio-common/_itoa.h" +#include /* 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 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 -#if _LIBC #include -#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 #include #include 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 #include -#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 #include #include +#include #include #include #include @@ -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 -#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 #include #include 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 + +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 + +const char *argp_program_version = + "argp-ex2 1.0"; +const char *argp_program_bug_address = + ""; + +/* 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} wil