Missing constant MAXHOSTNAMELEN
| From: | Richard Quadling | Date: | Wed, 10 Aug 2011 10:54:28 +0000 |
| Subject: | Missing constant MAXHOSTNAMELEN | ||
| Groups: | php.internals.win | ||
| Request: | Send a blank email to internals-win+get-814@lists.php.net to get a copy of this message | ||
Hi.
Due to http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/standard/dns.c?r1=306939&r2=314648,
my 5.3 Win32 build is failing.
I've just done a search for MAXHOSTNAMELEN in the Windows SDK (V6.0a
and V6.1) I have installed and it was not found.
I'm using MS VC++ 2008 Express Edition.
The errors are ...
dns.c
ext\standard\dns.c(121) : error C2065: 'MAXHOSTNAMELEN' : undeclared identifier
ext\standard\dns.c(121) : error C2057: expected constant expression
ext\standard\dns.c(121) : error C2466: cannot allocate an array of
constant size 0
ext\standard\dns.c(121) : error C2133: 'buf' : unknown size
From googling, it seems that I need something like ...
#ifdef PHP_WIN32
# ifndef MAXHOSTNAMELEN
# define MAXHOSTNAMELEN xxxxx
# endif
#endif
Where xxxx is some value. Seems to be 64 for windows in the various
googles I've looked at.
Richard.
--
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea