Re: [PHP4BETA] PF_INET
| From: | Jonathan Perret | Date: | Mon, 22 Nov 1999 21:50:03 +0000 |
| Subject: | Re: [PHP4BETA] PF_INET | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6702@lists.php.net to get a copy of this message | ||
>On Sat, Nov 20, 1999 at 02:49:24AM +0100, Jonathan Perret wrote:
>>
>> In Beta 3, ext/ftp/ftp.c has two occurrences of PF_INET (instead of
>> AF_INET).
>>
>> Is this normal ?
>
> AF_* -- Address Format (used in sockaddr* structures)
> PF_* -- Protocol Family (used in socket())
>
> AF_X and PF_X usually have the same value, but a
> Berkeley-like socket implementation must define both.
Yeah, sure, I agree, but see my previous message.
PHP is using socket(PF_xxx) (in ftp) AND socket(AF_xxx)
(in standard).
You can't allow it to be half-correct... Either change
the older code to use PF_xxx, or put the newest code in
line with the rest by using AF_xxx.
BeOS is not a reference here (its socket implementation is far from
conformant anyway), but are you sure every system has the PF_xxx
defines ? For example, the Linux socket(2) man page mentions only
AF_xxx, not PF_xxx.
Cheers,
--Jonathan