Help needed: fix build issue with xdxf_makedict in older platforms

Joshua Root jmr at macports.org
Tue Nov 7 22:20:01 UTC 2017


On 2017-11-8 05:46 , Ken Cunningham wrote:
> 
> that definition is guarded by a flag
> 
> #ifndef GNULIB_defined_setlocale /* don't override gnulib */
> #undef setlocale
> #define setlocale libintl_setlocale
> extern char *setlocale (int, const char *);
> #endif
> 
> 
> and sure enough, adding this to the portfile fixes the build:
> 
> configure.cxxflags-append -DGNULIB_defined_setlocale
> 
> I presume this workaround was made for this very error.

Looks more like it was made to support programs using gnulib, which
apparently provides its own setlocale implementation. I would probably
have tried including the gettext header last before undefining the macro.

The intent of having the macro in the first place would be to replace
setlocale calls in the program with libintl_setlocale, so be aware that
this won't happen, which may or may not be a problem or what the authors
intended. I would want to check that the program's gettext functionality
still works.

- Josh


More information about the macports-dev mailing list