Subject: | 2.002 syntax errors on WinCE, interface is a reserved word |
pack_ip_mreq and a couple more xsubs in Socket.xs declare variables called "interface". "interface" is macroed defined to "struct" in ole2.h on Windows. On Desktop Windows WIN32_LEAN_AND_MEAN prevents ole2.h from being loaded when windows.h is included. WinCE's headers dont implement WIN32_LEAN_AND_MEAN so ole2.h is included which defined interface to struct. The "struct" causes syntax errors when trying to build Socket for WinCE. Example preprocessed code.
Show quoted text
_________________________________________________________
static void XS_Socket_pack_ip_mreq (CV * cv);
static void
XS_Socket_pack_ip_mreq (CV * cv)
{
extern int Perl___notused (void);
SV **sp = PL_stack_sp;
I32 ax = (*PL_markstack_ptr--);
SV **mark = PL_stack_base + ax++;
I32 items = (I32) (sp - mark);
if (items < 1 || items > 2)
Perl_croak_xs_usage (cv, "multiaddr, interface=&PL_sv_undef");
{
SV *multiaddr = PL_stack_base[ax + (0)];
SV *struct;
if (items < 2)
struct = &PL_sv_undef;
else
{
struct = PL_stack_base[ax + (1)];
}
#line 997 "Socket.xs"
{
not_here ("pack_ip_mreq");
#line 1026 "Socket.xs"
}
#line 1374 "Socket.c"
}
_________________________________________________________
All variables named interface need to be renamed.