Re: [INTERNALS-WIN] Missing constant MAXHOSTNAMELEN

From: Date: Wed, 10 Aug 2011 11:22:29 +0000
Subject: Re: [INTERNALS-WIN] Missing constant MAXHOSTNAMELEN
References: 1  Groups: php.internals.win 
Request: Send a blank email to internals-win+get-815@lists.php.net to get a copy of this message
yes, that's a stupid idea as this constant is everything you want but a standard. This whole set of commits in 5.3 worries me a lot tbh. I will check what we can or should do for this exact case. On Wed, Aug 10, 2011 at 12:54 PM, Richard Quadling <rquadling@gmail.com> wrote: > 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 > > -- > Windows Internals Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org

« previous php.internals.win (#815) next »