Re: cvs: php-src / NEWS /ext/standard basic_functions.c basic_functions.h

From: Date: Sat, 07 Aug 2004 07:00:23 +0000
Subject: Re: cvs: php-src / NEWS /ext/standard basic_functions.c basic_functions.h
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-11985@lists.php.net to get a copy of this message
Sara Golemon wrote:
pollita Sat Aug 7 00:50:25 2004 EDT
  Modified files:                  /php-src/ext/standard	basic_functions.c basic_functions.h     /php-src	NEWS   Log:
New Functions inet_pton() and inet_ntop()
<snip>
+#ifdef HAVE_INET_NTOP + PHP_FE(inet_ntop, NULL) +#endif +#ifdef HAVE_INET_PTON + PHP_FE(inet_pton, NULL) +#endif
<snip>
+#ifdef HAVE_INET_NTOP +PHP_FUNCTION(inet_ntop); +#endif +#ifdef HAVE_INET_PTON +PHP_FUNCTION(inet_pton); +#endif
The build fails for me using the latest CVS and FreeBSD 5.2.1-RELEASE. The problem is FreeBSD's arpa/inet.h redefines inet_ntop and inet_pton to __inet_ntop and _inet__ntop, but it does it after basic_functions.h has been included, so you're left with: basic_functions.c:423: error: `zif___inet_ntop' undeclared here (not in a function) because PHP_FUNCTION(inet_ntop); correctly declared it, but it was redefined before the PHP_FE() call. I fixed it by moving the arpa/inet.h include above the php_standard.h include, but I'm not sure if this would be the correct solution. HTH Dave

« previous php.internals (#11985) next »