Re: [INTERNALS-WIN] Missing constant MAXHOSTNAMELEN

[email protected] (Pierre Joye)
Newsgroups php.internals.win
Message-ID <CAEZPtU7yywG4xY3O31LV5DB1R+UE4THhOs3rmDhuQFqfTREapg@mail.gmail.com>
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 <[email protected]> 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
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.