glib與glibc的區別

來源:互聯網
上載者:User

今天在安裝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.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.