platform/upstream/glibc.git
28 years ago* elf/Makefile (LDFLAGS-dl.so): New variable.
Roland McGrath [Wed, 3 Jul 1996 19:07:09 +0000 (19:07 +0000)]
* elf/Makefile (LDFLAGS-dl.so): New variable.

(libdl.so): Depend on eval.so.
(distribute): Add eval.c.
* elf/eval.c: New file.

28 years agoWed Jul 3 11:26:28 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Wed, 3 Jul 1996 18:51:10 +0000 (18:51 +0000)]
Wed Jul  3 11:26:28 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* time/strftime.c (strftime: do_number): Adjust P and I after sprintf
in case it wrote fewer than MAXDIGITS chars.

* stdio/fwrite.c (fwrite: fill_buffer): Separate flushing for last
newline from flushing full buffer in loop, fix test so no fflush is
done when last byte written exactly fills the buffer.

* nss/Makefile ($(services:%=$(objpfx)libnss_%.so)): Depend on libc.so.

* sysdeps/mach/hurd/Makefile (LDLIBS-c.so): Variable removed.
(libc.so): Instead, give this deps on lib{mach,hurd}user.so.

* elf/dl-debug.c (_dl_debug_initialize): Use LDBASE arg instead of
extracting _dl_rtld_map.l_addr.

* sysdeps/i386/dl-machine.h (elf_machine_rel): Declare _dl_rtld_map as
weak.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Likewise.

* shlib-versions (*-*-*): Set libnss_db=1.

* elf/rtld.c (dl_main): Set _dl_rtld_map's DT_DEBUG location too.

28 years agoWed Jul 3 11:26:28 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Wed, 3 Jul 1996 18:50:39 +0000 (18:50 +0000)]
Wed Jul  3 11:26:28 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* shlib-versions (*-*-*): Set libnss_db=1.

28 years ago(login): Only Frob OLD->ut_type if getutline_r actually found any entry. cvs/libc-960703
Miles Bader [Wed, 3 Jul 1996 05:22:21 +0000 (05:22 +0000)]
(login): Only Frob OLD->ut_type if getutline_r actually found any entry.

28 years agoTue Jul 2 10:44:37 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Tue, 2 Jul 1996 22:18:48 +0000 (22:18 +0000)]
Tue Jul  2 10:44:37 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* elf/rtld.c (dl_main): Set _dl_rtld_map's DT_DEBUG location too.

28 years ago* rpm/template (%build): Use @prefix@ instead of always /usr.
Roland McGrath [Tue, 2 Jul 1996 21:57:31 +0000 (21:57 +0000)]
* rpm/template (%build): Use @prefix@ instead of always /usr.

Set up configparms only if @prefix@ is in fact /usr.
* rpm/Makefile ($(config)): Substitute $(prefix) for @prefix@.

28 years ago* elf/Makefile: Add missing endif.
Roland McGrath [Tue, 2 Jul 1996 21:53:43 +0000 (21:53 +0000)]
* elf/Makefile: Add missing endif.

28 years ago* nss/nss_files/files-ethers.c (ntohost): Fix db key.
Roland McGrath [Tue, 2 Jul 1996 19:42:29 +0000 (19:42 +0000)]
* nss/nss_files/files-ethers.c (ntohost): Fix db key.

28 years ago* nss/nss_files/files-network.c: Pass empty for new DB_LOOKUP args.
Roland McGrath [Tue, 2 Jul 1996 19:35:40 +0000 (19:35 +0000)]
* nss/nss_files/files-network.c: Pass empty for new DB_LOOKUP args.

(DATABASE): Define this instead of DATAFILE.
* nss/nss_files/files-hosts.c: Likewise.
(hostbyname): Use LOOKUP_NAME macro.

* nss/nss_db/db-XXX.c: New file.
* nss/Makefile (services): Add db.
(libnss_db-inhibit-o): New variable.
(libnss_db-routines): New variable.
(distribute): Append db-XXX.c.
(libnss_db.so): Depend on libdb.so and libnss_files.so.
($(libnss_db-routines:%=$(objpfx)%.c)): New static pattern rule.

* nss/nss_files/files-XXX.c (DB_LOOKUP): Add KEYSIZE and KEYPATTERN
args, ignored.
(DATAFILE): New macro.
* nss/nss_files/files-parse.c (GENERIC): If undefined, define to
"files-XXX.c".
* nss/nss_files/files-rpc.c: Include GENERIC instead of "files-XXX.c".
Pass db key args to DB_LOOKUP.
(DATAFILE): Macro removed.
(DATABASE): New macro replaces it, lacks "/etc/" prefix.
* nss/nss_files/files-service.c: Likewise.
* nss/nss_files/files-pwd.c: Likewise.
* nss/nss_files/files-proto.c: Likewise.
* nss/nss_files/files-grp.c: Likewise.
* nss/nss_files/files-ethers.c: Likewise.

* elf/linux-compat.c: File removed.
* elf/Makefile (distribute): Remove linux-compat.c.
(ld-linux.so.1): Remove target and associated variables.

* sunrpc/xdr.c: Remove malloc decl.
* sunrpc/portmap.c: Likewise.

* sunrpc/svc_tcp.c (abort): Don't declare.  Instead define as macro
casting abort to fn returning bool_t.

* nss/nss_files/files-parse.c [EXTERN_PARSER]: Do an extern decl of
the parser function.
[EXTERN_PARSER] (LINE_PARSER): Define to empty.
* nss/nss_files/files-pwd.c (EXTERN_PARSER): Define it.
* nss/nss_files/files-grp.c: Likewise.

* Makeconfig (BUILD_CC): If undefined, define to $(CC).

* sunrpc/rpc/types.h: Include stdlib.h instead of declaring malloc.

* Makeconfig (built-program-cmd): Use $(rtld-installed-name) in place
of ld.so so lookups for that soname find it.

* nss/Makefile (libnss_dns.so): Depend on libresolv.so.
(resobjdir, LDLIBS-nss_dns.so): Variables removed.

28 years agoTue Jul 2 10:44:37 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Tue, 2 Jul 1996 17:43:35 +0000 (17:43 +0000)]
Tue Jul  2 10:44:37 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* pwd/fgetpwent.c: Don't include ../nss/nss_files/files-parse.c to
define parse_line function.
(parse_line): #define to _nss_files_parse_pwent and
add extern decl for that.

* nss/nss_files/files-XXX.c (internal_getent): Return
NSS_STATUS_TRYAGAIN for ERANGE error.

* sysdeps/i386/strtok.S (LreturnNULL): Save current state ptr instead
of null, so next round returns null again instead of bombing.  Fix
from drepper.

* nss/nss_files/files-parse.c (LINE_PARSER): Take new first arg EOLSET.
Remove ; after `ENTDATA_DECL (data)'.
Truncate line at strpbrk (line, EOLSET "\n").
(ENTDATA_DECL): Put ; at end.
(MIDLINE_COMMENTS): Macro removed.
* nss/nss_files/files-ethers.c: Pass new argument.
* nss/nss_files/files-hosts.c: Likewise.
* nss/nss_files/files-network.c: Likewise.
* nss/nss_files/files-parse.c: Likewise.
* nss/nss_files/files-proto.c: Likewise.
* nss/nss_files/files-rpc.c: Likewise.
* nss/nss_files/files-service.c: Likewise.
* grp/fgetgrent.c: Likewise.
* pwd/fgetpwent.c: Likewise.
* nss/nss_files/files-pwd.c: Get parse_line with extern decl, since
fgetpwent.c already defines it.
* nss/nss_files/files-grp.c: Likewise.

* elf/dl-load.c (_dl_map_object): Use any object with matching l_name
as well as any matching with l_libname.  Fix DT_SONAME lookup to use
string table properly.

* elf/rtld.c (dl_main): Set _dl_rtld_map.l_name from _dl_argv[0] when
invoked directly, and l_libname from that if PT_INTERP missing.
Set l_name from l_libname only if not set from argv.

* time/europe, time/northamerica: Updated from ADO 96i.

* stdio-common/tst-ungetc.c: Include unistd.h.

28 years agoMon Jul 1 15:44:34 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-960702
Roland McGrath [Mon, 1 Jul 1996 23:04:49 +0000 (23:04 +0000)]
Mon Jul  1 15:44:34 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* inet/Makefile (routines): Change getnetbypt to getnetbyad.

Mon Jul  1 12:29:50 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* nss/Makefile (databases): Change host to hosts.
* nss/host-lookup.c: Renamed to nss/hosts-lookup.c.

* nss/nsswitch.c (nss_parse_service_list): Use const for NAME.

* nss/nss_files/files-parse.c (parse_list): Correct alignment fixup.

* string/string.h (strndupa): Pass missing arg to strnlen.

* inet/getnetbypt_r.c: Renamed to ...
* inet/getnetbyad_r.c: this; fixed function name.
* inet/getnetbypt.c: Renamed to ...
* inet/getnetbyad.c: this; fixed function name.

Sat Jun 29 01:08:35 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* grp/getgrgid_r.c (LOOKUP_TYPE): Define to struct group, not
struct passwd.

Fri Jun 28 16:53:01 1996  David Mosberger-Tang  <davidm@azstarnet.com>

* resolv/res_hconf.c (strndup): Remove function.

* nss/nsswitch.c (nss_lookup_function): Declare loadbase and ref
using ElfW() instead of Elf32_*.

* sysdeps/unix/sysv/linux/alpha/init-first.h,
  sysdeps/unix/sysv/linux/m68k/init-first.h,
  sysdeps/unix/sysv/linux/i386/init-first.h: New files.
* sysdeps/unix/sysv/linux/init-first.c: Use platform-dependent
  init-first.h to make abstract machine dependent parts of
initialization.

* sysdeps/unix/alpha/sysdep.h: Undo PIC-optimization of syscall
error handling.  It's safer that way.

* sysdeps/unix/alpha/sysdep.S: Make ldgp part of the prologue.
Fix by Richard Henderson.

* sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt): Fix
  typo/extraneous whitespace.

* sunrpc/xdr.c (xdr_int, xdr_u_int): Use <limits.h> to test
determine what integer sizes we're dealing with.

* hurd/hurdsig.c (_hurd_internal_post_signal): In pending signal
check for signal zero, repair logical sense of test by
parenthesizing correctly.

Thu Jun 27 04:04:27 1996  David Mosberger-Tang  <davidm@azstarnet.com>

* configure.in (config_machine): Make ELF the default even for
Linux/Alpha unless a configuration of the form *-*-linux*ecoff
is specified.

* nss/nss_files/files-hosts.c (ENTDATA): Define it.
* nss/nss_files/files-parse.c (struct parser_data): Define entdata
member only #ifdef ENTDATA.
(ENTDATA_DECL): New macro.
(LINE_PARSER): Use it for entdata decl.
(parse_list): Find the space for LIST from DATA->linebuffer instead of
from the input LINE, which might not be writable buffer space.
(LINE_PARSER): Use `parser_stclass' in place of `static inline'.
[ENTDATA] (parser_stclass): #define to `static inline'.
[!ENDATA] (parser_stclass): #define to empty.
[!ENTDATA] (parse_line): #define to _nss_files_parse_ENTNAME; the
function is exported to -lnss_files users.

* string/strndup.c: Add missing arg.

* string/strndup.c (strndup): Always terminate the string.

28 years agoAdd *.mo
Roland McGrath [Mon, 1 Jul 1996 23:03:12 +0000 (23:03 +0000)]
Add *.mo

28 years ago* hurd/report-wait.c (describe_number): Make I unsigned long.
Miles Bader [Mon, 1 Jul 1996 22:37:26 +0000 (22:37 +0000)]
* hurd/report-wait.c (describe_number): Make I unsigned long.

28 years ago(describe_number): Make I unsigned long.
Miles Bader [Mon, 1 Jul 1996 22:35:18 +0000 (22:35 +0000)]
(describe_number): Make I unsigned long.

28 years agoMon Jul 1 12:29:50 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Mon, 1 Jul 1996 22:16:41 +0000 (22:16 +0000)]
Mon Jul  1 12:29:50 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* nss/Makefile (databases): Change host to hosts.
* nss/host-lookup.c: Renamed to nss/hosts-lookup.c.

28 years agoMon Jul 1 12:29:50 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Mon, 1 Jul 1996 22:16:08 +0000 (22:16 +0000)]
Mon Jul  1 12:29:50 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* inet/Makefile (routines): Change getnetbypt to getnetbyad.
* inet/getnetbypt_r.c: Renamed to ...
* inet/getnetbyad_r.c: this; fixed function name.
* inet/getnetbypt.c: Renamed to ...
* inet/getnetbyad.c: this; fixed function name.

28 years agoMon Jul 1 13:32:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
Miles Bader [Mon, 1 Jul 1996 19:33:30 +0000 (19:33 +0000)]
Mon Jul  1 13:32:42 1996  Miles Bader  <miles@gnu.ai.mit.edu>

* login/login.c (login): Only Frob OLD->ut_type if getutline_r
actually found any entry.

* login/pututline_r.c (pututline_r): If not located after any
entry don't use UTMP_DATA->ubuf, and seek to the end before adding.
Lock the file before stating.

28 years ago(pututline_r): If not located after any entry don't use UTMP_DATA->ubuf, and seek...
Miles Bader [Mon, 1 Jul 1996 19:19:08 +0000 (19:19 +0000)]
(pututline_r): If not located after any entry don't use UTMP_DATA->ubuf, and   seek to the end before adding.  Lock the file before stating.

28 years agoFri Jun 28 15:46:02 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
Roland McGrath [Mon, 1 Jul 1996 18:10:03 +0000 (18:10 +0000)]
Fri Jun 28 15:46:02 1996  Michael I. Bushnell, p/BSG  <mib@gnu.ai.mit.edu>

* hurd/hurdsig.c (_hurd_internal_post_signal): In pending signal
check for signal zero, repair logical sense of test by
parenthesizing correctly.

28 years agoFri Jun 28 15:46:02 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
Roland McGrath [Mon, 1 Jul 1996 18:00:14 +0000 (18:00 +0000)]
Fri Jun 28 15:46:02 1996  Michael I. Bushnell, p/BSG  <mib@gnu.ai.mit.edu>

* hurd/hurdsig.c (_hurd_internal_post_signal): In
  check-for-pending signals code, release _hurd_siglock before
  jumping to deliver_pending.

* hurd/hurdsig.c (_hurd_internal_post_signal): In pending signal
check for signal zero, repair logical sense of test by
parethisizing correctly.

28 years agoSat Jun 29 00:02:11 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Roland McGrath [Mon, 1 Jul 1996 16:32:03 +0000 (16:32 +0000)]
Sat Jun 29 00:02:11 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* string/strndup.c (strndup): Properly terminate the new
string; add missing second argument to strnlen.
* string/string.h (strndupa): Likewise.

28 years agoFri Jun 28 23:25:35 1996 Miles Bader <miles@gnu.ai.mit.edu> cvs/libc-960629 cvs/libc-960630 cvs/libc-960701
Miles Bader [Sat, 29 Jun 1996 03:40:40 +0000 (03:40 +0000)]
Fri Jun 28 23:25:35 1996  Miles Bader  <miles@gnu.ai.mit.edu>

* login/login.c (login): Initialize DATA so that setutent_r will
  actually do something.

28 years ago(login): Initialize DATA so that setutent_r will actually do something.
Miles Bader [Sat, 29 Jun 1996 03:37:49 +0000 (03:37 +0000)]
(login): Initialize DATA so that setutent_r will actually do something.

28 years ago(_hurd_internal_post_signal): In check-for-pending signals code, release _hurd_sigloc...
Thomas Bushnell, BSG [Fri, 28 Jun 1996 20:29:45 +0000 (20:29 +0000)]
(_hurd_internal_post_signal): In check-for-pending signals code, release _hurd_siglock before jumping to deliver_pending.

28 years ago(_hurd_internal_post_signal): In pending signal check for signal zero, repair logical...
Thomas Bushnell, BSG [Fri, 28 Jun 1996 19:44:50 +0000 (19:44 +0000)]
(_hurd_internal_post_signal): In pending signal check for signal zero, repair logical sense of test by parethisizing correctly.

28 years ago(mips:*:*:UMIPS): Fix typo in last change.
Richard Kenner [Fri, 28 Jun 1996 17:28:58 +0000 (17:28 +0000)]
(mips:*:*:UMIPS): Fix typo in last change.

28 years agoFri Jun 28 07:27:10 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Fri, 28 Jun 1996 11:42:05 +0000 (11:42 +0000)]
Fri Jun 28 07:27:10 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* string/strndup.c (strndup): Always terminate the string.
* string/string.h (strndupa): Likewise.

Thu Jun 27 14:22:31 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* stdio/Makefile (routines): Add vscanf.
* stdio-common/Makefile (routines): Remove vscanf.
* stdio-common/vscanf.c: Move to ...
* stdio/vscanf.c: here.

* rpm/Makefile (headers, install-lib, install-lib.so,
versioned, install-bin, install-sbin, install-data,
install-others): Add $(-VARIABLE).

28 years agoFri Jun 28 02:41:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-960628
Roland McGrath [Fri, 28 Jun 1996 08:56:59 +0000 (08:56 +0000)]
Fri Jun 28 02:41:08 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* nss/Makefile (databases): New variable.
(routines, libnss_files-routines): Use it.
(subdir-dirs): Compute from $(services).

* sysdeps/unix/sysv/linux/syscalls.list (create_module, delete_module,
init_module, klogctl): Use EXTRA in the "caller" column so these get
added to unix-extra-syscalls and thus compiled in misc.

* string/Makefile (routines): Add strndup.
* string/strndup.c: New file.
* string/string.h: Declare strndup.
(strndupa): New macro.

* string/string.h: Declare __strdup.
* string/strdup.c: Deansideclized.  Define __ name and weak alias.

* string/string.h: Don't define memccpy as macro for [__OPTIMIZE__].

Thu Jun 27 23:43:22 1996  Richard Henderson  <rth@tamu.edu>

* sysdeps/alpha/dl-machine.h (elf_machine_rela):  The Alpha's
address-of operation and plt format conspire to require all
dynamic relocs to be resolved to actual symbols not plt entries.

Thu Jun 27 02:49:28 1996  Ulrich Drepper  <drepper@cygnus.com>

* catgets/gencat.c: Add casts to avoid signed<->unsigned warnings.

* grp/initgroups.c (initgroups): De-ansi-fy.
Move declaration of NGROUPS and GROUPS outside #if so that
the code compiles for NGROUPS_MAX != 0.

* inet/Makefile (headers): Add netinet/ether.h and netinet/if_ether.h.
(routines): Add ether_aton, ether_aton_r, ether_hton, ether_line,
ether_ntoa, ether_ntoa_r, and ether_ntoh.
* inet/ether_aton.c, inet/ether_aton_r.c, inet/ether_hton.c,
inet/ether_line.c, inet/ether_ntoa.c, inet/ether_ntoa_r.c,
inet/ether_ntoh.c: New files.  Implementation of functions to
handle Ethernet address to host mapping.
* inet/netinet/ether.h: New file.  Declare ether_* functions.
* netinet/ether.h: Wrapper around inet/netinet/ether.h for glibc
compilation.
* nss/ethers-lookup.c: New file.  Lookup function for ethers database.
* nss/Makefile (routines): Add ethers-lookup.
(libnss_files-routines): Add files-ethers.

* nss/getXXent_r.c: Don't define set*ent and end*ent function
with _r suffix.

* nss/nss_files/files-XXX.c (internal_endent): Don't reset
KEEP_STREAM every time called.
(_nss_files_end): Reset KEEP_STREAM here instead.
(internal_getent): If STREAM == NULL try to open instead of
signalling error.
Use cast to prevent warning.
Terminate read line in case the buffer is too small.

* nss/nss_files/files-ethers.c: New file.  Implementation of
Ethernet adress<->hostname lookup through files interface.

* stdlib/mbstowcs.c: Define based on mbsrtowcs().
* stdlib/mbtowc.c: Define based on mbrtowc().
* stdlib/wcstombs.c: Define based on wcsrtombs().
* stdlib/wctomb.c: Define based on wcrtomb().

* sunrpc/xdr.c (xdr_u_int): Avoid bogus call to
unexpected_sizes_in_xdr_u_int.

* sysdeps/generic/netinet/if_ether.h: New file.  Generic declaration
of `struct ether_addr'.
* sysdeps/unix/sysv/linux/netinet/if_ether.h: New file.  Linux specific
declaration of `struct ether_addr'.

* wcsmbs/mbrtowc.c: Handle case where argument PS is NULL.
* wcsmbs/mbsrtowcs.c: Ditto.
* wcsmbs/wcrtomb.c: Ditto.
* wcsmbs/wcsrtombs.c: Ditto.

* wcsmbs/mbsinit.c: Prepare for PS being NULL.

28 years agoThu Jun 27 23:43:22 1996 Richard Henderson <rth@tamu.edu>
Roland McGrath [Fri, 28 Jun 1996 06:39:22 +0000 (06:39 +0000)]
Thu Jun 27 23:43:22 1996  Richard Henderson  <rth@tamu.edu>

* sysdeps/alpha/dl-machine.h (elf_machine_rela):  The Alpha's
address-of operation and plt format conspire to require all
dynamic relocs to be resolved to actual symbols not plt entries.

28 years ago* hurd/get-host.c <fcntl.h>: New include. cvs/libc-960627
Miles Bader [Wed, 26 Jun 1996 21:07:21 +0000 (21:07 +0000)]
* hurd/get-host.c <fcntl.h>: New include.

* hurd/set-host.c <fcntl.h>: New include.
(_hurd_set_host_config): Include NEW in args to dir_link.
Return NWROTE, not NREAD.

28 years agoWed Jun 26 13:19:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
Miles Bader [Wed, 26 Jun 1996 17:46:38 +0000 (17:46 +0000)]
Wed Jun 26 13:19:35 1996  Miles Bader  <miles@gnu.ai.mit.edu>

* sysdeps/mach/hurd/getcwd.c
(_hurd_canonicalize_directory_name_internal): Don't deallocate
DOTID & DOTDEVID until we're finished with them (we need to keep
them at least until we've fetched the next level of id ports, so
that mach will be able to use the same name if they're the same).
Add inner_errlose: label, which deallocates DOTID & DOTDEVID and
jumps to errlose, for those places where such cleanup is needed.

28 years ago(_hurd_canonicalize_directory_name_internal): Don't deallocate DOTID & DOTDEVID...
Miles Bader [Wed, 26 Jun 1996 17:44:44 +0000 (17:44 +0000)]
(_hurd_canonicalize_directory_name_internal):   Don't deallocate DOTID & DOTDEVID until we're finished with them (we need     to keep them at least until we've fetched the next level of id ports, so     that mach will be able to use the same name if they're the same).   Add inner_errlose: label, which deallocates DOTID & DOTDEVID and jumps to     errlose, for those places where such cleanup is needed.

28 years agoWed Jun 26 01:58:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Wed, 26 Jun 1996 15:46:01 +0000 (15:46 +0000)]
Wed Jun 26 01:58:49 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* nss/nss_files/files-parse.c (parse_list): Count null in EOL calc.

Move DB code into separate -ldb library.
* db/Makefile (extra-libs): New variable, list libdb.
(routines): Renamed to libdb-routines.
* shlib-versions: Add libdb=2.

* nss/network-lookup.c (DEFAULT_CONFIG): New macro.
* nss/host-lookup.c (DEFAULT_CONFIG): New macro.

* nss/nsswitch.c (nss_parse_service_list): Use __strncasecmp instead
of strncasecmp.  Extend syntax to grok [!foo=bar].

* sysdeps/generic/strncase.c: Define __strncasecmp with strncasecmp as
weak alias.
* string/string.h: Declare __strncasecmp.

* nss/nsswitch.c (nss_parse_file): Call __getline, not getline.
(service_alias): Variable removed.
(nss_parse_service_list): New function, broken out of nss_getline.
Remove alias conversion; we will just use symlinks.
(__nss_database_lookup): Take new string arg DEFCONFIG.
If no entry exists, make one with service list parsed from that.
* nss/nsswitch.h: Update protocol for __nss_database_lookup.
* nss/XXX-lookup.c (DEFAULT_CONFIG): New macro, set to 0 if undefined.
(DB_LOOKUP_FCT): Pass it to _nss_database_lookup.

* grp/initgroups.c: Rewritten using getgrent.  Handle unlimited group
list size.

* sunrpc/xdr.c (xdr_int): #if 0 out unresolved references in dead code.

Wed Jun 26 01:56:50 1996  Ulrich Drepper  <drepper@cygnus.com>

* locale/programs/locale.c (long_options): Short form of
--version option is `-V'.
(main): Recognize `-V' as option, not `-v'.
Call `usage' instead of printing error message for illegal
option.
(usage): Document `-V'.

28 years agoWed Jun 26 01:58:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-960626
Roland McGrath [Wed, 26 Jun 1996 06:13:37 +0000 (06:13 +0000)]
Wed Jun 26 01:58:49 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* sunrpc/xdr.c (xdr_int): #if 0 out unresolved references in dead code.

28 years agoTue Jun 25 17:22:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
Miles Bader [Tue, 25 Jun 1996 21:50:49 +0000 (21:50 +0000)]
Tue Jun 25 17:22:55 1996  Miles Bader  <miles@gnu.ai.mit.edu>

* sysdeps/mach/hurd/getcwd.c
(_hurd_canonicalize_directory_name_internal): Initialize PARENT to
THISDIR, and don't ever deallocate PARENT unless it's != THISDIR.

28 years ago(_hurd_canonicalize_directory_name_internal): Initialize PARENT to THISDIR, and...
Miles Bader [Tue, 25 Jun 1996 21:48:49 +0000 (21:48 +0000)]
(_hurd_canonicalize_directory_name_internal): Initialize PARENT to   THISDIR, and don't ever deallocate PARENT unless it != THISDIR.

28 years agoTue Jun 25 10:58:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Tue, 25 Jun 1996 18:22:06 +0000 (18:22 +0000)]
Tue Jun 25 10:58:23 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* inet/getrpcent.c: Fix macros.
* inet/getrpcent_r.c: Fix macros.

* elf/dlsym.c (dlsym): Search the global scope if HANDLE is null.

* elf/dl-load.c (_dl_map_object_from_fd): Initialize L.

28 years agoTue Jun 25 09:55:47 1996 David Mosberger-Tang <davidm@AZStarNet.com>
Roland McGrath [Tue, 25 Jun 1996 13:56:54 +0000 (13:56 +0000)]
Tue Jun 25 09:55:47 1996  David Mosberger-Tang  <davidm@AZStarNet.com>

* catgets/gencat.c (write_out): Use %Zu to print variables of type
  size_t.
* resolv/res_debug.c (__p_rr): Print size_t variable as %lu and
cast it to (unsigned long) to make it work both on 32 and 64
bit architectures.

Sat Jun 22 13:05:25 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* locale/Makefile (distribute): Add `programs/' prefix to all
files in that directory.

* Makerules (distinfo-vars): Assign subdir directly so that `ifdef
subdir' works.

* MakeTAGS (sources, headers): Make them simply expanded variables
so that all-dist is expanded before it is changed.

28 years ago* Make-dist (dist): Don't depend on crypt tar file. Remove that rule.
Roland McGrath [Tue, 25 Jun 1996 13:49:53 +0000 (13:49 +0000)]
* Make-dist (dist): Don't depend on crypt tar file.  Remove that rule.

28 years ago* Makefile (subdirs): Remove crypt.
Roland McGrath [Tue, 25 Jun 1996 13:46:05 +0000 (13:46 +0000)]
* Makefile (subdirs): Remove crypt.

* crypt: Directory removed.  It will be made an independent library
distribution.

* Makefile (distribute): Add rpm/{Makefile,teplate,rpmrc}.

28 years ago* inet/getrpcent_r.c (DATABASE_NAME): New macro.
Roland McGrath [Tue, 25 Jun 1996 13:40:47 +0000 (13:40 +0000)]
* inet/getrpcent_r.c (DATABASE_NAME): New macro.

28 years ago* inet/getrpcbynumber.c (BUFLEN): New macro.
Roland McGrath [Tue, 25 Jun 1996 12:13:01 +0000 (12:13 +0000)]
* inet/getrpcbynumber.c (BUFLEN): New macro.

* configure.in (--no-whole-archive check): Remove backslashes in cmd.

28 years ago* Makefile (headers): Add libc-lock.h.
Roland McGrath [Tue, 25 Jun 1996 11:59:42 +0000 (11:59 +0000)]
* Makefile (headers): Add libc-lock.h.

* sysdeps/stub/libc-lock.h: New file.

* inet/getrpcbynumber.c: Remove _r typo.

* elf/dl-load.c (_dl_map_object): Fix typo in last change.

28 years ago* resolv/Makefile (distribute): Remove res_hconf.h; add mapv4v6addr.h
Roland McGrath [Tue, 25 Jun 1996 10:52:53 +0000 (10:52 +0000)]
* resolv/Makefile (distribute): Remove res_hconf.h; add mapv4v6addr.h

and mapv4v6hostent.h.
(routines): Move res* and gethnamaddr into libresolv-routines.
(libresolv-routines): New variable, put them there.
(extra-libs): New variable, list libresolv.
(CPPFLAGS): Add -D for get*by* to res_get*by*.

28 years ago* nss/nss_files/files-parse.c (parse_list): Reset ELT for elements
Roland McGrath [Tue, 25 Jun 1996 10:20:09 +0000 (10:20 +0000)]
* nss/nss_files/files-parse.c (parse_list): Reset ELT for elements

after the first!

* nss/nsswitch.c (__nss_database_lookup): If nsswitch.conf is missing
or doesn't mention DATABASE, use an internal default equivalent to
"DATABASE: compat [NOTFOUND=return] dns [NOTFOUND=return] files".
(nss_lookup_function): Call nss_new_service as needed.
(nss_parse_file): Don't bother calling nss_new_service here.

* grp/fgetgrent.c (LINE_PARSER): Pass zero SWALLOW arg for fields.
* pwd/fgetpwent.c: Likewise.

28 years agoTue Jun 25 02:59:11 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-960625
Roland McGrath [Tue, 25 Jun 1996 08:56:57 +0000 (08:56 +0000)]
Tue Jun 25 02:59:11 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* malloc/malloc.h: Declare malloc_object_allocated_size, malloc_walk.
* malloc/Makefile (dist-routines): Add malloc-size, malloc-walk.
* malloc/malloc-size.c: New file.
* malloc/malloc-walk.c: New file.

* malloc/malloc-find.c (malloc_find_object_address): Return null if
PTR is outside the heap.

* elf/dl-load.c (_dl_map_object): If the requested name matches the
  soname of a loaded object, use that object.

Mon Jun 24 19:57:01 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* Makefile (subdirs): Add nss.

* inet/Makefile (routines): Add getrpcent, getrpcbyname,
getrpcbynumber, getrpcent_r, getrpcbyname_r, getrpcbynumber_r.
* inet/getrpcbynumber_r.c: New file.
* inet/getrpcbynumber.c: New file.
* inet/getrpcbyname.c: New file.
* inet/getrpcbyname_r.c: New file.
* inet/getrpcent_r.c: New file.
* inet/getrpcent.c: New file.
* nss/rpc-lookup.c: New file.
* nss/nss_files/files-rpc.c: New file.
* nss/Makefile (routines): Add rpc-lookup.
(libnss_files-routines): Add files-rpc.
* sunrpc/Makefile (routines): Remove getrpcent.
* sunrpc/getrpcent.c: File removed.

* nss/getXXent_r.c (REENTRANT_GETNAME): Clear NO_MORE when NIP is
non-null on entry.

* Makeconfig (rpath-link): Add $(nssobjdir).
(nssobjdir): New variable.

* Makerules: Move shared library building before objects rules, so
versions are known before extra-lib.mk gets included.
* extra-lib.mk (lib-noranlib): Depend on the shared object too.

* pwd/getpwuid.c: Rewritten using nss.
* pwd/getpwnam.c: Likewise.
* pwd/getpwent.c: Likewise.
* grp/getgrnam.c: Likewise.
* grp/getgrgid.c: Likewise.
* grp/getgrent.c: Likewise.
* pwd/Makefile (routines): Add getpwent_r, getpwnam_r, getpwuid_r.
* pwd/getpwent_r.c: New file.
* pwd/getpwnam_r.c: New file.
* pwd/getpwuid_r.c: New file.
* grp/Makefile (routines): Add getgrent_r, getgrgid_r, getgrnam_r.
* grp/getgrnam_r.c: New file.
* grp/getgrgid_r.c: New file.
* grp/getgrent_r.c: New file.
* grp/Makefile (routines): Remove grpopen, grpread.
* pwd/Makefile (routines): Remove pwdopen, pwdread.
* grp/grpopen.c, grp/grpread.c, pwd/pwdopen.c, pwd/pwdread.c: Removed.

* pwd/fgetpwent.c: Rewritten using files-parse.c.
* grp/fgetgrent.c: Likewise.

* nss/Makefile (routines): Add grp-lookup and pwd-lookup.
* nss/pwd-lookup.c, nss/grp-lookup.c: New files.
* nss/nss_files/files-grp.c: New file.
* nss/nss_files/files-pwd.c: New file.

* nss/Makefile (subdir-dirs): New variable; use it in vpath.

* nss/nss_files/files-parse.c: New file.
* nss/nss_files/files-XXX.c: New file.
* nss/nss_files/files-hosts.c, nss/nss_files/files-proto.c,
nss/nss_files/files-service.c, nss/nss_files/files-network.c:
Rewritten using them.

* nss/Makefile (libnss_files-routines): Remove files-host.
Add files-hosts, files-grp, files-pwd.

* nss/nss_dns/dns-network.c: Don't include <pthread.h>.

Mon Jun 24 22:39:12 1996  Richard Henderson  <rth@tamu.edu>

* sysdeps/alpha/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE):
A .plt entry now loads the .rela.plt offset directly rather
than making us calculate it.

Sun Jun 23 15:24:05 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* time/Makefile ($(installed-localtime-file) rule): Do
$(make-target-directory) first.

* resolv.h: Fix wrapper for resolv/resolv.h.

* configure.in (ld --no-whole-archive check): Use AC_TRY_COMMAND.
Compile dummy file and pass -nostdlib -nostartfiles so as not to
require installed libraries.

* shlib-versions (*-*-*): Set libresolv=2, libnss_files=1,
libnss_dns=1.

Sun Jun 23 19:42:05 1996  Ulrich Drepper  <drepper@cygnus.com>

* resolv/netdb.h (_PATH_NSSWITCH_CONF): New macro.

* inet/herrno.c: New file.

* resolv/res_init.c: Remove res_hconf calls.

* nss/Makefile, nss/XXX-lookup.c, nss/file-lookup.c,
nss/getXXbyYY.c, nss/getXXbyYY_r.c, nss/getXXent.c,
nss/getXXent_r.c, nss/host-lookup.c, nss/network-lookup.c,
nss/nsswitch.c, nss/nsswitch.h, nss/proto-lookup.c,
nss/service-lookup.c: New files.  Implementation of name
service switch, following the approach in Solaris.
Interface specification and general structure inspired by Peter
Eriksson <pen@lysator.liu.se>.
* nss/nss_files/files-host.c, nss/nss_files/files-network.c,
nss/nss_files/files-proto.c, nss/nss_files/files-service.c:
Implementation of libnss_files.so module for file based databases
in NSS service.
* nss/nss_dns/dns-host.c, nss/nss_dns/dns-network.c: Implementation
        if libnss_dns.so module for DNS name lookup in NSS service.

* inet/getproto.c, inet/getprtent.c, inet/getprtname.c,
inet/getservent.c, inet/getsrvbynm.c, inet/getsrvbypt.c:
Changed to serve as interface to NSS.
* inet/gethstbyad.c, inet/gethstbyad_r.c, inet/gethstbynm.c,
inet/gethstbynm2.c, inet/gethstbynm2_r.c, inet/gethstbynm_r.c,
inet/gethstent.c, inet/gethstent_r.c, inet/getnetbynm.c,
inet/getnetbynm_r.c, inet/getnetbypt.c, inet/getnetbypt_r.c,
inet/getnetent.c, inet/getnetent_r.c, inet/getproto_r.c,
inet/getprtent_r.c, inet/getprtname_r.c, inet/getservent_r.c,
inet/getsrvbynm_r.c, inet/getsrvbypt_r.c: New files.  Implement
interfaces to NSS, including reentrant functions.

* resolv/getnetbyaddr.c, resolv/getnetbyname.c, resolv/getnetent.c,
resolv/sethostent.c: Removed:  Obsoleted by NSS.

* resolv/mapv4v6addr.h, resolv/mapv4v6hostent.h: Extracted from
gethnamaddr.c.  These private functions are now used in more
than one file.

* resolv/inet_pton.c, resolv/gethnamaddr.c: Updated to bind-4.9.4-T5B.

Sat Jun 22 16:49:47 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* rpm/Makefile ($(config)): Make sure the word list in the for
loop is syntactically non-empty.

28 years agoSat Jun 22 21:29:52 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-1-92 cvs/libc-960623 cvs/libc-960624 glibc-1.92
Roland McGrath [Sun, 23 Jun 1996 01:31:00 +0000 (01:31 +0000)]
Sat Jun 22 21:29:52 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* Version 1.92 test release.

Sat Jun 22 23:30:07 1996  David Mosberger-Tang  <davidm@azstarnet.com>

* sysdeps/unix/sysv/linux/syscalls.list (ksyslog_ctl): Rename
to klogctl to match prototype in sys/klog.h.

* sysdeps/posix/libc_fatal.c: Add include of <string.h>.
* sysdeps/unix/sysv/linux/gethostid.c: Ditto.

* sysdeps/posix/getcwd.c (__canonicalize_directory_name_internal):
Remove.  Code is now part of __getcwd again.  The old function
never really worked for anything but THISDIR==".".

* sysdeps/alpha/Makefile (CFLAGS-rtld.c): Add -mbuild-constants
only when building ELF version of library.

* libio/libioP.h (_IO_vscanf): Add prototype.

* posix/unistd.h (syscall): Change sysno arg and return value
to int long.

* version.h (VERSION): Updated to 1.92.

28 years ago* version.h (VERSION): Version 1.92 test release.
Roland McGrath [Sat, 22 Jun 1996 22:06:08 +0000 (22:06 +0000)]
* version.h (VERSION): Version 1.92 test release.

* misc/Makefile (headers): Add ar.h.
* misc/ar.h: New file.

* config.make.in (BUILD_CC): New variable.
* configure.in: Check for BUILD_CC if $host != $build.

* posix/glob.c: Include <alloca.h> only [HAVE_ALLOCA_H], not [sparc].

* Makerules [! objects] (subdir_lib): Depend on the stamp$o files.
(stamp$o files): New targets, create them empty, no deps.

Update from bind-4.9.4-T3B.

28 years agoRegenerated
Roland McGrath [Sat, 22 Jun 1996 21:14:17 +0000 (21:14 +0000)]
Regenerated

Sat Jun 22 10:44:09 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* posix/glob.c: Include <alloca.h> only [HAVE_ALLOCA_H], not [sparc].

Fri Jun 21 00:27:51 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr
  only for ?s, not for *s.  Fix from Chet Ramey.

Wed May 22 17:22:14 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* posix/glob.c [VMS]: Don't include <pwd.h>.
[HAVE_VMSDIR_H]: Include "vmsdir.h".
(glob) [VMS]: Don't grok ~.

* posix/glob.h [_AMIGA]: Remove `struct stat;' forward decl.

28 years agoSat Jun 22 10:44:09 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Sat, 22 Jun 1996 15:00:08 +0000 (15:00 +0000)]
Sat Jun 22 10:44:09 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* rpm/template (Source): New field.
(%prep, %build, %install): New sections.
(%files): Add %doc FAQ NEWS NOTES README.
* rpm/rpmrc (builddir): Removed.

28 years ago* elf/dl-load.c (_dl_map_object_from_fd): Fix mapping and l_phdr cvs/libc-960622
Roland McGrath [Fri, 21 Jun 1996 21:37:08 +0000 (21:37 +0000)]
* elf/dl-load.c (_dl_map_object_from_fd): Fix mapping and l_phdr

  guessing to not assume p_vaddr of first load cmd is zero.

28 years ago* sysdeps/sparc/elf/start.S: New file.
Roland McGrath [Fri, 21 Jun 1996 21:01:27 +0000 (21:01 +0000)]
* sysdeps/sparc/elf/start.S: New file.

* sysdeps/sparc/dl-machine.h: New file.

* posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr
  only for ?s, not for *s.  Fix from Chet Ramey.

Fixes thanks to Raja R Harinath <harinath@cs.umn.edu>:
* sysdeps/unix/sysv/utmpbits.h: Define _HAVE_UT_{TYPE,ID,TV,HOST}.
Use __{BEGIN,END}_DECLS.
(_PATH_WTMP, _PATH_UTMP, _PATH_LASTLOG): New macros.
* login/utmp.h (UTMP_FILE, UTMP_FILENAME, WTMP_FILE, WTMP_FILENAME):
New macros, moved here from sysdeps/gnu/utmpbits.h.
* sysdeps/generic/utmpbits.h (_HAVE_UT_HOST): Define it.
* sysdeps/gnu/utmpbits.h (_HAVE_UT_HOST): Likewise.
* login/logout.c: Use ut_host only #if _HAVE_UT_HOST.
Use sizeof instead of UT_*SIZE.
* login/logwtmp.c: Likewise.

* misc/tsearch.c (tdelete): Define as weak alias to __tdelete.

* version.c (banner): Add trailing newline.

28 years agoFri Jun 21 00:27:51 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-960621
Roland McGrath [Fri, 21 Jun 1996 04:33:09 +0000 (04:33 +0000)]
Fri Jun 21 00:27:51 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* login/utmp.h: Declare login_tty.

Thu Jun 20 21:19:07 1996  Richard Henderson  <rth@tamu.edu>

* sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt):
Changed to a 12-byte PLT entry to remove dependency on $gp.
Take a new got_addr parameter.
(elf_machine_rela): Pass the new parameter.
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Do arithmetic for 12-byte PLT.
(RTLD_START): Do normal linkage with program entry.

__hurd_file_name_lookup, __hurd_file_name_split): Add & use LOOKUP
argument.
__hurd_file_name_lookup_retry, hurd_file_name_lookup_retry:

28 years agoThu Jun 20 21:19:07 1996 Richard Henderson <rth@tamu.edu>
Roland McGrath [Fri, 21 Jun 1996 04:30:50 +0000 (04:30 +0000)]
Thu Jun 20 21:19:07 1996  Richard Henderson  <rth@tamu.edu>

* sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt):
Changed to a 12-byte PLT entry to remove dependency on $gp.
Take a new got_addr parameter.
(elf_machine_rela): Pass the new parameter.
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Do arithmetic for 12-byte PLT.
(RTLD_START): Do normal linkage with program entry.

28 years agoThu Jun 20 12:18:21 1996 Miles Bader <miles@gnu.ai.mit.edu>
Miles Bader [Thu, 20 Jun 1996 21:32:45 +0000 (21:32 +0000)]
Thu Jun 20 12:18:21 1996  Miles Bader  <miles@gnu.ai.mit.edu>

* sysdeps/mach/hurd/brk.c (_hurd_brk): Initialize to 0.

* hurd/getuids.c (getuids): New weak link to __getuids.

28 years ago(___brk_addr): Now a variable, initialized to 0, instead of a weak link to _hurd_brk.
Miles Bader [Thu, 20 Jun 1996 17:34:37 +0000 (17:34 +0000)]
(___brk_addr):   Now a variable, initialized to 0, instead of a weak link to _hurd_brk.

28 years agoAdd support for PowerPC Linux
Michael Meissner [Thu, 20 Jun 1996 16:20:05 +0000 (16:20 +0000)]
Add support for PowerPC Linux

28 years ago(getuids): New weak link to __getuids.
Miles Bader [Thu, 20 Jun 1996 16:18:45 +0000 (16:18 +0000)]
(getuids): New weak link to __getuids.

28 years ago*** empty log message *** cvs/libc-960620
Miles Bader [Wed, 19 Jun 1996 22:38:55 +0000 (22:38 +0000)]
*** empty log message ***

Wed Jun 19 10:21:24 1996  Miles Bader  <miles@gnu.ai.mit.edu>

* hurd/hurdlookup.c (__hurd_file_name_lookup_retry,
__hurd_file_name_lookup, __hurd_file_name_split): Add & use LOOKUP argument.
Rename nested function lookup to lookup_op.
(__file_name_lookup, __file_name_lookup_under):
Pass 0 for lookup arg to __hurd_file_name_lookup.
(__file_name_split): Likewise for __hurd_file_name_split.
* hurd/path-lookup.c (hurd_file_name_path_lookup): Add LOOKUP argument.
Rename nested function lookup to scan_lookup.
(file_name_path_lookup): Pass 0 for lookup arg to
hurd_file_name_path_lookup.
* hurd/hurd/lookup.h (__hurd_file_name_lookup, hurd_file_name_lookup,
__hurd_file_name_lookup_retry, hurd_file_name_lookup_retry:
__hurd_file_name_split, hurd_file_name_split, hurd_file_name_lookup):
Add LOOKUP argument.
* sysdeps/mach/hurd/access.c (__access): Pass 0 lookup arg to
__hurd_file_name_lookup.

28 years ago(__hurd_file_name_lookup_retry, __hurd_file_name_lookup, __hurd_file_name_split)...
Miles Bader [Wed, 19 Jun 1996 20:11:26 +0000 (20:11 +0000)]
(__hurd_file_name_lookup_retry, __hurd_file_name_lookup, __hurd_file_name_split):   Add & use LOOKUP argument.   Rename nested function lookup to lookup_op. (__file_name_lookup, __file_name_lookup_under):   Pass 0 for lookup arg to __hurd_file_name_lookup. (__file_name_split):   Likewise for __hurd_file_name_split.

28 years agoRegenerated: autoconf configure.in
Roland McGrath [Wed, 19 Jun 1996 15:06:55 +0000 (15:06 +0000)]
Regenerated: autoconf  configure.in

28 years agoMon Jun 17 19:09:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Roland McGrath [Wed, 19 Jun 1996 14:52:21 +0000 (14:52 +0000)]
Mon Jun 17 19:09:49 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* Make-dist (+sysdeps): Move wildcard inside loop to avoid consing
up a huge list just to discard most of it.

* configure.in (sysnames): Avoid fgrep by using the case shell
builtin.

* Makeconfig (config.status): Fix dependency on Implies files.

28 years agoThu Jun 13 17:25:11 1996 David Mosberger-Tang <davidm@azstarnet.com> cvs/libc-960619
Roland McGrath [Wed, 19 Jun 1996 06:54:12 +0000 (06:54 +0000)]
Thu Jun 13 17:25:11 1996  David Mosberger-Tang  <davidm@azstarnet.com>

* sysdeps/generic/memcmp.c: Add prototype decls for internal fns.

* locale/programs/locale.c: Include string.h.

* sunrpc/xdr_stdio.c (xdrstdio_getlong), sunrpc/xdr_rec.c
  (xdrrec_getlong), sunrpc/xdr_mem.c (xdrmem_getlong): Make sure
  appropriate sign-extension is performed on machines with
  sizeof(long) > 4.

* sunrpc/xdr.c (xdr_int, xdr_u_int): If sizeof(long)==8 and
  sizeof(int)<sizeof(long), we need to go through a temporary
  variable.

* locale/programs/ld-numeric.c: Include <alloca.h>

* libio/stdio.h (__libc_fatal): Add prototype.

* libio/cleanup.c: Use __P() to declare prototype when __STDC__ is
  in efect.

* libio/iopopen.c (read_or_write, parent_end, child_end): Declare
  volatile to avoid "might get clobbered by longjmp" warning.

* features.h (__KERNEL_STRICT_NAMES): Define __KERNEL_STRICT_NAMES
  unless _LOOSE_KERNEL_NAMES is in effect (which, with high
  probability is a sure loser).
* sysdeps/unix/sysv/linux/gnu/types.h (__KERNEL_STRICT_NAMES): Remove.

* sysdeps/unix/bsd/osf/alpha/start.S (errno): Removed.
* sysdeps/unix/sysv/linux/alpha/start.S: Ditto.

* misc/paths.h (_PATH_MAN): Change from /usr/share/man to /usr/man
to be Linux FSSTND compliant.

Mon Jun 10 17:50:31 1996  David Mosberger-Tang  <davidm@azstarnet.com>

* sysdeps/unix/sysv/linux/alpha/pipe.S: Use PSEUDO.

* sysdeps/unix/sysv/linux/alpha/sysdep.S,
  sysdeps/unix/sysv/linux/alpha/brk.S,
  sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
  sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
  sysdeps/unix/sysv/linux/alpha/llseek.S,
  sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
  sysdeps/unix/sysv/linux/alpha/syscall.S: Rename syscall_error to
  __syscall_error to avoid intruding application name space.

* sysdeps/unix/sysv/linux/alpha/sysdep.h: Rename __NR_get?id
to SYS_get?id so that syscall stubs in sysdeps/unix define
these syscalls in terms of getxpid/getxuid/getxgid.

* sysdeps/unix/_exit.S, sysdeps/unix/getegid.S,
  sysdeps/unix/geteuid.S, sysdeps/unix/getppid.S,
  sysdeps/unix/execve.S, sysdeps/unix/fork.S,
  sysdeps/unix/syscall.S: Terminate syscall with PSEUDO_END.

* sysdeps/unix/make-syscalls.sh, sysdeps/unix/sysdep.h
  (PSEUDO_END): Rename END() to PSEUDO_END().

* sysdeps/unix/alpha/sysdep.h: Move error-handling code in PSEUDO
  to PSEUDO_END to improve branch-prediction.  Include .frame
  directive to make syscalls debugabble.
(PSEUDO_END): New macro.

* sysdeps/unix/alpha/sysdep.h, sysdeps/alpha/bb_init_func.S,
  sysdeps/unix/sysv/linux/alpha/brk.S: Use ldiq instead of ldi since
  latter is illegal under DEC Unix.

* sysdeps/unix/alpha/sysdep.S: Renamed from
sysdeps/unix/sysv/linux/alpha/sysdep.S.  This file works for OSF/1
  as well.
* sysdeps/unix/bsd/osf/alpha/sysdep.S: Remove (note that the
  EWOULDBLOCK -> EAGAIN mapping was unnecessary since
  EWOULDBLOCK==EAGAIN under DEC Unix and Linux/Alpha).

* sysdeps/alpha/divrem.h: Use retaddr instead of ra as the return
  address register in the .frame directive.

* sysdeps/alpha/copysign.c: Remove.

* sunrpc/rpc/types.h: Include <sys/param.h> and <netinet/in.h> to
  avoid RPC definitions of INADDR_LOOPBACK and/or MAXHOSTNAMELEN.

* errno.h: Move __END_DECLS to correct place to make file
  compilable under c++.

* dirent/dirent.h: Document _DIRENT_HAVE_D_OFF macro.  Define
d_ino only if <direntry.h> hasn't defined d_fileno.

* configure.in (HAVE_ASM_WEAKEXT_DIRECTIVE): Reverse order of
arguments to weakext to make .weakext detection work on ECOFF systems.

* FAQ: Add Linux/Alpha to list of supported platforms.  Mention
that _validuser() has been replaced by __ivaliduser().

Thu Jun  6 21:39:38 1996  David Mosberger-Tang  <davidm@azstarnet.com>

* sysdeps/unix/bsd/sun/sunos4/tcsetattr.c (tcsetattr): Declare cmd
  as unsigned long, not as int (to avoid incorrect int->long
  promotion).

28 years agoWed Jun 19 01:27:57 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Wed, 19 Jun 1996 05:38:55 +0000 (05:38 +0000)]
Wed Jun 19 01:27:57 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* math/Makefile (distribute): Add ieee-math.c.

Wed Jun 19 03:24:58 1996  Ulrich Drepper  <drepper@cygnus.com>

* locale/codeset_name.c: New file.  Provide function for information
  about currently used character set.
* locale/Makefile (routines): Add codeset_name.
* locale/langinfo.h (_NL_CTYPE_CODESET_NAME): Add new constant.
* locale/localeinfo.h: Change magic number because of incompatible
change.
* locale/C-ctype.c: Add initializer for new field `codeset_name'.
* locale/programs/ld-ctype.c: Implement handling of `codeset_name'.

* locale/programs/locfile.c: Don't depend in pre-2.0 Linux specific
  name `MAX_IOVEC'.  Instead use standard name `UIO_MAXIOV'.

* locale/setlocale.c (setlocale): Initialize local variables to
prevent warnings.

28 years ago* Version 1.91 test release. cvs/libc-1-91 glibc-1.91
Roland McGrath [Tue, 18 Jun 1996 22:27:43 +0000 (22:27 +0000)]
* Version 1.91 test release.

28 years ago* Makerules ($(common-objpfx)distinfo-$(subdir)): Change target from
Roland McGrath [Tue, 18 Jun 1996 22:23:37 +0000 (22:23 +0000)]
* Makerules ($(common-objpfx)distinfo-$(subdir)): Change target from

distinfo to this.
(distinfo): Make phony target depending on that.
(TAGS, po/%.pot, dist): Change deps.
(common-clean): Remove that file.
* rpm/Makefile (distinfo): Change names.

28 years agoTue Jun 18 17:56:44 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Tue, 18 Jun 1996 22:01:43 +0000 (22:01 +0000)]
Tue Jun 18 17:56:44 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* rpm/Makefile (clean): New target.

* stdlib/test-canon.c: New test program contributed by David Mosberger.
* stdlib/Makefile (tests): Add test-canon.
* stdlib/canonicalize.c: Rewritten by David Mosberger.

* mach/Machrules (%_server.c %_server.h rule): Remove gratuitous
mention of $< in mig cmd.  Thanks to Shantanu Goel.

28 years agoTue Jun 18 17:56:44 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Tue, 18 Jun 1996 22:01:27 +0000 (22:01 +0000)]
Tue Jun 18 17:56:44 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* stdlib/test-canon.c: New test program contributed by David Mosberger.
* stdlib/Makefile (tests): Add test-canon.
* stdlib/canonicalize.c: Rewritten by David Mosberger.

28 years agoRecognize -openvms.
Ian [Tue, 18 Jun 1996 18:23:57 +0000 (18:23 +0000)]
Recognize -openvms.

28 years agoSun Jun 16 03:22:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-960618
Roland McGrath [Tue, 18 Jun 1996 02:41:29 +0000 (02:41 +0000)]
Sun Jun 16 03:22:49 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* Make-dist (subdir): Make empty value really empty.

28 years agoMon Jun 17 17:53:21 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Mon, 17 Jun 1996 22:41:47 +0000 (22:41 +0000)]
Mon Jun 17 17:53:21 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* sysdeps/mach/hurd/brk.c (___brk_addr): Define as weak alias for
_hurd_brk.

* libio/stdio.h [__USE_SVID]: Declare tempnam.

Fri Jun 14 19:28:33 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* sysdeps/unix/sysv/linux/syscalls.list: Add swapon with two
parameters.

Wed Jun 12 20:40:51 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* sysdeps/m68k/dl-machine.h (RTLD_START): Fix access to
_dl_default_scope.

* sysdeps/stub/elfclass.h: New file.

28 years ago* Make-dist (subdir): Make empty value really empty. cvs/libc-960617
Roland McGrath [Sun, 16 Jun 1996 10:14:04 +0000 (10:14 +0000)]
* Make-dist (subdir): Make empty value really empty.

28 years ago* version.h (VERSION): Update to 1.91.
Roland McGrath [Sun, 16 Jun 1996 10:06:22 +0000 (10:06 +0000)]
* version.h (VERSION): Update to 1.91.

28 years ago* hurd/hurdinit.c (map0): Remove [!PIC] conditional. cvs/libc-960616
Roland McGrath [Sun, 16 Jun 1996 09:31:23 +0000 (09:31 +0000)]
* hurd/hurdinit.c (map0): Remove [!PIC] conditional.

* shlib-versions (*-*-*): Add libutil=1.

* rpm/Makefile (install-lib): Add libc.a et al.
(install-others): Only add libc.so if $(build-shared) is yes.

* math/Makefile (install-lib): New variable, list libieee.a.
(non-lib.a): Likewise.
(extra-objs): Likewise, and ieee-math.o.
($(objpfx)libieee.a): New target, link to ieee-math.o.
* math/ieee-math.c: New file.
* sysdeps/unix/sysv/linux/Makefile [$(subdir)=math]: Remove setfpucw
and libieee.a stuff.
* sysdeps/unix/sysv/linux/ieee-fpucw.c: File removed.
* sysdeps/unix/sysv/linux/i386/ieee_fpu.c: File removed.

28 years agoSun Jun 16 03:22:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Sun, 16 Jun 1996 08:46:47 +0000 (08:46 +0000)]
Sun Jun 16 03:22:49 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* sysdeps/unix/sysv/Makefile (sysdep_headers): Make append of termio.h
and rule for it conditional on termio.h not already being in
sysdep_headers.

* rpm/Makefile (install-others) [libc.so-version]: Get libc.so from
$(libdir), only the versioned named from $(slibdir).
(instfiles): New variable.
(glibc-$(version).$(config).rpm): New target.  Run rpm -bb.
* rpm/rpmrc: New file.  A third of the options controlling rpm can
only be given here (another third is on the command line, and a third
cannot be specified in any way shape or form).

28 years agoSun Jun 16 02:44:22 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Sun, 16 Jun 1996 06:52:32 +0000 (06:52 +0000)]
Sun Jun 16 02:44:22 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* rpm/template: New file.
* rpm/Makefile: New file.

* Makeconfig (sysdep-configures): Remove empty variable.

* Makerules (distinfo-vars): Write defns for $(install-lib.so) and
$(versioned).

* manual/Makefile (subdir_%): Add new rule with no deps, secondary to
to rule w/dep on %, with no-op commands.

* Makerules (subdir_distinfo): New phony target; depend on distinfo.
* Makefile (rpm/%): New rule.
(+subdir_targets): Add subdir_distinfo.

* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Don't add
  fpu_control.h here.

28 years agoSun Jun 16 00:40:20 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Sun, 16 Jun 1996 04:52:54 +0000 (04:52 +0000)]
Sun Jun 16 00:40:20 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* time/Makefile ($(installed-localtime-file)): If target exists, do
nothing but print a message; if not, make it an absolute symlink.

* time/tzset.c (__tzset): After stripping leading :, call
__tzfile_read on TZ even if it's empty or null.
* time/tzfile.c (__tzfile_read): Use "Universal" if passed "".

28 years ago* hurd/Makefile (routines): Add get-host, set-host.
Roland McGrath [Sun, 16 Jun 1996 03:49:40 +0000 (03:49 +0000)]
* hurd/Makefile (routines): Add get-host, set-host.

(distribute): Add hurdhost.h.
* hurd/hurdhost.h: New file.
* sysdeps/mach/hurd/gethostname.c: Use _hurd_get_host_config.
* sysdeps/mach/hurd/gethostid.c: Likewise.
* sysdeps/mach/hurd/sethostname.c: Use _hurd_set_host_config.
* sysdeps/mach/hurd/sethostid.c: Likewise.
* hurd/get-host.c: New file.
* hurd/set-host.c: New file.

* math/Makefile (headers): Add fpu_control.h.
(aux): New variable, list fpu_control and setfpucw.
* sysdeps/generic/fpu_control.c: New file.
* sysdeps/stub/fpu_control.h: New file.
* sysdeps/unix/sysv/linux/m68k/fpu_control.h: Moved to ...
* sysdeps/m68k/fpu_control.h: here.
* sysdeps/unix/sysv/linux/i386/fpu_control.h: Moved to ...
* sysdeps/i386/fpu_control.h: here.
* sysdeps/unix/sysv/linux/alpha/fpu_control.h: Moved to ...
* sysdeps/alpha/fpu/fpu_control.h: here.  Fixed copyright.
* sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines): Remove
setfpucw, fpu_control.
* sysdeps/unix/sysv/linux/alpha/fpu_control.c: File removed.
* sysdeps/unix/sysv/linux/setfpucw.c: Moved to ...
* sysdeps/generic/setfpucw.c: here.
(__fpu_control): Variable removed.
(__setfpucw): Use SET even if zero.

28 years ago* elf/dl-deps.c (_dl_map_object_deps): Set MAP's mark bit before loop.
Roland McGrath [Sun, 16 Jun 1996 02:18:58 +0000 (02:18 +0000)]
* elf/dl-deps.c (_dl_map_object_deps): Set MAP's mark bit before loop.

Set mark bits of deps as opened, instead of as scanned.

* elf/rtld.c (dl_main): Remove _dl_rtld_map from chain unconditionally.
Then if it has a nonzero l_opencount, add it back in search order.

* elf/dl-load.c (_dl_map_object): Don't use _dl_loaded's DT_RPATH if
  it ain't got one!

28 years agoSat Jun 15 18:13:43 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Sun, 16 Jun 1996 01:27:54 +0000 (01:27 +0000)]
Sat Jun 15 18:13:43 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* sysdeps/unix/sysv/linux/Dist: Add sys/klog.h.

* elf/dl-open.c (_dl_open): Remove PARENT argument, pass null.
* elf/link.h: Update prototype.
* elf/dl-load.c (_dl_map_object): If dependents' DT_RPATHs don't find
NAME, try the DT_RPATH of the executable itself if dynamic.
* elf/dlopen.c (dlopen): Don't pass first arg to _dl_open.

* elf/dl-load.c (_dl_map_object): Exit DT_RPATH checking loop when an
open succeeds.

* Makerules (build-shlib): Give -L opts for each elt of $(rpath-link).

* sysdeps/mach/hurd/Makefile (sysdep-LDFLAGS): Variable removed.
(rpath-link): Append to this instead.

28 years agoFri Jun 14 01:51:47 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-960615
Roland McGrath [Fri, 14 Jun 1996 12:05:04 +0000 (12:05 +0000)]
Fri Jun 14 01:51:47 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* version.c (banner): New static const variable, complete version
banner text.
(__libc_print_version): Use it, and use __write instead of printf.

* configure.in (sysnames): Don't cache the value, because it
  depends only on libc sources.  Merge uniquifying third pass into
Implies/parent expansion second pass.  Report each unique name as
it is added in partial report string, terminated when finished.

* Makeconfig (sysdep_dir): Move defn before config.status rule that
expands it.
(sysdep-configures): Variable removed.
(config.status): Use its contents directly, tighten up a bit, and
include Implies files.

* elf/dl-open.c (_dl_open) [PIC]: Set PARENT to _dl_loaded if null.

* elf/Makefile ($(objpfx)$(rtld-installed-name)): Make a symlink.

* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_open_zero_fill):
Add comment.

* elf/rtld.c (dl_main): Close _dl_zerofd after mapping deps.

* sysdeps/generic/machine-gmon.h [NO_UNDERSCORES]: Define mcount as
weak alias for _mcount.
* sysdeps/alpha/_mcount.S (mcount): Define as weak alias.

28 years agoThu Jun 13 00:02:25 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-960614
Roland McGrath [Thu, 13 Jun 1996 22:49:37 +0000 (22:49 +0000)]
Thu Jun 13 00:02:25 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* sysdeps/generic/machine-gmon.h [NO_UNDERSCORES]: Define mcount as
weak alias for _mcount.
* sysdeps/alpha/_mcount.S (mcount): Define as weak alias.

28 years ago*** empty log message ***
Miles Bader [Thu, 13 Jun 1996 20:50:55 +0000 (20:50 +0000)]
*** empty log message ***

Thu Jun 13 14:29:56 1996  Miles Bader  <miles@gnu.ai.mit.edu>

* hurd/hurdsig.c (_hurd_internal_post_signal): Rename `deliver:'
label to `deliver_pending:' to match goto.

28 years ago(_hurd_internal_post_signal): Rename `deliver:' label to `deliver_pending:' to...
Miles Bader [Thu, 13 Jun 1996 20:44:10 +0000 (20:44 +0000)]
(_hurd_internal_post_signal): Rename `deliver:' label to `deliver_pending:'   to match goto.

28 years agoThu Jun 13 00:02:25 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-960613
Roland McGrath [Thu, 13 Jun 1996 06:50:11 +0000 (06:50 +0000)]
Thu Jun 13 00:02:25 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* elf/dl-lookup.c (_dl_lookup_symbol): If no value and *REF is
null, consider it a strong reference and give the error.

28 years agoThu Jun 13 00:02:25 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Thu, 13 Jun 1996 04:06:45 +0000 (04:06 +0000)]
Thu Jun 13 00:02:25 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* elf/dl-lookup.c (_dl_lookup_symbol): If no value and *REF is
null, consider it a strong reference and give the error.

Wed Jun 12 15:52:46 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* elf/dl-open.c (_dl_open): Correctly terminate relocating loop
  after relocating NEW when it's the only new object.

* elf/dl-init.c (_dl_init_next): When out of initializers, set
  _r_debug.r_state to RT_CONSISTENT and call _dl_debug_state just
  before return.

* elf/rtld.c (dl_main): Move _dl_debug_initialize call after
  relocation.  Call it unconditionally and only fill in DT_DEBUG
  if it's present.  Then call _dl_debug_state with r_state RT_ADD
  before running initializers.

* elf/dl-open.c (_dl_open): Call _dl_debug_initialize and then call
  _dl_debug_state with r_state RT_ADD before running initializers
* elf/dl-close.c (_dl_close): Call _dl_debug_state with r_state
  RT_DELETE before running finalizers and with RT_CONSISTENT just
  before return.

* elf/Makefile (dl-routines): Add dl-debug.
* elf/dl-debug.c: New file.
* elf/rtld.c (_dl_r_debug): Rename to _r_debug and move to dl-debug.c.
(_dl_r_debug_state): Rename to _dl_debug_state and likewise move.
(dl_main): Use _dl_debug_initialize.
* elf/link.h: Fix name to _dl_debug_state in decl.
(_dl_debug_initialize): Declare new function from dl-debug.c.
(_r_debug): Declare it.

* Makerules (distinfo-vars): Add install-{lib,data,bin,sbin,others}.
In distinfo set $(subdir)-VAR and then set VAR to $($(subdir)-VAR).

* Makeconfig (rpath-link): New variable; add $(elfobjdir).
(default-rpath): Use it.
(built-program-cmd): Use it in LD_LIBRARY_PATH.

* Makeconfig (sysdep-configures): Prepend $(sysdep_dir) to names tried.

* sysdeps/unix/Dist: Add make-syscalls.sh.

* misc/Makefile (headers): Add sys/swap.h.
* posix/unistd.h: Remove decls for swapon, swapoff.
* sysdeps/generic/sys/swap.h: New file.
* sysdeps/unix/sysv/linux/sys/swap.h: New file.

* sysdeps/unix/sysv/linux/gnu/types.h: Remove temporary hack #define
of __kernel_fsid_t.  It is correctly defines in <linux/types.h> now.

28 years ago* sysdeps/alpha/dl-machine.h: New file. cvs/libc-960612
Roland McGrath [Wed, 12 Jun 1996 04:51:48 +0000 (04:51 +0000)]
* sysdeps/alpha/dl-machine.h: New file.

28 years agoTue Jun 11 23:23:30 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Wed, 12 Jun 1996 04:00:32 +0000 (04:00 +0000)]
Tue Jun 11 23:23:30 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* Makerules (LDFLAGS-c.so): Use __libc_main instead of
__libc_print_version as entry point for shared object.
* version.c [HAVE_ELF] (__libc_main): New function.

* elf/dl-load.c (_dl_map_object_from_fd): Relocate l_entry with the
load address.

28 years agoTue Jun 11 19:13:04 1996 Richard Henderson <rth@tamu.edu>
Roland McGrath [Wed, 12 Jun 1996 01:54:21 +0000 (01:54 +0000)]
Tue Jun 11 19:13:04 1996  Richard Henderson  <rth@tamu.edu>

* elf/dl-close.c: Include <string.h> for memcpy.
* elf/dl-lookup.c: Same.

* elf/elf.h: Add Elfxx_Symndx for symbol indices.
* elf/dl-lookup.c (_dl_lookup_symbol): Use it.
(_dl_setup_hash): Use it.
* elf/link.h (struct link_map): Use it.

* elf/rtld.c (_dl_start): Don't rely on pointer-to-first-arg hack
for getting the argc/argv/envp block.  Instead, make it the argument.
sysdeps/i386/dl-machine.h (RTLD_START): Do that.
sysdeps/m68k/dl-machine.h (RTLD_START): Same.

* shlib-versions: Add version numbers for alpha-linux.  To avoid
user confusion, make them the same as i386-linux.

* sysdeps/alpha/Makefile [subdir elf]: Add -mno-fp-regs to
sysdep-CFLAGS so that _dl_runtime_resolve doesn't have to save them.
Add -mbuild-constants to CFLAGS-rtld.c to that we can bootstrap
without using literal data.

* sysdeps/generic/dl-sysdep.c: Include <string.h> for memcpy.
Finish Elf32 -> ElfW migration.

28 years ago* Makerules (elfobjdir): Use $(objdir) if set, even in elf subdir.
Roland McGrath [Wed, 12 Jun 1996 01:34:32 +0000 (01:34 +0000)]
* Makerules (elfobjdir): Use $(objdir) if set, even in elf subdir.

* elf/Makefile (routines): Remove init-first.
* csu/Makefile (routines): New variable; put it here instead.

* config.make.in (CFLAGS): New variable.

* io/sys/stat.h (S_ISLNK, S_ISSOCK): Make conditional on __USE_BSD,
not __USE_GNU.
* string/string.h (strncasecmp): Likewise.

28 years ago* elf/Makefile (lib-noranlib): Move rule adding deps for ld.so et al
Roland McGrath [Tue, 11 Jun 1996 21:41:42 +0000 (21:41 +0000)]
* elf/Makefile (lib-noranlib): Move rule adding deps for ld.so et al

to after `include ../Rules', so $(rtld-installed-name) is defined.

28 years ago* string/basename.c (basename): Cast FILENAME to char * for return.
Roland McGrath [Tue, 11 Jun 1996 21:33:17 +0000 (21:33 +0000)]
* string/basename.c (basename): Cast FILENAME to char * for return.

* Makerules ($(libdir)/libc.so): Put $(rtld-installed) name between
libc.so and libc.a in the deps.

28 years ago* elf/Makefile ($(objpfx)$(rtld-installed-name)): New target to make
Roland McGrath [Tue, 11 Jun 1996 21:07:00 +0000 (21:07 +0000)]
* elf/Makefile ($(objpfx)$(rtld-installed-name)): New target to make

link to ld.so if that is not the installed name.
(lib-noranlib): Depend on the installed name in the build directory
instead of on ld.so.

* Makeconfig (link-libc): Include $(elfobjdir)/$(rtld-installed-name)
between libc.so and libc.a, because with libc.so's DT_NEEDED for ld.so
ld searches libc.a before ld.so (is that an ld bug?).
Add $(elfobjdir) to -rpath-link.

* Makerules (elfobjdir): Define as . when $(subdir) is elf.

* sysdeps/i386/dl-machine.h (elf_machine_rel): In R_386_32 case when
relocating _dl_rtld_map, subtract SYM's value from final reloc value,
but don't change *RELOC_ADDR before calling *RESOLVE, because it might
call the function we are relocating!

28 years agoTue Jun 11 15:09:15 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Tue, 11 Jun 1996 19:18:38 +0000 (19:18 +0000)]
Tue Jun 11 15:09:15 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* string/basename.c: New file.
* string/Makefile (routines): Add basename.

28 years ago* Makerules ($(common-objpfx)libc.so): Depend on $(elfobjdir)/ld.so. cvs/libc-960611
Roland McGrath [Mon, 10 Jun 1996 20:19:39 +0000 (20:19 +0000)]
* Makerules ($(common-objpfx)libc.so): Depend on $(elfobjdir)/ld.so.

* elf/dl-close.c: New file.
* elf/link.h: Declare _dl_close.
* elf/Makefile (routines): Add dl-close.
* elf/dlclose.c (dlclose): Use _dl_close.

* elf/Makefile ($(objpfx)librtld.so): Remove libelf from deps.

* elf/dl-runtime.c (_dl_global_scope): New variable.
(_dl_object_relocation_scope): New function.
(fixup): Use it.
* elf/rtld.c (dl_main): Use it.
* elf/dl-open.c (_dl_open): Use it.  If (MODE & RTLD_GLOBAL), set the
l_global bit and append the new map to _dl_global_scope.
* elf/link.h: Declare _dl_global_scope, _dl_global_scope_alloc,
and _dl_object_relocation_scope.

* elf/link.h (struct link_map): Add l_loader member.
Remove _dl_map_object_from_fd decl.
* elf/dl-load.c (_dl_map_object): Pass LOADER to ...
(_dl_map_object_from_fd): Take new arg LOADER and set l_loader member.
(_dl_map_object): Try DT_RPATH from all loaders up the chain.

* elf/dl-object.c (_dl_loaded): Variable removed.
(_dl_default_scope): New variable replaces it.
* elf/link.h (_dl_loaded): Remove variable decl; instead define as
macro for _dl_default_scope[2].
(_dl_default_scope): Declare it.
* sysdeps/i386/dl-machine.h (RTLD_START): Use _dl_default_scope[2]
instead of _dl_loaded.
* sysdeps/m68k/dl-machine.h (RTLD_START): Likewise.
* elf/rtld.c (dl_main): Use _dl_default_scope for symbol lookups.

* elf/dl-reloc.c (_dl_relocate_object): Remove check for _dl_rtld_map.
* elf/rtld.c (dl_main): Pass 0 for LAZY flag when re-relocating self.

* elf/link.h (struct link_map.l_type): Remove lt_interpreter.
  (struct link_map): Add new flag member l_global.

* elf/dl-reloc.c (_dl_relocate_object): Check for _dl_rtld_map
directly instead of looking for lt_interpreter.
* sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
* elf/rtld.c (_dl_start): Don't bother setting BOOTSTRAP_MAP.l_type.
(dl_main): Set _dl_rtld_map.l_type to lt_library.

* elf/dl-deps.c (_dl_map_object_deps): Propagate MAP->l_type to
dependencies loaded, downgrading lt_executable -> lt_library.

* elf/dl-load.c (_dl_map_object_from_fd): Take new arg TYPE and set
l_type from that, translating lt_library->lt_executable based on the
file's ELF type.
(_dl_map_object): Likewise.
* elf/link.h: Update prototypes.
* elf/dl-open.c: Pass type lt_loaded.
* elf/rtld.c: Pass type lt_library.

* elf/dl-load.c (_dl_map_object_from_fd): Handle null return from
_dl_new_object.
(_dl_map_object_from_fd: lose): Unchain and free L if it's not null.
Free REALNAME, and just use NAME in error message.
* elf/dl-object.c (_dl_new_object): If malloc fails, return null
instead of calling _dl_signal_error.

* elf/dl-load.c (_dl_map_object_from_fd): Close FD before signalling
error for _dl_zerofd setup failure.

* elf/dl-object.c (_dl_startup_loaded): Variable removed.
* elf/link.h: Remove its decl.

* elf/dl-reloc.c (_dl_relocate_object): Take new SCOPE arg and pass it
through to _dl_lookup_symbol.
* elf/link.h (_dl_relocate_object): Update comment and prototype.
* elf/rtld.c (dl_main): Pass scope vector to _dl_relocate_object.

* elf/dl-lookup.c (_dl_lookup_symbol): Arg SYMBOL_SCOPE is now a
null-terminated vector of pointers, no longer a vector of exactly two.
* elf/link.h (_dl_lookup_symbol): Update comment and prototype.

* elf/dl-runtime.c (fixup): Set up scope for symbol lookup properly as
done in _dl_relocate_object.

* elf/dlopen.c: Pass "" to _dl_open when FILE is null.

28 years ago* elf/link.h: Include elfclass.h to define __ELF_NATIVE_CLASS.
Roland McGrath [Mon, 10 Jun 1996 13:03:12 +0000 (13:03 +0000)]
* elf/link.h: Include elfclass.h to define __ELF_NATIVE_CLASS.

(ElfW, ELFW): Use it.
* elf/Makefile (headers): Add elfclass.h.
* sysdeps/wordsize-32/elfclass.h: New file.
* sysdeps/wordsize-64/elfclass.h: New file.
* sysdeps/alpha/Implies: Add wordsize-64.
* sysdeps/i386/Implies: Add wordsize-32.
* sysdeps/m68k/Implies: Add wordsize-32.
* sysdeps/mips/Implies: Add wordsize-32.
* sysdeps/sparc/Implies: Add wordsize-32.

28 years agoMon Jun 10 06:14:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Mon, 10 Jun 1996 10:18:47 +0000 (10:18 +0000)]
Mon Jun 10 06:14:03 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* sysdeps/mach/hurd/dl-sysdep.c (__open): Define this instead of open.
(__close, __mmap): Likewise define with __ names now.

Mon Jun 10 05:13:18 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* elf/dl-support.c: New file.
* elf/Makefile (CFLAGS-dl-support.c): New variable.
(routines, elide-routines.so): Add dl-support.

* elf/dl-minimal.c (_dl_pagesize): Remove common defn.
* elf/dl-load.c (_dl_pagesize): Define it here.
(_dl_map_object_from_fd): Initialize it if zero.
* elf/link.h (_dl_pagesize): Remove const.

Sun Jun  9 04:04:26 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* elf/Makefile (routines): Add dl-symbol.
* elf/dl-lookup.c (_dl_symbol_value): Moved to ...
* elf/dl-symbol.c: New file.

* elf/elf.h (Elf32_Xword, Elf32_Sxword): New types.
(Elf32_Section, Elf64_Section): New types, 16 bits.
(Elf32_Sym, Elf64_Sym): Use it.

* elf/dl-deps.c (_dl_open): Moved to ...
* elf/dl-open.c: New file.
* Makefile (routines): Add dl-open.

* elf/Makefile (dl-routines): New variable.
(routines): Add $(dl-routines).
(elide-routines.so): New variable, set to $(dl-routines).
(libdl-inhibit-o): Variable removed; build all flavors of -ldl.
(rtld-routines): All but rtld, dl-sysdep, and dl-minimal moved to
  $(dl-routines).

* elf/dl-lookup.c (_dl_lookup_symbol): Remove magic symbol grokage.

* elf/dladdr.c: Use ELFW(ST_BIND) in place of ELF32_ST_BIND.

* elf/dl-load.c (open_path): Use __ names for open and close.  Avoid
using strdup.
(_dl_map_object): Likewise.
(_dl_map_object_from_fd): Use __ names for mmap, munmap, and mprotect.
* elf/dl-minimal.c (malloc): Likewise.
* elf/dl-reloc.c (_dl_relocate_object): Likewise.

* elf/dl-minimal.c (_dl_pagesize): New variable.
(malloc): Use that instead of a static variable.
* elf/dl-reloc.c (_dl_relocate_object): Use _dl_pagesize instead of
calling getpagesize.
* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
* elf/link.h: Declare _dl_pagesize.

* elf/rtld.c (dl_r_debug): Renamed to _dl_r_debug.

* elf/link.h (struct link_map): Use Half for l_phnum instead of Word.
   * elf/rtld.c (dl_main): Use Half for phdr count arg.
(_dl_sysdep_start): Update prototype of DL_MAIN function ptr arg.

* elf/dl-load.c (_dl_map_object_from_fd): Use explicit Elf32_Word to
  extract 4-byte magic number, not ElfW(Word).  Match EI_CLASS against
  native wordsize, either 32 or 64.

* elf/elf.h (Elf64_Byte, Elf64_Section): Typedefs removed.  In C a
  char is always a byte, no need for a typedef.  Section indices are
16-bit quantities in elf64, which already have a typedef Elf64_Half.

Remove partial -lelf implementation.  There is now a
separately-distributed `libelf' package that implements it.
* elf/dl-lookup.c: Don't #include <libelf.h> any more.
(_dl_elf_hash): New function, moved from
libelf.h:elf_hash.
(_dl_lookup_symbol): Use it instead of elf_hash.
* elf/libelf.h: File removed.
* elf/elf_hash.c: File removed.
* elf/Makefile (headers): Remove libelf.h.
(extra-libs): Remove libelf.
(libelf-routines): Variable removed.

* elf/Makefile (libdl.so): Remove commands from this target.  The
  implicit rule commands are correct, this explicit rule just serves to
  add some dependencies.

* elf/dl-lookup.c (_dl_lookup_symbol): Use ELFW(ST_TYPE) in place of
  ELF32_ST_TYPE.  Likewise ST_BIND.
* elf/do-rel.h (elf_dynamic_do_rel): Likewise R_SYM.

* elf/link.h (ElfW): New macro for wordsize-independent ElfXX_* type
naming.
(ELFW): New macro, likewise for ELFXX_* macro naming.
(_ElfW, _ElfW_1): New macros, subroutines of ElfW and ELF.

Sat Jun  8 20:52:38 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* elf/link.h, elf/do-rel.h, elf/dynamic-link.h, elf/dl-deps.c,
  elf/dl-init.c, elf/dl-load.c, elf/dl-lookup.c, elf/dl-reloc.c,
  elf/dl-runtime.c, elf/dladdr.c, elf/dlclose.c, elf/dlsym.c,
  elf/linux-compat.c, elf/rtld.c: Change all uses of `Elf32_XXX' to
  `ElfW(XXX)' for wordsize-independence.

Sat Jun  8 20:50:42 1996  Richard Henderson  <rth@tamu.edu>

* elf/elf.h: Move Elf64_* types in parity with Elf32 counterparts.
(Elf64_auxv_t): New type.
(EM_ALPHA, R_ALPHA_*): New macros for elf64-alpha format.

28 years agoMon Jun 10 02:22:24 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
Roland McGrath [Mon, 10 Jun 1996 09:41:16 +0000 (09:41 +0000)]
Mon Jun 10 02:22:24 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

* sysdeps/unix/sysv/linux/configure.in: New file, start with configure.
Add check for installed <linux/version.h> being v2.0 or later.

* sysdeps/generic/dl-sysdep.c (_dl_sysdep_open_zero_fill): Call __open
instead of open.
(_dl_sysdep_fatal): Call __write instead of write.
(_dl_sysdep_message): Likewise.

Sun Jun  9 20:40:00 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* sysdeps/m68k/fpu/e_acosl.c: New file.

* Makerules (o-objects): New variable.  Use it in place of
$(objects:.o=$o); it filters out $(elide-routines$o).
Use o-iterator for ar and ranlib rules so they use the per-type object
list.

* sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise.

28 years ago* elf/dl-load.c (_dl_map_object_from_fd): Close FD before return. cvs/libc-960610
Roland McGrath [Sun, 9 Jun 1996 22:02:59 +0000 (22:02 +0000)]
* elf/dl-load.c (_dl_map_object_from_fd): Close FD before return.

* sysdeps/mach/mprotect.c: Define with __ name and weak alias.
* sysdeps/stub/mprotect.c: Likewise.
* sysdeps/unix/mman/syscalls.list (mprotect): Likewise.
* sysdeps/generic/sys/mman.h: Declare __mprotect.
* sysdeps/unix/sysv/irix4/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sys/mman.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/osf/sys/mman.h: Likewise.

28 years ago* Make-dist ($(tardir).tar): Use sed to check for file names longer cvs/libc-1-90 cvs/libc-960609 glibc-1.90
Roland McGrath [Sun, 9 Jun 1996 07:55:33 +0000 (07:55 +0000)]
* Make-dist ($(tardir).tar): Use sed to check for file names longer

than 14 chars, instead of doschk which checks for other things we
don't care about.