summary refs log tree commit diff
path: root/iconv/gconv_cache.c
Commit message (Collapse)AuthorAgeFilesLines
* * include/libc-symbols.h (__libc_freeres_fn_section, libc_freeres_fn):Roland McGrath2002-11-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New macros. * elf/dl-close.c (free_mem): Use libc_freeres_fn macro, remove text_set_element. * elf/dl-libc.c (free_mem): Likewise. * iconv/gconv_conf.c (free_mem): Likewise. * iconv/gconv_db.c (free_mem): Likewise. * iconv/gconv_dl.c (free_mem): Likewise. * iconv/gconv_cache.c (free_mem): Likewise. * intl/finddomain.c (free_mem): Likewise. * intl/dcigettext.c (free_mem): Likewise. * locale/setlocale.c (free_mem): Likewise. * misc/fstab.c (fstab_free): Likewise. * nss/nsswitch.c (free_mem): Likewise. * posix/regcomp.c (free_mem): Likewise. * resolv/gai_misc.c (free_res): Likewise. * stdlib/fmtmsg.c (free_mem): Likewise. * sunrpc/clnt_perr.c (free_mem): Likewise. * sysdeps/generic/setenv.c (free_mem): Likewise. * sysdeps/unix/sysv/linux/shm_open.c (freeit): Likewise. * sysdeps/pthread/aio_misc.c (free_res): Likewise. * time/tzset.c (free_mem): Likewise. * malloc/mtrace.c (release_libc_mem): Add __libc_freeres_fn_section. * locale/loadarchive.c (_nl_archive_subfreeres): Likewise. * malloc/set-freeres.c (__libc_freeres): Likewise. * login/getutent.c: Include stdlib.h instead of stddef.h. (buffer): Change into pointer to utmp, add libc_freeres_ptr. (__getutent): Allocate buffer the first time it is run. * login/getutid.c: Include stdlib.h instead of stddef.h. (buffer): Change into pointer to utmp, add libc_freeres_ptr. (__getutid): Allocate buffer the first time it is run. * login/getutline.c: Include stdlib.h instead of stddef.h. (buffer): Change into pointer to utmp, add libc_freeres_ptr. (__getutline): Allocate buffer the first time it is run. * malloc/mtrace.c (malloc_trace_buffer): Change into char *. (mtrace): Allocate malloc_trace_buffer. * resolv/nsap_addr.c (inet_nsap_ntoa): Decrease size of tmpbuf. * resolv/ns_print.c (ns_sprintrrf): Decrease size of t. * string/strerror.c: Include libintl.h and errno.h. (buf): New variable. (strerror): Only allocate buffer if actually needed (unknown error). * time/tzfile.c (transitions): Add libc_freeres_ptr. (freeres): Remove. 2002-10-25 Jakub Jelinek <jakub@redhat.com> * include/libc-symbols.h (libc_freeres_ptr): New macro. * malloc/set-freeres.c (__libc_freeres_ptrs): Define using symbol_set_define. (__libc_freeres): Free all pointers in that section. * Makerules (build-shlib): Add $(LDSEDCMD-$(@F:lib%.so=%).so) to sed commands when creating .lds script. (LDSEDCMD-c.so): New variable. * inet/rcmd.c (ahostbuf): Change into char *. Add libc_freeres_ptr. (rcmd_af): Use strdup to allocate ahostbuf. * inet/rexec.c (ahostbuf): Change into char *. Add libc_freeres_ptr. (rexec_af): Use strdup to allocate ahostbuf. * stdio-common/reg-printf.c (printf_funcs): Remove. (__printf_arginfo_table): Change into printf_arginfo_function **. Add libc_freeres_ptr. (__register_printf_function): Allocate __printf_arginfo_table and __printf_function_table the first time it is called. * stdio-common/printf-parse.h (__printf_arginfo_table): Change into printf_arginfo_function **. (parse_one_spec): Add __builtin_expect. * grp/fgetgrent.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * inet/getnetgrent.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * intl/localealias.c (libc_freeres_ptr): Define if !_LIBC. (string_space, map): Add libc_freeres_ptr. (free_mem): Remove. * misc/efgcvt.c (FCVT_BUFPTR): Add libc_freeres_ptr. (free_mem): Remove. * misc/mntent.c (getmntent_buffer): Add libc_freeres_ptr. (free_mem): Remove. * crypt/md5-crypt.c (libc_freeres_ptr): Define if !_LIBC. (buffer): Add libc_freeres_ptr. (free_mem): Remove for _LIBC. * nss/getXXbyYY.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * nss/getXXent.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * pwd/fgetpwent.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * resolv/res_hconf.c (ifaddrs): Add libc_freeres_ptr. (free_mem): Remove. * shadow/fgetspent.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * sysdeps/posix/ttyname.c (getttyname_name): Add libc_freeres_ptr. (free_mem): Remove. * sysdeps/unix/sysv/linux/getsysstats.c (mount_proc): Add libc_freeres_ptr. (free_mem): Remove. * sysdeps/unix/sysv/linux/ttyname.c (getttyname_name, ttyname_buf): Add libc_freeres_ptr. (free_mem): Remove. 2002-10-30 Jakub Jelinek <jakub@redhat.com> * malloc/obstack.c [_LIBC] (obstack_free): Change into strong_alias instead of duplicating the whole function in libc.
* Update.Ulrich Drepper2002-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-24 Ulrich Drepper <drepper@redhat.com> * locale/programs/charmap.c (charmap_new_char): Don't use ULONG_MAX as maximum UCS4 value. * sysdeps/unix/sysv/linux/ia64/sys/user.h: New file. * sysdeps/generic/strtol.c: We don't need the isascii test in glibc. * malloc/hooks.c (public_sET_STATe): use size_t as type for i. * malloc/malloc.c (mALLINFo): Likewise. * libio/wstrops.c (_IO_wstr_pbackfail): Use WEOF in comparison. * libio/wfileops.c (_IO_wfile_overflow): Use EOF not WEOF when examining result of _IO_do_flush call. * stdio-common/vfprintf.c (vfprintf): Use correct type in va_arg. Use prec not spec when sizing buffers. * catgets/open_catalog.c (__open_catalog): Add casts to avoid warnings. * locale/loadarchive.c (_nl_load_locale_from_archive): Likewise. * locale/loadlocale.c (_nl_intern_locale_data): Likewise. * stdio-common/vfscanf.c (inchar): Likewise. * misc/efgcvt_r.c (fcvt_r): Likewise. * elf/dl-misc.c (_dl_debug_vdprintf): Likewise. * elf/readlib.c (process_file): Likewise. * elf/sprof.c (load_profdata): Likewise. * sysdeps/ia64/hp-timing.h (HP_TIMING_PRINT): Likewise. * locale/programs/linereader.c (get_toplvl_escape): Likewise. * locale/programs/charmap.c (charmap_read): Likewise. * libio/fileops.c: Likewise. * libio/fmemopen.c: Likewise. * stdlib/strtod.c: Likewise. * elf/dl-load.c: Likewise. * iconv/iconvconfig.c: Likewise. * iconv/iconv_prog.c (process_block): Likewise. * sysdeps/unix/sysv/linux/ia64/Makefile: Define _ASM_IA64_CURRENT_H macro to calm down the compiler. * iconv/gconv_cache.c (__gconv_load_cache): Add cast to avoid warning. * sysdeps/ia64/elf/initfini.c: Don't use newlines embedded in string. * sysdeps/unix/sysv/linux/i386/sysdep.S: Update comment regarding placement of errno definition. * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * resolv/nss_dns/dns-host.c (MAXPACKET): Increase minimum value from 1024 to 65536, to avoid buffer overrun. 2002-08-16 Paul Eggert <eggert@twinsun.com> * resolv/gethnamaddr.c (MAXPACKET): Increase minimum value from 1024 to 65536, to avoid buffer overrun. * resolv/res_query.c (MAXPACKET): Likewise. architectures.
* Update.Ulrich Drepper2002-08-041-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-04 Ulrich Drepper <drepper@redhat.com> * stdio-common/psignal.c: Declare _sys_siglist_internal. Use USEINT to access _sys_siglist. * string/strsignal.c: Likewise. * sysdeps/generic/siglist.c: Add _sys_siglist_internal alias. * sysdeps/gnu/siglist.c: Likewise. * sysdeps/unix/siglist.c: Likewise. * sysdeps/unix/sysv/linux/arm/siglist.c: Likewise. * libio/fileops.c: Add missing INTUSEs for _IO_file_jumps. * libio/wfileops.c: Add missing INTUSE for _IO_file_close. * intl/dcigettext.c: Define _nl_default_dirname_internal as hidden alias and use it. * intl/bindtextdom.c: Use _nl_default_dirname_internal. * include/netinet/in.h: Add declaration of in6addr_loopback_internal. * inet/in6_addr.c: Add INTVARDEF for in6addr_loopback. * sysdeps/posix/getaddrinfo.c: Use INTUSE for in6addr_loopback access. * include/time.h: Add libc_hidden_proto for __gmtime_r. * time/gmtime.c (__gmtime_r): Add libc_hidden_def. * iconv/Versions: Replace __gconv_alias_db, __gconv_modules_db, and __gconv_cache with __gconv_get_alias_db, __gconv_get_modules_db, and __gconv_get_cache respectively. * iconv/gconv_cache.c (gconv_cache): Renamed for __gconv_cache and defined static. Change all users. (__gconv_get_cache): New function. * iconv/gconv_db.c (__gconv_get_modules_db): New function. (__gconv_get_alias_db): New function. * iconv/gconv_int.h (__gconv_alias_db): Declare as hidden. (__conv_modules_db): Likewise. Add prototypes for __gconv_get_cache, __gconv_get_modules_db, and __gconv_get_alias_db. * iconv/iconv_prog.c: Use the new functions instead of accessing the variables. * include/stdlib.h: Add prototype and libc_hidden_proto for __default_morecore. * sysdeps/generic/morecore.c: Include <stdlib.h>. * malloc/obstack.c: Remove fputs macro. * malloc/mtrace.c: Remove fopen macro.
* Update.Ulrich Drepper2001-09-011-24/+25
| | | | | | | | | | | 2001-09-01 Ulrich Drepper <drepper@redhat.com> * iconv/gconv_cache.c: Rename variable cache to __gconv_cache and export it. * iconv/Versions (libc) [GLIBC_2.2.5]: Export __gconv_cache. * iconv/iconv_prog.c (insert_cache): New function. (print_known_names): If cache is used call insert_cache to use the information from the cache [PR libc/2509].
* Update.Ulrich Drepper2001-08-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-17 Ulrich Drepper <drepper@redhat.com> * sunrpc/svc_simple.c (universal): Use __write instead of write. * wcsmbs/wcscoll.c: Also define __wcscoll. * include/wchar.h: Declare __wcscoll. * libio/fwprintf.c: Use __vfwprintf instead of vfwprintf. * libio/vwprintf.c: Likewise. * libio/wprintf.c: Likewise. * iconv/gconv_cache.c: Use __munmap instead of munmap. * posix/regex.c [_LIBC] (convert_mbs_to_wcs): Use __mbrtowc instead of mbrtowc. [_LIBC]: Use __iswctype instead of iswctype, __wcslen instead of wcslen, and __wcscoll instead of wcscoll. * sysdeps/unix/sockatmark.c (sockatmark): Use __ioctl instead of ioctl. * sysdeps/unix/sysv/linux/gai_sigqueue.c (__gai_sigqueue): Use __getuid instead of getuid. * stdio-common/perror.c (perror): Use __close instead of close. * iconv/gconv_cache.c (__gconv_load_cache): Likewise. * libio/freopen.c (freopen): Likewise. * libio/freopen64.c (freopen64): Likewise.
* Update.Ulrich Drepper2001-08-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-14 Tom Rix <trix@redhat.com> * iconv/gconv_cache.c (find_module): Add #ifndef STATIC_GCONV. * iconv/Makefile: Fix gconv_cache.c CFLAGS. 2001-08-13 Tom Rix <trix@redhat.com> * sysdeps/unix/sysv/aix/Makefile: Add rule to import kernel symbols. * sysdeps/unix/sysv/aix/bits/types.h: Fix type of __id_t, __useconds_t and __intptr_t. 2001-08-15 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S (__getcontext): Store the access registers to the ucontext structure. * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S (__getcontext): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S (__setcontext): Load the access registers from the ucontext structure. * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S (__setcontext): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: Adjust the SC_xxx offsets to the new ucontext layout. * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: Fix the layout of the ucontext structure. * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: Likewise.
* (__gconv_compare_alias_cache): New function.Ulrich Drepper2001-07-271-0/+20
|
* Update.Ulrich Drepper2001-07-241-9/+14
| | | | | | | | | | | * iconv/gconv_cache.c (find_module): Don't allocate room for the filename. Use alloca, we don't need it beyond this function. (__gconv_release_cache): New function. * iconv/gconv_db.c (__gconv_close_transform): Call __gconv_release_cache after the steps are handled. * iconv/gconv_dl.c (__gconv_find_shlib): Allocate file name in the record as well. * iconv/gconv_int.h: Add prototype fpr __gconv_release_cache.
* (__gconv_lookup_cache): Catch one more boundary case and reject it.Ulrich Drepper2001-07-241-2/+3
|
* Undo last change. Remove debugging output.Ulrich Drepper2001-07-241-3/+1
|
* * iconv/iconvconfig.c (name_insert): Make static to avoid warning.Andreas Jaeger2001-07-241-0/+1
| | | | * iconv/gconv_cache.c: Include stdio.h for puts declaration.
* Update.Ulrich Drepper2001-07-231-54/+74
| | | | | | | | | 2001-07-23 Ulrich Drepper <drepper@redhat.com> * iconv/gconv_cache.c (__gconv_lookup_cache): Handle encoding from and to INTERNAL. * iconv/iconvconfig.c: Create a special record for the INTERNAL encoding name in the output file.
* (__gconv_lookup_cache): Select correct module for conversion direction.Ulrich Drepper2001-07-231-9/+18
|
* Update.Ulrich Drepper2001-07-221-0/+395
2001-07-22 Ulrich Drepper <drepper@redhat.com> * iconv/gconv_builtin.c (struct builtin_map): Remove init and end elements. (BUILTIN_TRANSFORMATION): Remove Init and End parameters. (__gconv_get_builtin_trans): Initialize __init_fct and __end_fct to NULL. * iconv/gconv_builtin.h: Remove NULL parameters for Init and End in all BUILTIN_TRANSFORMATION calls. * iconv/gconv_conf.c (BUILTIN_TRANSFORMATION): Remove Init and End parameters. * iconv/gconv_simple.c: Likewise. * iconv/gconv_db.c (gen_steps): Internal converters don't have initializers, move the code accordingly. * iconv/gconv_conf.c (__gconv_read_conf): Don't read configuration file if STATIC_GCONV is defined. * iconv/gconv_conf.c (__gconv_path_envvar): New global variable. (__gconv_get_path): Use it instead of call getenv. (__gconv_read_conf): First see whether cache can be used. If yes, don't do any work here. * iconv/gconv_db.c (__gconv_release_step): Renamed from release_step and exported. Change callers. (__gconv_find_transform): First call __gconv_lookup_cache and only continue if it signals no cache available. Remove some unnecessary tests. * iconv/gconv_int.h: Declare __gconv_path_envvar, __gconv_lookup_cache, __gconv_release_step, and __gconv_loaded_cache. * iconv/gconv_cache.c: New file. * iconv/iconvconfig.c: New file. * iconv/iconvconfig.h: New file. * iconv/strtab.c: New file. * iconv/Makefile: Add rules to build new files and programs.