Hi Clement, > Here is a new version of the patch. I've tested on Linux and AIX. > There are still some tests failing but it starts having a good shape !  > However, I have few questions: > > 1) locale.name and syscalls just a terminology nit: none of those are syscalls. > 3) POSIX 2017 and non-POSIX functions > Many of the *_l functions being used in GNU or dragonfly models aren't > POSIX 2008, but mainly POSIX 2017 or like strtof_l not POSIX at all. > However, there are really useful in the code, thus I've made a double > implementation based on "#ifdef HAVE_". Is it ok for you ? It's not really > POSIX 2008 but more POSIX 2008 with 2017 compatibility. > For the configure, I didn't find any better way to check each syscall, as > they all depend on different includes. Tell me if you have a better idea. First a general observation: there are two groups of functions you're testing for: * Pure BSD additions, not available in either POSIX.1, ISO C, or glibc: localeconv_l mbstowcs_l strtod_l strtof_l strtold_l wcsftime_l * Part of XPG7: iswctype_l strcoll_l strftime_l strxfrm_l towlower_l towupper_l wcscoll_l wcsxfrm_l wctype_l My suggestion would be not to have configure tests _GLIBCXX_HAVE_ for any of the second group at all: this is ieee_1003.1-2008, after all, so if some OS selects that clocale variant, it better implement all of those. If really need be, one could a configure check for those and error out if any is missing. This makes the code way more readable than trying to handle some hypothetical partial implementation. As for the BSD group, I suggest to have one representative configure test (for localeconv_l perhaps) and then use an appropriate name for the group as a whole. Again, this will most likely be an all-or-nothing thing. Besides, your configure tests are way too complicated: just use AC_CHECK_FUNCS doing a link test and be done with it. In a similar vein, configure.ac already has AC_CHECK_HEADERS([xlocale.h]). Rather than hardcoding the existance of the header based on the configure triple, just use the existing HAVE_XLOCALE_H. This ways, things will simply fall into place for e.g. NetBSD, OpenBSD and possibly others. > 4) ctype_configure_char.cc > I've some troubles knowing what is supposed to be implemented on this file. > I don't really understand the part with setlocale which appears in many > os. When I'm adding it, some tests start failing, some start working... > Moreover, on Linux, if I understand correctly, there is some optimizations > based on classic_table(), _M_toupper and _M_tolower. Could you confirm > that it's only useful on Linux ? I don't know myself. However, when trying the first version of your patch (augmented to compile on Solaris), the corresponding change to the solaris file made no difference in test results. > Feel free to try in on other OS. But I've made modifications only for AIX and > Linux, as I can test the other ones. While reading through the patch, I saw that in two places you still use __DragonFly__ || __FreeBSD__ tests. For one, it's hard to tell what feature they are really about, besides they will require fiddling with e.g. for other BSDs. Please use a descriptive macro which says which difference this is about. That said, I gave the new patch a try on Solaris 11.4. To get it to compile, I had to apply two changes that I'd mentioned (without an actual patch) when commenting on the first patch: * The C99 fields of struct lconv need _LCONV_C99 to be visible for C++11. * Some ctype macros need __bitmapsize = 15, as the generic clocale implementation uses. With the attached patch, the code compiled using --enable-clocale=ieee_1003.1-2008. Compared to the augmented first patch, there are a few differences: a couple of failures went away and I've now +XPASS: 22_locale/ctype/is/wchar_t/2.cc execution test Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University