Hello GNULIB guys. Pleae see the patch below which Nelson needs in order to compile gawk on several of his systems. This comes from the use of the BE macro in regex.
Nelson, please chime in with a list of the system + compiler combinations where gawk needs this patch. As I mentioned, this is really a gnulib issue and thus I'm reporting it there. I will apply this patch, probably later this week, unless the GNULIB guys, with your help, can patch regex directly. Thanks, Arnold > Date: Sat, 29 Sep 2018 16:05:35 -0600 > From: "Nelson H. F. Beebe" <be...@math.utah.edu> > To: "Arnold Robbins" <arn...@skeeve.com> > Cc: be...@math.utah.edu > > I propose the following patch to fix the __builtin_expect() problem: > > % cat /home/gnu/src/gawk/gawk-2018-09-29.patch.p1 > *** custom.h.org Sat Sep 29 14:22:37 2018 > --- custom.h Sat Sep 29 14:56:04 2018 > *************** > *** 53,58 **** > --- 53,64 ---- > #endif > #endif > > + #ifndef __GNUC__ > + #ifndef __builtin_expect > + #define __builtin_expect(expr, val) (expr) > + #endif > + #endif > + > /* For QNX, based on submission from Michael Hunter, mphun...@qnx.com */ > #ifdef __QNX__ > #define GETPGRP_VOID 1 > > > I have applied it on a half-dozen systems that failed to build today > from the gawk-2018-09-29 snapshot that I pulled earlier this afternoon; > all of those systems then had successful builds. > > I'm still uncomfortable with the fact that a compiler-specific > feature, __builtin_expect, was used without adequate fallback > for non-gcc compiler builds. My patch remedies that problem. > > ------------------------------------------------------------------------------- > - Nelson H. F. Beebe Tel: +1 801 581 5254 > - > - University of Utah FAX: +1 801 581 4148 > - > - Department of Mathematics, 110 LCB Internet e-mail: be...@math.utah.edu > - > - 155 S 1400 E RM 233 be...@acm.org be...@computer.org > - > - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ > - > ------------------------------------------------------------------------------- >