Use of setenv() is not portable
|Reported by:||Richard Lloyd||Owned by:|
|Component version:||Operating system type:|
|Operating system version:||HP-UX 11.11|
In the FileZilla Client 3.1.6 code, src/interface/locale_initializer.cpp makes a call to setenv(), which unfortunately not every platform has (my example is HP-UX 11.11). To fix this in a somewhat kludgy way, I took the gitsetenv() routine from git's compat/setenv.c and put it in locale_initializer.cpp (I had to cast the malloc() call in the gitsetenv() function to (char *) as well). Whether there's a more elegant solution, I'll leave it up to you (e.g. you could test for setenv() in configure and #ifdef HAVE_SETENV or something, but you'll still need some code for your equivalent setenv() call of course).