uClibc_vs_SuSv3.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334
  1. uClibc attempts to fully (and rigorously) support "The Open Group Base
  2. Specifications Issue 6 IEEE Std 1003.1, 2003 Edition" (aka SuSv3). However, as
  3. with any standard, they sometimes require things that are either impossible or
  4. are Completely Stupid(tm). Therefore, we cannot claim full compliance, and
  5. there may be some area of uClibc that differ from the requirements of this
  6. specification. This document attempts to list these differences and, when
  7. completed, will contain a full list of all relevant differences between uClibc
  8. and the requirements of the SuSv3.
  9. 1) The uClibc setlocale() function is not threadsafe.
  10. SuSv3 states that "The locale state is common to all threads
  11. within a process.". But it does not explicitly mention
  12. setlocale() as a function that need not be thread-safe.
  13. Making setlocale() threadsafe would require an absurd amount
  14. of locking (i.e. inside each and every ctype call such as
  15. isalpha()). Furthermore, we consider calling setlocale()
  16. from N threads concurrently while using string functions to
  17. be a terribly dumb thing to do. Therefore, we have decided
  18. that setlocale() shall not be threadsafe. If you are
  19. multi-threaded, and you wish to change the global locale
  20. state, please take care to prevent all other threads from
  21. using any locale or ctype functions until the setlocale()
  22. call has finished.
  23. 2) Some functions required by SuSv3 are not currently implemented.
  24. The function you are mostly likely to encounter is wordexp().
  25. A couple of years ago, nobody used wordexp. Now some apps do.
  26. One of these days, someone may provide us with a well written
  27. patch to implement it...
  28. More to follow when we think of it...