Ken Raeburn <raeb...@raeburn.org> writes: > On Oct 6, 2009, at 17:35, Mike Gran wrote: >> I need to roll back the changes made to i18n.c >> that made locale-specific case conversion of strings >> work on GNU but break on Darwin. Locale-specific >> case conversion of strings works, but only when >> the locale is set using setlocale. > > Thanks. Though perhaps you could just explicitly test for GNU libc, > if the glibc structures are stable?
There's no reason why they should be stable, they're internal. Glibc's <xlocale.h> reads: --8<---------------cut here---------------start------------->8--- /* Structure for reentrant locale using functions. This is an (almost) opaque type for the user level programs. The file and this data structure is not standardized. Don't rely on it. It can go away without warning. */ typedef struct __locale_struct --8<---------------cut here---------------end--------------->8--- Maybe, until a better solution is found we could use: AC_CHECK_MEMBER([struct __locale_struct.__name] ...) But we should aim for a more robust solution. Thanks, Ludo'.