Commit Graph

61 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
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 b41bd5bc83 posix: Remove internal_function attribute 2017-08-31 18:52:00 +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
Joseph Myers 9dd346ff43 Convert 113 more function definitions to prototype style (files with assertions).
This mostly automatically-generated patch converts 113 function
definitions in glibc from old-style K&R to prototype-style.  Following
my other recent such patches, this one deals with the case of function
definitions in files that either contain assertions or where grep
suggested they might contain assertions - and thus where it isn't
possible to use a simple object code comparison as a sanity check on
the correctness of the patch, because line numbers are changed.

A few such automatically-generated changes needed to be supplemented
by manual changes for the result to compile.  openat64 had a prototype
declaration with "..." but an old-style definition in
sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the
generated prototype in the definition (I've filed
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68024> for diagnosing
such cases in GCC; the old state was undefined behavior not requiring
a diagnostic, but one seems a good idea).  In addition, as Florian has
noted regparm attribute mismatches between declaration and definition
are only diagnosed for prototype definitions, and five functions
needed internal_function added to their definitions (in the case of
__pthread_mutex_cond_lock, via the macro definition of
__pthread_mutex_lock) to compile on i386.

After this patch is in, remaining old-style definitions are probably
most readily fixed manually before we can turn on
-Wold-style-definition for all builds.

Tested for x86_64 and x86 (testsuite).

	* crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style
	function definition.
	* crypt/sha256-crypt.c (__sha256_crypt_r): Likewise.
	* crypt/sha512-crypt.c (__sha512_crypt_r): Likewise.
	* debug/backtracesyms.c (__backtrace_symbols): Likewise.
	* elf/dl-minimal.c (_itoa): Likewise.
	* hurd/hurdmalloc.c (malloc): Likewise.
	(free): Likewise.
	(realloc): Likewise.
	* inet/inet6_option.c (inet6_option_space): Likewise.
	(inet6_option_init): Likewise.
	(inet6_option_append): Likewise.
	(inet6_option_alloc): Likewise.
	(inet6_option_next): Likewise.
	(inet6_option_find): Likewise.
	* io/ftw.c (FTW_NAME): Likewise.
	(NFTW_NAME): Likewise.
	(NFTW_NEW_NAME): Likewise.
	(NFTW_OLD_NAME): Likewise.
	* libio/iofwide.c (_IO_fwide): Likewise.
	* libio/strops.c (_IO_str_init_static_internal): Likewise.
	(_IO_str_init_static): Likewise.
	(_IO_str_init_readonly): Likewise.
	(_IO_str_overflow): Likewise.
	(_IO_str_underflow): Likewise.
	(_IO_str_count): Likewise.
	(_IO_str_seekoff): Likewise.
	(_IO_str_pbackfail): Likewise.
	(_IO_str_finish): Likewise.
	* libio/wstrops.c (_IO_wstr_init_static): Likewise.
	(_IO_wstr_overflow): Likewise.
	(_IO_wstr_underflow): Likewise.
	(_IO_wstr_count): Likewise.
	(_IO_wstr_seekoff): Likewise.
	(_IO_wstr_pbackfail): Likewise.
	(_IO_wstr_finish): Likewise.
	* locale/programs/localedef.c (normalize_codeset): Likewise.
	* locale/programs/locarchive.c (add_locale_to_archive): Likewise.
	(add_locales_to_archive): Likewise.
	(delete_locales_from_archive): Likewise.
	* malloc/malloc.c (__libc_mallinfo): Likewise.
	* math/gen-auto-libm-tests.c (init_fp_formats): Likewise.
	* misc/tsearch.c (__tfind): Likewise.
	* nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise.
	* nptl/pthread_attr_getdetachstate.c
	(__pthread_attr_getdetachstate): Likewise.
	* nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize):
	Likewise.
	* nptl/pthread_attr_getinheritsched.c
	(__pthread_attr_getinheritsched): Likewise.
	* nptl/pthread_attr_getschedparam.c
	(__pthread_attr_getschedparam): Likewise.
	* nptl/pthread_attr_getschedpolicy.c
	(__pthread_attr_getschedpolicy): Likewise.
	* nptl/pthread_attr_getscope.c (__pthread_attr_getscope):
	Likewise.
	* nptl/pthread_attr_getstack.c (__pthread_attr_getstack):
	Likewise.
	* nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr):
	Likewise.
	* nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
	Likewise.
	* nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise.
	(__pthread_attr_init_2_0): Likewise.
	* nptl/pthread_attr_setdetachstate.c
	(__pthread_attr_setdetachstate): Likewise.
	* nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize):
	Likewise.
	* nptl/pthread_attr_setinheritsched.c
	(__pthread_attr_setinheritsched): Likewise.
	* nptl/pthread_attr_setschedparam.c
	(__pthread_attr_setschedparam): Likewise.
	* nptl/pthread_attr_setschedpolicy.c
	(__pthread_attr_setschedpolicy): Likewise.
	* nptl/pthread_attr_setscope.c (__pthread_attr_setscope):
	Likewise.
	* nptl/pthread_attr_setstack.c (__pthread_attr_setstack):
	Likewise.
	* nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr):
	Likewise.
	* nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
	Likewise.
	* nptl/pthread_condattr_setclock.c (pthread_condattr_setclock):
	Likewise.
	* nptl/pthread_create.c (__find_in_stack_list): Likewise.
	* nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise.
	* nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to
	use internal_function.
	* nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to
	prototype-style function definition.
	* nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise.
	(__pthread_mutex_cond_lock_adjust): Likewise.  Use
	internal_function.
	* nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock):
	Convert to prototype-style function definition.
	* nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock):
	Likewise.
	* nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
	Likewise.
	(__pthread_mutex_unlock): Likewise.
	* nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise.
	* nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise.
	* nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise.
	* nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise.
	* nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise.
	* nss/makedb.c (process_input): Likewise.
	* posix/fnmatch.c (__strchrnul): Likewise.
	(__wcschrnul): Likewise.
	(fnmatch): Likewise.
	* posix/fnmatch_loop.c (FCT): Likewise.
	* posix/glob.c (globfree): Likewise.
	(__glob_pattern_type): Likewise.
	(__glob_pattern_p): Likewise.
	* posix/regcomp.c (re_compile_pattern): Likewise.
	(re_set_syntax): Likewise.
	(re_compile_fastmap): Likewise.
	(regcomp): Likewise.
	(regerror): Likewise.
	(regfree): Likewise.
	* posix/regexec.c (regexec): Likewise.
	(re_match): Likewise.
	(re_search): Likewise.
	(re_match_2): Likewise.
	(re_search_2): Likewise.
	(re_search_stub): Likewise.  Use internal_function
	(re_copy_regs): Likewise.
	(re_set_registers): Convert to prototype-style function
	definition.
	(prune_impossible_nodes): Likewise.  Use internal_function.
	* resolv/inet_net_pton.c (inet_net_pton): Convert to
	prototype-style function definition.
	(inet_net_pton_ipv4): Likewise.
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise.
	* sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise.
	* sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise.
	* sysdeps/pthread/timer_delete.c (timer_delete): Likewise.
	* sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise.
	Make variadic.
	* time/strptime_l.c (localtime_r): Convert to prototype-style
	function definition.
	* wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise.
	* wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise.
	* wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise.
	* wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise.
2015-10-20 11:54:09 +00:00
Paul Pluzhnikov c2c6d39fab Fix BZ 18036 buffer overflow (read past end of buffer) in internal_fnmatch 2015-03-02 13:34:22 -08:00
Andreas Schwab 4a28f4d55a Fix read past end of pattern in fnmatch (bug 18032) 2015-02-26 16:05:08 +01:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Paul Eggert b1eda10e17 fnmatch: work around GCC compiler warning bug with uninit var
* posix/fnmatch_loop.c (FCT): Use a scalar not a one-item array.
This works around a bug with x86-64 GCC 4.9.2 and earlier
where 'gcc -O2 -Wmaybe-uninitialized' incorrectly complains
"../locale/weightwc.h:93:7: warning: '*((void *)&str+4)' may be
used uninitialized in this function [-Wmaybe-uninitialized]".
2014-11-25 14:20:53 -08:00
Roland McGrath 8c0ab919f6 Move findidx nested functions to top-level. 2014-09-11 16:02:17 -07:00
Siddhesh Poyarekar 059bf913b5 Fix Wundef warning for WIDE_CHAR_VERSION
fnmatch.c defines WIDE_CHAR_VERSION as 1 for wide chars, but does not
define it for the non-wide char bits.  Define it and also undef it in
fnmatch_loop.c like all other macros.
2014-06-26 22:30:45 +05:30
Andreas Schwab b3a9f56ba5 Don't read past end of pattern in fnmatch (BZ #17062) 2014-06-18 14:20:02 +02:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Joseph Myers 2e09a79ada Avoid use of "register" as optimization hint. 2013-06-07 22:24:35 +00:00
Ryan S. Arnold e054f49430 Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Andreas Schwab f3a6cc0a56 Fix access after end of search string in regex matcher 2011-11-30 11:03:20 +01:00
Roland McGrath a0bf67cca2 Fix some warning nits. 2011-02-04 10:53:51 -08:00
Ulrich Drepper 794c3ad3a4 FIx handling of unterminated [ expression in fnmatch. 2011-01-14 08:06:22 -05:00
Andreas Schwab 3540d66b66 Fix memory leak in fnmatch 2010-11-12 03:51:28 -05:00
Ulrich Drepper f15ce4d8dc Avoid too much stack use in fnmatch. 2010-08-09 21:09:37 -07:00
Ulrich Drepper b7d1c5fa30 * posix/fnmatch_loop.c: Take rule index returned as part of
findidx return value into account when accessing weights.
	* posix/regcomp.c: Likewise.
	* posix/regexec.c: Likewise.
2007-10-12 17:47:19 +00:00
Ulrich Drepper 9700b0390e * posix/fnmatch.c (STRUCT): Define.
(fnmatch): Pass NULL as last argument to internal_fn{,w}match.
	* posix/fnmatch_loop.c (struct STRUCT): New type.
	(FCT): Add ends argument.  If ends != NULL and normal * is
	seen in the pattern, store current pattern and string pointers
	and return.  Adjust recursive calls.
	(EXT): Adjust FCT callers.
	(STRUCT): Undef at the end of the file.
	* posix/Makefile (tests): Add tst-fnmatch2.
	* posix/tst-fnmatch2.c: New test.
2007-04-01 19:44:33 +00:00
Ulrich Drepper 7d4722e3fd [BZ #368]
* SUPPORTED (SUPPORTED-LOCALES): Add dz_BT.UTF-8.
	[BZ #368]
	* locales/dz_BT: New file.
2005-10-14 22:56:25 +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
Roland McGrath 469dcb0d46 * posix/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
normal_bracket label.

	* time/tst-mktime2.c (bigtime_test): Initialize tm.tm_isdst to -1.
2004-12-01 19:55:58 +00:00
Ulrich Drepper aae95a1b6a [BZ #361]
Update.
2004-09-01  Jakub Jelinek  <jakub@redhat.com>

	[BZ #361]
	* posix/fnmatch_loop.c (FCT): For backslash between brackets, branch
	to normal_bracket after fetching the next character.
	* posix/tst-fnmatch.input: Add 25 new tests.
	Reported by Markus Oberhumer <markus@oberhumer.com>.
2004-09-02 03:38:10 +00:00
Ulrich Drepper 2533775393 Update.
2003-06-13  Ulrich Drepper  <drepper@redhat.com>

	Fixing gcc 3.3 warnings, part II.
	* argp/argp-help.c (hol_entry_long_iterate): Always inline.
	* elf/dl-load.c (cache_rpath): Don't inline.
	* iconvdata/cns11642l2.h: Always inline all functions.
	* iconvdata/iso-ir-165.h: Likewise.
	* locale/Makefile (aux): Add coll-lookup.
	* locale/coll-lookup.c: New file.
	* locale/coll-lookup.h (collidx_table_lookup): Do not define here.
	(collseq_table_lookup): Likewise.
	* locale/weightwc.h: Adjust collidx_table_lookup calls for name change.
	* posix/fnmatch_loop.c: Adjust collseq_table_lookup calls for name
	change.
	* posix/regcomp.c: Likewise.
	* posix/regexec.c: Likewise.
	* locale/programs/3level.h (*_get): Always inline.
	* locale/programs/locfile.h: Move definition of handle_copy to...
	* locale/programs/locfile.c: ...here.
	* locale/programs/ld-collate.c (obstack_int32_grow): Always inline.
	(obstack_int32_grow_fast): Likewise.
	(utf8_encode): Likewise.
	(find_element): Avoid aliasing problems.
	(insert_value): Likewise.
	(collate_read): Likewise.
	* nss/getent.c (print_hosts): Don't inline
	(print_networks): Likewise.
	(print_shadow): Likewise.
	(build_doc): Likewise.
	* nss/nss_files/files-parse.c [ENTDATA] (parser_stclass): Don't
	inline.
	* posix/regcomp.c (re_set_fastmap): Always inline.
	(seek_collating_symbol_entry): Likewise.
	(lookup_collation_sequence_value): Likewise.
	(build_range_exp): Likewise.
	(build_collating_symbol): Likewise.
	* posix/regexec.c (acquire_init_state_context): Don't inline.
	(clean_state_log_if_need): Likewise.
	* resolv/res_send.c (eConsIovec): Rewrite to not return struct and
	adjust all callers.
	(evConsTime): Likewise.
	(evAddTime): Likewise.
	(evSubTime): Likewise.
	(evNowTime): Likewise.
	(evTimeSpec): Removed.
	(__libc_res_nsend): Avoid aliasing problem.
	* sysdeps/unix/sysv/linux/ifreq.h: Move old_siocgifconf definition to..
	* sysdeps/unix/sysv/linux/ifreq.c: ...here.
	* sysdeps/unix/sysv/linux/i386/dl-procinfo.h (_dl_string_hwcap):
	Always inline.
	(_dl_string_platform): Likewise.
	* wctype/wchar-lookup.h (wctype_table_lookup): Always inline.
	(wcwidth_table_lookup): Likewise.
	(wctrans_table_lookup): Likewise.

	* sysdeps/unix/sysv/linux/sys/epoll.h: Include <stdint.h>.
2003-06-13 21:05:42 +00:00
Roland McGrath eb64f8cbe3 * posix/fnmatch_loop.c: Add casts for signedness.
* nscd/nscd_getpw_r.c (nscd_getpw_r): Likewise.
	* gmon/gmon.c (write_call_graph): Use u_long for FROM_LEN.
	* nscd/nscd_getgr_r.c (nscd_getgr_r): Use nscd_ssize_t for CNT.
2003-03-16 03:22:41 +00:00
Ulrich Drepper be29c482f7 Update.
* posix/fnmatch_loop.c: Recognize - at end of bracket expression
	correctly.
2001-10-27 00:38:28 +00:00
Ulrich Drepper 2f76d88d7d Update.
* posix/fnmatch_loop.c: Fix computation of alignment.

2001-08-09  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regex.c (wcs_regex_compile): Use appropriate string
	to compare with collating element.
	Fix the padding for the alignment.

2001-08-09  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* locale/programs/ld-collate.c (collate_output): Exclude
	characters from elem_table.
	Reduce if clause to write collating elements correctly.
	* posix/Makefile (tests): Add bug-regex5.
	* posix/bug-regex5.c: New file.

2001-08-09  Ulrich Drepper  <drepper@redhat.com>
2001-08-10 05:59:19 +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
Ulrich Drepper 817a51e296 Update.
2001-04-04  Ulrich Drepper  <drepper@redhat.com>

	* posix/fnmatch_loop.c: Undefine NEW_PATTERN when it is not used
	anymore.
2001-04-05 02:51:34 +00:00
Ulrich Drepper 228293b590 Update.
* posix/fnmatch_loop.c (FCT): Handle !() after * special like @()
	and +().
	* posix/tst-fnmatch.input: Add test cases for matching empty strings.
2001-03-28 06:25:09 +00:00
Ulrich Drepper a986484f67 Update.
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.
2001-03-16 07:40:05 +00:00
Ulrich Drepper 821a6bb436 Update.
* posix/tst-fnmatch.input: Add test case for FNM_PERIOD handling with
	FNM_EXTMATCH.

	* posix/fnmatch_loop.c: Optimize handling of ?() and @().
	* posix/fnmatch.c: Define STRLEN and STRCAT appropriately.

	* posix/Versions [libc] (GLIBC_2.2.3): Add fnmatch.
	* posix/fnmatch.c: Define with new default version GLIBC_2.2.3 to
	avoid running binaries with libc versions without FNM_EXTMATCH support.

	* include/wchar.h: Add prototype for __wcscat.
	* wcsmbs/wcscat.c: Define __wcscat and make wcscat weak alias.
2001-03-15 20:04:25 +00:00
Ulrich Drepper 955994e131 Update.
2001-03-15  Ulrich Drepper  <drepper@redhat.com>

	* posix/fnmatch.h (FNM_EXTMATCH): Define.
	* posix/fnmatch.c (NO_LEADING_PERIOD): Define.
	(posixly_correct): Move global variable here.
	(INT, EXT, END): Name new functions defined in fnmatch_loop.c.
	(fnmatch): Pretty printing.
	* posix/fnmatch_loop.c: Add code to handle FNM_EXTMATCH.
	* posix/tst-fnmatch.c: Recognize EXTMATCH flag.
	* posix/tst-fnmatch.input: Add tests for extended matching.

	* posix/testfnm.c: Add test for patterns with multiple ** before /.
	* posix/fnmatch_loop.c: Fix problem with the test above.
2001-03-15 09:36:19 +00:00
Ulrich Drepper bd8fbd5724 Update.
* posix/fnmatch_loop.c: Handle ranges outside glibc correctly.
2001-02-22 01:21:50 +00:00
Ulrich Drepper 70dc5068f8 Update.
* posix/fnmatch_loop.c: Remove incorrect reverse condition in
	[. .] matching.  Patch by Isamu Hasegawa <isamu@yamato.ibm.com>.

2001-01-31  Mark Kettenis  <kettenis@gnu.org>

	* misc/sys/select.h: Include <bits/time.h> instead of <sys/time.h>
	to get definition of `struct timeval'.

2001-01-31  Ulrich Drepper  <drepper@redhat.com>
2001-02-01 07:28:23 +00:00
Ulrich Drepper f798bf32a2 Update.
2001-01-31  Ulrich Drepper  <drepper@redhat.com>

	* posix/tst-fnmatch.input: Add test cases for de_DE.UTF-8 locale.
	* posix/fnmatch_loop.c: Fix handling of [= =] for multibyte charsets.
2001-01-31 21:04:34 +00:00
Ulrich Drepper 82eafaf769 Indentation fix. 2001-01-22 17:05:26 +00:00
Andreas Jaeger 2e47aff5ac * posix/fnmatch_loop.c (FCT): Remove signed warnings.
* posix/wordexp.c (do_parse_glob): Likewise. 
* sysdeps/posix/sigblock.c (__sigblock): Likewise. 
* sysdeps/posix/sigsetmask.c (__sigsetmask): Likewise. 
* elf/dl-open.c (_dl_open): Likewise. 
* elf/dl-close.c (_dl_close): Likewise. 
* elf/dl-load.c (_dl_map_object): Likewise. 
* iconv/iconv_prog.c (process_fd): Likewise.
2001-01-12 17:03:52 +00:00
Ulrich Drepper a4607c1f07 Update.
* posix/fnmatch_loop.c: Make FNM_LEADING_DIR behave as GNU tar
	expects it.  Patch by Colin Watson <riva.ucam.org>.
	* posix/tst-fnmatch.input: Add test cases for FNM_LEADING_DIR.
2000-10-21 07:30:28 +00:00
Ulrich Drepper 4c7d276eb1 Update.
2000-08-31  Bruno Haible  <haible@clisp.cons.org>

	* wctype/wcfuncs.c (iswblank): New function.
	* wctype/wcfuncs_l.c (__iswblank_l): New function.
	* wctype/wcextra.c: Remove file.
	* wctype/wcextra_l.c: Remove file.
	* wctype/Makefile (distribute): Remove wcextra and wcextra_l.

2000-08-31  Bruno Haible  <haible@clisp.cons.org>

	* locale/programs/ld-collate.c (collate_output): Remove redundant
	assert call.
	* string/strcoll.c: Likewise.
	* string/strxfrm.c: Include assert.h.  Add assert calls like in
	string/strcoll.c.

2000-08-31  Bruno Haible  <haible@clisp.cons.org>

	* locale/categories.def (_NL_COLLATE_HASH_SIZE,
	_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_NAMES, _NL_CTYPE_NAMES,
	_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Remove definitions.
	* locale/langinfo.h (_NL_COLLATE_HASH_SIZE, _NL_COLLATE_HASH_LAYERS,
	_NL_COLLATE_NAMES): Rename to _NL_COLLATE_GAP1/2/3 respectively.
	(_NL_CTYPE_NAMES): Rename to _NL_CTYPE_GAP3.
	(_NL_CTYPE_GAP3): Rename to _NL_CTYPE_GAP4.
	(_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Rename to
	_NL_CTYPE_GAP5/6 respectively.

	* locale/C-ctype.c (_nl_C_LC_CTYPE): Update.
	* ctype/ctype-info.c (__ctype_names, __ctype_width): Remove variables.
	* locale/lc-ctype.c (_nl_postload_ctype): Assume new locale format.
	Don't initialize __ctype_names and __ctype_width.
	* wctype/cname-lookup.h: Remove file.
	* wctype/Makefile (distribute): Remove cname-lookup.h.
	* wctype/wchar-lookup.h: Include stdint.h.
	* wctype/wctype.c (__wctype): Assume new locale format.
	* wctype/wctype_l.c (__wctype_l): Likewise.
	* wctype/iswctype.c: Don't include cname-lookup.h.
	(__iswctype): Assume new locale format.
	* wctype/iswctype_l.c: Don't include cname-lookup.h.
	(__iswctype_l): Assume new locale format.
	* wctype/wctrans.c: Don't include ctype.h.
	(wctrans): Assume new locale format.
	* wctype/wctrans_l.c (__wctrans_l): Likewise.
	* wctype/towctrans.c: Don't include cname-lookup.h.
	(__towctrans): Assume new locale format.
	* wctype/towctrans_l.c: Don't include cname-lookup.h.
	(__towctrans_l): Assume new locale format.
	* wctype/wcfuncs.c: Don't include ctype.h and cname-lookup.h. Include
	localeinfo.h instead.
	(__NO_WCTYPE): Remove unused macro.
	(__ctype32_b, __ctype32_toupper, __ctype32_tolower): Remove
	declarations.
	(iswalnum, iswalpha, iswcntrl, iswdigit, iswlower, iswgraph, iswprint,
	iswpunct, iswspace, iswupper, iswxdigit): Assume new locale format.
	(towlower, towupper): Likewise.
	* wctype/wcfuncs_l.c: Don't include cname-lookup.h. Include
	localeinfo.h instead.
	(__NO_WCTYPE): Remove unused macro.
	(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
	__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
	__iswxdigit_l): Assume new locale format.
	(__towlower_l, __towupper_l): Likewise.
	* wcsmbs/wcwidth.h: Don't include cname-lookup.h.
	(__ctype32_b): Remove declaration.
	(internal_wcwidth): Assume new locale format.
	* locale/programs/ld-ctype.c (struct locale_ctype_t): Remove fields
	plane_size, plane_cnt, names, width. Rename map to map_b, rename map32
	to map32_b, rename width_3level to width.
	(ctype_output): Always create new locale format. Don't emit
	_NL_CTYPE_NAMES, _NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS any more.
	(allocate_arrays): Always create new locale format.

	* locale/C-collate.c (_nl_C_LC_COLLATE): Update.
	* locale/weightwc.h (findidx): Assume new locale format.
	* string/strcoll.c (wcscoll): Remove local variables size, layers,
	names.
	* string/strxfrm.c (wcsxfrm): Likewise.
	* posix/fnmatch_loop.c (internal_fnwmatch): Likewise. Change type of
	local variable collseq to 'const char *'.
	(SUFFIX): Don't use, don't undefine.
	* posix/fnmatch.c: Remove SUFFIX definition.
	* locale/programs/ld-collate.c (struct locale_collate_t): Remove
	fields plane_size, plane_cnt, wcheads, wcseqorder. Rename
	wcheads_3level to wcheads, rename wcseqorder_3level to wcseqorder.
	(collate_finish): Always create new locale format. Remove local
	variables min_total, act_size.
	(collate_output): Always create new locale format. Remove local
	variables table_size, names, tablewc. Rename tablewc_3level to
	tablewc.

2000-08-31  Bruno Haible  <haible@clisp.cons.org>

	* locale/programs/ld-collate.c (obstack_int32_grow,
	obstack_int32_grow_fast): New inline functions.
	(output_weightwc, collate_output): Use them where possible.
2000-09-01 19:36:44 +00:00
Ulrich Drepper 04ea3b0fbb Update.
2000-08-27  Bruno Haible  <haible@clisp.cons.org>

	* string/strxfrm.c (strxfrm, wcsxfrm): Include <sys/param.h>.
	If nrules == 0 and srclen < n, copy only srclen + 1 characters.

	* sysdeps/generic/getdomain.c (getdomainname): Include <sys/param.h>.
	If the result is fits in the buffer, copy only as many bytes as needed.

	* sysdeps/generic/_strerror.c (__strerror_r): Don't zero-fill the
	buffer after copying numbuf into it.
	* sysdeps/mach/_strerror.c (__strerror_r): Likewise.

2000-08-27  Bruno Haible  <haible@clisp.cons.org>

	* posix/confstr.c (confstr): When string_len > len, NUL-terminate
	the result.  When string_len < len, don't clear the rest of the buffer.

2000-08-27  Bruno Haible  <haible@clisp.cons.org>

	Support for new LC_COLLATE format.
	* locale/coll-lookup.h: New file.
	* locale/weightwc.h (findidx): When size == 0, call
	collidx_table_lookup.
	* wcsmbs/wcscoll.c: Include coll-lookup.h.
	* wcsmbs/wcsxfrm.c: Likewise.
	* posix/fnmatch.c: Likewise.
	* posix/fnmatch_loop.c (internal_fnwmatch): When size == 0, call
	collseq_table_lookup.
	* locale/programs/3level.h: New file.
	* locale/programs/ld-ctype.c: (wcwidth_table, wctrans_table): Define
	by including "3level.h".
	* locale/programs/ld-collate.c (wchead_table, collidx_table,
	collseq_table): New types, defined by including "3level.h".
	(locale_collate_t): New wcheads_3level, wcseqorder_3level fields.
	(encoding_mask, encoding_byte): Remove.
	(utf8_encode): Use simple shifts instead.
	(collate_finish): When !oldstyle_tables, set plane_size and plane_cnt
	to 0, and initialize and fill wcheads_3level and wcseqorder_3level.
	(collate_output): New local variable tablewc_3level. When
	!oldstyle_tables, set table_size to 0 and names to NULL and fill
	tablewc_3level instead of tablewc. Change format of TABLEWC and
	COLLSEQWC entries written to the file.
	* locale/C-collate.c (collseqwc): Change format.
	(_nl_C_LC_COLLATE): Set HASH_SIZE and HASH_LAYERS to 0, change format
	of COLLSEQWC.
	* locale/Makefile (distribute): Add coll-lookup.h, programs/3level.h.

2000-08-27  Bruno Haible  <haible@clisp.cons.org>

	* locale/programs/ld-ctype.c (MAX_CHARNAMES_IDX): New macro.
	(locale_ctype_t): New charnames_idx field.
	(ctype_startup): Initialize charnames_idx field.
	(find_idx): Speed up dramatically by using charnames_idx inverse table.

2000-08-27  Bruno Haible  <haible@clisp.cons.org>

	* locale/C-ctype.c: Switch to new locale format.
	(_nl_C_LC_CTYPE_names): Remove array.
	(STRUCT_CTYPE_CLASS): New macro.
	(_nl_C_LC_CTYPE_class_{upper,lower,alpha,digit,xdigit,space,print,
	graph,blank,cntrl,punct,alnum}, _nl_C_LC_CTYPE_map_{toupper,tolower}):
	New three-level tables.
	(_nl_C_LC_CTYPE_width): Change from array to three-level table.
	(_nl_C_LC_CTYPE): Fix nstrings value. Set HASH_SIZE and HASH_LAYERS
	to 0. Change WIDTH format. Set CLASS_OFFSET and MAP_OFFSET. Add
	12 class tables and 2 map tables at the end.
	* ctype/ctype-info.c (_nl_C_LC_CTYPE_names): Remove declaration.
	(_nl_C_LC_CTYPE_class_{upper,lower,alpha,digit,xdigit,space,print,
	graph,blank,cntrl,punct,alnum}, _nl_C_LC_CTYPE_map_{toupper,tolower}):
	New declarations.
	(b): Remove trailing semicolon.
	(__ctype_names, __ctype_width): Don't initialize.
	(__ctype32_wctype, __ctype32_wctrans, __ctype32_width): Initialize.

2000-08-27  Bruno Haible  <haible@clisp.cons.org>

	* elf/dl-load.c (open_path): Add a argument telling whether *dirsp
	is guaranteed to be allocated with the same malloc() and may be
	passed to free().
	(_dl_map_object): Update open_path calls. If rtld_search_dirs has
	been set to empty by an earlier open_path call, don't pass it again.
2000-08-29 01:20:23 +00:00
Ulrich Drepper 8fb81470d9 Update.
* gnulib/Makefile (tests): Add tst-gcc.
	* gnulib/tst-gcc.c: New file.

	* assert/Makefile (routines): Add __assert.
	* assert/Versions: Export __assert for glibc 2.2.
	* assert/__assert.c: New file.
	* assert/assert.h: Declare __assert.

2000-07-27  Bruno Haible  <haible@clisp.cons.org>

	* locale/localeinfo.h (_ISCTYPE): New macro.
	* posix/fnmatch_loop.c (internal_fnmatch): Use it, support new
	LC_CTYPE locale format.
	* locale/programs/ld-ctype.c (locale_ctype_t): New field class_b.
	(ctype_output): Output class_b[nr] right before class_3level[nr].
	(allocate_arrays): Fill class_b, similarly to class_3level.

2000-08-01  Ulrich Drepper  <drepper@redhat.com>
2000-08-02 00:09:25 +00:00
Ulrich Drepper c1ac11df76 Fixes for use outside glibc. 2000-07-26 16:04:48 +00:00