From: Jeff Garland (jeff_at_[hidden])
Date: 2002-01-22 16:17:44
> I wrote that, and it might be too strong. It could have said something
> like if you include a platform specific header with damaging macros, do so
> in a way (#undef or whatever) that the danger does not propagate into user
> code. But one problem is what happens when the header changes.
> Some of these headers really do have macros with names like "send" - that
> isn't an exaggeration!
> I'm inclined to thing that even on the busiest server the cost of dynamic
> allocation would so low as to be nonexistent compared to the rest of what a
> sockets library does.
> In any event, your interface design should not require inclusion of
> platform headers. That should be an implementation decision left up to the
> implementor, not something required by the interface.
Having been bit by this one myself (on SCO Unix) where send, recv, and a bunch
of other nice names are macros defined to interesting names like send_ (hope you
caught that underscore in the error!) I would say do whatever it takes to keep
the platform headers out. And, it would be tough to undef all the platform
specific macros as I recall the header file....
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk