C library and Unix发展扫盲

本文深入探讨了Linux和C语言中的基础库,包括标准库、glibc、UNIX及其变体的发展历史。从IEEE到ANSI C标准,从C POSIX库到ISO标准,再到具体的实现如glibc和Linux Standard Base,本文提供了对Linux环境下C语言库的全面概述。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

接触linux C有些时间了,一直对于libcglibcunix/like unix的发展不是很了解,学习这么久还不知道他的详细发展,所以整理了此文。

目录:

1.C standard library

C standard library,IEEE,ANSIC,POSIX,C POSIXlibrary,ISOSingle UNIXSpecification

2.glibc

GNU C Library,Linux Standard Base,GLib

3.UNIX and like UNIX

Solaris (operating system),SunOSBSD,UNIX System V,System V Interface Definition,X/Open

C standard library



C standard library

TheC Standard Libraryis thestandard libraryfor theprogramming language C, as specifiedintheANSI Cstandard.[1]It was developed at the same timeas theC POSIX library, which is basicallya supersetof it[citation needed]. Since ANSI C was adoptedby theInternational Organization for Standardization,[2]the C standard library is also called theISO C library.

Informally, the termsC standard libraryorC libraryorlibcare also used to designate a particular implementation on a given system. In theUnixenvironment, such an implementation is usually shipped with the operating system and its presence is assumed by many applications. For instance,GNU/Linuxcomes with theGNUimplementationglibc.

The C standard library provides macros, type definitions, and functions for tasks likestringhandling, mathematical computations, input/output processing, memory allocation and several otheroperating systemservices.

IEEE

TheInstitute of Electrical and Electronics Engineers(IEEE, readI-Triple-E) is anon-profitprofessional associationheadquartered inNew York Citythat is dedicated to advancing technological innovation and excellence. It has more than 400,000 members in more than 160 countries, about 55% of whom reside in theUnited States.[2][3]

ANSI C

ANSI Crefers tothe family of successivestandardspublishedby theAmerican National Standards Institute(ANSI) for theC programming language. Software developers writing in C are encouraged to conformto the standards, as doing so aidsportabilitybetween compilers.

POSIX

POSIX(/ˈpɒzɪks/poz-iks), an acronym for "PortableOperatingSystemInterface", is a family ofstandardsspecified by theIEEEfor maintaining compatibility betweenoperating systems. POSIX defines theapplication programming interface(API), along with command lineshellsand utility interfaces, for software compatible with variants ofUnixand other operating systems.[1][2]

C POSIXlibrary

TheC POSIX libraryis a specificationof aC standard libraryforPOSIXsystems. It was developedat the same timeas theANSI Cstandard. Some effort was made to make POSIX compatible withstandard C; POSIX includes additionalfunctions to those introducedin standard C.

ISO

TheInternational Organization for Standardization(French:Organisation internationale de normalisation,Russian:Международная организация по стандартизации,tr.Mezhdunarodnaya organizaciya po standartizacii),[1]widely known asISO, is aninternational standard-setting body composed of representatives from various nationalstandards organizations. Founded on February 23, 1947, the organization promulgates worldwide proprietary, industrial, and commercialstandards. It has its headquarters inGeneva,Switzerland.[2]

Single UNIX Specification

TheSingle UNIX Specification(SUS) is the collective name of a family of standards forcomputeroperating systemsto qualify for the name "Unix". The SUS is developed and maintained by theAustin Group, based on earlier work by theIEEEandThe Open Group.

glibc


GNU C Library

TheGNU C Library, commonly known asglibc, is theC standard libraryreleased by theGNU Project. Originally written by theFree Software Foundation(FSF) for theGNUoperating system, the library's development has been overseen by a committee since 2001,[2]with Ulrich Drepper fromGoldman Sachsas the lead contributor and maintainer.

Released under theGNU Lesser General Public License, glibc isfree software.

Linux Standard Base

TheLinux Standard Base(LSB) is a joint project by severalLinux distributionsunder the organizational structure of theLinux Foundationto standardize the software system structure, including thefilesystem hierarchy, used withLinuxoperating system. The LSB is based on thePOSIXspecification, theSingle UNIX Specification, and several other open standards, but extends them in certain areas.

According to the LSB:

The goal of the LSB is to develop and promote a set of open standards that will increase compatibility among Linux distributions and enable software applications to run on any compliant system even in binary form. In addition, the LSB will help coordinate efforts to recruit software vendors to port and write products for Linux Operating System.

The LSB compliance may be certified for a product by a certification procedure.[1]

The LSB specifies for example: standardlibraries, a number of commands and utilities that extend thePOSIXstandard, the layout of thefile system hierarchy,run levels, the printing system, includingspoolerssuch asCUPSand tools likeFoomaticand several extensions to theX Window System.

GLib

GLibis a cross-platformsoftware utility librarythat began as part of theGTK+project. However, before releasing version 2 of GTK+, the project's developers decided to separate non-GUI-specific code from the GTK+ platform, thus creating GLib as a separate product. GLib was released as a separate library so other developers, those who did not make use of the GUI-related portions of GTK+, could make use of the non-GUI portions of the library without the overhead of depending on a full-blown GUI library.

Since GLib is a cross-platform library, applications using it to interface with the operating system are usually portable across different operating systems without major changes.[1]

UNIX and like UNIX


Solaris (operating system)

Solarisis aUnixoperating systemoriginally developed bySun Microsystems. It superseded their earlierSunOSin 1993.Oracle Solaris, as it is now known, has been owned byOracle Corporationsince Oracle's acquisition of Sun in January 2010.[2]

Solaris is known for itsscalability, especially onSPARCsystems, and for originating many innovative features such asDTrace,ZFSand Time Slider.[3][4]Solaris supports SPARC-based andx86-basedworkstationsandserversfrom Sun and other vendors, with efforts underway to port to additional platforms. Solaris is registered as compliant with theSingle Unix Specification.

Solaris was historically developed asproprietary software, then in June 2005 Sun Microsystems released most of thecodebaseunder theCDDLlicense, and founded theOpenSolarisopen sourceproject.[5]With OpenSolaris Sun wanted to build a developer and user community around the software. After the acquisition of Sun Microsystems in January 2010, Oracle decided to discontinue the OpenSolaris distribution and the development model.[6][7]As a result, the OpenSolaris communityforkedas theOpenIndianaproject,[8]a part of theIllumosFoundation.[7][9]In August 2010, Oracle discontinued providing public updates to the source code of the Solaris Kernel, effectively turning Solaris 11 into a closed source proprietary operating system. However, through theOracle Technology Network(OTN), industry partners can still gain access to the in-development Solaris source code.[7]. The Open source portion of Solaris 11 is available for download from Oracle.[10]

SunOS

SunOSis a version of theUnixoperating systemdeveloped bySun Microsystemsfor theirworkstationandservercomputer systems. The SunOS name is usually only used to refer to versions 1.0 to 4.1.4 of SunOS. These versions were based onBSD, while SunOS version 5.0 and later are based on UNIXSystem V Release 4, and are marketed under thebrand nameSolaris.

BSD

Berkeley Software Distribution

Berkeley Software Distribution(BSD, sometimes calledBerkeley Unix) is aUnixoperating systemderivative developed and distributed by theComputer Systems Research Group(CSRG) of theUniversity of California, Berkeley, from 1977 to 1995. Today the term "BSD" is often non-specifically used to refer to any of the BSD descendants which together form a branch of the family ofUnix-likeoperating systems. Operating systems derived from the original BSDcoderemain actively developed and widely used.

Historically, BSD has been considered a branch of UNIX—"BSD UNIX", because it shared the initial codebase and design with the originalAT&TUNIX operating system. In the 1980s, BSD was widely adopted by vendors ofworkstation-class systems in the form of proprietary UNIX variants such asDECULTRIXandSun MicrosystemsSunOS. This can be attributed to the ease with which it could be licensed, and the familiarity it found among the founders of many technology companies of this era.

Though these proprietary BSD derivatives were largely superseded by the UNIXSystem V Release 4andOSF/1systems in the 1990s (both of which incorporated BSD code and are the basis of other modern Unix systems), later BSD releases provided a basis for severalopen sourcedevelopment projects,e.g.FreeBSD,NetBSD,OpenBSDorDragonFly, that are ongoing. These, in turn, have been incorporated in whole or in part in modern proprietary operating systems,e.gtheTCP/IP(IPv4 only) networking code inMicrosoft Windowsor the foundation ofApple'sMac OS X.

UNIX System V

Unix System V, commonly abbreviatedSysV(and usually pronounced—though rarely written—as "System Five"), is one of the first commercial versions of theUnixoperating system. It was originally developed byAmerican Telephone & Telegraph(AT&T) and first released in 1983. Four major versions of System V were released, termed Releases 1, 2, 3 and 4. System V Release 4, or SVR4, was commercially the most successful version, being the result of an effort, marketed asUnix System Unification, which solicited the collaboration of the major Unix vendors. It was the source of several common commercial Unix features.

While AT&T sold their own hardware that ran System V (seeAT&T Computer Systems), most customers ran a version from a reseller, based on AT&T'sreference implementation. A standards document called theSystem V Interface Definitionoutlined the default features and behavior of implementations. The most widely used versions of System V today areIBM'sAIX, based on System V Release 3, andSun'sSolarisandHewlett-Packard'sHP-UX, both based on System V Release 4.

In the 1980s and early-1990s, System V was considered one of the two major "flavors" of UNIX, the other beingBerkeley Unix(BSD). During the period of theUnix warsSystem V was known for being the primary choice of manufacturers of largemultiuser systems, in opposition toBSD's dominance of desktop workstations. However, with standardization efforts such asPOSIXand the commercial success ofLinux, this generalization is not as accurate as it once was.

System V Interface Definition

TheSystemV Interface Definition(orSVID) is a standard that describes theAT&TUNIX System Vbehavior, including that ofsystem calls,C libraries, available programs and devices. While it was not the first attempt at a standardizations document (the industry trade association/usr/grouppublished a standard in 1984 based onSystem IIIwith a few system call additions fromBSD), it was an important effort of early standardization of UNIX in a period when UNIX variants were multiplying rapidly and portability was problematic at best. By 1986, AT&T required conformance with SVID issue 2 if vendors were to actually brand their products "System V R3"[1]. By the 1990s, however, its importance was largely eclipsed byPOSIXand theSingle UNIX Specification, which were based in part upon the SVID. Part of the reason for this was undoubtedly their vendor-independent approach (seeUnix wars).

X/Open

X/Open Company, Ltd.was aconsortiumfounded by several EuropeanUNIXsystems manufacturers in 1984 to identify and promoteopen standardsin the field ofinformation technology.

X/Open managed theUNIXtrademarkfrom 1993 to 1996, when it merged with theOpen Software Foundationto formThe Open Group.

参考:

<http://en.wikipedia.org/wiki/X/Open_Portability_Guide#Output>

<http://en.wikipedia.org/wiki/X/Open_Portability_Guide#Output>

<http://en.wikipedia.org/wiki/System_V_Interface_Definition>

<http://en.wikipedia.org/wiki/UNIX_System_V#SVR5>

<http://en.wikipedia.org/wiki/UNIX_System_V#SVR5>

<http://en.wikipedia.org/wiki/Berkeley_Unix>

<http://en.wikipedia.org/wiki/Single_UNIX_Specification>

<http://en.wikipedia.org/wiki/SunOS>

<http://en.wikipedia.org/wiki/Solaris_(operating_system)>

<http://en.wikipedia.org/wiki/Glib>

<http://en.wikipedia.org/wiki/Linux_Standard_Base>

<http://en.wikipedia.org/wiki/Glibc>

<http://en.wikipedia.org/wiki/International_Organization_for_Standardization>

<http://en.wikipedia.org/wiki/POSIX>

<http://en.wikipedia.org/wiki/ANSI_C>

<http://en.wikipedia.org/wiki/Institute_of_Electrical_and_Electronics_Engineers>

<http://en.wikipedia.org/wiki/C_standard_library>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值