Glib和Glibc的区别(查资料的时候发现)

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.

你可能感兴趣的:(C)