cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: portability issues

From: Heikki Korpela <heko_at_iki.fi>
Date: Tue, 13 Nov 2001 18:04:11 +0200

Daniel Stenberg wrote on "portability issues":

> HP-UX (with _XOPEN_SOURCE_EXTENDED)
> int accept(int s, struct sockaddr *addr, socklen_t *addrlen);

> HP-UX (plain)
> int accept(int s, struct sockaddr *addr, size_t *addrlen);

Err.. right. That's just great.

> Is this anything we _can_ care about?
> Is this anything we _want_ to care about?
> If so, how?

I'd say: use standards, and let people report when they hit problems,
and then add some #ifdef magic, and hit the vendor repeatedly with a
rubber duck.

BTW, FreeBSD has a nice search interface to a bunch of manual pages.
I also have a very limited and simple link generator to Unix manpage
collections:

http://iki.fi/heko/links/manpages.php

accept gives me:

OpenBSD: int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
AIX: int accept ( Socket, Address, AddressLength)
        int Socket; struct sockaddr *Address; socklen_t *AddressLength;
BSDI: int accept(int s, struct sockaddr *name, socklent *namelen);
Darwin: int accept(int s, struct sockaddr *addr, socklen_t *addrlen)
FreeBSD: int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
HP-UX:
        int accept(int s, void *addr, int *addrlen);

        _XOPEN_SOURCE_EXTENDED only (UNIX 98)
        int accept(int s, struct sockaddr *addr, socklen_t *addrlen);

        Obsolescent _XOPEN_SOURCE_EXTENDED only (UNIX 95)
        int accept(int s, struct sockaddr *addr, size_t *addrlen);
IRIX: int accept (int s, struct sockaddr *addr, int *addrlen);
RH 7.2: int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
NetBSD: int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
Solaris 8: int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
Tru64: int accept ( int socket, struct sockaddr *address, socklen_t *address_len );
Received on 2001-11-13