Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: make fails to build on linux



On Sat, Apr 17, 2021 at 07:25:58PM +0200, Manuel Bouyer wrote:
> Hello
> trying a build.sh tools on linux I got:
> /dsk/l1/misc/bouyer/HEAD/clean/src/tools/compat/../../lib/libc/regex/regcomp.c: 
> In function '__regex_wctype':
> /dsk/l1/misc/bouyer/HEAD/clean/src/tools/compat/../../lib/libc/regex/regcomp.c:254:2: error: 'for' loop initial declarations are only allowed in C99 mode
>   for (size_t i = 0; i < __arraycount(wctypes); i++) {
>     ^
> /dsk/l1/misc/bouyer/HEAD/clean/src/tools/compat/../../lib/libc/regex/regcomp.c:2
> 54:2: note: use option -std=c99 or -std=gnu99 to compile your code
> 
> What is the right fix for this ?
> 
> For now I just moved the declaration outside of the loop

Well, the build fails later with the same error.
Using "-V HOST_CFLAGS=-std=gnu99" allows the tools to build; maybe
this should be the default ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index