Commit Graph

73 Commits

Author SHA1 Message Date
Joseph Myers 04277e02d7 Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2019-01-01 00:11:28 +00:00
Arjun Shankar c5288d378a Remove unnecessary locking when reading iconv configuration [BZ #22062]
In iconv/gconv_conf.c, __gconv_get_path unnecessarily obtains a lock when
populating the array pointed to by __gconv_path_elem. The locking is not
necessary because all calls to __gconv_read_conf (which in turn calls
__gconv_get_path) are serialized using __libc_once.

This patch:
- removes all locking in __gconv_get_path;
- replaces all explicitly serialized __gconv_read_conf calls with calls to
  __gconv_load_conf, a new wrapper that is serialized internally;
- adds a new test, iconv/tst-iconv_mt.c, to exercise iconv initialization,
  usage, and cleanup in a multi-threaded program;
- indents __gconv_get_path correctly, removing tab characters (which makes
  the patch look a little bigger than it really is).

After removing the unnecessary locking, it was confirmed that the test case
fails if the relevant __libc_once is removed. Additionally, four localedata
and iconvdata tests also fail. This gives confidence that the testsuite
sufficiently guards against some regressions relating to multi-threading
with iconv.

Tested on x86_64 and i686.
2018-10-17 17:47:29 +02:00
Joseph Myers 688903eb3e Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2018-01-01 00:32:25 +00:00
Florian Weimer d7ccc6c983 iconv, intl, locale, wcsmbs: Remove internal_function
Also adjust parts of the time subdirectory.
2017-08-31 15:59:06 +02:00
Florian Weimer 251bccfa1f iconv_open: Fix heap corruption on gconv_init failure [BZ #22026]
Also mangle the __end_fct function pointer on the error handling
path.
2017-08-29 17:33:58 +02:00
Florian Weimer e7c18b9d0a iconv: Mangle __btowc_fct even without __init_fct [BZ #22025] 2017-08-29 17:16:09 +02:00
Patsy Franklin 1cf1232cd4 gconv: Consistently mangle NULL function pointers [BZ #22025]
Not mangling NULL pointers is not safe because with very low
probability, a non-NULL function pointer can turn into a NULL pointer
after mangling.
2017-08-29 15:53:28 +02:00
Joseph Myers bfff8b1bec Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Paul Pluzhnikov be64c2ef2a Fix BZ #19012 -- iconv_open leaks memory on error path. 2015-10-05 20:03:48 -07:00
Joseph Myers ec999b8e5e Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912).
It was noted in
<https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the
bits/*.h naming scheme should only be used for installed headers.
This patch renames bits/libc-lock.h to plain libc-lock.h and
bits/libc-lockP.h to plain libc-lockP.h to follow that convention.

Note that I don't know where libc-lockP.h comes from for Hurd (the
Hurd libc-lock.h includes libc-lockP.h, but the only libc-lockP.h in
the glibc source tree is for NPTL) - some unmerged patch? - but I
updated the #include in the Hurd libc-lock.h anyway.

Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch).

	[BZ #14912]
	* bits/libc-lock.h: Move to ...
	* sysdeps/generic/libc-lock.h: ...here.
	(_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H.
	* sysdeps/mach/hurd/bits/libc-lock.h: Move to ...
	* sysdeps/mach/hurd/libc-lock.h: ...here.
	(_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H.
	[_LIBC]: Include <libc-lockP.h> instead of <bits/libc-lockP.h>.
	* sysdeps/mach/bits/libc-lock.h: Move to ...
	* sysdeps/mach/libc-lock.h: ...here.
	(_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H.
	* sysdeps/nptl/bits/libc-lock.h: Move to ...
	* sysdeps/nptl/libc-lock.h: ...here.
	(_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H.
	* sysdeps/nptl/bits/libc-lockP.h: Move to ...
	* sysdeps/nptl/libc-lockP.h: ...here.
	(_BITS_LIBC_LOCKP_H): Rename macro to _LIBC_LOCKP_H.
	* crypt/crypt_util.c: Include <libc-lock.h> instead of
	<bits/libc-lock.h>.
	* dirent/scandir-tail.c: Likewise.
	* dlfcn/dlerror.c: Likewise.
	* elf/dl-close.c: Likewise.
	* elf/dl-iteratephdr.c: Likewise.
	* elf/dl-lookup.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-support.c: Likewise.
	* elf/dl-writev.h: Likewise.
	* elf/rtld.c: Likewise.
	* grp/fgetgrent.c: Likewise.
	* gshadow/fgetsgent.c: Likewise.
	* gshadow/sgetsgent.c: Likewise.
	* iconv/gconv_conf.c: Likewise.
	* iconv/gconv_db.c: Likewise.
	* iconv/gconv_dl.c: Likewise.
	* iconv/gconv_int.h: Likewise.
	* iconv/gconv_trans.c: Likewise.
	* include/link.h: Likewise.
	* inet/getnameinfo.c: Likewise.
	* inet/getnetgrent.c: Likewise.
	* inet/getnetgrent_r.c: Likewise.
	* intl/bindtextdom.c: Likewise.
	* intl/dcigettext.c: Likewise.
	* intl/finddomain.c: Likewise.
	* intl/gettextP.h: Likewise.
	* intl/loadmsgcat.c: Likewise.
	* intl/localealias.c: Likewise.
	* intl/textdomain.c: Likewise.
	* libidn/idn-stub.c: Likewise.
	* libio/libioP.h: Likewise.
	* locale/duplocale.c: Likewise.
	* locale/freelocale.c: Likewise.
	* locale/newlocale.c: Likewise.
	* locale/setlocale.c: Likewise.
	* login/getutent_r.c: Likewise.
	* login/getutid_r.c: Likewise.
	* login/getutline_r.c: Likewise.
	* login/utmp-private.h: Likewise.
	* login/utmpname.c: Likewise.
	* malloc/mtrace.c: Likewise.
	* misc/efgcvt.c: Likewise.
	* misc/error.c: Likewise.
	* misc/fstab.c: Likewise.
	* misc/getpass.c: Likewise.
	* misc/mntent.c: Likewise.
	* misc/syslog.c: Likewise.
	* nis/nis_call.c: Likewise.
	* nis/nis_callback.c: Likewise.
	* nis/nss-default.c: Likewise.
	* nis/nss_compat/compat-grp.c: Likewise.
	* nis/nss_compat/compat-initgroups.c: Likewise.
	* nis/nss_compat/compat-pwd.c: Likewise.
	* nis/nss_compat/compat-spwd.c: Likewise.
	* nis/nss_nis/nis-alias.c: Likewise.
	* nis/nss_nis/nis-ethers.c: Likewise.
	* nis/nss_nis/nis-grp.c: Likewise.
	* nis/nss_nis/nis-hosts.c: Likewise.
	* nis/nss_nis/nis-network.c: Likewise.
	* nis/nss_nis/nis-proto.c: Likewise.
	* nis/nss_nis/nis-pwd.c: Likewise.
	* nis/nss_nis/nis-rpc.c: Likewise.
	* nis/nss_nis/nis-service.c: Likewise.
	* nis/nss_nis/nis-spwd.c: Likewise.
	* nis/nss_nisplus/nisplus-alias.c: Likewise.
	* nis/nss_nisplus/nisplus-ethers.c: Likewise.
	* nis/nss_nisplus/nisplus-grp.c: Likewise.
	* nis/nss_nisplus/nisplus-hosts.c: Likewise.
	* nis/nss_nisplus/nisplus-initgroups.c: Likewise.
	* nis/nss_nisplus/nisplus-network.c: Likewise.
	* nis/nss_nisplus/nisplus-proto.c: Likewise.
	* nis/nss_nisplus/nisplus-pwd.c: Likewise.
	* nis/nss_nisplus/nisplus-rpc.c: Likewise.
	* nis/nss_nisplus/nisplus-service.c: Likewise.
	* nis/nss_nisplus/nisplus-spwd.c: Likewise.
	* nis/ypclnt.c: Likewise.
	* nptl/libc_pthread_init.c: Likewise.
	* nss/getXXbyYY.c: Likewise.
	* nss/getXXent.c: Likewise.
	* nss/getXXent_r.c: Likewise.
	* nss/nss_db/db-XXX.c: Likewise.
	* nss/nss_db/db-netgrp.c: Likewise.
	* nss/nss_db/nss_db.h: Likewise.
	* nss/nss_files/files-XXX.c: Likewise.
	* nss/nss_files/files-alias.c: Likewise.
	* nss/nsswitch.c: Likewise.
	* posix/regex_internal.h: Likewise.
	* posix/wordexp.c: Likewise.
	* pwd/fgetpwent.c: Likewise.
	* resolv/res_hconf.c: Likewise.
	* resolv/res_libc.c: Likewise.
	* shadow/fgetspent.c: Likewise.
	* shadow/lckpwdf.c: Likewise.
	* shadow/sgetspent.c: Likewise.
	* socket/opensock.c: Likewise.
	* stdio-common/reg-modifier.c: Likewise.
	* stdio-common/reg-printf.c: Likewise.
	* stdio-common/reg-type.c: Likewise.
	* stdio-common/vfprintf.c: Likewise.
	* stdio-common/vfscanf.c: Likewise.
	* stdlib/abort.c: Likewise.
	* stdlib/cxa_atexit.c: Likewise.
	* stdlib/fmtmsg.c: Likewise.
	* stdlib/random.c: Likewise.
	* stdlib/setenv.c: Likewise.
	* string/strsignal.c: Likewise.
	* sunrpc/auth_none.c: Likewise.
	* sunrpc/bindrsvprt.c: Likewise.
	* sunrpc/create_xid.c: Likewise.
	* sunrpc/key_call.c: Likewise.
	* sunrpc/rpc_thread.c: Likewise.
	* sysdeps/arm/backtrace.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/generic/stdio-lock.h: Likewise.
	* sysdeps/generic/unwind-dw2-fde.c: Likewise.
	* sysdeps/i386/backtrace.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c: Likewise.
	* sysdeps/m68k/backtrace.c: Likewise.
	* sysdeps/mach/hurd/cthreads.c: Likewise.
	* sysdeps/mach/hurd/dirstream.h: Likewise.
	* sysdeps/mach/hurd/malloc-machine.h: Likewise.
	* sysdeps/nptl/malloc-machine.h: Likewise.
	* sysdeps/nptl/stdio-lock.h: Likewise.
	* sysdeps/posix/dirstream.h: Likewise.
	* sysdeps/posix/getaddrinfo.c: Likewise.
	* sysdeps/posix/system.c: Likewise.
	* sysdeps/pthread/aio_suspend.c: Likewise.
	* sysdeps/s390/s390-32/backtrace.c: Likewise.
	* sysdeps/s390/s390-64/backtrace.c: Likewise.
	* sysdeps/unix/sysv/linux/check_pf.c: Likewise.
	* sysdeps/unix/sysv/linux/if_index.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c: Likewise.
	* sysdeps/unix/sysv/linux/shm-directory.c: Likewise.
	* sysdeps/unix/sysv/linux/system.c: Likewise.
	* sysdeps/x86_64/backtrace.c: Likewise.
	* time/alt_digit.c: Likewise.
	* time/era.c: Likewise.
	* time/tzset.c: Likewise.
	* wcsmbs/wcsmbsload.c: Likewise.
	* nptl/tst-initializers1.c (do_test): Refer to <libc-lock.h>
	instead of <bits/libc-lock.h> in comment.
2015-09-08 21:11:03 +00:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
H.J. Lu 06585ee8da Update copyright years 2012-09-10 05:20:22 -07:00
H.J. Lu de2139a9f2 Check if deriv->steps is NULL before freeing it 2012-09-07 14:14:08 -07:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper 7b503bcc13 * iconv/gconv_int.h (__GCONV_NULCONV): New internal only error code.
* iconv/gconv_cache.c (__gconv_lookup_cache): Return __GCONV_NULCONV
	if from and to charsets are the same.
	* iconv/gconv_db.c (__gconv_find_transform): Likewise.
	* intl/dcigettext.c (_nl_find_msg): Return NULL even if __gconv_open
	returns __GCONV_NOCONV, but not for __GCONV_NULCONV.

2007-07-17  Jakub Jelinek  <jakub@redhat.com>

	* wcsmbs/wchar.h: Only define wint_t if __need_wint_t.
	Don't define wint_t when __need_mbstate_t unless it
	is necessary.
	(__mbstate_t): Use __WINT_TYPE__ rather than wint_t
	in the typedef if possible.
	* wctype/wctype.h (wint_t): Define by including
	wchar.h with __need_wint_t instead of including stddef.h
	with __need_wint_t and as fallback definining it ourselves.
	* iconv/gconv.h (__need_wint_t): Define before including
	wchar.h.
	* sysdeps/gnu/_G_config.h: Don't include gconv.h if not _LIBC
	or _GLIBCPP_USE_WCHAR_T.
	(__need_wchar_t): Don't define
	if not _LIBC or _GLIBCPP_USE_WCHAR_T.
	(__need_wint_t): Don't define before including stddef.h,
	define before including wchar.h only if _LIBC or
	_GLIBCPP_USE_WCHAR_T.
	(_G_iconv_t): Don't define if not _LIBC or _GLIBCPP_USE_WCHAR_T.
	* sysdeps/mach/hurd/_G_config.h: Likewise.
	* sysdeps/generic/_G_config.h: Likewise.
	* libio/libio.h (__wunderflow, __wuflow, __woverflow): Only
	prototype if _LIBC or _GLIBCPP_USE_WCHAR_T.
	(_IO_getwc_unlocked, _IO_putwc_unlocked): Only define
	if _LIBC or _GLIBCPP_USE_WCHAR_T.
2007-07-28 19:02:07 +00:00
Ulrich Drepper 74ed1159d1 [BZ #2569]
2006-04-25  Ulrich Drepper  <drepper@redhat.com>
	[BZ #2569]
	* iconv/gconv_db.c (__gconv_release_step): Fix condition of assert
	call.
	* iconvdata/Makefile (tests): Add tst-iconv6.
	* iconvdata/tst-iconv6.c: New file.
2006-04-25 17:47:32 +00:00
Ulrich Drepper 915a6c51c5 * iconv/gconv.c: Demangle pointers before use if necessary.
* iconv/gconv_cache.c: Likewise.
	* iconv/skeleton.c: Likewise.
	* libio/iofwide.c: Likewise.
	* wcsmbs/btowc.c: Likewise.
	* wcsmbs/mbrtowc.c: Likewise.
	* wcsmbs/mbsnrtowcs.c: Likewise.
	* wcsmbs/mbsrtowcs_l.c: Likewise.
	* wcsmbs/wcrtomb.c: Likewise.
	* wcsmbs/wcsnrtombs.c: Likewise.
	* wcsmbs/wcsrtombs.c: Likewise.
	* wcsmbs/wctob.c: Likewise.
	* iconv_gconv_db.c: Likewise.  After init functions returns mangle
	btowc pointer if necessary.
	* iconv/gconv_dl.c: Mangle function pointers retrieved from dlsym.
2005-12-19 07:26:29 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Ulrich Drepper 9e365fe710 Update.
2004-08-06  Ulrich Drepper  <drepper@redhat.com>

	* iconvdata/jisx0213.h (jisx0213_added_in_2004_p): Fix typo.
	Reported by Paolo Bonzini.

2004-08-06  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Add
	always_inline.
	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_runtime_setup,
	elf_machine_fixup_plt, elf_machine_plt_conflict): Likewise.

	* sysdeps/unix/sysv/linux/netatalk/at.h: Include bits/sockaddr.h
	before including linux/atalk.h.

	* resolv/res_libc.c: Include atomic.h.

	* intl/finddomain.c (free_mem): Rename to...
	(_nl_finddomain_subfreeres): ... this.  Add
	__libc_freeres_fn_section.
	* intl/loadmsgcat.c (_nl_unload_domain): Add
	__libc_freeres_fn_section.
	* intl/gettextP.h (_nl_unload_domain): Move into #ifdef _LIBC.
	Add attribute_hidden.
	(_nl_findomain_subfreeres): New prototype.
	* iconv/gconv_db.c (free_mem): Call _nl_findomain_subfreeres.
2004-08-06 18:32:16 +00:00
Ulrich Drepper 7c11c4a146 (do_release_all): Add __libc_freeres_fn_section. 2004-08-04 21:58:10 +00:00
Ulrich Drepper 9e26f1295a Update.
* iconv/gconv_db.c: Don't define lock as static.  Rename to
	__gconv_lock and export from the file.
	* iconv/gconv_int.h: Declare __gconv_lock.
	* libio/iofclose.c [_LIBC] (_IO_new_fclose): Lock gconv lock
	before __gconv_release_step calls.
	Patch by Shunichi Sagawa <s-sagawa@jp.fujitsu.com>.

	* iconv/gconv_simple.c (internal_ucs4_loop): Fix typo in last change.

	* iconv/gconv_db.c
2004-03-09 10:04:55 +00:00
Ulrich Drepper dd9423a67a Update.
2003-06-11  Ulrich Drepper  <drepper@redhat.com>

	* allocatestack.c (queue_stack): Always inline.
	* ptreadhP.h (__do_cancel): Likewise.
2003-06-11 21:57:23 +00:00
Ulrich Drepper f9ad060c7a Update.
2002-11-30  Bruno Haible  <bruno@clisp.org>

	* iconv/gconv.h (__gconv_btowc_fct): New typedef.
	(struct __gconv_step): New field __btowc_fct.
	* wcsmbs/btowc.c (__btowc): Use the __btowc_fct shortcut if possible.
	* iconv/gconv_int.h (__BUILTIN_TRANSFORM): Renamed from
	__BUILTIN_TRANS.
	(__gconv_btwoc_ascii): New declaration.
	* iconv/gconv_simple.c (BUILTIN_TRANSFORMATION): Add BtowcFct argument.
	(__gconv_btwoc_ascii): New function.
	* iconv/gconv_builtin.h: Add BtowcFct argument to all
	BUILTIN_TRANSFORMATION invocations.
	* iconv/gconv_conf.c (BUILTIN_TRANSFORMATION): Add BtowcFct argument.
	* iconv/iconvconfig.c (BUILTIN_TRANSFORMATION): Likewise.
	* iconv/gconv_builtin.c (map): New field btowc_fct.
	(BUILTIN_TRANSFORMATION): Add BtowcFct argument. Use it to initialize
	btowc_fct field.
	(__gconv_get_builtin_trans): Initialize __btowc_fct field.
	* iconv/gconv_cache.c (find_module): Initialize __btowc_fct field.
	* iconv/gconv_db.c (gen_steps, increment_counter): Likewise.
	* wcsmbs/wcsmbsload.c (to_wc, to_mb): Likewise.
	* iconv/skeleton.c: Document STORE_REST and FROM_ONEBYTE.
	(gconv_init): Initialize __btowc_fct field.
	Undefine EXTRA_LOOP_ARGS and FROM_ONEBYTE at the end.
	* iconv/loop.c: Document ONEBYTE_BODY.
	(gconv_btowc, FROM_ONEBYTE): Define if ONEBYTE_BODY is defined.
	Undefine ONEBYTE_BODY at the end.
	* iconvdata/8bit-generic.c (ONEBYTE_BODY): New macro.
	* iconvdata/8bit-gap.c (NONNUL): New macro.
	(BODY for FROM_LOOP): Use it.
	(ONEBYTE_BODY): New macro.
	* iconvdata/isiri-3342.c (HAS_HOLES): Set to 1.
	(NONNUL): New macro.
	* iconvdata/ansi_x3.110.c (ONEBYTE_BODY): New macro.
	* iconvdata/armscii-8.c (ONEBYTE_BODY): New macro.
	* iconvdata/cp1255.c (ONEBYTE_BODY): New macro.
	* iconvdata/cp1258.c (ONEBYTE_BODY): New macro.
	* iconvdata/tcvn5712-1.c (ONEBYTE_BODY): New macro.
	* iconvdata/big5.c (ONEBYTE_BODY): New macro.
	* iconvdata/big5hkscs.c (ONEBYTE_BODY): New macro.
	* iconvdata/euc-cn.c (ONEBYTE_BODY): New macro.
	* iconvdata/euc-jp.c (ONEBYTE_BODY): New macro.
	* iconvdata/euc-jisx0213.c (ONEBYTE_BODY): New macro.
	* iconvdata/euc-kr.c (ONEBYTE_BODY): New macro.
	* iconvdata/euc-tw.c (ONEBYTE_BODY): New macro.
	* iconvdata/gbk.c (ONEBYTE_BODY): New macro.
	* iconvdata/gb18030.c (ONEBYTE_BODY): New macro.
	* iconvdata/ibm932.c: Include <stdbool.h>.
	(TRUE, FALSE): Remove macros.
	(BODY for FROM_LOOP): Remove unused variable rp1.
	(ONEBYTE_BODY): New macro.
	(BODY for TO_LOOP): Use bool.
	* iconvdata/ibm932.h (__ibm932sb_to_ucs4_idx): Remove array.
	* iconvdata/ibm943.c: Include <stdbool.h>.
	(TRUE, FALSE): Remove macros.
	(BODY for FROM_LOOP): Remove unused variable rp1.
	(ONEBYTE_BODY): New macro.
	(BODY for TO_LOOP): Use bool.
	* iconvdata/ibm943.h (__ibm943sb_to_ucs4_idx): Remove array.
	* iconvdata/iso8859-1.c (ONEBYTE_BODY): New macro.
	* iconvdata/iso_6937-2.c (ONEBYTE_BODY): New macro.
	* iconvdata/iso_6937.c (ONEBYTE_BODY): New macro.
	* iconvdata/johab.c (ONEBYTE_BODY): New macro.
	* iconvdata/sjis.c (ONEBYTE_BODY): New macro.
	* iconvdata/shift_jisx0213.c (ONEBYTE_BODY): New macro.
	* iconvdata/t.61.c (ONEBYTE_BODY): New macro.
	* iconvdata/uhc.c (ONEBYTE_BODY): New macro.
	* iconvdata/gbbig5.c: Tweak comment.
2002-12-02 22:39:58 +00:00
Roland McGrath c877418f2e * include/libc-symbols.h (__libc_freeres_fn_section, libc_freeres_fn):
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.
2002-11-01 20:44:15 +00:00
Ulrich Drepper 230491f02c Update.
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.
2002-08-04 23:32:14 +00:00
Ulrich Drepper 9a018f6c44 Update.
2001-07-27  Ulrich Drepper  <drepper@redhat.com>

	* iconv/gconv_cache.c (__gconv_compare_alias_cache): New function.
	* iconv/gconv_int.h: Add prototype for __gconv_compare_alias_cache.
	* iconv/gconv_charset.h: Replace __gconv_lookup_alias prototype with
	__gconv_compare_alias prototype.
	* iconv/gconv_db.c (__gconv_lookup_alias): Removed.
	(__gconv_compare_alias): New function.
	* locale/findlocale.c (_nl_find_locale): Ise __gconv_compare_alias
	instead of calling __gconv_lookup_alias twice and compare here.
2001-07-27 17:34:53 +00:00
Ulrich Drepper 0db597422f Update.
* 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.
2001-07-24 21:30:18 +00:00
Ulrich Drepper 6b98979fc9 Update.
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.
2001-07-22 17:47:08 +00:00
Andreas Jaeger 41bdb6e20c Update to LGPL v2.1.
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.
2001-07-06 04:58:11 +00:00
Andreas Jaeger c3afcb6aec Include gconv_charset.h for __gconv_lookup_alias prototype. 2001-04-16 15:21:51 +00:00
Ulrich Drepper e7f21fa6fb Update.
2001-04-06  Ulrich Drepper  <drepper@redhat.com>

	* iconv/iconv_open.c: Move strip and upstr definitions...
	* iconv/gconv_charset.h: ...here.  New file.
	* iconv/gconv_db.c (once): Move to file level.
	(do_lookup_alias): Split out from __gconv_find_transform.
	(__gconv_find_transform): Call do_lookup_alias.
	(__gconv_loopup_alias): New function.
	* locale/langinfo.h: Define _NL_*_CODESET values for all categories
	but LC_CTYPE.
	* locale/categories.def: Add entries for new _NL_*_CODESET values.
	* locale/C-ctype.c: Use _nl_C_codeset to initialize CODESET entry.
	* locale/C-address.c: Initialize _NL_*_CODESET element.
	* locale/C-collate.c: Likewise.
	* locale/C-identification.c: Likewise.
	* locale/C-measurement.c: Likewise.
	* locale/C-messages.c: Likewise.
	* locale/C-monetary.c: Likewise.
	* locale/C-name.c: Likewise.
	* locale/C-numeric.c: Likewise.
	* locale/C-paper.c: Likewise.
	* locale/C-telephone.c: Likewise.
	* locale/C-time.c: Likewise.
	* locale/localeinfo.h: Declare _nl_C_codeset.
	* locale/C_name.c: Define _nl_C_codeset.
	* locale/findlocale.c: Before accepting locale check that the used
	charset does not conflict with what the locale name said.
	* locale/programs/ld-address.c: Emit codeset information.
	* locale/programs/ld-collate.c: Likewise.
	* locale/programs/ld-identification.c: Likewise.
	* locale/programs/ld-measurement.c: Likewise.
	* locale/programs/ld-messages.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-name.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-paper.c: Likewise.
	* locale/programs/ld-telephone.c: Likewise.
	* locale/programs/ld-time.c: Likewise.

	* localedata/tests-mbwc/tst_funcs.h (TST_HEAD_LOCALE): It is an error
	if the locale data couldn't be found.

	* string/Makefile: Define tst-strxfrm-ENV.

	* ysdeps/unix/sysv/linux/ia64/getcontext.S: Fix comment.
2001-04-06 17:49:18 +00:00
Roland McGrath 8a0746ae74 * sysdeps/mach/hurd/Makefile ($(link-rpcuserlibs)): Don't append
options after $(build-module), which is no longer a single command.
	(LDFLAGS-link-rpcuserlibs): New variable to hold those options.
	(LDFLAGS-libmachuser-link.so, LDFLAGS-libhurduser-link.so): New
	variables using it.  Reported by Mark Kettenis <kettenis@gnu.org>.

2001-03-11  Roland McGrath  <roland@frob.com>

	* elf/rtld.c (dl_main): Add cast to quiet warning.
	* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
	* iconv/gconv_conf.c (__gconv_get_path): Likewise.
	(__gconv_read_conf): Likewise.
	* iconv/gconv_db.c (gen_steps): Likewise.
	(__gconv_find_transform): Likewise.
	* locale/programs/charmap-dir.c (fopen_uncompressed): Likewise.
	(fopen_uncompressed): Use const in second argument's type.

2001-03-11  Roland McGrath  <roland@frob.com>

	* sysdeps/mach/hurd/dl-sysdep.c (__writev): New function.

	* mach/mach_error.h: Fix ancient #endif syntax.
	* hurd/hurdmalloc.c: Likewise.

	* sysdeps/generic/atomicity.h (exchange_and_add, atomic_add,
	compare_and_swap): Add volatile qualifier to first arg, to bring
	these prototypes in line with all the other implementations.
	Add a #warning to remind the builder that these are not atomic.

2001-03-04  Roland McGrath  <roland@frob.com>

	* hurd/vpprintf.c (vpprintf) [USE_IN_LIBIO]: Use innermore first
	member of TEMP_F so its type is _IO_FILE * as expected.

	* hurd/fopenport.c (seekio): Conditionalize type of POS argument
	on [USE_IN_LIBIO].  Check the value for overflow, since for libio
	it might exceed off_t's range.

2001-02-25  Roland McGrath  <roland@frob.com>

	* sysdeps/mach/hurd/sysd-stdio.c (__stdio_reopen): Use prototype.
	* sysdeps/unix/bsd/getpt.c (__posix_openpt): Likewise.

	* sysdeps/mach/hurd/i386/intr-msg.h (SYSCALL_EXAMINE): Make this a
	macro instead of an inline function,
	(MSG_EXAMINE): Likewise.

	* hurd/hurd/ioctl.h (_HURD_HANDLE_IOCTLS_1): Remove extraneous ##.

	* hurd/get-host.c: Include <string.h> for decls of built-ins.
	* hurd/hurdchdir.c: Likewise.
	* sysdeps/mach/hurd/i386/sigreturn.c: Likweise.
	* sysdeps/mach/hurd/opendir.c: Likewise.

	* mach/mach_init.c: Include <unistd.h> for _exit decl.

	* mach/errsystems.awk: Give output file a trailing newline.

	* mach/Machrules (MIG): Prepend CC='${CC}' to the mig command, so that
	the script will use our compiler for the cpp stage.

	With --enable-all-warnings we get a whole bunch of warnings,
	and these are just a few fixes; there are more needed to silence it.
	* mach/mach/mig_support.h (__mig_strncpy, mig_strncpy): Add extern
	decls before extern inline defns to quiet gcc warning.
	* hurd/hurd/threadvar.h (__hurd_threadvar_location_from_sp): Likewise.
	* sysdeps/mach/i386/machine-sp.h (__thread_stack_pointer): Likewise.
2001-04-01 05:04:31 +00:00
Ulrich Drepper 17427edd1f Update.
2000-11-20  Ulrich Drepper  <drepper@redhat.com>

	* csu/gmon-start.c: Always have prototype for __gmon_start.
	* csu/version.c: Add prototypes for __libc_print_version and
	__libc_main.
	* iconv/gconv.c: Include gconv_int.h and gconv.h.
	* iconv/gconv.h (struct __gconv_step): Remove const from __from_name
	and __to_name.
	* iconv/gconv_builtin.h: Add ASCII module definitions.
	* iconv/gconv_conf.c (__gconv_path_elem): Remove const.
	(add_module): Add cast to avoid warning.  Rework construction of
	strings for new module.
	* iconv/gconv_db.c (__gconv_alias_compare): Make s1 and s2 const.
	(derivation_compare): Likewise.
	* iconv/gconv_dl.c (do_release_shlib): Remove const from nodep.
	(__gconv_release_shlib): Cast do_release_shlib as parameter for twalk.
	* iconv/gconv_int.h (__gconv_path_elem): Remove const.
	(struct gconv_alias): Remove const from fromname and toname.
	* iconv/gconv_simple.c: Include gconv_builtin.h to get prototypes
	for loop functions.
	(internal_ucs4_loop): Use correct const-ness.
	(ucs4_internal_loop): Likewise.
	(internal_ucs4le_loop): Likewise.
	(ucs4le_internal_loop_single): Likewise.
	* iconv/gconv_trans.c (__gconv_transliterate): Make from_idx, from_tbl,
	to_idx, to_tbl, winbuf, winbufend const.  Change casts in
	assignments appropriately.
	(struct known_trans): Remove const from fname.
	(trans_compare): Make s1 and s2 const.
	* iconv/loop.c (LOOPFC): Make outend parameter const.  Add cast to
	avoid warning.
	* iconv/skeleton.c: Remove cast in calls of loop functions.
	* iconvdata/gconv-modules: Remove US-ASCII definitions.
	* iconvdata/iso646.c: Remove US_ASCII support.
	* include/set-hooks.h (DEFINE_HOOK): Also generate prototype.
	* include/unistd.h: Add __libc_check_standard_fds prototype.
	* string/bits/string2.h (__mempcpy_args): Add const to casts.
	* sysdeps/generic/initfini.c: Add prototypes for dummy, _init, and
	_fini.
	* sysdeps/generic/libc-start.c: Add prototype for __libc_start_main.
	* sysdeps/i386/i486/bits/string.h (strcmp): Add const to casts.
	* sysdeps/unix/sysv/linux/dl-osinfo.h (dl_fatal): Add cast to avoid
	warning.
	* sysdeps/unix/sysv/linux/init-first.c: Add prototypes for
	__libc_init_first and _dl_start.

	* sysdeps/unix/sysv/linux/mips/clone.S: Fix comments.
2000-11-20 09:16:41 +00:00
Ulrich Drepper b79f74cd62 Update.
2000-09-03  Bruno Haible  <haible@clisp.cons.org>

	* charmaps/EUC-TW: Add commented non-reversible mappings.

2000-09-03  Bruno Haible  <haible@clisp.cons.org>

	* charmaps/CP949: New file.

2000-09-03  Bruno Haible  <haible@clisp.cons.org>

	* charmaps/GB2312: Remove 0x80..0xA0, 0xAA..0xAF, 0xF8..FF.

2000-09-03  Bruno Haible  <haible@clisp.cons.org>

	* charmaps/EUC-JP: Nonreversibly map 0xA1C0 to U+005C and 0x8FA2B7 to
	U+007E.
2000-09-05 02:41:25 +00:00
Ulrich Drepper 34e55074c4 Update.
2000-08-29  Ulrich Drepper  <drepper@redhat.com>

	* charmaps/GB18030: Add entries from GBK not present here.

	* SUPPORTED: Add zh_TW.EUC-JP and zh_CN.GB18030.

	* locales/iso14651_t1: Use hexadecimal ellipsis in <HAN> script.
2000-08-30 00:02:38 +00:00
Ulrich Drepper c7c3b0e907 Update.
2000-08-29  Akira Higuchi  <a@kondara.org>

	* iconv/gconv_db.c (increment_counter): Reset __init_fct, __fct,
	and __end_fct fields of struct __gconv_step.
	* iconv/Makefile (tests): Add iconv-bug2.
	* iconv/iconv-bug2.c: New file.

	* iconvdata/euc-kr.c (BODY for FROM_LOOP): Pass 'inend - inptr'
	instead of 'inptr - inend' to ksc5601_to_ucs4.

	* iconvdata/sjis.c (BODY for FROM_LOOP): Allow 0x7f character.

	* iconvdata/iso-2022-cn.c (BODY for FROM_LOOP): If an incomplete
	character or shift sequence is found at the end of the input
	string, return__GCONV_INCOMPLETE_INPUT instead of
	__GCONV_EMPTY_INPUT.
	* iconvdata/iso-2022-jp.c (BODY for FROM_LOOP): Likewise.
	* iconvdata/iso-2022-kr.c (BODY for FROM_LOOP): Likewise.

	* iconvdata/iso-2022-jp.c (BODY for FROM_LOOP): Return
	__GCONV_ILLEGAL_INPUT for 8bit characters.
2000-08-29 21:14:05 +00:00
Ulrich Drepper 405b8c60d0 Update.
* iconv/gconv_db.c (gen_steps): Always initialize __data field of
	step.

	* iconv/gconv_open.c (__gconv_open): Reapply
	2000-07-12 Bruno Haible <haible@clisp.cons.org>

		* iconv/gconv_open.c (__gconv_open): Merge duplicated
		code.
2000-07-13 01:58:04 +00:00
Ulrich Drepper d2dfc5de01 Update.
* iconv/gconv_int.h (strict gconv_module): Remove all members
	associated with regular expressions.  Use a simple string as the
	from name.
	* iconv/gconv_db.c: Remove code handling regular expressions.
	* iconv/gconv_conf.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* iconv/gconv_builtin.h: Adjust for change in gconv_conf.c.
2000-06-20 00:34:21 +00:00
Ulrich Drepper 5ea1a82def Update.
* iconvdata/big5hkscs.c: Add __builtin_expect in many places.
	* iconvdata/big5.c: Likewise.
	* iconvdata/ansi_x3.110.c: Likewise.
	* iconvdata/8bit-generic.c: Likewise.
	* iconvdata/8bit-gap.c: Likewise.
	* iconv/loop.c: Likewise.
	* iconv/gconv_db.c: Likewise.
	* iconv/gconv_dl.c: Likewise.
	* iconv/gconv_simple.c: Likewise.
	* iconv/skeleton.c: Likewise.
2000-06-06 06:49:00 +00:00
Andreas Jaeger e8b1163ed0 2000-03-09 Martin Buchholz <martin@xemacs.org>
* sysdeps/unix/sysv/linux/alpha/syscall.S:
	* manual/message.texi (Using gettextized software):
	* manual/message.texi (Message Translation): Doc Fixes.
	* manual/filesys.texi (File Size):
	* manual/charset.texi (glibc iconv Implementation):
	* locale/programs/ld-collate.c (collate_output):
	* iconv/gconv_db.c (find_derivation):
	* manual/install.texi:
	* manual/search.texi (Hash Search Function):
	* manual/stdio.texi (Output Conversion Syntax):
	* FAQ.in:
	* config.h.in:
	* sysdeps/generic/dl-sysdep.c:
	Doc Fixes.  `allows to' is not correct English.

	* elf/rtld.c: Doc fixes.
	* manual/creature.texi (Feature Test Macros): Doc fixes.
	* manual/memory.texi (Hooks for Malloc): Doc Fixes.

	* manual/filesys.texi (Working Directory): Check for ERANGE to
	avoid infloop.
2000-03-10 08:41:39 +00:00
Ulrich Drepper 76a2102b08 Update.
1999-12-07  Ulrich Drepper  <drepper@cygnus.com>

	* iconv/gconv_db.c (gen_steps): Set __counter initialy to 1.
	(increment_counter): New function.  Broken out of find_derivation.
	(find_derivation): No need for a lock.  Increment counter only when
	the derivation was already available.
	* iconv/gconv_dl.c: Add debugging functions.
	(known_compare): We have to use strcmp.
1999-12-08 04:02:45 +00:00
Ulrich Drepper 60c53a1219 (__gconv_find_transform): Take extra parameter with flags. If GCONV_AVOID_NOCONV flag is set don't return copying transformation. 1999-08-22 22:28:29 +00:00
Ulrich Drepper 94e365c612 Update.
* sysdeps/gnu/Makefile (libdl-routines): Add eval.

1999-07-06  Zack Weinberg  <zack@rabi.columbia.edu>

	* dlfcn: New directory.  Move the following files from elf:
	dladdr.c, dlclose.c, dlerror.c, dlfcn.h, dlopen.c,
	dlopenold.c, dlsym.c, dlvsym.c.
	* dlfcn/Makefile: New file.
	* dlfcn/Versions: New file.
	* dlfcn/dlsym.c: All ELF-specific code split out to new
	function _dl_sym.
	* dlfcn/dlvsym.c: All ELF-specific code split out to new
	function _dl_vsym.
	* elf/dl-sym.c: New file.  _dl_sym and _dl_vsym are
	implemented here.

	* dlfcn/dladdr.c: Remove all references to ELF data structures
	or headers.
	* dlfcn/dlclose.c: Likewise.
	* dlfcn/dlerror.c: Likewise.
	* dlfcn/dlopen.c: Likewise.
	* dlfcn/dlopenold.c: Likewise.

	* Makeconfig (dlfcn): New variable - set to `dlfcn' if elf is
	yes, empty otherwise.
	(libdl): Set to dlfcn/libdl.so or libdl.a if elf is yes,
	depending on build-shared.
	(subdirs): Add $(dlfcn).
	(rpath-dirs): Add dlfcn.
	* elf/Makefile: Remove all references to libdl or its
	components, except the ones relating to the test cases.
	(routines): Add dl-sym.
	* elf/Versions (libc): Add _dl_sym and _dl_vsym for GLIBC_2.2.
	(libdl): Delete.

	* elf/dl-close.c (_dl_close): Change argument to void *.
	* elf/dl-open.c (_dl_open): Change return type to void *.
	* elf/eval.c: Removed.
	* elf/ldsodefs.h: Move prototypes of _dl_catch_error,
	_dlerror_run, _dl_open, _dl_close, _dl_addr, and
	_dl_mcount_wrapper_check to include/dlfcn.h.  Delete
	_CALL_DL_FCT macro.
	* include/dlfcn.h: Also prototype _dl_sym and _dl_vsym here.
	Include real header from dlfcn directory.
	* include/ldsodefs.h: Removed.

	* grp/initgroups.c: Use DL_CALL_FCT not _CALL_DL_FCT.
	* nss/getXXbyYY_r.c: Likewise.
	* nss/getXXent_r.c: Likewise.
	* iconv/gconv.c: Likewise.  Don't include ldsodefs.h.
	* iconv/gconv_db.c: Likewise.  Don't include ldsodefs.h.
	* iconv/skeleton.c: Don't include ldsodefs.h.
	* nss/nsswitch.h: Don't include ldsodefs.h.  Include dlfcn.h.

1999-07-07  Ulrich Drepper  <drepper@cygnus.com>
1999-07-07 18:39:33 +00:00
Ulrich Drepper b3fc5f84d1 Update.
* sysdeps/libm-ieee754/e_gamma_r.c: Initialize *signgamp for NaN
	returns.
	* sysdeps/libm-ieee754/e_gammaf_r.c: Likewise.
	* sysdeps/libm-ieee754/e_gammal_r.c: Likewise.
	Reported by John Reiser <jreiser@BitWagon.com> [PR libc/1185].

	* elf/dl-dst.h: Fix typo.
	* elf/dl-open.c: Likewise.

1999-06-26  Zack Weinberg  <zack@rabi.columbia.edu>

	* elf/dl-libc.c: New file, provides three functions:
	__libc_dlopen, __libc_dlclose, __libc_dlsym.
	* include/dlfcn.h: Prototype them.  Prototype _dl_addr.
	* elf/Makefile (routines): Add dl-libc.c.
	* elf/dl-profstub.c (_dl_mcount_wrapper): Change type of
	argument to void *.
	* elf/ldsodefs.h: Change proto and use of _dl_mcount_wrapper to match.

	* iconv/gconv.c: Include dlfcn.h.
	* iconv/gconv_db.c: Likewise.
	* malloc/mtrace.c: Likewise.  Don't include ldsodefs.h.

	* iconv/gconv_int.h (struct __gconv_loaded_object): Change
	`handle' to a void *.
	(__gconv_find_func): Delete prototype.

	* iconv/gconv_dl.c: Don't include ldsodefs.h.  Remove
	dlerror_run and related functions and structs.  Use
	__libc_dlopen, __libc_dlsym, __libc_dlclose.
	* nss/nsswitch.c: Likewise.

1999-06-28  Ulrich Drepper  <drepper@cygnus.com>
1999-06-28 15:52:36 +00:00
Ulrich Drepper d64b6ad075 Update.
* Versions.def: Add GLIBC_2.2 for libc.

	* iconv/gconv.h: Make header suitable for inclusion in public header
	by protecting all names with __.
	* iconv/gconv.c: Adapt for symbol name changes.
	* iconv/gconv.h: Likewise.
	* iconv/gconv_builtin.c: Likewise.
	* iconv/gconv_close.c: Likewise.
	* iconv/gconv_db.c: Likewise.
	* iconv/gconv_dl.c: Likewise.
	* iconv/gconv_int.h: Likewise.
	* iconv/gconv_open.c: Likewise.
	* iconv/gconv_simple.c: Likewise.
	* iconv/iconv.c: Likewise.
	* iconv/iconv_close.c: Likewise.
	* iconv/iconv_open.c: Likewise.
	* iconv/loop.c: Likewise.
	* iconv/skeleton.c: Likewise.
	* iconvdata/8bit-gap.c: Likewise.
	* iconvdata/8bit-generic.c: Likewise.
	* iconvdata/ansi_x3.110.c: Likewise.
	* iconvdata/big5.c: Likewise.
	* iconvdata/cns11643.h: Likewise.
	* iconvdata/cns11643l1.h: Likewise.
	* iconvdata/euc-cn.c: Likewise.
	* iconvdata/euc-jp.c: Likewise.
	* iconvdata/euc-kr.c: Likewise.
	* iconvdata/euc-tw.c: Likewise.
	* iconvdata/gb2312.h: Likewise.
	* iconvdata/iso-2022-jp.c: Likewise.
	* iconvdata/iso-2022-kr.c: Likewise.
	* iconvdata/iso646.c: Likewise.
	* iconvdata/iso8859-1.c: Likewise.
	* iconvdata/iso_6937-2.c: Likewise.
	* iconvdata/iso_6937.c: Likewise.
	* iconvdata/jis0201.h: Likewise.
	* iconvdata/jis0208.h: Likewise.
	* iconvdata/jis0212.h: Likewise.
	* iconvdata/johab.c: Likewise.
	* iconvdata/ksc5601.h: Likewise.
	* iconvdata/sjis.c: Likewise.
	* iconvdata/t.61.c: Likewise.
	* iconvdata/uhc.c: Likewise.
	* stdlib/mblen.c: Likewise.
	* stdlib/mbtowc.c: Likewise.
	* stdlib/wctomb.c: Likewise.
	* wcsmbs/btowc.c: Likewise.
	* wcsmbs/mbrtowc.c: Likewise.
	* wcsmbs/mbsnrtowcs.c: Likewise.
	* wcsmbs/mbsrtowcs.c: Likewise.
	* wcsmbs/wchar.h: Likewise.
	* wcsmbs/wcrtomb.c: Likewise.
	* wcsmbs/wcsmbsload.c: Likewise.
	* wcsmbs/wcsmbsload.h: Likewise.
	* wcsmbs/wcsnrtombs.c: Likewise.
	* wcsmbs/wcsrtombs.c: Likewise.
	* wcsmbs/wctob.c: Likewise.

	* include/limits.h (MB_LEN_MAX): Increase to 16.

	* sysdeps/generic/_G_config.h: Define _G_fpos_t as struct.  Define
	_G_iconv_t.
	* sysdeps/unix/sysv/linux/_G_config.h: Likewise.
	* include/wchar.h: Change mbstate_t to __mbstate_t.

	* libio/Makefile (routines): Add wfiledoalloc, oldiofgetpos,
	oldiofgetpos64, oldiofsetpos, oldiofsetpos64, fputwc, fputwc_u,
	getwc, getwc_u, getwchar, getwchar_u, iofgetws, iofgetws_u,
	iofputws, iofputws_u, iogetwline, iowpadn, ioungetwc, putwc, putwc_u,
	putchar, putchar_u, swprintf, vwprintf, wprintf, wscanf, fwscanf,
	vwscanf, vswprintf, iovswscanf, swscanf, wgenops, wstrops, wfileops,
	and iofwide.
	(tests): Add tst_swprintf, tst_wprintf, tst_swscanf, and tst_wscanf.
	* libio/Versions: Add _IO_fgetpos, _IO_fgetpos64, _IO_fsetpos,
	_IO_fsetpos64, fgetpos, fgetpos64, fgetwc, fgetwc_unlocked, fgetws,
	fgetws_unlocked, fputwc, fputwc_unlocked, fputws, fputws_unlocked,
	fsetpos, fsetpos64, fwide, fwprintf, fwscanf, getwc, getwc_unlocked,
	getwchar, getwchar_unlocked, putwc, putwc_unlocked, putwchar,
	putwchar_unlocked, swprintf, swscanf, ungetwc, vfwprintf, vswprintf,
	vwprintf, vfwscanf, vswscanf, vwscanf, wprintf, and wscanf to
	GLIBC_2.2 for libc.
	* libio/libio.h: Define codecvt struct.  Define _IO_wide_data.
	Extend _IO_file contain pointer to codecvt, widedata and mode.
	(_IO_getwc_unlocked): New macro.
	(_IO_putwc_unlocked): New macro.
	(_IO_fwide): New macro.
	* libio/libioP.h: Add new prototypes and adjust existing declarations.
	* libio/fileops.c (_IO_new_file_close_it): Reset normal or widedata
	buffers based on mode.
	(new_do_write): Set _IO_write_end to _IO_buf_end if stream is wide
	oriented.
	(_IO_new_file_overflow): Don't depend only on _IO_CURRENTLY_PUTTING
	flag to be enough to signal unallocated buffer.  For wide oriented
	stream don't make it linebuffered.  Don't use _IO_do_flush, use
	_IO_new_do_write directly.
	(_IO_new_file_seekoff): Change return value type to _IO_off64_t.
	(_IO_file_seek): Likewise.
	* libio/genops.c (_IO_least_marker): Make global.
	(__underflow): Orient stream if not already done.
	(__uflow): Likewise.
	(_IO_default_seekpos): Change to type _IO_off64_t.
	(_IO_default_seekoff): Likewise.
	(_IO_default_seek): Likewise.
	(_IO_no_init): New function.  Similar to _IO_init but allows to orient
	in initialization.
	* libio/iolibio.h: Add prototype for _IO_vswprintf.  Change _IO_pos_BAD
	to use _IO_off64_t.
	* libio/ftello.c: Use _IO_off_t.  For now abort when use with wide
	char stream.
	* libio/ftello64.c: Likewise.
	* libio/ioftell.c: Likewise.
	* libio/iofopncook.c: Likewise.
	* libio/ioseekoff.c: Likewise.
	* libio/ioseekpos.c: Likewise.
	* libio/oldfileops.c: Likewise.
	* libio/iofgetpos.c: Store state of conversion if necessary.
	* libio/iofgetpos64.c: Likewise.
	* libio/iofsetpos.c: Restore conversion state if necessary.
	* libio/iofsetpos64.c: Likewise.
	* libio/iofdopen.c: Initialize so that stream can be wide oriented.
	* libio/iofopen.c: Likewise.
	* libio/iofopen64.c: Likewise.
	* libio/iopopen.c: Likewise.
	* libio/iovdprintf.c: Likewise.
	* libio/iovsprintf.c: Likewise.
	* libio/iovsscanf.c: Likewise.
	* libio/memstream.c: Likewise.
	* libio/obprintf.c: Likewise.
	* libio/iofputs.c: Orient stream if not already happened.
	* libio/iofputs_u.c: Likewise.
	* libio/iofwrite.c: Likewise.
	* libio/iofwrite_u.c: Likewise.
	* libio/ioputs.c: Likewise.
	* libio/iosetbuffer.c: Handle not yet oriented stream.
	* libio/iosetvbuf.c: Likewise.
	* libio/oldstdfiles.c: Adjust FILEBUF_LITERAL call.
	* libio/stdfiles.c: Likewise.
	* libio/strops.c (_IO_str_overflow): Correctly free buffer after
	failed allocation.
	(_IO_str_seekoff): Use _IO_off64_t.
	* libio/vasprintf.c: Pre-orient stream.
	* libio/vsnprintf.c: Likewise.
	* libio/fputwc.c: New file.
	* libio/fputwc_u.c: New file.
	* libio/fwprintf.c: New file.
	* libio/fwscanf.c: New file.
	* libio/getwc.c: New file.
	* libio/getwc_u.c: New file.
	* libio/getwchar.c: New file.
	* libio/getwchar_u.c: New file.
	* libio/iofgetws.c: New file.
	* libio/iofgetws_u.c: New file.
	* libio/iofputws.c: New file.
	* libio/iofputws_u.c: New file.
	* libio/iofwide.c: New file.
	* libio/iogetwline.c: New file.
	* libio/ioungetwc.c: New file.
	* libio/iovswscanf.c: New file.
	* libio/iowpadn.c: New file.
	* libio/oldiofgetpos.c: New file.
	* libio/oldiofgetpos64.c: New file.
	* libio/oldiofsetpos.c: New file.
	* libio/oldiofsetpos64.c: New file.
	* libio/putwc.c: New file.
	* libio/putwc_u.c: New file.
	* libio/putwchar.c: New file.
	* libio/putwchar_u.c: New file.
	* libio/swprintf.c: New file.
	* libio/swscanf.c: New file.
	* libio/tst_swprintf.c: New file.
	* libio/tst_swscanf.c: New file.
	* libio/tst_wprintf.c: New file.
	* libio/tst_wscanf.c: New file.
	* libio/tst_wscanf.input: New file.
	* libio/vswprintf.c: New file.
	* libio/vwprintf.c: New file.
	* libio/vwscanf.c: New file.
	* libio/wfiledoalloc.c: New file.
	* libio/wfileops.c: New file.
	* libio/wgenops.c: New file.
	* libio/wprintf.c: New file.
	* libio/wscanf.c: New file.
	* libio/wstrops.c: New file.
	* stdio-common/Makefile (routines): Add _itowa, itowa-digits,
	vfwprintf, and vfwscanf.
	* stdio-common/_itoa.c (base_table): Rename to _IO_base_table and
	make global.
	* stdio-common/_itowa.c: New file.
	* stdio-common/_itowa.h: New file.
	* stdio-common/itoa-digits.c: Minimal optimization.
	* stdio-common/itowa-digits.c: New file.
	* stdio-common/printf-parse.h: Allow use in wide character context.
	* stdio-common/printf-prs.c: Define ISASCII and MBRLEN.
	* stdio-common/printf.h (printf_info): Add wide bit.
	* stdio-common/printf_fp.c: Determine from wide bit whether stream
	is wide oriented or not.
	* stdio-common/printf_size.c: Likewise.
	* sysdeps/generic/printf_fphex.c: Likewise.
	* stdlib/strfmon.c: Call __printf_fp with wide bit cleared.
	* stdio-common/vfprintf.c: Rewrite to allow use in wide character
	context.
	* stdio-common/vfscand.c: Likewise.
	* stdio-common/vfwprintf.c: New file.
	* stdio-common/vfwscanf.c: New file.

	* time/Makefile (routines): Add wcsftime.
	(tests): Add tst_wcsftime.
	* time/Versions: Add wcsftime to GLIBC_2.2 for libc.
	* time/strftime.c: Make usable as wcsftime.
	* time/wcsftime.c: New file.
	* time/tst_wcsftime.c: New file.

	* wcsmbs/Makefile (routines): Add wmempcpy and wcschrnul.
	* wcsmbs/Versions: Add wmempcpy and wcschrnul to GLIBC_2.2 for libc.
	* wcsmbs/wcschrnul.c: New file.
	* wcsmbs/wmemcpy.c: New file.
	* wcsmbs/wmemcpy.c: Rename to __wmemcpy and make wmemcpy weak alias.
	* wcsmbs/wmemmove.c: Likewise for wmemmove.

	* manual/stdio.texi: Document is_char and wide element if printf_info.

	* manual/time.texi: Document wcsftime.

	* include/wchar.h: Add prototypes for __wmemcpy, __wmempcpy,
	__wmemmove, __wcschrnul, and __vfwscanf.

	* locale/langinfo.h: Add new LC_TIME entries for wchar_t data.
	* locale/C-time.c: Adapt for above change.
	* locale/categories.def: Likewise.
	* locale/localeinfo.h: Likewise.
	* localedata/Makefile: Don't run tests for now.
1999-06-16 22:55:47 +00:00
Ulrich Drepper 390500b147 Update.
1999-04-28  Ulrich Drepper  <drepper@cygnus.com>

	* manager.c (pthread_allocate_stack): Optimize initialization of new
	thread descriptor.
1999-04-28 21:56:46 +00:00