invalid length [Coverity CID 106].
* nss/nss_files/files-key.c (search): Close stream before
successful return [Coverity CID 107].
* io/fts.c (fts_open): Don't allocate parent if *argv==NULL
[Coverity CID 108].
* sunrpc/rpc_cout.c (inline_struct): Free sizestr after use
[Coverity CID 110, 109].
* sunrpc/rpc_scan.c (docppline): Free file string if it is not
going to be used [Coverity CID 111].
* sysdeps/unix/sysv/linux/getsourcefilter.c (getsourcefilter): Free
memory if socket level value cannot be retrieved [Coverity CID 112].
* nis/nis_clone_dir.c (nis_clone_directory): Free all memory in
error case [Coverity CID 114].
* nis/nis_clone_res.c (nis_clone_result): Free all memory in the
error cases [Coverity CID 115].
* sunrpc/rpc_parse.c (get_definition): Free defp if tok ==
TOK_EOF [Coverity CID 116].
* sysdeps/unix/sysv/linux/setsourcefilter.c (setsourcefilter): Free
memory if socket level value cannot be retrieved [Coverity CID 117].
* elf/cache.c (save_cache): Initialize pad to avoid writing
uninitialized data to disk.
* elf/cache.c (save_cache): Free file_entries_new [Coverity CID 118].
* intl/finddomain.c (_nl_find_domain): Avoid strdup of expand
locale name, use strdupa. Remove free call [Coverity CID 119].
* sunrpc/rpc_main.c (generate_guard): Avoid extra allocation and
the resulting leak [Coverity CID 121].
* sunrpc/rpc_main.c (mkfile_output): Free all allocated memory
[Coverity CID 122].
* sunrpc/rpc_main.c (h_output): Free guard after we are done
[Coverity CID 123].
* sunrpc/svc_udp.c (cache_set): Free victim if newbuf allocation
fails [Coverity CID 126].
* sunrpc/svc_udp.c (svcudp_enablecache): Free memory in error
cases [Coverity CID 127].
* nis/nis_table.c (__create_ib_request): Free ibreq in case strdup
fails [Coverity CID 128].
* nis/nis_getservlist.c (nis_getservlist): Free all memory in case
of an error [Coverity CID 130, 129].
* nis/nis_print_group_entry.c (nis_print_group_entry): If
nis_lookup call failed, return. Free lookup result in error
cases [Coverity CID 131].
* nis/nis_removemember.c (nis_removemember): Free all memory in
error cases [Coverity CID 132].
* nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r):
Always free lookup result [Coverity CID 134].
* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r):
Always free lookup result [Coverity CID 135].
* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r):
Always free lookup result [Coverity CID 136].
* nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r):
Before retrying, free old result [Coverity CID 137].
* nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user):
Free res in case UID is zero [Coverity CID 138].
* nis/ypclnt.c (yp_update): Always free master string
[Coverity CID 140].
* nis/nis_creategroup.c (nis_creategroup): Free all memory in
error cases [Coverity CID 143, 142, 141].
* nis/nss_nis/nis-publickey.c (_nss_nis_getpublickey): Free result
if yp_match call succeeded [Coverity CID 155].
* nis/nss_nis/nis-publickey.c (_nss_nis_getsecretkey): Free string
allocated in yp_match at all times [Coverity CID 157, 156].
* nscd/nscd.c (write_pid): Close stream also if writing failed
[Coverity CID 165].
* nis/nis_table.c (nis_add_entry): Move test for NULL parameter
ahead of first use [Coverity CID 167].
* nis/nss_nis/nis-alias.c (_nss_nis_getaliasbyname_r): Move test
for NULL parameter ahead of first use [Coverity CID 168].
* intl/finddomain.c (_nl_find_domain): We never return NULL if we
found the locale [Coverity CID 169].
* inet/getnameinfo.c (getnameinfo): __getservbyport_r does not set
herrno [Coverity CID 178].
* nis/nis_checkpoint.c (nis_checkpoint): Don't access and returned
freed object [Coverity CID 182].
[(NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO) && SHARED]: Scan
GLRO(dl_sysinfo_map) for PT_NOTE giving Linux kernel version,
we can skip the uname call if it's there.
* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Don't use
DL_SYSDEP_OSCHECK here.
* elf/rtld.c (dl_main) [DL_SYSDEP_OSCHECK]: Do it here instead.
* sysdeps/generic/ldsodefs.h (struct rtld_global_ro):
Add _dl_sysinfo_map.
* elf/rtld.c (dl_main): Don't call _dl_init_paths early in the
rtld_is_main case. Call it unconditionally later.
Move GLRO(dl_sysinfo_dso) handling earlier, before _dl_init_paths call.
Initialize GLRO(dl_sysinfo_map).
* elf/dl-load.c (open_path): Bail out if _dl_init_paths wasn't called.
* sysdeps/generic/dl-sysdep.c (_DL_FIRST_EXTRA): New macro.
(_dl_important_hwcaps)
[(NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO) && SHARED]: Scan
GLRO(dl_sysinfo_map) for PT_NOTE giving synthetic hwcap names
and bit values.
* elf/ldconfig.c (_DL_FIRST_EXTRA): New macro.
(hwcap_extra): New static variable.
(is_hwcap_platform): Check hwcap_extra for a matching name.
Remove tls special case.
(path_hwcap): Likewise.
(parse_conf): Parse "hwcap" directive to define synthetic hwcap bits
and their names, stored in hwcap_extra.
(main) [USE_TLS]: Initialize final synthetic hwcap bit as "tls".
* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Use uint64_t for
_dl_hwcap and _dl_hwcap_mask.
* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Cast a_val for
AT_HWCAP to unsigned long int.
* elf/dl-support.c (_dl_aux_init): Likewise.
(_dl_hwcap): Update defn.
* elf/cache.c (print_entry): Pad hwcap value with 0s in diagnostic.
* elf/ldconfig.c (search_dir): Likewise.
* sysdeps/generic/utmp_file.c (setutent_file): Invalidate last_entry
also on platforms with !HAVE_UT_TYPE.
(proc_utmp_eq): Remove function.
(internal_getut_r, pututline_file): Call __utmp_equal instead.
2002-09-20 Bruno Haible <bruno@clisp.org>
* abi-tags: Add support for FreeBSD with ABI OS value 3.
* elf/cache.c (print_entry): Support the GNU/FreeBSD ABI tag.
* elf/cache.c (print_entry): Add case for FLAG_POWERPC_LIB64.
Remove per-machine conditionals for FLAG_* cases.
* sysdeps/unix/sysv/linux/powerpc/ldconfig.h: New file.
* sysdeps/unix/sysv/linux/powerpc/readelflib.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h: New file.
2001-07-06 Paul Eggert <eggert@twinsun.com>
* manual/argp.texi: Remove ignored LGPL copyright notice; it's
not appropriate for documentation anyway.
* manual/libc-texinfo.sh: "Library General Public License" ->
"Lesser General Public License".
2001-07-06 Andreas Jaeger <aj@suse.de>
* All files under GPL/LGPL version 2: Place under LGPL version
2.1.
* elf/cache.c: Mark and have translated a few more messages.
2001-03-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
* elf/cache.c: Add case for FLAG_S390_LIB64.
* sysdeps/generic/ldconfig.h: Add define for FLAG_S390_LIB64.
* sysdeps/unix/sysv/linux/s390/ldconfig.h: New file.
* sysdeps/unix/sysv/linux/s390/readelflib.c: New file.
2001-03-19 Ulrich Drepper <drepper@redhat.com>
2001-03-12 Jakub Jelinek <jakub@redhat.com>
* csu/Makefile (abi-tag.h): Define OS and version separately, allow
version to be overriden from config.h.
* csu/abi-note.S: Use OS and version separately, include config.h.
* elf/dl-load.c (_dl_osversion): New.
(_dl_map_object_from_fd): Kill some warnings.
(open_verify): Check .note.ABI-tag of the library if present.
* elf/Makefile (CPPFLAGS-dl-load.c): Add -I$(csu-objpfx).
* elf/cache.c (struct cache_entry): Add osversion.
(print_entry): Print osversion.
(print_cache): Pass osversion to it.
(compare): Sort according to osversion.
(save_cache): Set osversion.
(add_to_cache): Add osversion argument.
* sysdeps/generic/ldconfig.h (add_to_cache, process_file,
process_elf_file): Add osversion argument.
* elf/readlib.c (process_file): Likewise.
* sysdeps/generic/readelflib.c (process_elf_file): Likewise.
* sysdeps/unix/sysv/linux/ia64/readelflib.c (process_elf_file,
process_elf32_file, process_elf64_file): Likewise.
* sysdeps/unix/sysv/linux/i386/readelflib.c (process_elf_file,
process_elf32_file, process_elf64_file): Likewise.
* sysdeps/unix/sysv/linux/sparc/readelflib.c (process_elf_file,
process_elf32_file, process_elf64_file): Likewise.
* elf/ldconfig.c (manual_link): Pass it.
(search_dir): Issue diagnostic if two libs with the same soname in
the same directory have different .note.ABI-tag. Record osversion in
dlib_entry and use it from there.
(struct lib_entry): Remove.
(struct dlib_entry): Add osversion.
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Check
osversion.
* sysdeps/generic/dl-cache.h (struct file_entry_new): Replace __unused
field with osversion.
* sysdeps/generic/ldsodefs.h (_dl_osversion): Declare.
* sysdeps/unix/sysv/linux/init-first.c: Include ldsodefs.h.
* sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): Save kernel
version in _dl_osversion.
* sysdeps/unix/sysv/linux/configure.in: Define __ABI_TAG_VERSION.
* Makerules (build-shlib-helper, build-module-helper): New.
(build-shlib, build-module-helper): Make sure .note.ABI-tag comes
early.
* config.h.in (__ABI_TAG_VERSION): Add.
* elf/dl-minimal.c (__strtoul_internal): Set endptr on return.
* sysdeps/unix/sysv/linux/i386/dl-librecon.h (EXTRA_LD_ENVVARS):
Handle LD_ASSUME_KERNEL.
* sysdeps/unix/sysv/linux/dl-librecon.h: New.
2000-09-29 Ulrich Drepper <drepper@redhat.com>
* elf/chroot_canon.c: Don't report a failure if the last path
component is not available.
* elf/ldconfig.c (parse_conf): Use canonicalized name when reporting
error.
* elf/cache.c (print_cache): Use stat64 instead of stat.
* elf/ldconfig.c (chroot_stat): Likewise.
(create_links): Likewise.
(manual_link): Likewise.
(search_dir): Likewise.
* elf/readlib.c (process_file): Likewise.
* Makefile (install): Set LC_ALL and LANGUAGE to C before running
ldconfig.
2000-09-29 Jakub Jelinek <jakub@redhat.com>
* elf/chroot_canon.c: New file.
* elf/Makefile: Build and distribute it.
* elf/ldconfig.h (process_file): Add real_file_name argument.
(chroot_canon): Add prototype.
* elf/ldconfig.c (cache_file): Remove const.
(chroot_stat): New.
(create_links): Add real_path argument.
If opt_chroot, maintain both real and given filenames.
(manual_link): Likewise.
(search_dir): Likewise.
(parse_conf): If opt_chroot, use chroot_canon to find the real
config file.
(main): For -r, try to use chroot, if it fails, leave opt_chroot set
and use chroot_canon where appropriate to do the same as if chroot
succeeded.
* elf/readlib.c (process_file): Add real_file_name argument, pass it
to fopen.
2000-09-29 Ulrich Drepper <drepper@redhat.com>
* math/complex.h (_Complex): We can be more specific when _Complex
is defined by the compiler.
2000-09-29 H.J. Lu <hjl@gnu.org>
* sysdeps/unix/sysv/linux/ia64/dl-cache.h: New.
* elf/cache.c (print_entry): Replace 64bit with IA-64 in message
for x86/IA-64 binary.
2000-09-29 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/ia64/readelflib.c: New file.
* elf/cache.c (print_entry): Check for FLAG_IA64_LIB64.
2000-05-17 Jakub Jelinek <jakub@redhat.com>
* sysdeps/generic/dl-cache.h (_DL_CACHE_DEFAULT_ID): Only define if
not yet defined.
(_dl_cache_check_flags): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/dl-cache.h: include_next
dl-cache.h.
2000-05-17 Andreas Jaeger <aj@suse.de>
* manual/creature.texi (Feature Test Macros): Remove paragraph
since the description is wrong.
Closes PR libc/1691, reported by Geoff Clare <gwc@unisoft.com>.
2000-05-17 Andreas Jaeger <aj@suse.de>
* time/test_time.args: Removed.
* time/Makefile (test_time-ARGS): Added contents here instead.
* posix/tstgetopt.args: Removed.
* posix/Makefile (tstgetopt-ARGS): Added contents here instead.
* Rules: Allow arguments for test files to be specified in
Makefile with testname-ARGS; remove rules with .args in it.
* dirent/Makefile (opendir-tst1-ARGS): Use this for opendir-tst1,
remove old bogus rule for opendir-tst1.args.
* stdlib/test-canon.c: Rewrite to use test-skeleton.c.
* stdlib/Makefile (test-canon-ARGS): New, supply argument to chdir
into objdir. This allows a readonly sourcetree.
Reported by lrgallardo@yahoo.com, closes PR libc/1421.
2000-05-16 Andreas Jaeger <aj@suse.de>,
David Huggins-Daines <dhd@linuxcare.com>
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Set
cache_data in case of only new cache format correctly.
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Align struct
cache_file_new.
* sysdeps/generic/dl-cache.h (ALIGN_CACHE): New macro to align
struct cache_file_new.
* elf/cache.c (save_cache): Fix str_offset if only new cache is
present.
* elf/cache.c (save_cache): Align struct new_file_cache.
(print_cache): Likewise.
2000-05-06 Bruno Haible <haible@clisp.cons.org>
* iconv/gconv_open.c (__gconv_open): If __gconv_find_transform
returned != __GCONV_OK, there is nothing to clean up.
2000-05-06 Bruno Haible <haible@clisp.cons.org>
* intl/tst-gettext.c (main): Disable possibly existing LC_CTYPE and
OUTPUT_CHARSET environment variables.
2000-05-06 Andreas Jaeger <aj@suse.de>
* sysdeps/generic/dl-cache.h (struct file_entry_new): New.
(struct cache_file_new): New.
(struct file_entry): New (moved from cache.c).
(struct cache_file): New (moved from cache.c).
* sysdeps/generic/dl-cache.c (SEARCH_CACHE): New macro, broken out
from _dl_load_cache_lookup.
(_dl_load_cache_lookup): Move search to SEARCH_CACHE macro, handle
the different cache formats.
New variable cache_new for new format.
* elf/ldconfig.h: Change according to changes in cache.c and
ldconfig.c; remove cache_libcmp; add opt_format.
* elf/ldconfig.c: Include "dl-cache.h" and "dl-procinfo.h"; remove
stuff that's defined in those headers.
Add hwcap to struct lib_entry.
(opt_format): New variable to select cache format.
(options): Add format parameter.
(is_hwcap): New function.
(path_hwcap): New function.
(parse_opt): Handle new format parameter.
(search_dir): Handle hwcap, search also subdirectories with hwcap.
* elf/cache.c (_GNU_SOURCE): Removed. Not needed anymore since
ldconfig is part of glibc.
Include dl-cache.h and remove stuff that's defined there.
(struct cache_entry): Add new member hwcap.
(print_entry): Print hwcap, cleanup a bit.
(print_cache): Print new and old formats.
(compare): Use _dl_cache_libcmp from dl-cache.h; handle hwcap.
(save_cache): Save new and old formats.
(add_to_cache): Handle hwcap.
* sysdeps/generic/dl-cache.c (_dl_cache_libcmp): Moved from here...
* sysdeps/generic/dl-cache.h (_dl_cache_libcmp): ...to here.
* sysdeps/generic/dl-cache.c (LD_SO_CACHE): Moved from here...
* sysdeps/generic/dl-cache.h (LD_SO_CACHE): ...to here.
* sysdeps/generic/dl-cache.c (CACHEMAGIC): Moved from here...
* sysdeps/generic/dl-cache.h (CACHEMAGIC): ...to here.
2000-05-05 Bruno Haible <haible@clisp.cons.org>
* intl/dcigettext.c (alignof): New macro.
(_nl_find_msg): Use it instead of __alignof__. Pass correct output
buffer length to __gconv/iconv. If malloc (freemem_size) fails, set
freemem_size to 0.
2000-05-05 Bruno Haible <haible@clisp.cons.org>
* intl/dcigettext.c (dcigettext): Fix interpretation of tsearch
return value.
* elf/cache.c (print_entry): Only look at the type field when
printing the type.
2000-04-04 Andreas Schwab <schwab@suse.de>
* iconvdata/big5.c (BODY): Fix typo.
2000-04-04 Andreas Schwab <schwab@suse.de>
1999-11-30 Andreas Jaeger <aj@suse.de>
Add ldconfig:
* elf/Makefile (extra-objs): Added ldconfig-modules.
(ldconfig-modules): New.
Added vpath for xstrdup and xmalloc.
Check for use-ldconfig instead of has-ldconfig.
($(objpfx)ldconfig): New rule with dependencies.
(distribute): Add new files.
* sysdeps/unix/sysv/linux/sparc/readelflib.c: New file,
developed together with Jakub Jelinek <jakub@redhat.com>.
* sysdeps/generic/readelflib.c: Likewise.
* elf/cache.c: New file.
* elf/ldconfig.c: New file.
* elf/ldconfig.h: New file.
* elf/readlib.c: New file.
* Makefile (install): Remove flag -d in ldconfig call.
* configure.in: Rename has_ldconfig to use_ldconfig, set it to no
by default.
* config.make.in (has-ldconfig): Renamed to use-ldconfig, changed
comment.