curl-library
Re: Problem facing to compilinglibcurl on VDSP4.5
Date: Tue, 15 Jan 2008 13:07:22 +0530
Hi all;
I am thankful to you people for your help. Actually I am trying to
map LwIP stack API to Curl API at Low level. So please tell me where I will
change in curl library.
I wrote my select.h file is as follows:
//......................select.h...........................//
#ifndef _SYS_SELECT_H_
#define _SYS_SELECT_H_
#ifdef __cplusplus
extern "C" {
#endif
#undef FD_SETSIZE
#define FD_SETSIZE 1024
#define FD_SET(n, p) ((p)->fd_bits[(n)/8] |= (1 << ((n) & 7)))
#define FD_CLR(n, p) ((p)->fd_bits[(n)/8] &= ~(1 << ((n) & 7)))
#define FD_ISSET(n,p) ((p)->fd_bits[(n)/8] & (1 << ((n) & 7)))
#define FD_ZERO(p) memset((void*)(p),0,sizeof(*(p)))
typedef struct fd_set {
unsigned char fd_bits [(FD_SETSIZE+7)/8];
} fd_set;
int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set
*exceptset,
struct timeval *timeout);
#define select(a,b,c,d,e) lwip_select(a,b,c,d,e)
#ifdef __cplusplus
}
#endif
#endif
//..........................................................//
Plz tell me what I will change in setuponce.h files? Actually I saw for
different-different OS setuponce.h is configuring differently.
Actually LwIP (Ported in VDK)is also taken from BSD. Curl is also supporting
BSD.
Why so many problem is coming when porting Curl on VDK.
Here problem is also coming to match net_ntoa.
LWip having net_inet.h file is given below:
//................................................//
#ifndef __LWIP_INET_H__
#define __LWIP_INET_H__
#include "lwip/arch.h"
#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"
u16_t inet_chksum(void *dataptr, u16_t len);
u16_t inet_chksum_pbuf(struct pbuf *p);
u16_t inet_chksum_pseudo(struct pbuf *p,
struct ip_addr *src, struct ip_addr *dest,
u8_t proto, u16_t proto_len);
u32_t inet_addr(const char *cp);
int inet_aton(const char *cp, struct in_addr *addr);
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not
reentrant! */
#ifdef htons
#undef htons
#endif /* htons */
#ifdef htonl
#undef htonl
#endif /* htonl */
#ifdef ntohs
#undef ntohs
#endif /* ntohs */
#ifdef ntohl
#undef ntohl
#endif /* ntohl */
#if BYTE_ORDER == BIG_ENDIAN
#define htons(x) (x)
#define ntohs(x) (x)
#define htonl(x) (x)
#define ntohl(x) (x)
#else
#ifdef LWIP_PREFIX_BYTEORDER_FUNCS
/* workaround for naming collisions on some platforms */
#define htons lwip_htons
#define ntohs lwip_ntohs
#define htonl lwip_htonl
#define ntohl lwip_ntohl
#endif
u16_t htons(u16_t x);
u16_t ntohs(u16_t x);
u32_t htonl(u32_t x);
u32_t ntohl(u32_t x);
#endif
#endif /* __LWIP_INET_H__ */
//...............................................//
At last I want to ask Libcurl is supporting BSD and other stacks. Can it is
possible to make it VDK (LwIP) supported? If yes then how?
Please help me.
Thanks.
Regards,
Ajeet Kumar Singh
Received on 2008-01-15