?? library_30.html
字號:
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 subdirectories
that 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 this
directory is referred to in the <TT>`Implies'</TT> file in a machine
architecture-specific directory, such as <TT>`m68k/Implies'</TT>.
<P>
<DT><TT>`posix'</TT>
<DD>This directory contains implementations of things in the library in
terms of POSIX.1 functions. This includes some of the POSIX.1
functions themselves. Of course, POSIX.1 cannot be completely
implemented 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-purpose
subdirectories 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>mach
This 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 of
the <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 variations
between different machines, and variations in what facilities are
provided by the kernel. But the interface to the operating system
facilities is, for the most part, pretty uniform and simple.
<P>
The code for Unix systems is in the directory <TT>`unix'</TT>, at the top
level of the <TT>`sysdeps'</TT> hierarchy. This directory contains
subdirectories (and subdirectory trees) for various Unix variants.
<P>
The functions which are system calls in most Unix systems are
implemented in assembly code in files in <TT>`sysdeps/unix'</TT>. These
files 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 C
preprocessor 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 must
finish defining them for the particular machine and operating system
variant. See <TT>`sysdeps/unix/sysdep.h'</TT> and the machine-specific
<TT>`sysdep.h'</TT> implementations to see what these macros are and what
they should do.<P>
The system-specific makefile for the <TT>`unix'</TT> directory,
<TT>`sysdeps/unix/Makefile'</TT>, gives rules to generate several files from
the Unix system you are building the library on (which is assumed to be
the target system you are building the library <EM>for</EM>). All the
generated files are put in the directory where the object files are
kept; they should not affect the source tree itself. The files
generated 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 by
Richard Stallman, David J. MacKenzie, and Roland McGrath.
<P>
<LI>
Most of the math functions are taken from 4.4 BSD; they have been
modified only slightly to work with the GNU C library. The
Internet-related code (most of the <TT>`inet'</TT> subdirectory) and several
other miscellaneous functions and header files have been included with
little 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 without
modification, are permitted provided that the following conditions
are met:
<P>
<OL>
<LI>
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
<LI>
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
<LI>
All advertising materials mentioning features or use of this software
must 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 contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
</OL>
<P>
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH 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. Cohen
for the University of California at Berkeley and are copyrighted by the
Regents of the University of California. They have undergone minor
changes 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 written
by 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 by
Granlund.<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 System
Copyright (C) 1991,1990,1989 Carnegie Mellon University
All Rights Reserved.
</PRE>
<P>
Permission to use, copy, modify and distribute this software and its
documentation is hereby granted, provided that both the copyright
notice and this permission notice appear in all copies of the
software, derivative works or modified versions, and any portions
thereof, 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 FOR
ANY 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 or
extensions that they make and grant Carnegie Mellon the rights to
redistribute 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 were
contributed 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 + -