cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Problem linking to recv on HP-UX

From: Blackburn, Gary (HHS/RHRC) <Gary.Blackburn_at_hhs.gov>
Date: Mon, 4 Sep 2006 07:34:48 -0400

Is this what you were looking for? (taken from sys/socket.h):

#if defined(_XOPEN_SOURCE_EXTENDED) && !defined(_KERNEL)
#ifdef __cplusplus
  extern "C" {
#endif /* __cplusplus */
   extern int accept __((int, struct sockaddr *, socklen_t *));
   extern int bind __((int, const struct sockaddr *, socklen_t));
   extern int connect __((int, const struct sockaddr *, socklen_t));
   extern int getpeername __((int, struct sockaddr *, socklen_t *));
   extern int getsockname __((int, struct sockaddr *, socklen_t *));
   extern int getsockopt __((int, int, int, void *, socklen_t *));
   extern int listen __((int, int));
   extern ssize_t recv __((int, void *, size_t, int));
   extern ssize_t recvfrom __((int, void *, size_t, int,
                               struct sockaddr *, socklen_t *));
   extern ssize_t recvmsg __((int, struct msghdr *, int));
   extern ssize_t send __((int, const void *, size_t, int));
   extern ssize_t sendmsg __((int, const struct msghdr *, int));
   extern ssize_t sendto __((int, const void *, size_t, int,
                             const struct sockaddr *, socklen_t));
   extern int setsockopt __((int, int, int, const void *, socklen_t));
   extern int shutdown __((int, int));
   extern int socket __((int, int, int));
   extern int socketpair __((int, int, int, int[2]));
#ifdef __cplusplus
   }
#endif /* __cplusplus */

#else /* !_XOPEN_SOURCE_EXTENDED*/
#ifdef __cplusplus
  extern "C" {
#endif /* __cplusplus */
   extern int accept __((int, void *, int *));
   extern int bind __((int, const void *, int));
   extern int connect __((int, const void *, int));
   extern int getpeername __((int, void *, int *));
   extern int getsockname __((int, void *, int *));
   extern int getsockopt __((int, int, int, void *, int *));
   extern int listen __((int, int));
   extern int recv __((int, void *, int, int));
   extern int recvfrom __((int, void *, int, int, void *, int *));
   extern int recvmsg __((int, struct msghdr msg[], int));
   extern int send __((int, const void *, int, int));
   extern int sendto __((int, const void *, int, int, const void *,
int));
   extern int sendmsg __((int, const struct msghdr msg[], int));
   extern int setsockopt __((int, int, int, const void *, int));
   extern int shutdown __((int, int));
   extern int socket __((int, int, int));
   extern int socketpair __((int, int, int, int[2]));
   extern sbsize_t sendfile __((int, int, off_t, bsize_t,
                               const struct iovec *, int));
   extern sbsize_t sendpath __((int, char *, off_t, bsize_t,
                               const struct iovec *, int));

> Besides <sys/types.h> and <sys/socket.h> which additional headers are
> needed to compile a small program that calls both functions ? And
> which libraries are needed to finally link the small program ?

I really have no idea as I'm not a C programmer. :-D

Thanks.

--
Gary Blackburn
-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Yang Tse
Sent: Sunday, September 03, 2006 10:37 PM
To: the curl tool
Subject: Re: Problem linking to recv on HP-UX
On Mon, 4 Sep 2006, Blackburn, Gary (HHS/RHRC) wrote:
> I'm trying to compile curl for an HP-UX 11 box, and I can't get
configure to
> complete.
> [...]
> checking for recv... yes
> checking types of arguments and return type for recv... unknown
> configure: error: Cannot find proper types to use for recv args
> [...]
Could you lookup the prototypes socket functions send() and recv()
have on your platform and post them here ?
Besides <sys/types.h> and <sys/socket.h> which additional headers are
needed to compile a small program that calls both functions ? And
which libraries are needed to finally link the small program ?
-- 
-=[Yang]=-
Received on 2006-09-04