On Mon, Jun 17, 2019 at 3:42 PM Carsten Haitzler <[email protected]> wrote: > > On Mon, 17 Jun 2019 10:26:13 +0200 Vincent Torri <[email protected]> > said: > > > On Mon, Jun 17, 2019 at 10:10 AM Carsten Haitzler <[email protected]> > > wrote: > > > > > > > > > > > > > Hello > > > > > > > > I want to make Evil completely private (it seems that currently, it is > > > > possible), but the examples need functions /macro that do not exist on > > > > Windows. Namely (for now) : > > > > > > > > edje/edje-text.c line 57 : setenv > > > > edje/edje-textblock-hyphenation.c line 85 : LC_MESSAGES > > > > > > > > Note that, on Windows, the equivalent of setenv() is _putenv() > > > > > > > > I can include evil_private.h in these examples. Is it ok for everyone > > > > ? Or should I export setenv and LC_MESSAGES in Evil.h (and maybe other > > > > stuff ? > > > > > > Xavi said this already -> if you want evil to be private, then you can't > > > go > > > using it in public examples. setenv() already is an issue as I've found it > > > to be unportable between unixes in the past. putenv() is portable, BUT has > > > the nasty issue of using the VAR=val pointer directly in the env and thus > > > becoming an ownership and lifetime nightmare. > > > > maybe we can add an API in eina, but having an #ifdef in the examples > > for seenv/putenv is not a pb for me > > > > > Luckily... ecore efl now has EFL api's for dealing with env vars ... so > > > this > > > becomes a problem for legacy. I'd advise to just use putenv() but kep in > > > mind you can't just free the string buffer after the putenv(). It must > > > stay > > > valid and be around... I can fix these example. They will get uglier with > > > putenv(), but... that's life. mingw32 should provide a putenv() (not > > > _putenv())... right? > > > > yes, putenv() is available in mingw-w64 and is working (I did a test > > with putenv("FOO=1"); which returns 0). > > ok. will change it to putenv then > > > > Now what about setlocale + LC_MESSAGES? LC_ALL will do? it is just an > > > example. I am assuming people will just using MinGW32 when on Windows > > > anyway... > > > > LC_MESSAGES is a bigger problem. setlocale exists but without > > LC_MESSAGES support. LC_ALL is available, though : > > ok. that'll work for the purposes of this example. i'll fix it.
thank you Vincent _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
