r13105 added <unistd.h> to a4gl_incl_4glhdr.h so that a CODE block calling
usleep would not rely on an implicit declaration, which gcc 14 rejects. That
header also declares dup, read, write, close, link and access, and generated C
puts module and GLOBALS variables at file scope under their 4GL names - so any
program with a variable of such a name stopped compiling:
error: 'dup' redeclared as different kind of symbol
Those are ordinary 4GL variable names: such programs compiled in 1.6.3 and up
to r13104. The include is removed again, and the two files in the tree that
need the header now ask for it themselves in a CODE block - tools/test/clock.4gl
for usleep() and tools/test/html/html_report.4gl for unlink(). Every other CODE
block calling a POSIX function is in a file that already reaches the header
through tools/asql/simple.h; all 243 versioned .4gl files were scanned for this.
Checked on clean exports of r13115 built with and without the change: configure
and make both succeed, with 0 errors and the same 361 warnings, and not one
diagnostic appears or disappears. The files r13105 was aimed at are not part of
any default target, which is why the build does not move either way.
A variable can still collide with stdio.h, string.h or stdlib.h - index, time
and system, say. A4GL_MARK_SCOPE covers that case.