今天在安裝syslog-ng 3.0的時候說需要glib 2.12.3 以上的版本,想起還有一個glibc庫,好像不太一樣,上網搜了一下:
原文:http://hi.baidu.com/yuanfang/blog/item/85acd788af41c191a5c27208.html
GLib是Gtk
+庫和Gnome的基礎。GLib可以在多個平台下使用,比如Linux、Unix、Windows等。GLib為許多標準的、常用的C語言結構提供了相應的替代物。
GLib中定義了好多有用的資料結構,如單(雙)向連表,可變長的數組等,線程池等有用的東西。使用GLib庫的程式都應該包含GLib的標頭檔glib.h。
Glibc
是提供系統調用和基本函數的 C 庫,比如open, malloc, printf等等。所有動態串連的程式都要用到它。是GNU開發的C庫。
他們之間在用途上沒有太大關係。
GLib is a general-purpose utility library, which provides many useful data
types, macros, type conversions, string utilities, file utilities, a main loop
abstraction, and so on. It works on many UNIX-like platforms, Windows, OS/2 and
BeOS. GLib is released under the GNU Library General Public License (GNU
LGPL).
The general policy of GLib is that all functions are invisibly threadsafe
with the exception of data structure manipulation functions, where, if you have
two threads manipulating the same data structure, they must use a lock to
synchronize their operation.
GLIBC
The GNU C library is primarily designed to be a portable and high performance
C library.
It follows all relevant standards (ISO C 99, POSIX.1c, POSIX.1j, POSIX.1d,
Unix98, Single Unix Specification). It is also internationalized and has one of
the most complete internationalization interfaces known.