From: Darren S. <da...@st...> - 2004-01-02 22:50:47
|
WOOHOO :-) Untar the tarball ;-) 1. Change include dir from libiax to libiax2 and include portmixer/px_common 2. Add IAXC_IAX2 & LIBIAX to PRE_DEFINITIONS 3. Remove libiax/*.h & *.c from project 4. add libspeex/mdf.c to project 5. add portmixer/px_win_wmme/px_win_wmme.c to project 6. remove inline crap 7. change sendto_t to: typedef int (pascal *sendto_t)(SOCKET, const char *, int, int, const struct sockaddr *, int); 8. add libiax2/src/iax.c 9. add libiax2/src/md5.c 10. apply patch to iax.c 11. add libiax2/src/iax2-parser.c 12. move #include <unistd.h> declaration in iax2-parser to inside the !WIN32 DEF clause Then Compile and enjoy native IAX2 (in Debug mode anyway) :-) Regards Darren ']data[' Smith > -----Original Message----- > From: iax...@li... > [mailto:iax...@li...] On > Behalf Of Darren Smith > Sent: 02 January 2004 21:21 > To: 'Faizan Naqvi'; iax...@li... > Subject: RE: [Iaxclient-devel] solved struct hell. > > Hi Faizan et al > > There are still errors it seems :-( > > In libiax2/iax-client.h: > > typedef int PASCAL (*sendto_t)(SOCKET, const char *, int, > int, const struct sockaddr *, int); > > Doesn't seem to work at all, if I remove the PASCAL (google > says PASCAL == > __stdcall?) it compiles however WinIAX crashes badly, yet no > matter what combination I try, will it accept it :-) > > In iax.c 'struct iax_session *iax_session_new(void)': > > S->sendto = sendto causes: > error C2152: '=' : pointers to functions with different > attributes > > If I typecast it with (sendto_t) it compiles? > > Lastly, but I don't think it matters too much (except from a > performance point of view?): > > Libiax2/winpoop.h: > > inline doesn't seem to want to work, either as __inline > or inline. > > Any thoughts you have would be appreciated. > > Regards > > Darren ']data[' Smith. > > > -----Original Message----- > > From: iax...@li... > > [mailto:iax...@li...] On Behalf Of > > Faizan Naqvi > > Sent: 23 November 2003 07:52 > > To: iax...@li... > > Subject: [Iaxclient-devel] solved struct hell. > > > > Hi. > > Well it looks like Release version wont work for a while. > So here is > > the solution with some C theory. > > If I am repeating someone's else thoughts than sorry for that. > > /////////////////MY CODE////////////////// #ifdef _MSC_VER unsigned > > buffer[4096]; > > struct { > > struct iax_frame fr2; > > } buf; > > #else > > struct { > > struct iax_frame fr2; > > unsigned char buffer[4096]; /* Buffer -- must > > preceed fr2 */ > > } buf; > > #endif > > struct iax_frame *fr; > > int res; > > int sendmini=0; > > unsigned int lastsent; > > unsigned int fts; > > > > #ifdef _MSC_VER > > buffer[0]=0; > > #else > > /* Shut up GCC */ > > buf.buffer[0] = 0; > > #endif > > /////////////////////////////////////////END OF MY > > CODE.////////////////////////////// > > > > The member afdata of iax_frame is zero sized. The struct hell > > origianly was declaerd like this ////////////////code in > > iax_send///////// struct hell { > > struct iax_frame*fr2; > > unsigned char buffer[4096]; > > } buf; > > ////////////////end code/////// > > This allocated 4K after afdata so when afdata is filled it > goes into > > buffer but is able to accessed by afdata. > > MSVC doesnt allow this. Putting it buffer before fr2 > compiles fine but > > gives no space for data to be copied in afdata. > > So, remebering that stack is in reverse declaring buffer > just before > > struct hell gives afdata 4K like this. > > //////////////modified iax_send code./////////// unsigned char > > buffer[4096]; struct hell { > > struct iax_frame*fr2; > > } buf; > > //////////////end code/////////////////////// > > > > I hope this solevs the proble, > > Somebody get the Release version working. > > thank you. > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: IBM Linux Tutorials. > > Become an expert in LINUX or just sharpen your skills. Sign up for > > IBM's Free Linux Tutorials. Learn everything from the bash > shell to > > sys admin. > > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > > _______________________________________________ > > Iaxclient-devel mailing list > > Iax...@li... > > https://lists.sourceforge.net/lists/listinfo/iaxclient-devel > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign > up for IBM's Free Linux Tutorials. Learn everything from the > bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Iaxclient-devel mailing list > Iax...@li... > https://lists.sourceforge.net/lists/listinfo/iaxclient-devel > |