Sterling,
I am writing you because I am assuming you are the socket module maintainer.
Awhile back I put in a hack that defines the capability to use a solaris specific
pragma
(pragma redefine_extname), which essentially allows you to change an external name
reference after compile phase, so that the symbol in your object file references
another
name.
Solaris uses this to point all XOPEN socket calls to another function name.
(ex socket() is changed to __xnet_socket()) The problem with this is that if the
redefine_extname capability isn't available, Solaris uses #define statements. This
broke the build on gcc, because it would change every occurrence of "socket" to
"__xnet_socket". This ended up producing things like "php_if___xnet_socket" and
"php_if___xnet_bind"
The code I added to cvs prevents the define from occurring, but still does not use the
appropriate XOPEN function calls, instead the Solaris functions are referred to.
Now when I made the modification, everything tested fine, so using the Solaris socket
calls
does not appear to cause issues. However, if the functionality of these differ in even
a slight
way, or in the future they do, we could see possible problems.
There is actually a gcc way to perform something equivalent to redefine_extname, but
that
would require implementing code that fulfilled the job of socket.h.
I think that the only clean way to solve the problem is to pull all socket functions
into a separate .c file.We can then call them as php_socket, php_bind, etc. In that
case,
solaris's (and other possible platforms) redefine would no longer be an issue and we
could
remove the hack I last applied.
I am willing to make the modifications of this, but for a change this large, I wanted
to
get the author's insight.
Thanks,
-Jason
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]