J. L. Schilling
2003-12-03 15:03:09 UTC
I am porting a product to UnixWare 7.1.1 by re-compiling the source
code in C++ (already have a few ported to other Unix platforms). I
have a very strange compliation error that affects a few source code
listed as follow: [...]
The problem here is that your code is declaring and using member functioncode in C++ (already have a few ported to other Unix platforms). I
have a very strange compliation error that affects a few source code
listed as follow: [...]
names "shutdown" and "send". This is improper, as the various POSIX
and X/Open UNIX standards specifications reserve these names for
the implementation. See for example
http://www.opengroup.org/onlinepubs/007908799/xns/namespace.html.
On some platforms using these reserved names doesn't cause any
difficulty. But on UnixWare 7 it does, because the implementation
supports networking API versionning by use of macros on these names.
So, the best solution is to change your application to not name its
own functions "shutdown" and "send".
If you can't do that, then make sure that the <sys/socket.h> is
including at the start of *every* header or source file that declares,
defines, or calls these functions. Then the macro change will be
applied consistently.
Having done this, you'll still have a problem because of your
use of the function "_shutdown". This happens to be what one of
the versionning macros changes "shutdown" to ... a double whammy!
You'll have to change that protected function to something else,
like "_prot_shutdown". Then everything should be ok.
Jonathan Schilling