sys/ptrace.h: remove obsolete Linux PTRACE_SEIZE_DEVEL constant
[uclibc-ng.git] / docs / uClibc_vs_SuSv3.txt
bloba5a9dcd49e9ebdaf224c1c23440ca50e60af8925
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.
11 *) The uClibc setlocale() function is not threadsafe.
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.
30 ----------------------------------------------------------------
31 heukelum -- heukelum at freemail dot nl writes:
33 Hi everyone,
35 I think uClibc is a great project! And, since I found the file
36 docs/uClibc_vs_SuSv3.txt in the source tarball which mentioned only
37 fmtmsg as a missing function compared to the SUSv3, I got curious about
38 the length of the list denoted by "<others?>". So I built the
39 20040305-snapshot using allyesconfig, extracted the symbols from the
40 (dynamic) libraries, and compared that list to the SUSv3 header files...
42 The largest source of omissions was the mathematical interface
43 (183/355), followed by optional interfaces (134/355). The result: only
44 38 non-mathematical interfaces are missing compared to the minimal
45 SUSv3! Naming only one function as missing was over-enthousiastic, but
46 the result was better than I anticipated.
48 A compact list of omissions is appended.
49 I hope this was a helpful exercise ;)
51 Greetings,
52          Alexander
54 P.S. uClibc was compiled with thread support, but did not provide the
55 interfaces pthread_cleanup_push and pthread_cleanup_pop.
59 Omissions from obligatory interfaces:
60 -------------------------------------
61 stdlib.h: _Exit, lcong48, lldiv, posix_openpt;
62           ecvt, fcvt
63 ndbm.h: [all=9] dbm_*
64 utmpx.h: [all=6] *utx* (but functions without "x" do exist!)
65 nl_types.h: [all] catclose, catgets, catopen
66 unistd.h: getwd, ualarm
67 inttypes.h: imaxdiv
68 fmtmsg.h: fmtmsg
69 string.h: strerror_r
70 setjmp.h: setsigjmp
71 monetary.h: strfmon
72 sys/select.h: pselect
73 sys/socket.h: sockatmark
74 sys/wait.h: waitid
77 Unimplemented optional interfaces:
78 ----------------------------------
79 trace.h: (depends on TRC) [all=50] posix_trace_*
80 pthread.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)
90 spawn.h: (depends on SPN) [all=21] posix_spawn*
91 aio.h: (depends on AIO) [all=8] aio_*, lio_*
92 stropts.h: (depends on XSR) isastream, {g,s}et{,p}msg, fattach, fdetach
93 sys/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)
96 fcntl.h: posix_fallocate (depend on ADV)
97 signal.h: sigqueue (depends on RTS)
100 Unimplemented mathematical interfaces:
101 --------------------------------------
102 math.h: [126] many
103 complex.h: [46] all, except cabs
104 fenv.h: [11] all
105 _______________________________________________