intro.3
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 243 行
3
243 行
.\" SCCSID: @(#)intro.3 3.1 11/24/87.TH intro 3.SH Nameintro \- introduction to library functions.SH Description.NXR "intro(3) keyword".NXA "subroutine" "\fIspecific subroutines\fP"This section describes functions that may be foundin various libraries. The library functions are those other than thefunctions that directly invoke ULTRIX system primitives,described in section 2..NXR "library" "functions"Section 3 has the libraries physically grouped together. The functions described in thissection are grouped into various libraries:.SH Sections 3 and 3sThe (3) functions are the standard C library functions. TheC library also includes all the functions described in Section 2. .NXR "libc library" "contents".NXA "C library" "libc library"These routines areincluded for compatibility with other systems. In particular,a number of system call interfaces provided in 4.2BSD have been included for source code compatibility.The (3s) functions comprise the standard I/O library. Together with the(3n), (3xti), (3yp) and (3) routines, these functions constitutelibrary \fIlibc\fP,which is automatically loaded by the C compiler(cc), the Pascal compiler (pc), and the FORTRAN compiler(f77).(FORTRANand Pascal are optional and may not be installed on your system.)Declarations for these functions may be obtained fromthe include file, <stdio.h>.The link editor .MS ld 1searches this library under the \-lc option.Declarations for some of these functions may be obtainedfrom include files indicated on the appropriate pages..NT "VAX Only"On VAX machines, the GFLOAT version of.I libcis used when you use the .MS cc 1command with the.B \-Mgoption, or you use the .MS ld 1command with the.B \-lcgoption. The GFLOAT version of.IR libcmust be used with modules compiled with .MS cc 1using the .B \-Mgoption. .spNote that neither the compiler nor the linker .MS ld 1can detect when mixed double floating point types are used,and your program may produce erroneous results if this occurs on aVAX machine..NE.SH Section 3curThe (3cur) library routines make up the X/Open curses library. Theseroutines are different from the 4.2BSD curses routines contained inSection 3x..SH Section 3fThe (3f) functions are all functions callable from FORTRAN. Thesefunctions perform the same jobs as do the (3) functions.An unsupported FORTRAN compiler, f77, is included in the VAXdistribution. FORTRAN is available as a layered product on both VAXand RISC machines..SH Section 3intThe (3int) functions assist programs in supporting native languageinterfaces. They are found in the internationalization library.IR libi ..SH Section 3krbThe library of routines for the Kerberos authentication service. Theseroutines support the authentication of commonly networked applicationsacross machine boundaries in a distributed network..SH Section 3m.NXR "libm library" "contents"The (3m) functions constitute the math library,.IR libm .They are automatically loaded as needed by the Pascalcompiler (pc)and the FORTRAN compiler (f77).The link editor searches this library under the .B \-lm option. Declarations for these functions may be obtained from the include file, < math.h >..NT "VAX Only"On VAX machines, the GFLOAT version of.IR libmis used when you use the .MS ld 1command with the.B \-lcgoption. Note that you must usethe GFLOAT version of.IR libmwith modules compiled using the .MS cc 1command with the.B \-Mgoption. .spNote that neither the compiler nor the linker .MS ld 1can detect when mixed double floating pointtypes are used, and the program may produceerroneous results if this occurs on a VAX machine..NE.SH Section 3ncsThis section describes the NCS (Network Computing System) library routines.The Title, Name, and See Also sections of the NCS reference pages do notcontain the dollar ($) sign in the command names and library routines.The actual NCS commands and library routines do contain thedollar ($) sign..SH Section 3nThese functions constitute the internet network library,.SH Section 3xVarious specialized libraries have not been given distinctive captions.Files in which such libraries are found are named on appropriate pages..SH Section 3xtiThe X/Open Transport Interface defines a transport service interface that isindependent of any specific transport provider. The interface is provided byway of a set of library functions for the C programming language..SH Section 3ypThese functions are specific to the Yellow Pages (YP) service..SH Environmental Compatibility.NXS "environment (System V)" "System V environment".NXR "System V environment" "specifying".NXS "environment (POSIX)" "POSIX environment".NXR "POSIX environment" "specifying"The libraries in Sections 3, 3m, and 3s contain System V and POSIXcompatibility features that are available to general ULTRIXprograms. This compatibility sometimes conflicts withfeatures already present in ULTRIX. That is, the functionperformed may be slightly different in the System V or POSIX environment.These features are provided for applications that are beingported from System V or written for a POSIX environment..PPThe descriptions in these sections include an ENVIRONMENTsection to describe any differences in function betweenSystem V or POSIX and the standard C runtime library..PPThe System V compatibility features are not contained in thestandard C runtime library. To get System V-specific behavior,you must specify that the System V environment is to be used incompiling and linking programs. You can do this in one of twoways:.IP 1. 5Using the \fB\-YSYSTEM_FIVE\fR option for the .PN cccommand..IP 2. 5Globally setting the environment variable PROG_ENV to SYSTEM_FIVE.If you are using the C shell, you would execute the following line,or include it in your .login file:.EXsetenv PROG_ENV SYSTEM_FIVE.EEIf you are using the Bourne shell, you would execute the followingline, or include it in your .profile file:.EXPROG_ENV=SYSTEM_FIVE ; export PROG_ENV.EE.PPIn both cases, the .MS cc 1command defines the preprocessor symbol SYSTEM_FIVE, so that theC preprocessor, .PN /lib/cpp, will select the System V version of various data structuresand symbol definitions..PPIn addition, if .MS cc 1invokes .MS ld 1 ,the library libcV.a (the System V version of the Standard C library) is searched beforelibc.a to resolve references to theSystem-V-specific routines. Also, if\fB\-lm\fR is specified on either the .MS cc 1or the.MS ld 1command line, then theSystem V version of the mathlibrary will be used instead of the regular ULTRIX math library..PPThe POSIX compatibility features are included in the library libcP.a, sothe only special action needed is to specify \fB-YPOSIX\fP on the.MS cc 1command line or set the environment variable PROG_ENV to POSIX. Eitheraction will cause the.MS cc 1command to define the preprocessor symbol POSIX and search the POSIX library..SH Files.TP 30/usr/lib/libc.a .TP /usr/lib/lib_cg.a (VAX only).TP/usr/lib/libm.a .TP/usr/lib/libc_p.a (VAX only).TP/usr/lib/m_g.a (VAX only).TP/usr/lib/libm_p.a (VAX only).fi.SH Diagnostics.NXR "libm library" "diagnostics and"Functions in the math library (3m) may returnconventional values when the function is undefined for thegiven arguments or when the value is not representable.In these cases the external variable.I errnois set to the value EDOM (domain error) or ERANGE (range error).For further information, see .MS intro 2 .The values of EDOM and ERANGE are defined in the include file<math.h>..SH See Alsocc(1), ld(1), nm(1), intro(2)intro(3m), intro(3n), intro(3ncs), intro(3s), intro(3xti)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?