Gnulib,也称为GNU 可移植性库,是一个 GNU 代码集合,用于协助编写可移植代码。来自手册:
Gnulib 旨在成为 GNU 项目的大多数重要“可移植性”和/或通用文件的规范源。这些是旨在在源代码级别共享的文件; Gnulib 不是一个典型的需要安装和链接的库。因此,与大多数项目不同,Gnulib 通常不会生成源 tarball 发行版;相反,开发人员直接从源存储库获取模块。
许多函数都实现了可移植性解决方法用于 ISO C 和 POSIX 函数。
glibc, the shortened form of GNU C Library, is the GNU Project's implementation of the C standard library. The API of the C standard library is declared in familiar header files like <stdio.h> and <stdlib.h> (see the Wikipedia link for a full list of header files).
The POSIX operating system API is provided through <unistd.h> which mainly wraps system calls like fork and I/O operations like read/write.
GLib is a bundle of system libraries written in C and developed by GNOME (part of the GNU Project). Quoting from Wikipedia (without source unfortunately)
GLib provides advanced data structures, such as memory chunks, doubly and singly linked lists, hash tables, dynamic strings and string utilities, such as a lexical scanner, string chunks (groups of strings), dynamic arrays, balanced binary trees, N-ary trees, quarks (a two-way association of a string and a unique integer identifier), keyed data lists, relations, and tuples. Caches provide memory management.
GLib implements functions that provide threads, thread programming and related facilities such as primitive variable access, mutexes, asynchronous queues, secure memory pools, message passing and logging, hook functions (callback registering) and timers. GLib also includes message passing facilities such as byte order conversion and I/O channels.
Gnulib, also called the GNU Portability Library, is a collection of GNU code to assist with writing portable code. From the manual:
Gnulib is intended to be the canonical source for most of the important “portability” and/or common files for GNU projects. These are files intended to be shared at the source level; Gnulib is not a typical library meant to be installed and linked against. Thus, unlike most projects, Gnulib does not normally generate a source tarball distribution; instead, developers grab modules directly from the source repository.
发布评论
评论(2)
glibc
是一个核心 C 运行时库。它提供了诸如printf(3)
和fopen(3)
之类的功能。glib
是一个用 C 语言编写的基于对象的事件循环和实用程序库。gnulib
是一个提供从 POSIX API 到本机 API 的适配器的库。这三个都用于完全不同的任务。
glibc
is a core C runtime library. It provides things likeprintf(3)
andfopen(3)
.glib
is an object-based event loop and utility library written in C.gnulib
is a library that provides an adapter from the POSIX API to the native API.All three are used for completely different tasks.
glibc,GNU C Library 的缩写形式,是 GNU 项目对 C 标准库。 C 标准库的 API 在熟悉的头文件中声明,例如
和
(有关完整列表,请参阅 Wikipedia 链接)头文件)。POSIX操作系统API是通过
提供的,主要封装了fork
等系统调用和read
/等I/O操作写
。GLib 是一组用 C 语言编写的系统库,由 GNOME(GNU 项目的一部分)开发。引用自维基百科(不幸的是没有来源)
为什么使用 GLib 函数?
Gnulib,也称为GNU 可移植性库,是一个 GNU 代码集合,用于协助编写可移植代码。来自手册:
许多函数都实现了可移植性解决方法用于 ISO C 和 POSIX 函数。
glibc, the shortened form of GNU C Library, is the GNU Project's implementation of the C standard library. The API of the C standard library is declared in familiar header files like
<stdio.h>
and<stdlib.h>
(see the Wikipedia link for a full list of header files).The POSIX operating system API is provided through
<unistd.h>
which mainly wraps system calls likefork
and I/O operations likeread
/write
.GLib is a bundle of system libraries written in C and developed by GNOME (part of the GNU Project). Quoting from Wikipedia (without source unfortunately)
Why use GLib functions?
Gnulib, also called the GNU Portability Library, is a collection of GNU code to assist with writing portable code. From the manual:
Many of the functions implement portability workarounds for ISO C and POSIX functions.