Break ABI compatibility is harmful

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.

2 Responses to “Break ABI compatibility is harmful”

  1. Yes trading speed with compatibility is not a bad idea.

  2. inlined says:

    [...] Website. Sam Inverso is proudly powered by WordPress. Entries (RSS) and Comments (RSS) …Break ABI compatibility is harmful I'm rafanAs these functions are inlined, the symbol reference will be shown in your ELF binary if … x by [...]

Leave a Reply