On Mon, Jan 11, 2021 at 10:56 AM CHIGOT, CLEMENT <clement.chi...@atos.net> wrote: > > >> Hi David, Clement, > >> > >>> The patch is local to libstdc++ AIX support, so I believe that I can > >>> approve it. > >> > >>have you considered merging the dragonfly and aix trees? I'm asking > >>because it seems prudent to try and avoid creating more and more > >>almost-but-not-quite-similar configurations (Solaris might be able to > >>use the same code, at least in 11.4 which has XPG7 support). > > > >Agreed. > > > >See also > >https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D57585&data=04%7C01%7Cclement.chigot%40atos.net%7Cb9820136976149e643b408d8b64756c2%7C33440fc6b7c7412cbb730e70b0198d5a%7C0%7C0%7C637459764803442555%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qinNdbwsbyUdvijD76PanMf0Y1iSfn1FhRAt2T2dl%2B0%3D&reserved=0 > > I haven't thought about that. It should be possible. > The main problem with AIX are the few missing locale functions > (strtof_l, localeconv_l, etc). I've defined some in c_locale.h, some > are simply wrapped by uselocale in the code itself. > The question is if we merged dragonfly, aix and allow others OS > to use this new locale support, what should go in c_locale.h ? > Do we want it to define all missing functions or do we rather > have some #ifdef wrapping "uselocale" when a *_l function > is missing ? > Both ways, I'm fearing there will be a lot of #ifdef.
The OS-specific definitions could be placed in config/os/XXX/os_defines.h. And the DragonFly locale files could include <bits/c++config.h> to obtain the definitions. I'm not certain where to place the uselocale changes. Either #ifdefs or move part of the files to config/os/XXX/... Thanks, David