From: "Zahir Koradia" <zahir.koradia@gmail.com>
To: cygwin-apps@cygwin.com
Subject: Problems with sunrpc
Date: Mon, 12 Jun 2006 19:17:00 -0000 [thread overview]
Message-ID: <f0d10dd60606121216n1395040dhe160e0e8ca44c9fd@mail.gmail.com> (raw)
Hi,
This message might be specifically for Sam Robb but am sendign to the
whole list as others may be able to help. I installed the binaries and
downloaded the source of sunrpc while installing cygwin. I intended to
use the function clnttcp_create present in clnt.h header. The anamoly
I see is that in the header file the signature has no parameters and
in the source code the function definition has parameters. The
signature in the header file is
/*
* TCP based rpc
* CLIENT *
* clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
* struct sockaddr_in *raddr;
* u_long prog;
* u_long version;
* register int *sockp;
* u_int sendsz;
* u_int recvsz;
*/
extern CLIENT *clnttcp_create( );
and the source code (clnt_tcp.c) definition had the line
CLIENT *
clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
struct sockaddr_in *raddr;
u_long prog;
u_long vers;
register int *sockp;
u_int sendsz;
u_int recvsz;
{
This code does not compile. When I use the function with parameters in
my code it gives me error "undefined reference to..." then i went and
changed the signature in the header file itself. I did get past that
error but now I have a loader error stating that there is no
implementation for the function (with parameters).
I wanted to know whether the binaries have the function with
parameters or without them. To me having the function without the
parameters seems unlikely. Where can I get the right header file? Am I
going wrong somewhere myself?
In clnt.h header file the macro definition
#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
is fault since if u look at the client structure u will notice that
cl_destroy does not take any arguments. The definition should have
been
#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)())
Is the version that i have got very old? (It is 4.0.2 or 4.0.3 i dont
rememebr exactly which one)
Can some please clear thing out here?
Thanx,
Zahir Koradia
next reply other threads:[~2006-06-12 19:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-12 19:17 Zahir Koradia [this message]
2006-06-12 22:52 ` Christopher Faylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f0d10dd60606121216n1395040dhe160e0e8ca44c9fd@mail.gmail.com \
--to=zahir.koradia@gmail.com \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).