Ticket #4097 (closed Bug report: fixed)
Use of setenv() is not portable
| Reported by: | rkl | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | FileZilla Client |
| Keywords: | Cc: | ||
| Operating system type: | Operating system version: | HP-UX 11.11 |
Description
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).
Change History
Note: See
TracTickets for help on using
tickets.
