# New Ticket Created by Simon Glover
# Please include the string: [perl #24381]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24381 >
An attempt to build Parrot with PIO_OS_STDIO defined (as is the case
when you're trying to build miniparrot) dies in core_ops.c with the error
message:
ops/io.ops: In function `Parrot_sockaddr_s_i_s':
ops/io.ops:497: parse error before `;'
[etc...]
The reason is the interaction between the sockaddr op definition:
op sockaddr(out STR, in INT, in STR) {
$1 = PIO_sockaddr_in(interpreter, (unsigned short)$2, $3);
goto NEXT();
}
and this ifdef in io.h:
#ifdef PIO_OS_STDIO
extern INTVAL PIO_stdio_isatty(PIOHANDLE fd);
extern INTVAL PIO_stdio_getblksize(PIOHANDLE fd);
# define PIO_isatty(x) PIO_stdio_isatty(x)
# define PIO_sockaddr_in(i,p,a)
# define PIO_getblksize(x) PIO_stdio_getblksize(x)
#endif
The preprocessor turns the op definition into:
op sockaddr(out STR, in INT, in STR) {
$1 = ;
goto NEXT();
}
which is clearly a syntax error.
An easy fix is to wrap the offending line in #ifndef PIO_OS_STDIO ..
#endif, but there may be a better solution.
Regards,
Simon