diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-12-22 17:21:16 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-12-22 17:21:16 +0200 |
commit | 725d2f781b48ba83f4c8784a0fbe62fe2a6c107a (patch) | |
tree | 396c052bd95aa1190d90bc81f3b983dd60550e36 | |
parent | cd35e365b6f8d356645093bab1c67c1867a63aef (diff) | |
download | egawk-725d2f781b48ba83f4c8784a0fbe62fe2a6c107a.tar.gz egawk-725d2f781b48ba83f4c8784a0fbe62fe2a6c107a.tar.bz2 egawk-725d2f781b48ba83f4c8784a0fbe62fe2a6c107a.zip |
Add small regex fix. Add support directory.
-rw-r--r-- | ChangeLog | 22 | ||||
-rw-r--r-- | Makefile.am | 38 | ||||
-rw-r--r-- | Makefile.in | 62 | ||||
-rw-r--r-- | awklib/Makefile.in | 1 | ||||
-rwxr-xr-x | configure | 96 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/Makefile.in | 1 | ||||
-rw-r--r-- | extras/Makefile.in | 1 | ||||
-rw-r--r-- | support/dfa.c (renamed from dfa.c) | 0 | ||||
-rw-r--r-- | support/dfa.h (renamed from dfa.h) | 0 | ||||
-rw-r--r-- | support/getopt.c (renamed from getopt.c) | 0 | ||||
-rw-r--r-- | support/getopt.h (renamed from getopt.h) | 0 | ||||
-rw-r--r-- | support/getopt1.c (renamed from getopt1.c) | 0 | ||||
-rw-r--r-- | support/getopt_int.h (renamed from getopt_int.h) | 0 | ||||
-rw-r--r-- | support/intprops.h (renamed from intprops.h) | 0 | ||||
-rw-r--r-- | support/localeinfo.c (renamed from localeinfo.c) | 0 | ||||
-rw-r--r-- | support/localeinfo.h (renamed from localeinfo.h) | 0 | ||||
-rw-r--r-- | support/random.c (renamed from random.c) | 0 | ||||
-rw-r--r-- | support/random.h (renamed from random.h) | 0 | ||||
-rw-r--r-- | support/regcomp.c (renamed from regcomp.c) | 0 | ||||
-rw-r--r-- | support/regex.c (renamed from regex.c) | 0 | ||||
-rw-r--r-- | support/regex.h (renamed from regex.h) | 0 | ||||
-rw-r--r-- | support/regex_internal.c (renamed from regex_internal.c) | 0 | ||||
-rw-r--r-- | support/regex_internal.h (renamed from regex_internal.h) | 3 | ||||
-rw-r--r-- | support/regexec.c (renamed from regexec.c) | 6 | ||||
-rw-r--r-- | support/verify.h (renamed from verify.h) | 0 | ||||
-rw-r--r-- | support/xalloc.h (renamed from xalloc.h) | 0 | ||||
-rw-r--r-- | test/Makefile.in | 1 |
28 files changed, 160 insertions, 73 deletions
@@ -4,6 +4,28 @@ * intprops.h: New file. * Makefile.am (base_sources): Add intprops.h. + Unrelated. Import GNULIB fix for regex: fix integer-overflow + bug in never-used code. + Problem reported by Clément Pit–Claudel in: + http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00654.html + Fix by Paul Eggert <eggert@cs.ucla.edu>: + + * regex_internal.h: Include intprops.h. + * regexec.c (re_search_2_stub): Use it to avoid undefined + behavior on integer overflow. + + Unrelated. Set up a support directory for externally obtained + support files. + + * Makefile.am (base_sources, EXTRA_DIST): Edit lists. + (SUBDIRS): Get ordering right. + (LDADD): Add support/libsupport.a. + (DEFS): Add -I for support directory. + * dfa.c, dfa.h, getopt.c, getopt.h, getopt1.c, getopt_int.h, + intprops.h, localeinfo.c, localeinfo.h, random.c, random.h, + regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h, + regexec.c, verify.h, xalloc.h: Moved to support. + 2016-12-11 Arnold D. Robbins <arnold@skeeve.com> * dfa.c: Sync with GNULIB. diff --git a/Makefile.am b/Makefile.am index 733b41ba..0d2efd18 100644 --- a/Makefile.am +++ b/Makefile.am @@ -51,30 +51,26 @@ EXTRA_DIST = \ po/README \ pc \ posix \ - regcomp.c \ - regex_internal.c \ - regex_internal.h \ - regexec.c \ vms \ ylwrap # The order to do things in. # +# Build in support first, since we need the support library. +# # Build explicitly in "." in order to build gawk first, so # that `make check' without a prior `make' works. -# +SUBDIRS = support . + # Build in extension before test so that # ./configure && make check # works properly too. -# -# Build in awklib after in doc, since we want to extract -# sample files if doc/gawk.texi changed. -SUBDIRS = . - if ENABLE_EXTENSIONS SUBDIRS += extension endif +# Build in awklib after in doc, since we want to extract +# sample files if doc/gawk.texi changed. SUBDIRS += extras doc awklib po test # what to make and install @@ -92,8 +88,6 @@ base_sources = \ command.y \ custom.h \ debug.c \ - dfa.c \ - dfa.h \ eval.c \ ext.c \ field.c \ @@ -102,16 +96,9 @@ base_sources = \ gawkapi.c \ gawkapi.h \ gawkmisc.c \ - getopt.c \ - getopt.h \ - getopt1.c \ - getopt_int.h \ gettext.h \ int_array.c \ interpret.h \ - intprops.h \ - localeinfo.c \ - localeinfo.h \ io.c \ mbsupport.h \ main.c \ @@ -121,22 +108,17 @@ base_sources = \ nonposix.h \ profile.c \ protos.h \ - random.c \ - random.h \ re.c \ - regex.c \ - regex.h \ replace.c \ str_array.c \ symbol.c \ - verify.h \ - version.c \ - xalloc.h + version.c gawk_SOURCES = $(base_sources) # Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS. -LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR) +LDADD = support/libsupport.a \ + $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR) # Directory for gawk's data files. Automake supplies datadir. pkgdatadir = $(datadir)/awk @@ -148,7 +130,7 @@ DEFPATH='".$(PATH_SEPARATOR)$(pkgdatadir)"' SHLIBEXT = "\"$(GAWKLIBEXT)"\" DEFLIBPATH="\"$(pkgextensiondir)\"" -DEFS= -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' +DEFS= -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' -I"$(srcdir)/support" # Get rid of core files when cleaning CLEANFILES = core core.* diff --git a/Makefile.in b/Makefile.in index 664f284a..9a46553a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -111,6 +111,10 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ + +# Build in extension before test so that +# ./configure && make check +# works properly too. @ENABLE_EXTENSIONS_TRUE@am__append_1 = extension bin_PROGRAMS = gawk$(EXEEXT) subdir = . @@ -140,21 +144,19 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \ cint_array.$(OBJEXT) command.$(OBJEXT) debug.$(OBJEXT) \ - dfa.$(OBJEXT) eval.$(OBJEXT) ext.$(OBJEXT) field.$(OBJEXT) \ + eval.$(OBJEXT) ext.$(OBJEXT) field.$(OBJEXT) \ floatcomp.$(OBJEXT) gawkapi.$(OBJEXT) gawkmisc.$(OBJEXT) \ - getopt.$(OBJEXT) getopt1.$(OBJEXT) int_array.$(OBJEXT) \ - localeinfo.$(OBJEXT) io.$(OBJEXT) main.$(OBJEXT) \ - mpfr.$(OBJEXT) msg.$(OBJEXT) node.$(OBJEXT) profile.$(OBJEXT) \ - random.$(OBJEXT) re.$(OBJEXT) regex.$(OBJEXT) \ + int_array.$(OBJEXT) io.$(OBJEXT) main.$(OBJEXT) mpfr.$(OBJEXT) \ + msg.$(OBJEXT) node.$(OBJEXT) profile.$(OBJEXT) re.$(OBJEXT) \ replace.$(OBJEXT) str_array.$(OBJEXT) symbol.$(OBJEXT) \ version.$(OBJEXT) am_gawk_OBJECTS = $(am__objects_1) gawk_OBJECTS = $(am_gawk_OBJECTS) gawk_LDADD = $(LDADD) am__DEPENDENCIES_1 = -gawk_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +gawk_DEPENDENCIES = support/libsupport.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -263,7 +265,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags CSCOPE = cscope -DIST_SUBDIRS = . extension extras doc awklib po test +DIST_SUBDIRS = support . extension extras doc awklib po test am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/configh.in ABOUT-NLS \ AUTHORS COPYING ChangeLog INSTALL NEWS README TODO awkgram.c \ command.c compile config.guess config.rpath config.sub depcomp \ @@ -326,7 +328,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' +DEFS = -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' -I"$(srcdir)/support" DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -375,6 +377,7 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ +RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -469,26 +472,20 @@ EXTRA_DIST = \ po/README \ pc \ posix \ - regcomp.c \ - regex_internal.c \ - regex_internal.h \ - regexec.c \ vms \ ylwrap # The order to do things in. # +# Build in support first, since we need the support library. +# # Build explicitly in "." in order to build gawk first, so # that `make check' without a prior `make' works. -# -# Build in extension before test so that -# ./configure && make check -# works properly too. -# + # Build in awklib after in doc, since we want to extract # sample files if doc/gawk.texi changed. -SUBDIRS = . $(am__append_1) extras doc awklib po test +SUBDIRS = support . $(am__append_1) extras doc awklib po test include_HEADERS = gawkapi.h # sources for both gawk and dgawk @@ -502,8 +499,6 @@ base_sources = \ command.y \ custom.h \ debug.c \ - dfa.c \ - dfa.h \ eval.c \ ext.c \ field.c \ @@ -512,16 +507,9 @@ base_sources = \ gawkapi.c \ gawkapi.h \ gawkmisc.c \ - getopt.c \ - getopt.h \ - getopt1.c \ - getopt_int.h \ gettext.h \ int_array.c \ interpret.h \ - intprops.h \ - localeinfo.c \ - localeinfo.h \ io.c \ mbsupport.h \ main.c \ @@ -531,22 +519,18 @@ base_sources = \ nonposix.h \ profile.c \ protos.h \ - random.c \ - random.h \ re.c \ - regex.c \ - regex.h \ replace.c \ str_array.c \ symbol.c \ - verify.h \ - version.c \ - xalloc.h + version.c gawk_SOURCES = $(base_sources) # Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS. -LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR) +LDADD = support/libsupport.a \ + $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR) + # stuff for compiling gawk/pgawk DEFPATH = '".$(PATH_SEPARATOR)$(pkgdatadir)"' @@ -675,26 +659,20 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cint_array.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatcomp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gawkapi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gawkmisc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/int_array.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/re.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_array.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symbol.Po@am__quote@ diff --git a/awklib/Makefile.in b/awklib/Makefile.in index 597ba20b..16f8132c 100644 --- a/awklib/Makefile.in +++ b/awklib/Makefile.in @@ -259,6 +259,7 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ +RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -662,6 +662,7 @@ USE_NLS SED pkgextensiondir acl_shlibext +RANLIB LN_S YFLAGS YACC @@ -5245,6 +5246,98 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + @@ -10872,7 +10965,7 @@ dylib) GAWKLIBEXT=so ;; # MacOS uses .dylib for shared libraries, but libtool us esac -ac_config_files="$ac_config_files Makefile awklib/Makefile doc/Makefile extras/Makefile po/Makefile.in test/Makefile" +ac_config_files="$ac_config_files Makefile support/Makefile awklib/Makefile doc/Makefile extras/Makefile po/Makefile.in test/Makefile" if test "x$enable_extensions" = "xyes"; then @@ -11626,6 +11719,7 @@ do "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:configh.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;; "awklib/Makefile") CONFIG_FILES="$CONFIG_FILES awklib/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "extras/Makefile") CONFIG_FILES="$CONFIG_FILES extras/Makefile" ;; diff --git a/configure.ac b/configure.ac index 518a7398..48c6980c 100644 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,7 @@ AC_PROG_YACC AC_PROG_LN_S AC_PROG_CC_C99 AC_PROG_CPP +AC_PROG_RANLIB AC_OBJEXT AC_EXEEXT @@ -400,6 +401,7 @@ esac AC_SUBST(GAWKLIBEXT) AC_CONFIG_FILES(Makefile + support/Makefile awklib/Makefile doc/Makefile extras/Makefile diff --git a/doc/Makefile.in b/doc/Makefile.in index 69d2a1d3..b3523a20 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -288,6 +288,7 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ +RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/extras/Makefile.in b/extras/Makefile.in index befba005..5c92819b 100644 --- a/extras/Makefile.in +++ b/extras/Makefile.in @@ -245,6 +245,7 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ +RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/getopt.c b/support/getopt.c index 8bc59610..8bc59610 100644 --- a/getopt.c +++ b/support/getopt.c diff --git a/getopt.h b/support/getopt.h index 8393569d..8393569d 100644 --- a/getopt.h +++ b/support/getopt.h diff --git a/getopt1.c b/support/getopt1.c index 438fe52b..438fe52b 100644 --- a/getopt1.c +++ b/support/getopt1.c diff --git a/getopt_int.h b/support/getopt_int.h index 514a1beb..514a1beb 100644 --- a/getopt_int.h +++ b/support/getopt_int.h diff --git a/intprops.h b/support/intprops.h index 716741ad..716741ad 100644 --- a/intprops.h +++ b/support/intprops.h diff --git a/localeinfo.c b/support/localeinfo.c index ca96afc7..ca96afc7 100644 --- a/localeinfo.c +++ b/support/localeinfo.c diff --git a/localeinfo.h b/support/localeinfo.h index cf2f9a69..cf2f9a69 100644 --- a/localeinfo.h +++ b/support/localeinfo.h diff --git a/random.c b/support/random.c index cba1b6bc..cba1b6bc 100644 --- a/random.c +++ b/support/random.c diff --git a/random.h b/support/random.h index 84b31414..84b31414 100644 --- a/random.h +++ b/support/random.h diff --git a/regcomp.c b/support/regcomp.c index 5ac53701..5ac53701 100644 --- a/regcomp.c +++ b/support/regcomp.c diff --git a/regex.c b/support/regex.c index 9f133fab..9f133fab 100644 --- a/regex.c +++ b/support/regex.c diff --git a/regex.h b/support/regex.h index 143b3afa..143b3afa 100644 --- a/regex.h +++ b/support/regex.h diff --git a/regex_internal.c b/support/regex_internal.c index 18641ef1..18641ef1 100644 --- a/regex_internal.c +++ b/support/regex_internal.c diff --git a/regex_internal.h b/support/regex_internal.h index 09f17b25..01465e76 100644 --- a/regex_internal.h +++ b/support/regex_internal.h @@ -44,6 +44,9 @@ #if defined HAVE_STDINT_H || defined _LIBC # include <stdint.h> #endif /* HAVE_STDINT_H || _LIBC */ + +#include "intprops.h" + #if defined _LIBC # include <libc-lock.h> #else diff --git a/regexec.c b/support/regexec.c index aee21173..c8f11e52 100644 --- a/regexec.c +++ b/support/regexec.c @@ -362,10 +362,12 @@ re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, { const char *str; int rval; - int len = length1 + length2; + int len; char *s = NULL; - if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) + if (BE ((length1 < 0 || length2 < 0 || stop < 0 + || INT_ADD_WRAPV (length1, length2, &len)), + 0)) return -2; /* Concatenate the strings. */ diff --git a/verify.h b/support/verify.h index 5c8381d2..5c8381d2 100644 --- a/verify.h +++ b/support/verify.h diff --git a/xalloc.h b/support/xalloc.h index 0d169cf9..0d169cf9 100644 --- a/xalloc.h +++ b/support/xalloc.h diff --git a/test/Makefile.in b/test/Makefile.in index d96343b0..ac0bdc1a 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -215,6 +215,7 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ +RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ |