summaryrefslogtreecommitdiff
path: root/docs/Glibc_vs_uClibc_Differences.txt
blob: 16608abdf6be39b21524e17eece601737957fc52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
uClibc and Glibc are not the same -- there are a number of differences which
may or may not cause you problems.  This document attempts to list these
differences and, when completed, will contain a full list of all relevant
differences.


1) uClibc is smaller than glibc.  We attempt to maintain a glibc compatible
interface, allowing applications that compile with glibc to easily compile with
uClibc.  However, we do not include _everything_ that glibc includes, and
therefore some applications may not compile.  If this happens to you, please
report the failure to the uclibc mailing list, with detailed error messages.

2) uClibc is much more configurable then glibc.  This means that a developer
may have compiled uClibc in such a way that significant amounts of
functionality have been omitted.  

3) uClibc does not even attempt to ensure binary compatibility across releases.
When a new version of uClibc is released, you may or may not need to recompile
all your binaries.

4) malloc(0) in glibc returns a valid pointer to something(!?!?) while in
uClibc calling malloc(0) returns a NULL.  The behavior of malloc(0) is listed
as implementation-defined by SuSv3, so both libraries are equally correct.
This difference also applies to realloc(NULL, 0).  I personally feel glibc's
behavior is not particularly safe.

5) uClibc does not provide a database library (libdb).

6) uClibc does not support NSS (/lib/libnss_*), which allows glibc to easily
support various methods of authentication and DNS resolution.  uClibc only
supports flat password files and shadow password files for storing
authentication information.

7) uClibc's libresolv is only a stub.  Some, but not all of the functionality
provided by glibc's libresolv is provided internal to uClibc.  Other functions
are not at all implemented.

8) uClibc does not provide libnsl.so.1, and has no support for Network
Information Service (NIS). 

9) uClibc's locale support is not 100% complete yet.  We are working on it.

10) uClibc's math library only supports long double as inlines, and even
then the long double support is quite limited.

11) uClibc's libcrypt does not support the reentrant crypt_r, setkey_r and
encrypt_r, since these are not required by SuSv3.

12) uClibc does not implement wordexp()


13) uClibc directly uses the kernel types to define most opaque data types.

14) uClibc directly uses the linux kernel's arch specific 'stuct stat'.

15) Add other things here as they come up......