> 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.

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?

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...

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - [email protected]



_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to