⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 library_30.html

📁 Linux程序员的工作手册
💻 HTML
📖 第 1 页 / 共 3 页
字号:
hierarchy that are not for particular machine architectures.<P><DL COMPACT><DT><TT>`generic'</TT><DD><DT><TT>`stub'</TT><DD>As described above (see section <A HREF="library_30.html#SEC497" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_30.html#SEC497">Porting the GNU C Library</A>), these are the two subdirectoriesthat every configuration implicitly uses after all others.<P><DT><TT>`ieee754'</TT><DD>This directory is for code using the IEEE 754 floating-point format,where the C type <CODE>float</CODE> is IEEE 754 single-precision format, and<CODE>double</CODE> is IEEE 754 double-precision format.  Usually thisdirectory is referred to in the <TT>`Implies'</TT> file in a machinearchitecture-specific directory, such as <TT>`m68k/Implies'</TT>.<P><DT><TT>`posix'</TT><DD>This directory contains implementations of things in the library interms of POSIX.1 functions.  This includes some of the POSIX.1functions themselves.  Of course, POSIX.1 cannot be completelyimplemented in terms of itself, so a configuration using just<TT>`posix'</TT> cannot be complete.<P><DT><TT>`unix'</TT><DD>This is the directory for Unix-like things.  See See section <A HREF="library_30.html#SEC499" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_30.html#SEC499">Porting the GNU C Library to Unix Systems</A>.<TT>`unix'</TT> implies <TT>`posix'</TT>.  There are some special-purposesubdirectories of <TT>`unix'</TT>:<P><DL COMPACT><DT><TT>`unix/common'</TT><DD>This directory is for things common to both BSD and System V release 4.Both <TT>`unix/bsd'</TT> and <TT>`unix/sysv/sysv4'</TT> imply <TT>`unix/common'</TT>.<P><DT><TT>`unix/inet'</TT><DD>This directory is for <CODE>socket</CODE> and related functions on Unix systems.The <TT>`inet'</TT> top-level subdirectory is enabled by <TT>`unix/inet/Subdirs'</TT>.<TT>`unix/common'</TT> implies <TT>`unix/inet'</TT>.</DL><P><LI>machThis is the directory for things based on the Mach microkernel from CMU(including the GNU operating system).  Other basic operating systems(VMS, for example) would have their own directories at the top level ofthe <TT>`sysdeps'</TT> hierarchy, parallel to <TT>`unix'</TT> and <TT>`mach'</TT>.</DL><P><H3><A NAME="SEC499" HREF="library_toc.html#SEC499" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC499">Porting the GNU C Library to Unix Systems</A></H3><P>Most Unix systems are fundamentally very similar.  There are variationsbetween different machines, and variations in what facilities areprovided by the kernel.  But the interface to the operating systemfacilities is, for the most part, pretty uniform and simple.<P>The code for Unix systems is in the directory <TT>`unix'</TT>, at the toplevel of the <TT>`sysdeps'</TT> hierarchy.  This directory containssubdirectories (and subdirectory trees) for various Unix variants.<P>The functions which are system calls in most Unix systems areimplemented in assembly code in files in <TT>`sysdeps/unix'</TT>.  Thesefiles are named with a suffix of <SAMP>`.S'</SAMP>; for example,<TT>`__open.S'</TT>.  Files ending in <SAMP>`.S'</SAMP> are run through the Cpreprocessor before being fed to the assembler.<P>These files all use a set of macros that should be defined in<TT>`sysdep.h'</TT>.  The <TT>`sysdep.h'</TT> file in <TT>`sysdeps/unix'</TT>partially defines them; a <TT>`sysdep.h'</TT> file in another directory mustfinish defining them for the particular machine and operating systemvariant.  See <TT>`sysdeps/unix/sysdep.h'</TT> and the machine-specific<TT>`sysdep.h'</TT> implementations to see what these macros are and whatthey should do.<P>The system-specific makefile for the <TT>`unix'</TT> directory,<TT>`sysdeps/unix/Makefile'</TT>, gives rules to generate several files fromthe Unix system you are building the library on (which is assumed to bethe target system you are building the library <EM>for</EM>).  All thegenerated files are put in the directory where the object files arekept; they should not affect the source tree itself.  The filesgenerated are <TT>`ioctls.h'</TT>, <TT>`errnos.h'</TT>, <TT>`sys/param.h'</TT>, and<TT>`errlist.c'</TT> (for the <TT>`stdio'</TT> section of the library).<P><H2><A NAME="SEC500" HREF="library_toc.html#SEC500" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC500">Contributors to the GNU C Library</A></H2><P>The GNU C library was written almost entirely by Roland McGrath.Some parts of the library were contributed by other people.<P><UL><LI>The <CODE>getopt</CODE> function and related code were written byRichard Stallman, David J. MacKenzie, and Roland McGrath.<P><LI>Most of the math functions are taken from 4.4 BSD; they have beenmodified only slightly to work with the GNU C library.  TheInternet-related code (most of the <TT>`inet'</TT> subdirectory) and severalother miscellaneous functions and header files have been included withlittle or no modification.<P>All code incorporated from 4.4 BSD is under the following copyright:<P><BLOCKQUOTE><PRE>Copyright (C) 1991 Regents of the University of California.All rights reserved.</PRE><P>Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditionsare met:<P><OL><LI>Redistributions of source code must retain the above copyrightnotice, this list of conditions and the following disclaimer.<LI>Redistributions in binary form must reproduce the above copyrightnotice, this list of conditions and the following disclaimer in thedocumentation and/or other materials provided with the distribution.<LI>All advertising materials mentioning features or use of this softwaremust display the following acknowledgement:<BLOCKQUOTE>	This product includes software developed by the University of	California, Berkeley and its contributors.</BLOCKQUOTE><LI>Neither the name of the University nor the names of its contributorsmay be used to endorse or promote products derived from this softwarewithout specific prior written permission.</OL><P>THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" ANDANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSEARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODSOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICTLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAYOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OFSUCH DAMAGE.</BLOCKQUOTE><P><LI>The random number generation functions <CODE>random</CODE>, <CODE>srandom</CODE>,<CODE>setstate</CODE> and <CODE>initstate</CODE>, which are also the basis for the<CODE>rand</CODE> and <CODE>srand</CODE> functions, were written by Earl T. Cohenfor the University of California at Berkeley and are copyrighted by theRegents of the University of California.  They have undergone minorchanges to fit into the GNU C library and to fit the ANSI C standard,but the functional code is Berkeley's.<P><LI>The merge sort function <CODE>qsort</CODE> was written by Michael J. Haertel.<P><LI>The quick sort function used as a fallback by <CODE>qsort</CODE> was writtenby Douglas C. Schmidt.<P><LI>The memory allocation functions <CODE>malloc</CODE>, <CODE>realloc</CODE> and<CODE>free</CODE> and related code were written by Michael J. Haertel.<P><LI>Fast implementations of many of the string functions (<CODE>memcpy</CODE>,<CODE>strlen</CODE>, etc.) were written byGranlund.<P><LI>Some of the support code for Mach is taken from Mach 3.0 by CMU,and is under the following copyright terms:<P><BLOCKQUOTE><PRE>Mach Operating SystemCopyright (C) 1991,1990,1989 Carnegie Mellon UniversityAll Rights Reserved.</PRE><P>Permission to use, copy, modify and distribute this software and itsdocumentation is hereby granted, provided that both the copyrightnotice and this permission notice appear in all copies of thesoftware, derivative works or modified versions, and any portionsthereof, and that both notices appear in supporting documentation.<P>CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FORANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.<P>Carnegie Mellon requests users of this software to return to<P><PRE> Software Distribution Coordinator School of Computer Science Carnegie Mellon University Pittsburgh PA 15213-3890</PRE><P>or <SAMP>`Software.Distribution@CS.CMU.EDU'</SAMP> any improvements orextensions that they make and grant Carnegie Mellon the rights toredistribute these changes.</BLOCKQUOTE><P><LI>The <TT>`tar.h'</TT> header file was written by David J. MacKenzie.<P><LI>The port to the MIPS DECStation running Ultrix 4(<CODE>mips-dec-ultrix4</CODE>)was contributed by Brendan Kehoe and Ian Lance Taylor.<P><LI>The DES encryption function <CODE>crypt</CODE> and related functions werecontributed by Michael Glad.<P><LI>The <CODE>ftw</CODE> function was contributed by Ian Lance Taylor.<P><LI>The code to support SunOS shared libraries was contributed by Tom Quinn.<P><LI>The <CODE>mktime</CODE> function was contributed by Noel Cragg.<P><LI>The port to the Sequent Symmetry running Dynix version 3(<CODE>i386-sequent-bsd</CODE>) was contributed by Jason Merrill.</UL><P><P>Go to the <A HREF="library_29.html" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_29.html">previous</A>, <A HREF="library_31.html" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_31.html">next</A> section.<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -