Subject: Re: bug#32194: [PATCH] Use Gnulib regex for lib-src

From: Paul Eggert <[email-masked]>
Date: Thu, 2 Aug 2018 07:41:38 -0700

Eli Zaretskii wrote:

> I thought that using
> 
>    #include "regex.h"
> 
> in src/regex.c should avoid any such "fights".

The problem I ran into was the other way around: lib-src/etags.c and lib/regex.c 
say '#include <regex.h>' and this grabs the wrong regex.h. Changing the 
directives to say '#include "<regex.h>"' would start to diverge from glibc 
source, which I'd rather not do. Also, for non-POSIX compilers, the '#include 
"<regex.h>"' trick might not work; it also might not work if the builder puts 
'-I-' in CFLAGS with GCC. The whole mess is easily avoidable by renaming 
src/regex.h.

Renaming is appropriate anyway, since the APIs are not the same, and it's 
confusing to have two include files with the same name.