Date: 02/21/01
- Next message: sas <email protected>: "[PHP-DEV] PHP 4.0 Bug #9362 Updated: When sendmail not available, get compile errors"
- Previous message: sas <email protected>: "[PHP-DEV] PHP 4.0 Bug #9358 Updated: HAVE_RDEV not being checked before accessing field st_rdev"
- In reply to: amra <email protected>: "[PHP-DEV] PHP 4.0 Bug #9360: Type of the parameter conflicts with previous declaration of function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
thanks for your patches. I've already applied some of them.
[..]
> host_info = gethostbyname(host);
>
> But host is const char *. So I had to change line to as follows:
> host_info = gethostbyname((char *)host);
Then your system header files are broken. The correct
prototype for gethostbyname as per SUSv3 is
struct hostent *gethostbyname(const char *);
> host_info = gethostbyname((char *)addr);
> But addr is const char *. So I had to change line to as follows:
> host_info = gethostbyname((char *)addr);
Ditto.
> Line 183:
> Protoype for getsockopt is: getsockopt(int, int, int, char *, int *).
>
> However, Line 183 contains:
>
> if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) {
>
> where error is int and len is socklen_t. I had to change line to as follows:
Again, your system headers are at fault here. The correct
prototype for getsockopt is
int getsockopt(int socket, int level, int option_name,
void *restrict option_value, socklen_t *restrict option_len);
All parameters in line 183 are compatible with the prototype.
> I hope that these types of changes are made, so as to compile
> easily on any platform.
Yes, we definitely will apply all patches which improve
portability.
- Sascha
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: sas <email protected>: "[PHP-DEV] PHP 4.0 Bug #9362 Updated: When sendmail not available, get compile errors"
- Previous message: sas <email protected>: "[PHP-DEV] PHP 4.0 Bug #9358 Updated: HAVE_RDEV not being checked before accessing field st_rdev"
- In reply to: amra <email protected>: "[PHP-DEV] PHP 4.0 Bug #9360: Type of the parameter conflicts with previous declaration of function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

