[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] linphonec.c handle_configfile_migration and a

From: Henrik Pauli
Subject: Re: [Linphone-developers] linphonec.c handle_configfile_migration and a few other weird ifdefs
Date: Wed, 25 Mar 2015 16:58:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

And looking at address@hidden: is linphone ever even run on a Windows that isn't UNICODE (that's Win95/Win98/WinME, afaik). All those vestigial(?) ifdefs make it quite complicated, probably unnecessarily.

There's not many places looking for UNICODE (or _UNICODE):

linphone$ ack "ifn?def _?UNICODE|if.*defined\(_?UNICODE\)"
51:#ifndef _UNICODE
97:#ifndef _UNICODE
116:#ifndef _UNICODE
149:#ifndef _UNICODE
158:#ifndef _UNICODE

263:    #ifndef _UNICODE

439:#ifdef UNICODE
455:#ifdef UNICODE
475:#ifdef UNICODE
487:#ifdef UNICODE
495:#ifdef UNICODE
512:#ifdef UNICODE

82:#ifdef UNICODE
105:#ifdef UNICODE
123:#ifdef UNICODE
170:#ifdef UNICODE
191:#ifdef UNICODE

20:#ifndef UNICODE

180:#ifdef UNICODE

On 25/03/15 13:46, Henrik Pauli wrote:
In 3.8.0, are you sure you mean this in linphonec.c handle_configfile_migration?

#if !defined(_WIN32_WCE)
    char *old_cfg_gui;
    char *old_cfg_cli;
    char *new_cfg;
#if !defined(_WIN32_WCE)
    const char *home = getenv("HOME");
    const char *home = ".";
#endif /*_WIN32_WCE*/
// ... etc etc ...
#endif /*_WIN32_WCE*/

Similarly, it also appears to me that oRTP's port.h has this (and belle-sip's port.h too)

#if defined(__MINGW32__) || !defined(WINAPI_FAMILY_PARTITION)
// Only use with x being WINAPI_PARTITION_DESKTOP to test if building on desktop

Which is wrong because if it is defined already (and it is on recent mingw64), it will be redefined, resulting in a warning, which by default errors out during compilation.

In linphone's and mediastreamer's you have a strange conflict between the code and the comment

if test "$mingw_found" != "yes" ; then
dnl gettext macro does not work properly under mingw. And we want to use the one provided by GTK.

The code starts to work if you change it to "$mingw_found" = "yes" instead. Makes sense too, because the else branch (in mediastreamer at least) contains a -L/usr/lib which does not make much sense in mingw (it may make sense in msys, but not in mingw proper). Or maybe this change would break linux builds (haven't tried), but it certainly fixed mingw for me.

And finally, a question: mediastreamer seems to locate its plugins relative to the current working directory (in my mingw built linphone anyway), although it claims to be relative to the installation directory. Can you look at the code and tell me whether this is indeed correct? I also don't seem ms_set_plugins_dir used anywhere, though it would be pretty cool to be able to specify it from linphonec command line for example.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]