1uClibc attempts to fully (and rigorously) support "The Open Group Base 2Specifications Issue 6 IEEE Std 1003.1, 2003 Edition" (aka SuSv3). However, as 3with any standard, they sometimes require things that are either impossible or 4are Completely Stupid(tm). Therefore, we cannot claim full compliance, and 5there may be some areas of uClibc that differ from the requirements of this 6specification. This document attempts to list these differences and, when 7completed, will contain a full list of all relevant differences between uClibc 8and the requirements of the SuSv3. 9 10 11*) The uClibc setlocale() function is not threadsafe. 12 13 SuSv3 states that "The locale state is common to all threads 14 within a process.". But it does not explicitly mention 15 setlocale() as a function that need not be thread-safe. 16 Making setlocale() threadsafe would require an absurd amount 17 of locking (i.e. inside each and every ctype call such as 18 isalpha()). Furthermore, we consider calling setlocale() 19 from N threads concurrently while using string functions to 20 be a terribly dumb thing to do. Therefore, we have decided 21 that setlocale() shall not be threadsafe. If you are 22 multi-threaded, and you wish to change the global locale 23 state, please take care to prevent all other threads from 24 using any locale or ctype functions until the setlocale() 25 call has finished. 26 27 28 29 30---------------------------------------------------------------- 31heukelum -- heukelum at freemail dot nl writes: 32 33Hi everyone, 34 35I think uClibc is a great project! And, since I found the file 36docs/uClibc_vs_SuSv3.txt in the source tarball which mentioned only 37fmtmsg as a missing function compared to the SUSv3, I got curious about 38the length of the list denoted by "<others?>". So I built the 3920040305-snapshot using allyesconfig, extracted the symbols from the 40(dynamic) libraries, and compared that list to the SUSv3 header files... 41 42The largest source of omissions was the mathematical interface 43(183/355), followed by optional interfaces (134/355). The result: only 4438 non-mathematical interfaces are missing compared to the minimal 45SUSv3! Naming only one function as missing was over-enthousiastic, but 46the result was better than I anticipated. 47 48A compact list of omissions is appended. 49I hope this was a helpful exercise ;) 50 51Greetings, 52 Alexander 53 54P.S. uClibc was compiled with thread support, but did not provide the 55interfaces pthread_cleanup_push and pthread_cleanup_pop. 56 57 58 59Omissions from obligatory interfaces: 60------------------------------------- 61stdlib.h: _Exit, lcong48, lldiv, posix_openpt; 62 ecvt, fcvt 63ndbm.h: [all=9] dbm_* 64utmpx.h: [all=6] *utx* (but functions without "x" do exist!) 65nl_types.h: [all] catclose, catgets, catopen 66unistd.h: getwd, ualarm 67inttypes.h: imaxdiv 68fmtmsg.h: fmtmsg 69string.h: strerror_r 70setjmp.h: setsigjmp 71monetary.h: strfmon 72sys/select.h: pselect 73sys/socket.h: sockatmark 74sys/wait.h: waitid 75 76 77Unimplemented optional interfaces: 78---------------------------------- 79trace.h: (depends on TRC) [all=50] posix_trace_* 80pthread.h: (depends on THR) pthread_cleanup_{push,pop}; 81 pthread_attr_{g,s}etstack (depend on TSA TSS); 82 [7] pthread_barrier* (depend on BAR); 83 pthread_condattr_{g,s}et_clock (depend on CS); 84 pthread_getcpuclockid (depends on TCT); 85 pthread_mutex{,attr}_{g,s}etprioceiling (depend on TPP); 86 pthread_mutexattr_{g,s}etprotocol (depend on TPP|TPI); 87 pthread_rwlock_timed{rd,rw}lock (depend on TMO); 88 pthread_setschedprio (depends on TPS); 89 [5] pthread_spin_* (depend on SPI) 90spawn.h: (depends on SPN) [all=21] posix_spawn* 91aio.h: (depends on AIO) [all=8] aio_*, lio_* 92stropts.h: (depends on XSR) isastream, {g,s}et{,p}msg, fattach, fdetach 93sys/mman.h: posix_madvice (depends on ADV); posix_mem_offset, 94 posix_typed_mem_getinfo, posix_typed_mem_open (depend on TYM); 95 shm_open, shm_unlink (depend on SHM) 96fcntl.h: posix_fallocate (depend on ADV) 97signal.h: sigqueue (depends on RTS) 98 99 100Unimplemented mathematical interfaces: 101-------------------------------------- 102math.h: [126] many 103complex.h: [46] all, except cabs 104fenv.h: [11] all 105_______________________________________________ 106