mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-05 21:00:05 +00:00
Update.
<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.
This commit is contained in:
parent
b0de3e9e30
commit
714a562f0b
256
ChangeLog
256
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.
|
||||
|
8
Makefile
8
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:
|
||||
|
||||
|
14
Makerules
14
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
|
||||
|
4
PROJECTS
4
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
|
||||
|
15
README
15
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
|
||||
|
@ -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. */
|
||||
|
71
config.guess
vendored
71
config.guess
vendored
@ -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;
|
||||
}
|
||||
|
8
config.sub
vendored
8
config.sub
vendored
@ -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
|
||||
|
@ -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 \
|
||||
|
12
db/libdb.map
Normal file
12
db/libdb.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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])
|
||||
|
@ -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)
|
||||
|
7
elf/libdl.map
Normal file
7
elf/libdl.map
Normal file
@ -0,0 +1,7 @@
|
||||
GLIBC_2.0 {
|
||||
global:
|
||||
dladdr; dlclose; dlerror; dlopen; dlsym; dlvsym;
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
53
libc.map
Normal file
53
libc.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
@ -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
|
||||
|
7
locale/libBrokenLocale.map
Normal file
7
locale/libBrokenLocale.map
Normal file
@ -0,0 +1,7 @@
|
||||
GLIBC_2.0 {
|
||||
global:
|
||||
__ctype_get_mb_cur_max;
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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>
|
||||
|
7
login/libutil.map
Normal file
7
login/libutil.map
Normal file
@ -0,0 +1,7 @@
|
||||
GLIBC_2.0 {
|
||||
global:
|
||||
forkpty; login; login_tty; logout; logwtmp; openpty; updwtmp;
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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-%: ;
|
||||
|
||||
|
@ -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
|
||||
|
9
manual/examples/argp-ex1.c
Normal file
9
manual/examples/argp-ex1.c
Normal file
@ -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);
|
||||
}
|
25
manual/examples/argp-ex2.c
Normal file
25
manual/examples/argp-ex2.c
Normal file
@ -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);
|
||||
}
|
100
manual/examples/argp-ex3.c
Normal file
100
manual/examples/argp-ex3.c
Normal file
@ -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);
|
||||
}
|
144
manual/examples/argp-ex4.c
Normal file
144
manual/examples/argp-ex4.c
Normal file
@ -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);
|
||||
}
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 \
|
||||
|
9
math/libm.map
Normal file
9
math/libm.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
@ -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__) \
|
||||
|
@ -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
|
||||
|
||||
|
7
md5-crypt/libcrypt.map
Normal file
7
md5-crypt/libcrypt.map
Normal file
@ -0,0 +1,7 @@
|
||||
GLIBC_2.0 {
|
||||
global:
|
||||
crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r;
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
@ -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));
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
14
nis/libnsl.map
Normal file
14
nis/libnsl.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
11
nis/libnss_compat.map
Normal file
11
nis/libnss_compat.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
25
nis/libnss_nis.map
Normal file
25
nis/libnss_nis.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
32
nis/libnss_nisplus.map
Normal file
32
nis/libnss_nisplus.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -46,11 +46,9 @@ searchgroup (char *str)
|
||||
while (cptr[i] != '\0' && cptr[i] != ':')
|
||||
i++;
|
||||
if (i == 0) /* only "group=" ? */
|
||||
return (nis_name)"";
|
||||
return (nis_name) "";
|
||||
|
||||
strncpy (default_group, cptr, i);
|
||||
|
||||
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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 (buf[strlen (buf) - 1] != '.')
|
||||
strcat (buf, ".");
|
||||
if (len >= NIS_MAXNAMELEN - 1)
|
||||
/* XXX The buffer is too small. Can this happen??? */
|
||||
return strcpy (__principal, "nobody");
|
||||
|
||||
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';
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
if (NISENTRYVAL (0, 7, result) > 0)
|
||||
{
|
||||
char *line, *cp;
|
||||
|
||||
line = cp;
|
||||
cp = strchr (line, ':');
|
||||
if (cp == NULL)
|
||||
return 0;
|
||||
*cp++ = '\0';
|
||||
sp->sp_min = atol(line);
|
||||
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_max = 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_warn = 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_inact = 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_expire = atol(line);
|
||||
line = cp;
|
||||
cp = strchr (line, ':');
|
||||
if (cp == NULL)
|
||||
return 0;
|
||||
*cp++ = '\0';
|
||||
sp->sp_inact = atol(line);
|
||||
|
||||
line = cp;
|
||||
if (line == NULL)
|
||||
return 0;
|
||||
sp->sp_flag = 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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
20
nss/libnss_db.map
Normal file
20
nss/libnss_db.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
28
nss/libnss_files.map
Normal file
28
nss/libnss_files.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
9
resolv/libnss_dns.map
Normal file
9
resolv/libnss_dns.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
11
resolv/libresolv.map
Normal file
11
resolv/libresolv.map
Normal file
@ -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:
|
||||
*;
|
||||
};
|
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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))
|
@ -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))
|
||||
|
@ -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;
|
||||
|
@ -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__
|
||||
|
@ -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))
|
@ -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))
|
@ -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))
|
@ -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))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user