gnulib.git
18 years ago* lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
Paul Eggert [Thu, 1 Sep 2005 07:03:01 +0000 (07:03 +0000)]
* lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
lengths fit in regoff_t; this isn't true if regoff_t is the same
width as size_t.
* lib/regex.c (re_search_internal): 5th arg is LAST_START
(= START + RANGE) instead of RANGE.  This avoids overflow
problems when regoff_t is the same width as size_t.
All callers changed.
(re_search_2_stub): Check for overflow when adding the
sizes of the two strings.
(re_search_stub): Check for overflow when adding START
to RANGE; if it occurs, substitute the extreme value.
* config/srclist.txt: Add glibc bug 1284.

18 years ago* lib/regcomp.c (search_duplicated_node): Make first pointer arg
Paul Eggert [Wed, 31 Aug 2005 23:36:42 +0000 (23:36 +0000)]
* lib/regcomp.c (search_duplicated_node): Make first pointer arg
a pointer-to-const.
* lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
(register_state): Likewise.
* lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
(check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
(group_nodes_into_DFAstates): Likewise.
* config/srclist.txt: Add glibc bug 1282.

18 years agoOn 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
Paul Eggert [Wed, 31 Aug 2005 22:51:09 +0000 (22:51 +0000)]
On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
old glibc regex code mishandles strings longer than 2**31 bytes.
This patch fixes this when the regex code is used in gnulib
(i.e., outside glibc).

* lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
governing whether the rest of this patch is active.  By default,
the macro is disabled and the patch has no effect.
(regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
(__re_idx_t, __re_size_t, __re_long_size_t): New types.
(struct re_pattern_buffer, re_search, re_search_2, re_match):
(re_match_2, re_set_registers): Use the new types.
* lib/regex_internal.h (Idx, re_hashval_t): New types.
(REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
New macros.
(re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
(re_string_context_at, bin_tree_t, re_dfastate_t):
(struct re_state_table_entry, state_array_t, re_sub_match_last_t):
(re_sub_match_top_t, re_match_context_t, re_sift_context_t):
(struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
(re_string_char_size_at, re_string_wchar_at):
(re_string_elem_size_at):
Use the new types and macros to port to 64-bit hosts.
Use unsigned types for internal values, so that the code
mostly works even for arrays larger than SSIZE_MAX.
* lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
(search_duplicated_node, calc_eclosure_iter, fetch_number):
(parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
(build_equiv_class, build_charclass, re_compile_fastmap_iter):
(free_dfa_content, create_initial_state, optimize_utf8, analyze):
(optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
(calc_inveclosure, parse_dup_op, build_range_exp):
(build_collating_symbol, parse_bracket_exp, build_charclass_op):
(fetch_number, create_token_tree, mark_opt_subexp):
Likewise.
* lib/regex_internal.c
(re_string_construct_common, create_ci_newstate):
(create_cd_newstate, re_string_allocate, re_string_construct):
(re_string_realloc_buffers, build_wcs_upper_buffer):
(re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
(re_string_reconstruct, re_string_peek_byte_case):
(re_string_fetch_byte_case, re_string_context_at):
(re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
(re_node_set_init_copy, re_node_set_add_intersect):
(re_node_set_init_union, re_node_set_merge, re_node_set_insert):
(re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
(re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
(re_acquire_state, re_acquire_state_context, register_state):
Likewise.
* lib/regex.c
(match_ctx_init, match_ctx_add_entry, search_cur_bkref_entry):
(match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
(re_search_internal, re_search_2_stub, re_search_stub)
(re_copy_regs, check_matching, check_halt_state_context, update_regs):
(push_fail_stack, sift_states_iter_mb, build_sifted_states):
(update_cur_sifted_state, check_dst_limits):
(check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
(check_subexp_limits, sift_states_bkref, merge_state_array):
(check_subexp_matching_top, get_subexp, get_subexp_sub):
(find_subexp_node, check_arrival, check_arrival_add_next_nodes):
(check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
(expand_bkref_cache, check_node_accept_bytes):
(group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
(re_search, re_match_2, re_search_2, prune_impossible_nodes):
(acquire_init_state_context, check_halt_node_context):
(proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
(sift_states_backward, clean_state_log_if_needed):
(sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
(find_recover_state, transit_state_sb, transit_state_mb):
(transit_state_bkref, build_trtable, match_ctx_clean):
Likewise.
* lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
to work around an assumption that REG_MISSING is negative.
* m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
_REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
and large-file glibc and in 32-bit large-file Solaris.
* config/srclist.txt: Add glibc bug 1281.

18 years agoMake it possible to use multiple gnulib instantiations with the same
Bruno Haible [Wed, 31 Aug 2005 20:57:03 +0000 (20:57 +0000)]
Make it possible to use multiple gnulib instantiations with the same
configure.ac.
Fix some breakage by previous patches.

18 years agoAvoid unnecessary diffs in the generated lib/Makefile.am.
Bruno Haible [Wed, 31 Aug 2005 20:55:19 +0000 (20:55 +0000)]
Avoid unnecessary diffs in the generated lib/Makefile.am.

18 years agoRead the previous cached settings.
Bruno Haible [Wed, 31 Aug 2005 20:54:49 +0000 (20:54 +0000)]
Read the previous cached settings.
Remove files that become obsolete if gnulib-tool added them earlier.

18 years agoSeparate the generates files into cvs-committable files and frequently
Bruno Haible [Wed, 31 Aug 2005 20:53:42 +0000 (20:53 +0000)]
Separate the generates files into cvs-committable files and frequently
changing files.

18 years agoAvoid multiple copies of AC_GNU_SOURCE in the configure file.
Bruno Haible [Wed, 31 Aug 2005 20:52:14 +0000 (20:52 +0000)]
Avoid multiple copies of AC_GNU_SOURCE in the configure file.

18 years agoRename some variables.
Bruno Haible [Wed, 31 Aug 2005 20:51:41 +0000 (20:51 +0000)]
Rename some variables.

18 years agoPut all dummy definitions of gnulib-tool's specification macros into
Bruno Haible [Wed, 31 Aug 2005 20:51:09 +0000 (20:51 +0000)]
Put all dummy definitions of gnulib-tool's specification macros into
gnulib-tool.m4.

18 years agoNew option --macro-prefix.
Bruno Haible [Wed, 31 Aug 2005 20:48:36 +0000 (20:48 +0000)]
New option --macro-prefix.

18 years agoEmit a stub for gl_LIBTOOL: we want to cache whether --libtool was specified.
Bruno Haible [Wed, 31 Aug 2005 20:46:59 +0000 (20:46 +0000)]
Emit a stub for gl_LIBTOOL: we want to cache whether --libtool was specified.

18 years ago* lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
Paul Eggert [Wed, 31 Aug 2005 20:27:56 +0000 (20:27 +0000)]
* lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
(seek_collating_symbol_entry) [defined _LIBC]:
(lookup_collation_sequence_value) [defined _LIBC]:
(build_range_exp, build_collating_symbol) [defined _LIBC]:
Use prototypes rather than old-style function definitions.
* lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
(transit_state_sb) [0]:
(find_collation_sequence_value) [defined _LIBC]: Likewise.
* config/srclist.txt: Add glibc bug 1280.

18 years ago* lib/regexec.c (re_search_internal): Simplify update of
Paul Eggert [Wed, 31 Aug 2005 19:55:29 +0000 (19:55 +0000)]
* lib/regexec.c (re_search_internal): Simplify update of
rm_so and rm_eo by replacing "if (A == B) A += C - B;"
with the equivalent of "if (A == B) A = C;".  This will
make the code more reliable once we port to 64-bit hosts.
* config/srclist.txt: Add glibc bug 1279.

18 years agoAdd glibc bug 1277.
Paul Eggert [Wed, 31 Aug 2005 19:40:48 +0000 (19:40 +0000)]
Add glibc bug 1277.

18 years ago* lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
Paul Eggert [Wed, 31 Aug 2005 19:38:13 +0000 (19:38 +0000)]
* lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
(optimize_subexps, lower_subexp):
Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
since the signed shift might overflow.  Use 1u<<31 instead.
* lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
Likewise.
* lib/regexec.c (check_dst_limits_calc_pos_1):
(check_subexp_matching_top): Likewise.
* lib/regcomp.c (optimize_subexps, lower_subexp):
Use CHAR_BIT rather than 8, for clarity.
* lib/regexec.c (check_dst_limits_calc_pos_1):
(check_subexp_matching_top): Likewise.
* lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
have to worry about portability issues when shifting it left.
Remove no-longer-needed test for table_size > 0.
* lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
in a word, as the resulting behavior is undefined.
* lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
in one case, a <= should have been an <, and in another case the
whole test was missing.
* lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
the standard name CHAR_BIT.
* lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
this is not true on one's complement and signed-magnitude hosts.

18 years ago* lib/regex_internal.h (re_sub_match_top_t): Remove unused member
Paul Eggert [Wed, 31 Aug 2005 18:08:34 +0000 (18:08 +0000)]
* lib/regex_internal.h (re_sub_match_top_t): Remove unused member
next_last_offset.
(struct re_dfa_t): Remove unused member states_alloc.
* lib/regcomp.c (init_dfa): Don't initialize unused members.
* config/srclist.txt: Add glibc bug 1273.

18 years ago*** empty log message ***
Jim Meyering [Wed, 31 Aug 2005 15:56:30 +0000 (15:56 +0000)]
*** empty log message ***

18 years agoAdd a FIXME comment.
Jim Meyering [Wed, 31 Aug 2005 15:56:01 +0000 (15:56 +0000)]
Add a FIXME comment.

18 years ago*** empty log message ***
Jim Meyering [Wed, 31 Aug 2005 15:39:56 +0000 (15:39 +0000)]
*** empty log message ***

18 years ago(Files): Add stdio--.h.
Jim Meyering [Wed, 31 Aug 2005 15:39:48 +0000 (15:39 +0000)]
(Files): Add stdio--.h.

18 years ago(Files): Add unistd--.h.
Jim Meyering [Wed, 31 Aug 2005 15:39:33 +0000 (15:39 +0000)]
(Files): Add unistd--.h.

18 years agoInclude a header, to define NULL.
Bruno Haible [Wed, 31 Aug 2005 11:51:18 +0000 (11:51 +0000)]
Include a header, to define NULL.

18 years ago* iconvme.h: Add prototype for iconv_alloc.
Simon Josefsson [Tue, 30 Aug 2005 07:38:53 +0000 (07:38 +0000)]
* iconvme.h: Add prototype for iconv_alloc.

18 years ago.
Karl Berry [Tue, 30 Aug 2005 07:36:01 +0000 (07:36 +0000)]
.

18 years agoAvoid unnecessary spaces in $avoidlist.
Bruno Haible [Mon, 29 Aug 2005 20:03:01 +0000 (20:03 +0000)]
Avoid unnecessary spaces in $avoidlist.

18 years agoEmit more comments and advice.
Bruno Haible [Mon, 29 Aug 2005 20:02:25 +0000 (20:02 +0000)]
Emit more comments and advice.

18 years agoProtect references to destdir with double-quotes.
Bruno Haible [Mon, 29 Aug 2005 19:59:56 +0000 (19:59 +0000)]
Protect references to destdir with double-quotes.

18 years ago*** empty log message ***
Jim Meyering [Mon, 29 Aug 2005 11:57:22 +0000 (11:57 +0000)]
*** empty log message ***

18 years agoIf more parameters are given, check each of them
Jim Meyering [Mon, 29 Aug 2005 11:57:17 +0000 (11:57 +0000)]
If more parameters are given, check each of them
separately; add more exceptions, as noted by Jim Meyering.
(check_module): New procedure.
(%exempt_header): Now contains all exceptions.

18 years agoFix rule to not assume GNU make.
Bruno Haible [Mon, 29 Aug 2005 11:13:56 +0000 (11:13 +0000)]
Fix rule to not assume GNU make.

18 years agoFix, spotted by Stepan Kasal.
Bruno Haible [Mon, 29 Aug 2005 11:08:46 +0000 (11:08 +0000)]
Fix, spotted by Stepan Kasal.

18 years agoFix typo in description, spotted by Stepan Kasal.
Bruno Haible [Mon, 29 Aug 2005 11:01:04 +0000 (11:01 +0000)]
Fix typo in description, spotted by Stepan Kasal.

18 years ago* iconvme.c: Fix errno.
Simon Josefsson [Mon, 29 Aug 2005 08:09:21 +0000 (08:09 +0000)]
* iconvme.c: Fix errno.
* iconvme.c: Split iconv_string into iconv_alloc.

18 years ago.
Karl Berry [Sun, 28 Aug 2005 07:34:41 +0000 (07:34 +0000)]
.

18 years ago*** empty log message ***
Jim Meyering [Sat, 27 Aug 2005 20:49:48 +0000 (20:49 +0000)]
*** empty log message ***

18 years agoMerge minor changes from coreutils.
Jim Meyering [Sat, 27 Aug 2005 20:49:12 +0000 (20:49 +0000)]
Merge minor changes from coreutils.

18 years agoMerge from coreutils: New file.
Jim Meyering [Sat, 27 Aug 2005 20:46:51 +0000 (20:46 +0000)]
Merge from coreutils: New file.

18 years ago*** empty log message ***
Jim Meyering [Sat, 27 Aug 2005 20:39:01 +0000 (20:39 +0000)]
*** empty log message ***

18 years agoincrement serial number
Jim Meyering [Sat, 27 Aug 2005 20:38:27 +0000 (20:38 +0000)]
increment serial number

18 years ago(gl_STDIO_SAFER): Add stdio--.h.
Jim Meyering [Sat, 27 Aug 2005 20:38:08 +0000 (20:38 +0000)]
(gl_STDIO_SAFER): Add stdio--.h.

18 years agoNew file. From coreutils.
Jim Meyering [Sat, 27 Aug 2005 20:37:14 +0000 (20:37 +0000)]
New file.  From coreutils.

18 years ago*** empty log message ***
Jim Meyering [Sat, 27 Aug 2005 20:35:39 +0000 (20:35 +0000)]
*** empty log message ***

18 years agoAdd pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
Jim Meyering [Sat, 27 Aug 2005 20:35:21 +0000 (20:35 +0000)]
Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.

18 years agoMerge from coreutils: New file.
Jim Meyering [Sat, 27 Aug 2005 20:12:02 +0000 (20:12 +0000)]
Merge from coreutils: New file.

18 years ago*** empty log message ***
Jim Meyering [Sat, 27 Aug 2005 20:06:29 +0000 (20:06 +0000)]
*** empty log message ***

18 years ago(pipe): Define to pipe_safer.
Jim Meyering [Sat, 27 Aug 2005 20:06:18 +0000 (20:06 +0000)]
(pipe): Define to pipe_safer.

18 years ago*** empty log message ***
Jim Meyering [Sat, 27 Aug 2005 14:37:32 +0000 (14:37 +0000)]
*** empty log message ***

18 years ago(gl_UNISTD_SAFER): Add pipe-safer.c.
Jim Meyering [Sat, 27 Aug 2005 14:37:07 +0000 (14:37 +0000)]
(gl_UNISTD_SAFER): Add pipe-safer.c.

18 years ago(gl_FCNTL_SAFER): Add creat-safer.c to the
Jim Meyering [Sat, 27 Aug 2005 14:35:43 +0000 (14:35 +0000)]
(gl_FCNTL_SAFER): Add creat-safer.c to the
AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.

18 years ago(Files): Add creat-safer.c.
Jim Meyering [Sat, 27 Aug 2005 14:29:31 +0000 (14:29 +0000)]
(Files): Add creat-safer.c.

18 years ago(Files): Add pipe-safer.c
Jim Meyering [Sat, 27 Aug 2005 14:29:15 +0000 (14:29 +0000)]
(Files): Add pipe-safer.c

18 years ago*** empty log message ***
Jim Meyering [Sat, 27 Aug 2005 14:29:00 +0000 (14:29 +0000)]
*** empty log message ***

18 years agoDeclare pipe_safer.
Jim Meyering [Sat, 27 Aug 2005 14:28:43 +0000 (14:28 +0000)]
Declare pipe_safer.

18 years agoInclude <sys/types.h> and declare creat_safer.
Jim Meyering [Sat, 27 Aug 2005 14:28:28 +0000 (14:28 +0000)]
Include <sys/types.h> and declare creat_safer.

18 years ago(creat): Define to creat_safer.
Jim Meyering [Sat, 27 Aug 2005 14:28:10 +0000 (14:28 +0000)]
(creat): Define to creat_safer.

18 years agoGNU tar needs these.
Jim Meyering [Sat, 27 Aug 2005 14:27:24 +0000 (14:27 +0000)]
GNU tar needs these.

18 years ago* config/srclist.text: Add glibc bug 1248.
Paul Eggert [Fri, 26 Aug 2005 21:47:51 +0000 (21:47 +0000)]
* config/srclist.text: Add glibc bug 1248.
* lib/regex_internal.h: Remove all references to
RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
or better.
(bitset_not, bitset_merge, bitset_not_merge):
(bitset_mask, re_string_allocate, re_string_construct):
(re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
(re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
(re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
(re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
(re_node_set_init_union, re_node_set_merge, re_node_set_insert):
(re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
(re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
(re_acquire_state_context):
Remove unnecessary forward decls.
(re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
Put __attribute at function definition,
now that the function decl has been removed.
* lib/regex_internal.c (re_string_peek_byte_case):
(re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
Likewise.

18 years ago* getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
Simon Josefsson [Fri, 26 Aug 2005 12:33:59 +0000 (12:33 +0000)]
* getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
Haible <bruno@clisp.org>.

18 years ago.
Karl Berry [Fri, 26 Aug 2005 07:36:33 +0000 (07:36 +0000)]
.

18 years agoFix typo: __LIBC -> _LIBC.
Paul Eggert [Fri, 26 Aug 2005 06:08:46 +0000 (06:08 +0000)]
Fix typo: __LIBC -> _LIBC.

18 years ago* config/srclist.txt: Add glibc bug 1245.
Paul Eggert [Fri, 26 Aug 2005 05:58:54 +0000 (05:58 +0000)]
* config/srclist.txt: Add glibc bug 1245.

* lib/regexec.c (set_regs): Don't alloca with an unbounded size.

alloca modernization/simplification for regex.
* lib/regex.c: Remove portability cruft for alloca.  This no longer
needs to be at the start of the file, and can be moved into
regex_internal.h and simplified.
* lib/regex_internal.h: Include <alloca.h>.
(__libc_use_alloca) [!defined _LIBC]: New macro.
* lib/regexec.c (build_trtable): Remove "#ifdef _LIBC",
since the code now works outside glibc.

18 years ago* getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
Simon Josefsson [Thu, 25 Aug 2005 21:19:07 +0000 (21:19 +0000)]
* getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
__fsetlocking.

18 years ago* getpass.c: Add WIN32 implementation. Conditionalize use of
Simon Josefsson [Thu, 25 Aug 2005 21:18:50 +0000 (21:18 +0000)]
* getpass.c: Add WIN32 implementation.  Conditionalize use of
termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
GLIBC specific code.

18 years agoUse m4_pushdef/m4_popdef and AS_TR_SH, AS_TR_CPP.
Bruno Haible [Thu, 25 Aug 2005 20:57:11 +0000 (20:57 +0000)]
Use m4_pushdef/m4_popdef and AS_TR_SH, AS_TR_CPP.

18 years ago* m4/regex.m4: Add AC_PREREQ(2.50).
Paul Eggert [Thu, 25 Aug 2005 20:54:03 +0000 (20:54 +0000)]
* m4/regex.m4: Add AC_PREREQ(2.50).
(gl_REGEX): If --with-included-regex was given, skip the autodetection.

18 years agoAdd comment.
Bruno Haible [Thu, 25 Aug 2005 20:42:45 +0000 (20:42 +0000)]
Add comment.

18 years agoMake regex safe for g++. This fixes one real bug (an "err"
Paul Eggert [Thu, 25 Aug 2005 20:39:57 +0000 (20:39 +0000)]
Make regex safe for g++.  This fixes one real bug (an "err"
that should have been "*err").
* config/srclist.txt: Add glibc bug 1241.
* lib/regex_internal.h (re_calloc): New macro, consistent with
re_malloc etc.  All callers of calloc changed to use re_calloc.
* lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
not int.  All callers changed.
* lib/regcomp.c (re_compile_fastmap_iter): Don't use alloca
(mb_cur_max); just use an array of size MB_LEN_MAX.
* lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
(find_recover_state): Change "err" to "*err"; this fixes what
appears to be a real bug.
(check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
versus int.

18 years ago* modules/regex (Depends-on): Add malloc, since the code
Paul Eggert [Thu, 25 Aug 2005 19:45:05 +0000 (19:45 +0000)]
* modules/regex (Depends-on): Add malloc, since the code
assumes that !malloc(0) means failure.

18 years ago*** empty log message ***
Jim Meyering [Thu, 25 Aug 2005 16:30:08 +0000 (16:30 +0000)]
*** empty log message ***

18 years agoInclude <config.h>.
Jim Meyering [Thu, 25 Aug 2005 16:30:01 +0000 (16:30 +0000)]
Include <config.h>.
Otherwise, we'd lose LARGEFILE support in any file using e.g. "fcntl--.h"

18 years agoTests for module 'tls'.
Bruno Haible [Thu, 25 Aug 2005 12:40:25 +0000 (12:40 +0000)]
Tests for module 'tls'.

18 years agoTests for gnulib module 'lock'.
Bruno Haible [Thu, 25 Aug 2005 12:36:58 +0000 (12:36 +0000)]
Tests for gnulib module 'lock'.

18 years agoSupport for unit test modules.
Bruno Haible [Thu, 25 Aug 2005 12:36:00 +0000 (12:36 +0000)]
Support for unit test modules.

18 years agoTemplate for tests module description.
Bruno Haible [Thu, 25 Aug 2005 12:17:21 +0000 (12:17 +0000)]
Template for tests module description.

18 years agoUpdate copyright year and authors.
Bruno Haible [Thu, 25 Aug 2005 12:15:37 +0000 (12:15 +0000)]
Update copyright year and authors.

18 years agoFix autoreconf invocation.
Bruno Haible [Thu, 25 Aug 2005 12:11:12 +0000 (12:11 +0000)]
Fix autoreconf invocation.

18 years agoGeneralize support for --aux-dir.
Bruno Haible [Thu, 25 Aug 2005 12:08:21 +0000 (12:08 +0000)]
Generalize support for --aux-dir.

18 years agoUse compound statement instead of subshell.
Bruno Haible [Thu, 25 Aug 2005 12:02:37 +0000 (12:02 +0000)]
Use compound statement instead of subshell.

18 years agoChange --aux-dir default to "build-aux".
Bruno Haible [Thu, 25 Aug 2005 12:00:38 +0000 (12:00 +0000)]
Change --aux-dir default to "build-aux".

18 years agoProper autoconf macro argument quoting.
Bruno Haible [Thu, 25 Aug 2005 11:56:57 +0000 (11:56 +0000)]
Proper autoconf macro argument quoting.

18 years ago.
Karl Berry [Thu, 25 Aug 2005 07:41:09 +0000 (07:41 +0000)]
.

18 years ago* config/srclist.txt: Add glibc bug 1240.
Paul Eggert [Thu, 25 Aug 2005 05:08:59 +0000 (05:08 +0000)]
* config/srclist.txt: Add glibc bug 1240.
* lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
* lib/regex.h (regerror): Likewise.

18 years agoFix typo in previous log entry.
Paul Eggert [Wed, 24 Aug 2005 23:43:46 +0000 (23:43 +0000)]
Fix typo in previous log entry.

18 years ago* srclist.txt: Comment out lib/regex.c. Add glibc bug 1238.
Paul Eggert [Wed, 24 Aug 2005 23:43:00 +0000 (23:43 +0000)]
* srclist.txt: Comment out lib/regex.c.  Add glibc bug 1238.
* lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
requires this.  (The code never needed it.)

18 years ago* config/srclist.txt: Add glibc bug 1237.
Paul Eggert [Wed, 24 Aug 2005 23:29:39 +0000 (23:29 +0000)]
* config/srclist.txt: Add glibc bug 1237.
* lib/regcomp.c, lib/regex_internal.c, lib/regex_internal.h:
* lib/regexec.c:
All uses of recently-renamed identifiers changed to use the new,
POSIX-compliant names.  The code will build and run just fine
without these changes, but it's better to eat our own dog food
and use the standard-conforming names.
* m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
for GNU regex features.

18 years ago[_REGEX_SOURCE]: Define re_fastmap_accurate too; this was
Paul Eggert [Wed, 24 Aug 2005 23:09:33 +0000 (23:09 +0000)]
[_REGEX_SOURCE]: Define re_fastmap_accurate too; this was
inadvertently omitted from the previous patch.

18 years ago* config/srclist.txt:
Paul Eggert [Wed, 24 Aug 2005 22:29:38 +0000 (22:29 +0000)]
* config/srclist.txt:
Remove glibc bug 1233 and add 1236, which supersedes it.

* lib/regex.h: Fix a multitude of POSIX name space violations.
These changes have an effect only for programs that define
_POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
do not change anything for programs compiled in the normal way.
Also, there is no effect on the ABI.

(_REGEX_SOURCE): New macro.
Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
defined and _GNU_SOURCE is not; this fixes a name space violation.

Rename the following macros to obey POSIX requirements.
The old names are still visible as macros if _REGEX_SOURCE is defined.
(REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
RE_BACKSLASH_ESCAPE_IN_LISTS.
(REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
(REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
(REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
(REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
(REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
(REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
(REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
(REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
(REG_INTERVALS): renamed from RE_INTERVALS.
(REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
(REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
(REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
(REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
(REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
(REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
(REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
(REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
RE_UNMATCHED_RIGHT_PAREN_ORD.
(REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
(REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
(REG_DEBUG): renamed from RE_DEBUG.
(REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
(REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
unusual, since we can't clash with the POSIX REG_ICASE.
(REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
(REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
(REG_NO_SUB): renamed from RE_NO_SUB.
(REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
(REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
(REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
(REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
(REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
(REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
(REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
(REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
(REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
(_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
(REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
(REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
RE_SYNTAX_POSIX_MINIMAL_BASIC.
(REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
(REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
(REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
(REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
(REG_REALLOCATE): Renamed from REGS_REALLOCATE.
(REG_FIXED): Renamed from REGS_FIXED.
(REG_NREGS): Renamed from RE_NREGS.

(REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
of other REG_* macros, since POSIX says the user is allowed to
#undef these macros selectively.

(reg_errcode_t): Update comment stating what other tables need
to be consistent.

Rename the following enum values to obey POSIX requirements.
The old names are still visible as macros.
(_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
is not defined, since GNU is supposed to be a superset of POSIX as
much as possible, and since we want reg_errcode_t to be a signed
type for implementation consistency.
(_REG_NOERROR): Renamed from REG_NOERROR.
(_REG_NOMATCH): Renamed from REG_NOMATCH.
(_REG_BADPAT): Renamed from REG_BADPAT.
(_REG_ECOLLATE): Renamed from REG_ECOLLATE.
(_REG_ECTYPE): Renamed from REG_ECTYPE.
(_REG_EESCAPE): Renamed from REG_EESCAPE.
(_REG_ESUBREG): Renamed from REG_ESUBREG.
(_REG_EBRACK): Renamed from REG_EBRACK.
(_REG_EPAREN): Renamed from REG_EPAREN.
(_REG_EBRACE): Renamed from REG_EBRACE.
(_REG_BADBR): Renamed from REG_BADBR.
(_REG_ERANGE): Renamed from REG_ERANGE.
(_REG_ESPACE): Renamed from REG_ESPACE.
(_REG_BADRPT): Renamed from REG_BADRPT.
(_REG_EEND): Renamed from REG_EEND.
(_REG_ESIZE): Renamed from REG_ESIZE.
(_REG_ERPAREN): Renamed from REG_ERPAREN.
(REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
(REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
(REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
(REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.

(_REG_RE_NAME, _REG_RM_NAME): New macros.
(REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
changed.  But support the old name if the new one is not defined
and if _REGEX_SOURCE.

Change the following member names in struct re_pattern_buffer.
The old names are still supported if !_REGEX_SOURCE.
The new names are always supported, regardless of _REGEX_SOURCE.
(re_buffer): Renamed from buffer.
(re_allocated): Renamed from allocated.
(re_used): Renamed from used.
(re_syntax): Renamed from syntax.
(re_fastmap): Renamed from fastmap.
(re_translate): Renamed from translate.
(re_can_be_null): Renamed from can_be_null.
(re_regs_allocated): Renamed from regs_allocated.
(re_fastmap_accurate): Renamed from fastmap_accurate.
(re_no_sub): Renamed from no_sub.
(re_not_bol): Renamed from not_bol.
(re_not_eol): Renamed from not_eol.
(re_newline_anchor): Renamed from newline_anchor.

Change the following member names in struct re_registers.
The old names are still supported if !_REGEX_SOURCE.
The new names are always supported, regardless of _REGEX_SOURCE.
(rm_num_regs): Renamed from num_regs.
(rm_start): Renamed from start.
(rm_end): Renamed from end.

(re_set_syntax, re_compile_pattern, re_compile_fastmap):
(re_search, re_search_2, re_match, re_match_2, re_set_registers):
Prepend __ to parameter names.

18 years ago(File descriptor based Input/Output): Add fcntl-safer.
Jim Meyering [Wed, 24 Aug 2005 19:44:08 +0000 (19:44 +0000)]
(File descriptor based Input/Output): Add fcntl-safer.

18 years ago(Depends-on): Add fcntl-safer.
Jim Meyering [Wed, 24 Aug 2005 19:43:48 +0000 (19:43 +0000)]
(Depends-on): Add fcntl-safer.

18 years ago*** empty log message ***
Jim Meyering [Wed, 24 Aug 2005 19:42:04 +0000 (19:42 +0000)]
*** empty log message ***

18 years agoSync from coreutils.
Jim Meyering [Wed, 24 Aug 2005 19:40:42 +0000 (19:40 +0000)]
Sync from coreutils.
New file.

18 years agofilter through indent
Jim Meyering [Wed, 24 Aug 2005 11:56:36 +0000 (11:56 +0000)]
filter through indent

18 years agoAdd multiple-inclusion guard.
Bruno Haible [Wed, 24 Aug 2005 11:04:19 +0000 (11:04 +0000)]
Add multiple-inclusion guard.

18 years agoUse GNU coding style.
Bruno Haible [Wed, 24 Aug 2005 11:01:01 +0000 (11:01 +0000)]
Use GNU coding style.

18 years agoInclude config.h too.
Simon Josefsson [Wed, 24 Aug 2005 10:59:57 +0000 (10:59 +0000)]
Include config.h too.

18 years ago* tests/test-getpass.c: New file.
Simon Josefsson [Wed, 24 Aug 2005 09:21:10 +0000 (09:21 +0000)]
* tests/test-getpass.c: New file.

18 years ago*** empty log message ***
Jim Meyering [Wed, 24 Aug 2005 06:23:16 +0000 (06:23 +0000)]
*** empty log message ***

18 years ago(Makefile.am): Remove `lib_SOURCES += ...' line,
Jim Meyering [Wed, 24 Aug 2005 06:23:07 +0000 (06:23 +0000)]
(Makefile.am): Remove `lib_SOURCES += ...' line,
now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.

18 years agoUse AC_LIBSOURCES and AC_LIBOBJ to indicate source
Jim Meyering [Wed, 24 Aug 2005 06:21:29 +0000 (06:21 +0000)]
Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
and object files for this module.