[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Partysip-dev] compiling partysip
From: |
Jayesh Srivastava |
Subject: |
Re: [Partysip-dev] compiling partysip |
Date: |
Wed, 15 May 2002 20:02:19 -0700 (PDT) |
--- Aymeric Moizard <address@hidden> wrote:
>
> On Wed, 15 May 2002, Ralf Mahlo wrote:
>
>
> What are the changes you made? Can you send the
> modified
> code with some proper #ifdef for the TRU64 platform.
In my case I get very few problems during compilation
and I already resolved those. I am sending the file
which I changed with this mail. Pls look into that.
>
> > > 2. snprintf() is used in partysip which is not
> > > supported by TRU64 Unix.
>
> so what did you do to compile? any code to send back
> to me?
>
I simply changed it to sprintf for the time being
becoz it is hardcoded there so I suppose that part
will change in future and right now it is not
effecting much. This is just for testing purpose.
> > > BUGS:
> > > In josua.c it is used like this which should to
> be
> > > changed.
> > > 493 ua_global_core = ua_core;
>
> Are you using the --disable-mt options with josua???
> I've never tried this. (yes, true...) Is it working
> for you?
> I just tried and as expected it completely fails..
> just because
> it's not implemented... :)
I tried once and I got compilation error which I
mentioned above but I have not tested that yet so I
dont know much abt this issue.
And thanx Ralf it worked after commenting the connect
line as u suggested.
> Let me know if this fix all the issues.
> Please, send me patches for gethostbyname if you
> fixed that...
> Thanks
> Aymerc
Well I am sending the pplsocket.c file with this mail
if this will solve the problem let me know.
Bye for now.
Jayesh
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
/*
This is the ppl library. It provides a portable interface to usual OS features
Copyright (C) 2002 WellX Telecom - <address@hidden>
Copyright (C) 2002 Aymeric MOIZARD - <address@hidden>
The ppl library free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
The ppl library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the ppl library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "ppl_socket.h"
PPL_DECLARE(ppl_socket_t) ppl_socket(int domain, int protocol, int type)
{
return socket(domain, protocol, type);
}
PPL_DECLARE(ppl_socket_t) ppl_socket_bind(ppl_socket_t sock,
struct sockaddr* addr, int len)
{
return bind(sock, addr, len);
}
PPL_DECLARE(int) ppl_socket_close(ppl_socket_t sock)
{
return close(sock);
}
PPL_DECLARE(int) ppl_socket_write(ppl_socket_t sock,const void *buf, size_t
count)
{
return write(sock, buf, count);
}
PPL_DECLARE(int) ppl_socket_read(ppl_socket_t sock,void *buf, size_t count)
{
return read(sock, buf, count);
}
PPL_DECLARE(int) ppl_gethostbyname(struct sockaddr_in *sin, char *hostname, int
port)
{
struct hostent result_buffer;
char tmp[GETHOSTBYNAME_BUFLEN];
struct hostent *result;
int my_error;
/* Jay changed according to TRU64 plateform
gethostbyname_r(hostname, the FQDN
&result_buffer, the result buffer
tmp,
GETHOSTBYNAME_BUFLEN - 1,
&result,
&my_error);
*/
#ifdef _OSF_SOURCE
gethostbyname_r(hostname, /* the FQDN */
&result_buffer, /* the result buffer */
&result
);
#else
gethostbyname_r(hostname, the FQDN
&result_buffer, the result buffer
tmp,
GETHOSTBYNAME_BUFLEN - 1,
&result,
&my_error);
#endif
if (!result)
return my_error;
{
int curaddr=0;
sin->sin_family = AF_INET;
sin->sin_addr = *(struct in_addr *)result->h_addr_list[0];
sin->sin_port = htons(port);
printf("pplsocket.c: IP addresses used: %s\n", result->h_addr_list[0]);
++curaddr;
while (result->h_addr_list[curaddr]) {
printf("pplsocket.c: IP addresses to be tried later: %s\n",
result->h_addr_list[curaddr]);
++curaddr;
}
}
return PPL_SUCCESS;
}
Re: [Partysip-dev] compiling partysip, Ralf Mahlo, 2002/05/15
Re: [Partysip-dev] compiling partysip, Tim Na, 2002/05/16
Re: [Partysip-dev] compiling partysip, Aymeric Moizard, 2002/05/15