Glibc_vs_uClibc_Differences.txt 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. uClibc and Glibc are not the same -- there are a number of differences which
  2. may or may not cause you problems. This document attempts to list these
  3. differences and, when completed, will contain a full list of all relevant
  4. differences.
  5. 1) uClibc is smaller than glibc. We attempt to maintain a glibc compatible
  6. interface, allowing applications that compile with glibc to easily compile with
  7. uClibc. However, we do not include _everything_ that glibc includes, and
  8. therefore some applications may not compile. If this happens to you, please
  9. report the failure to the uclibc mailing list, with detailed error messages.
  10. 2) uClibc is much more configurable then glibc. This means that a developer
  11. may have compiled uClibc in such a way that significant amounts of
  12. functionality have been omitted.
  13. 3) uClibc does not even attempt to ensure binary compatibility across releases.
  14. When a new version of uClibc is released, you may or may not need to recompile
  15. all your binaries.
  16. 4) malloc(0) in glibc returns a valid pointer to something(!?!?) while in
  17. uClibc calling malloc(0) returns a NULL. The behavior of malloc(0) is listed
  18. as implementation-defined by SuSv3, so both libraries are equally correct.
  19. This difference also applies to realloc(NULL, 0). I personally feel glibc's
  20. behavior is not particularly safe.
  21. 5) uClibc does not provide a database library (libdb).
  22. 6) uClibc does not support NSS (/lib/libnss_*), which allows glibc to easily
  23. support various methods of authentication and DNS resolution. uClibc only
  24. supports flat password files and shadow password files for storing
  25. authentication information.
  26. 7) uClibc's libresolv is only a stub. Some, but not all of the functionality
  27. provided by glibc's libresolv is provided internal to uClibc. Other functions
  28. are not at all implemented.
  29. 8) uClibc does not provide libnsl.so.1, and has no support for Network
  30. Information Service (NIS).
  31. 9) uClibc's locale support is not 100% complete yet. We are working on it.
  32. 10) uClibc's math library only supports long double as inlines, and even
  33. then the long double support is quite limited.
  34. 11) uClibc's libcrypt does not support the reentrant crypt_r, setkey_r and
  35. encrypt_r, since these are not required by SuSv3.
  36. 12) uClibc does not implement wordexp()
  37. 13) uClibc directly uses the kernel types to define most opaque data types.
  38. 14) uClibc directly uses the linux kernel's arch specific 'stuct stat'.
  39. 15) Add other things here as they come up......