Index: gdb-10.1/gdb/config.in =================================================================== --- gdb-10.1.orig/gdb/config.in +++ gdb-10.1/gdb/config.in @@ -734,9 +734,6 @@ /* Define if has the TD_VERSION error code. */ #undef THREAD_DB_HAS_TD_VERSION -/* Define to 1 if the regex included in libiberty should be used. */ -#undef USE_INCLUDED_REGEX - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE Index: gdb-10.1/gdb/configure =================================================================== --- gdb-10.1.orig/gdb/configure +++ gdb-10.1/gdb/configure @@ -912,7 +912,6 @@ enable_source_highlight with_intel_pt with_libipt_prefix with_libipt_type -with_included_regex with_sysroot with_system_gdbinit with_system_gdbinit_dir @@ -1663,10 +1662,6 @@ Optional Packages: --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib --without-libipt-prefix don't search for libipt in includedir and libdir --with-libipt-type=TYPE type of library to search for (auto/static/shared) - --without-included-regex - don't use included regex; this is the default on - systems with version 2 of the GNU C library (use - with caution on other system) --with-sysroot[=DIR] search for usr/lib et al within DIR --with-system-gdbinit=PATH automatically load a system-wide gdbinit file @@ -16006,57 +16001,6 @@ if test "$ac_cv_func_setpgrp_void" = yes fi fi -# Assume we'll default to using the included libiberty regex. -gdb_use_included_regex=yes - -# However, if the system regex is GNU regex, then default to *not* -# using the included regex. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 -$as_echo_n "checking for GNU regex... " >&6; } -if ${gdb_cv_have_gnu_regex+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#define REGEX_INTERFACE_VERSION 1 -#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION -# error "Version mismatch" -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_gnu_regex=yes -else - gdb_cv_have_gnu_regex=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 -$as_echo "$gdb_cv_have_gnu_regex" >&6; } -if test "$gdb_cv_have_gnu_regex" = yes; then - gdb_use_included_regex=no -fi - - -# Check whether --with-included-regex was given. -if test "${with_included_regex+set}" = set; then : - withval=$with_included_regex; gdb_with_regex=$withval -else - gdb_with_regex=$gdb_use_included_regex -fi - -if test "$gdb_with_regex" = yes; then - -$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h - -fi - # Check if defines `struct thread' with a td_pcb member. ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include #include Index: gdb-10.1/gdb/configure.ac =================================================================== --- gdb-10.1.orig/gdb/configure.ac +++ gdb-10.1/gdb/configure.ac @@ -1514,35 +1514,6 @@ if test "$ac_cv_func_setpgrp_void" = yes fi fi -# Assume we'll default to using the included libiberty regex. -gdb_use_included_regex=yes - -# However, if the system regex is GNU regex, then default to *not* -# using the included regex. -AC_CACHE_CHECK( - [for GNU regex], - [gdb_cv_have_gnu_regex], - [AC_TRY_COMPILE( - [#include ], - [#define REGEX_INTERFACE_VERSION 1 -#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION -# error "Version mismatch" -#endif], - gdb_cv_have_gnu_regex=yes, - gdb_cv_have_gnu_regex=no)]) -if test "$gdb_cv_have_gnu_regex" = yes; then - gdb_use_included_regex=no -fi - -AC_ARG_WITH(included-regex, - AS_HELP_STRING([--without-included-regex], [don't use included regex; this is the default on systems with version 2 of the GNU C library (use with caution on other system)]), - gdb_with_regex=$withval, - gdb_with_regex=$gdb_use_included_regex) -if test "$gdb_with_regex" = yes; then - AC_DEFINE(USE_INCLUDED_REGEX, 1, - [Define to 1 if the regex included in libiberty should be used.]) -fi - # Check if defines `struct thread' with a td_pcb member. AC_CHECK_MEMBERS([struct thread.td_pcb], [], [], [#include Index: gdb-10.1/gdb/gdb_regex.h =================================================================== --- gdb-10.1.orig/gdb/gdb_regex.h +++ gdb-10.1/gdb/gdb_regex.h @@ -19,13 +19,7 @@ #ifndef GDB_REGEX_H #define GDB_REGEX_H 1 -#ifdef USE_INCLUDED_REGEX # include "xregex.h" -#else -/* Request 4.2 BSD regex functions. */ -# define _REGEX_RE_COMP -# include -#endif /* A compiled regex. This is mainly a wrapper around regex_t. The the constructor throws on regcomp error and the destructor is