From: Babar S. <bab...@ya...> - 2003-12-19 15:18:57
|
diff -d -r C:\Documents and Settings\Administrator\Desktop\iaxclient.tar\iaxclient\iaxclient\lib/libiax2/src/iax.c E:\iaxclient\lib/libiax2/src/iax.c 410c410 < s->sendto = sendto; --- > s->sendto = (int) sendto; //MSVC Attributes difference Error 616,619d615 < struct { < struct iax_frame fr2; < unsigned char buffer[4096]; /* Buffer -- must preceed fr2 */ < } buf; 620a617,620 > struct { > unsigned char buffer[4096]; /* Buffer -- must preceed fr2 */ > struct iax_frame fr2; > } buf; 766,767c766,771 < f.offset = 0; < f.src = __FUNCTION__; --- > f.offset = 0; > #if _MSC_VER > 1000 /* Babar Shafiq Nazmi */ > f.src = __FILE__; > #else > f.src = __FUNCTION__; > #endif diff -d -r C:\Documents and Settings\Administrator\Desktop\iaxclient.tar\iaxclient\iaxclient\lib/libiax2/src/iax2-parser.c E:\iaxclient\lib/libiax2/src/iax2-parser.c 15c15,16 < #include <winsock.h> --- > #include <winsock.h> > #define snprintf _snprintf diff -d -r C:\Documents and Settings\Administrator\Desktop\iaxclient.tar\iaxclient\iaxclient\lib/libiax2/src/iax2.h E:\iaxclient\lib/libiax2/src/iax2.h 116,117c116,153 < < /* Full frames are always delivered reliably */ --- > > > /* Full frames are always delivered reliably */ > #if _MSC_VER > 1000 > #pragma pack (push,iax2_full_hdr) > struct ast_iax2_full_hdr { > unsigned short scallno; /* Source call number -- high bit must be 1 */ > unsigned short dcallno; /* Destination call number -- high bit is 1 if retransmission */ > unsigned int ts; /* 32-bit timestamp in milliseconds (from 1st transmission) */ > unsigned char oseqno; /* Packet number (outgoing) */ > unsigned char iseqno; /* Packet number (next incoming expected) */ > char type; /* Frame type */ > unsigned char csub; /* Compressed subclass */ > unsigned char iedata[0]; > }; > struct ast_iax2_mini_hdr { > unsigned short callno; /* Source call number -- high bit must be 0, rest must be non-zero */ > unsigned short ts; /* 16-bit Timestamp (high 16 bits from last ast_iax2_full_hdr) */ > /* Frametype implicitly VOICE_FRAME */ > /* subclass implicit from last ast_iax2_full_hdr */ > unsigned char data[0]; > }; > struct ast_iax2_meta_hdr { > unsigned short zeros; /* Zeros field -- must be zero */ > unsigned char metacmd; /* Meta command */ > unsigned char cmddata; /* Command Data */ > unsigned char data[0]; > }; > struct ast_iax2_meta_trunk_hdr { > unsigned int ts; /* 32-bit timestamp for all messages */ > unsigned char data[0]; > }; > struct ast_iax2_meta_trunk_entry { > unsigned short callno; /* Call number */ > unsigned short len; /* Length of data for this callno */ > }; > #pragma pack (pop,iax2_full_hdr) > #else 129d164 < /* Mini header is used only for voice frames -- delivered unreliably */ 137c172 < --- > 143,144c178,179 < } __attribute__ ((__packed__)); < --- > } __attribute__ ((__packed__)); > 149c184 < --- > 154c189 < --- > #endif diff -d -r C:\Documents and Settings\Administrator\Desktop\iaxclient.tar\iaxclient\iaxclient\lib/libiax2/src/winpoop.h E:\iaxclient\lib/libiax2/src/winpoop.h 17c17 < static inline int inet_aton(char *cp, struct in_addr *inp) --- > #if defined(_MSC_VER) > #define INLINE __inline > #else > #define INLINE inline > #endif > static int INLINE inet_aton(char *cp, struct in_addr *inp) //inline // Babar Shafiq Nazmi diff -d -r C:\Documents and Settings\Administrator\Desktop\iaxclient.tar\iaxclient\iaxclient\lib/winfuncs.c E:\iaxclient\lib/winfuncs.c 2c2,3 < #include <windows.h> --- > #include <windows.h> > #include <time.h> //undeclared identifier Babar Shafiq Nazmi 23c24 < time_t t; --- > time_t t; //error ===== God is a great Programmer __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |