Missing constant MAXHOSTNAMELEN

[email protected] (Richard Quadling)
Newsgroups php.internals.win
Message-ID <CAKUjMCUXp_351pAOUvok9p1nCPjf+-ws2PFOACbqBQCr1He5Hw@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.