Archive for November, 2007

Break ABI compatibility is harmful

Thursday, November 1st, 2007

Last week, I did a MFC for fixing ctype(3) operating in UTF-8 locale (original committed by ache@). However, this breaks the forward compatibility of libc. There are many discussions on cvs-src@. In short, we have some inlined functions in _ctype.h which refer to an internal variable __mb_sb_limit of libc. As these functions are inlined, the symbol reference will be shown in your ELF binary if you include ctype.h (which includes _ctype.h). This means newly compiled binary can not run on older system. In the end, I restored the compatibility on 6.x by making these inlined functions to be compiled as non-inlined form which may hurt performance. I did not do the same for 7 and 8 as 7 is not yet released and 8 is HEAD. I would like to thank my mentor delphij@ for his help. Having a mentor who lives in complete different timezone is not a bad thing. *grin* Back to the forward compatibility issue, personally, I don’t mind the forward compatibility is broken as I never use binary from future system. However, I know there are users uses packages this way. Trading speed with compatibility may not be a bad idea, anyway.