This doesn't guarantee that nl_langinfo(CODESET) will work, because CODESET may fail to be defined... and indeed it's not defined on OpenBSD... In fact, it's only an issue in java, since main gcc's configure appears to have the correct test... Some java maintainer to fix that ? this breaks bootstraps of java on OpenBSD...