From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: dj@redhat.com Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Include "gdb_regex.h" instead of "gnu-regex.h" Date: Thu, 02 Aug 2001 14:03:00 -0000 Message-id: <200108022103.f72L3re25561@delius.kettenis.local> References: <200108022018.f72KIaD25223@delius.kettenis.local> <200108022029.QAA08616@greed.delorie.com> X-SW-Source: 2001-08/msg00056.html Date: Thu, 2 Aug 2001 16:29:13 -0400 From: DJ Delorie Why not "xregex.h" ? I'm working on that :-). In fact replacing gnu-regex.{c,h} with xregex.h is what prompted this change. We will still need to go through gdb_regex.h to support --without-included-regex though. Before we can get rid of the regex code in the gdb subdirectory, there is one problem to solve though. GDB uses the BSD re_comp() and re_exec() instead of the POSIX interfaces. Unfortunately, that bit of code isn't currently compiled into the code included in libiberty. In the long run we probably want to switch to the POSIX interfaces, but in the meantime, the attached patch would make it possible to use "xregex.h" in GDB. I think it is pretty harmless, although it does involve some name-space pollution. Mark Index: ChangeLog from Mark Kettenis * xregex.h (_REGEX_RE_COMP): Define. (re_comp): Define to xre_comp. (re_exec): Define to xre_exec. Index: xregex.h =================================================================== RCS file: /cvs/src/src/include/xregex.h,v retrieving revision 1.1 diff -u -p -r1.1 xregex.h --- xregex.h 2001/07/11 00:15:17 1.1 +++ xregex.h 2001/08/02 20:57:19 @@ -19,6 +19,10 @@ # define re_syntax_options xre_syntax_options # define re_max_failures xre_max_failures +# define _REGEX_RE_COMP +# define re_comp xre_comp +# define re_exec xre_exec + #include "xregex2.h" #endif /* xregex.h */