[MacPorts] #62134: wget @1.21.1 does not build on PPC Leopard, Mac OS X 10.5.8, because of "error: 'for' loop initial declaration used outside C99 mode'"
MacPorts
noreply at macports.org
Sat Jan 23 19:57:34 UTC 2021
#62134: wget @1.21.1 does not build on PPC Leopard, Mac OS X 10.5.8, because of
"error: 'for' loop initial declaration used outside C99 mode'"
------------------------+---------------------
Reporter: ballapete | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Resolution: | Keywords: leopard
Port: wget |
------------------------+---------------------
Comment (by ballapete):
Choosing the second solution the file is compiled and a new error appears:
{{{
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H
-DSYSTEM_WGETRC=\"/opt/local/etc/wgetrc\"
-DLOCALEDIR=\"/opt/local/share/locale\" -I. -I../lib -I../lib
-I/opt/local/include -DNDEBUG -pipe -Os -arch ppc -MT progress.o -MD
-MP -MF $depbase.Tpo -c -o progress.o progress.c &&\
mv -f $depbase.Tpo $depbase.Po
progress.c: In function 'bar_set_params':
progress.c:1378: error: 'for' loop initial declaration used outside C99
mode
make[3]: *** [progress.o] Error 1
make[3]: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_wget/wget/work/wget-1.21.1/src'
}}}
Its cause is similar:
{{{
1366 static void
1367 bar_set_params (const char *params)
1368 {
1369 /* if run_with_timeout() will be used for read, needs to disable
interactive bar,
1370 or on every timeout(1s) we will have 'retry' with error
"decryption failed" */
1371 #if (defined(HAVE_LIBSSL) || defined(HAVE_LIBSSL32)) &&
defined(OPENSSL_RUN_WITHTIMEOUT)
1372 current_impl->interactive = false;
1373 #else
1374 current_impl->interactive = true;
1375 #endif
1376 if (params)
1377 {
1378 for (const char *param = params; *param; )
1379 {
1380 if (!strncmp (param, "force", 5))
1381 current_impl_locked = 1;
1382 else if (!strncmp (param, "noscroll", 8))
1383 opt.noscroll = true;
1384
1385 if (*(param = strchrnul(param, ':')))
1386 param++;
1387 }
1388 }
}}}
Here the re-declaration of `param` looks faulty since its type is known
from the function's definition.
--
Ticket URL: <https://trac.macports.org/ticket/62134#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list