Martin Raspe <[EMAIL PROTECTED]> writes:

> > I found it: "read" and "write" get declared in
> 
> > perl/lib/CORE/win32IOp.h (this is Perl 5.6)
> > #define read(fd,b,s)        win32_read(fd,b,s)
> 
> > #define write(fd,b,s)        win32_write(fd,b,s)
> > What I haven't found is where to switch it off with an #undef in
> > Xerces.cpp.
> 
> 
> Here it is:
> xerces.cpp, line 258
> 
> /* Get rid of free and malloc defined by perl */
> #undef free
> #undef malloc
> #undef read <--- new
> #undef write <--- new

Yes, Perl is notorious for not properly prefixing common macro names
like this - this is the correct place to add them. I can get this
added to the swig runtime files so it will appear their in later
XML-Xerces releases.

The problem is these are pre-processor macros, and so namespaces don't
work.

> But now I see new ones, further down in Xerces.cpp - I guess I'll
> give it up for the moment.

Ah, let me know what these are. Your strategy of putting #undef's in
Xerces.cpp is the correct one.

Cheers,
jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to