uClibc_vs_SuSv3.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 areas 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. *) 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. ----------------------------------------------------------------
  24. heukelum -- heukelum at freemail dot nl writes:
  25. Hi everyone,
  26. I think uClibc is a great project! And, since I found the file
  27. docs/uClibc_vs_SuSv3.txt in the source tarball which mentioned only
  28. fmtmsg as a missing function compared to the SUSv3, I got curious about
  29. the length of the list denoted by "<others?>". So I built the
  30. 20040305-snapshot using allyesconfig, extracted the symbols from the
  31. (dynamic) libraries, and compared that list to the SUSv3 header files...
  32. The largest source of omissions was the mathematical interface
  33. (183/355), followed by optional interfaces (134/355). The result: only
  34. 38 non-mathematical interfaces are missing compared to the minimal
  35. SUSv3! Naming only one function as missing was over-enthousiastic, but
  36. the result was better than I anticipated.
  37. A compact list of omissions is appended.
  38. I hope this was a helpful exercise ;)
  39. Greetings,
  40. Alexander
  41. P.S. uClibc was compiled with thread support, but did not provide the
  42. interfaces pthread_cleanup_push and pthread_cleanup_pop.
  43. Omissions from obligatory interfaces:
  44. -------------------------------------
  45. stdlib.h: _Exit, lcong48, lldiv, posix_openpt;
  46. ecvt, fcvt
  47. ndbm.h: [all=9] dbm_*
  48. utmpx.h: [all=6] *utx* (but functions without "x" do exist!)
  49. nl_types.h: [all] catclose, catgets, catopen
  50. unistd.h: getwd, ualarm
  51. inttypes.h: imaxdiv
  52. fmtmsg.h: fmtmsg
  53. string.h: strerror_r
  54. setjmp.h: setsigjmp
  55. monetary.h: strfmon
  56. sys/select.h: pselect
  57. sys/socket.h: sockatmark
  58. sys/wait.h: waitid
  59. Unimplemented optional interfaces:
  60. ----------------------------------
  61. trace.h: (depends on TRC) [all=50] posix_trace_*
  62. pthread.h: (depends on THR) pthread_cleanup_{push,pop};
  63. pthread_attr_{g,s}etstack (depend on TSA TSS);
  64. [7] pthread_barrier* (depend on BAR);
  65. pthread_condattr_{g,s}et_clock (depend on CS);
  66. pthread_getcpuclockid (depends on TCT);
  67. pthread_mutex{,attr}_{g,s}etprioceiling (depend on TPP);
  68. pthread_mutexattr_{g,s}etprotocol (depend on TPP|TPI);
  69. pthread_rwlock_timed{rd,rw}lock (depend on TMO);
  70. pthread_setschedprio (depends on TPS);
  71. [5] pthread_spin_* (depend on SPI)
  72. spawn.h: (depends on SPN) [all=21] posix_spawn*
  73. aio.h: (depends on AIO) [all=8] aio_*, lio_*
  74. stropts.h: (depends on XSR) isastream, {g,s}et{,p}msg, fattach, fdetach
  75. sys/mman.h: posix_madvice (depends on ADV); posix_mem_offset,
  76. posix_typed_mem_getinfo, posix_typed_mem_open (depend on TYM);
  77. shm_open, shm_unlink (depend on SHM)
  78. fcntl.h: posix_fallocate (depend on ADV)
  79. signal.h: sigqueue (depends on RTS)
  80. Unimplemented mathematical interfaces:
  81. --------------------------------------
  82. math.h: [126] many
  83. complex.h: [46] all, except cabs
  84. fenv.h: [11] all
  85. _______________________________________________