2009/3/11 Della Betta Filippo <filippo.dellabe...@telecomitalia.it>:
> Dear Jonas, all
> if you want to compile the latest version win mingw I found the following:
> 1) to overcome the PKG_CHECK_MODULE problem, you need to install pkg-config 
> (see http://www.mingw.org/wiki/FAQ - How do I get pkg-config installed? -)
> 2) I noticed that there are o lot of warnings on mingw complaining 
> declaration with SOFIAPUBVAR. I think extern is missing (see patch attached)

Hm, wonder what was the reason to drop the extern in first place?

> 3) Makefile.am should be modified to include (in case of MinGW platform) 
> su_win32_port.c on the list of libsu_la_SOURCES (and removed from EXTRA_DIST)

I'll see how to do detection...

> 4) I also had some problem with gai_strerror function (the check in 
> sac-su2.m4 line 529 don't find gai_strerror for mingw, but actually 
> gai_strerror is present on mingw platform). To overcome this issue, I simply 
> changed config.h generated defining HAVE_GAI_STRERROR to 1

You could have a peek in config.log and see config.log which
diagnostics the gcc spews out there.

> 5) I had some problem with s2check (s2base.c line 77 timespec is not defined 
> on mingw platform). I included pthread.h on s2base.c and changed code a 
> little since timespec in pthread.h has tv_nsec instead of tv.tv_usec.

copy&paste error, that should be struct timeval.

> 6) Regarding error in winbase.h, this is due to the fact that #include 
> <stdio.h> and #include <stdarg.h> (needed for va_list macro definition) are 
> missing on line 274 of sac-su2.m4)

OK, I'll add those...

> 7) The -lpthreadVC2 is correct, what mingw doesn't like (I don't know why) is 
> the -I and -L syntax with $(top_srcdir). I overcome this issue I put the full 
> path of pthread dir (i.e. -I/home/Administrator/sofia-sip/win32/pthread and 
> -L/home/Administrator/sofia-sip/win32/pthread) in sac-general.m4

Do you use msys or cygwin to run configure?

There is also some problems with thread-specific storage in
su_uniqueid.c. Currently, I plan to solve the issue with pthread_once,
pthread_key and a cleanup function declared with GCC
__attribute__((destructor)) on Unix systems. I plan to call the
destructor fucntion from a DllMain() function in win32/64, but perhaps
someone more familiar with mingw could tell me how mingw gcc and
runtime implements __attribute__((destructor)) and what happens if
sofia-sip has defined its own DllMain()?

-- 
Pekka.Pessi mail at nokia.com

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to