DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

Intro(3C)


Intro -- introduction to libc library

Synopsis

#include <libc.so>

Description

This section contains manual pages for the routines in libc, the standard C library which is automatically linked by the C compilation system.

The standard C library, libc.so, is searched at compile time by default. Specify -dn on the cc(1) command line to link with the archive version of this library, libc.a, and the archive version of all other libraries being searched.

Compatibility

If you are compiling an application using the Release 7.1 version of libc and the UDK, and want your application to also run on Release 7.0.0 or Release 7.0.1, then you may need to include the following in your cc(1) command line:
   -l cudk70

If you do not, then applications built with the Release 7.1 version of libc may not run on Release 7.0.0 or Release 7.0.1. This is because 81 symbols from the archive part of libc (listed in the table below) were moved into the shared part for Release 7.1.

To provide a way for users to create applications that use these symbols and run on all UnixWare 7 releases, an archive library (libcudk70.a), is provided which contains only the following symbols (moved from the archive to the shared part of libc since Release 7.0.0):

_adjtime adjtime
_async_daemon async_daemon
_dtop  
_ecvt ecvt
_exect exect
_exportfs exportfs
_fcvt fcvt
_fstat fstat
_fstat32 fstat32
_fstat64 fstat64
_fstatfs fstatfs
_gcvt gcvt
_getdents getdents
_gethz gethz
_gtty gtty
_iba_dtop  
_iba_ltostr  
_keyctl keyctl
_lstat lstat
_lstat32 lstat32
_lstat64 lstat64
_ltostr  
_mincore mincore
_nfs_getfh nfs_getfh
_nfssvc nfssvc
_nfssys  
_plock plock
_realpath realpath
_setegid setegid
_seteuid seteuid
_settimeofday settimeofday
_stat stat
_stat32 stat32
_stat64 stat64
_statfs statfs
_stty stty
_syscall syscall
_sysfs sysfs
_sysi86 sysi86
_ttyslot ttyslot
_uadmin uadmin
_utssys utssys
_vfork vfork

                         _adjtime        adjtime
                         _async_daemon   async_daemon
                         _dtop
                         _ecvt           ecvt
                         _exect          exect
                         _exportfs       exportfs
                         _fcvt           fcvt
                         _fstat          fstat
                         _fstat32        fstat32
                         _fstat64        fstat64
                         _fstatfs        fstatfs
                         _gcvt           gcvt
                         _getdents       getdents
                         _gethz          gethz
                         _gtty           gtty
                         _iba_dtop
                         _iba_ltostr
                         _keyctl         keyctl
                         _lstat          lstat
                         _lstat32        lstat32
                         _lstat64        lstat64
                         _ltostr
                         _mincore        mincore
                         _nfs_getfh      nfs_getfh
                         _nfssvc         nfssvc
                         _nfssys
                         _plock          plock
                         _realpath       realpath
                         _setegid        setegid
                         _seteuid        seteuid
                         _settimeofday   settimeofday
                         _stat           stat
                         _stat32         stat32
                         _stat64         stat64
                         _statfs         statfs
                         _stty           stty
                         _syscall        syscall
                         _sysfs          sysfs
                         _sysi86         sysi86
                         _ttyslot        ttyslot
                         _uadmin         uadmin
                         _utssys         utssys
                         _vfork          vfork


NOTE: The _stat and stat interfaces listed above are the versions of the stat system call that provide the older System V Release 3-style stat structure (before expanded fundamental types). Normally, the stat.h header file translates a call to stat(2) to xstat, which has always been in the shared part libc.

New applications compiled without -l cudk70 on Release 7.1 will no longer bind the symbols listed above into their own images and will, instead, expect to find them in the shared part of libc. Since the native versions of the shared part of libc on Release 7.0.0 and Release 7.0.1 do not contain the above symbols, such applications will not run on these systems. To permit Release 7.1 applications to run on prior version of UnixWare 7, include the libcudk70.a library during the linking phase of compiling the application.

Files

LIBDIR/libc.so libc library (shared object) LIBDIR/libc.a libc library (archive) /usr/lib/libc.so.1 libc Run-time Standard C Library

Return values

For functions that return a floating-point value, if an error occurs, the value of errno will be one of the values represented by the manifest constants EDOM or ERANGE (defined in math.h). EDOM typically indicates a domain error: one of the input values was not in the domain of the function. ERANGE typically indicates a range error: the calculated result was either too big or too small to be represented by the data type returned by the function.

Functions that result in a range error typically return zero for underflow or a value that will compare equal to ±HUGE_VAL for overflow. HUGE_VAL is defined in math.h. On systems that support IEEE infinity, HUGE_VAL is infinity.

If the system supports IEEE NaN (not-a-number), functions that result in a domain error typically return NaN. Such functions may also raise one of the IEEE floating-point exceptions. On systems that do not support IEEE NaN, functions that result in a domain error typically return zero.

The error behavior for programs compiled with the -Xt (transitional) compilation mode is different (see cc(1)). In that case, these functions typically return zero instead of IEEE NaN for domain errors and a value that will compare equal to ±HUGE instead of ±HUGE_VAL for overflows. HUGE is defined in math.h.

Definitions

A character (except a multibyte character; see mbchar(3C)) is any bit pattern able to fit into a byte on the machine. The null character is a character with value 0, conventionally represented in the C language as \0. A character array is a sequence of characters. A null-terminated character array (a ``string'') is a sequence of characters, the last of which is the null character. The null string is a character array containing only the terminating null character. A NULL pointer is the value that is obtained by casting 0 into a pointer. C guarantees that this value will not match that of any legitimate pointer, so many functions that return pointers return NULL to indicate an error. The macro NULL is defined in stdio.h. Types of the form size_t are defined in the appropriate header files.

References

Programming in standard C and C++ in Programming in standard C and C++
Programming with system calls and libraries in Programming with system calls and libraries

Standards compliance

The following are comformant with X/Open Portability Guide, Issue 4, Version 2 (UNIX95): _tolower(3C), _toupper(3C), a64l(3C), abort(3C), abs(3C), asctime(3C), atexit(3C), atof(3C), atoi(3C), atol(3C), atoll(3C), bcmp(3C), bcopy(3C), bsearch(3C), bzero(3C), calloc(3C), catclose(3C), catgets(3C), catopen(3C), cfgetispeed(3C), cfgetospeed(3C), cfsetispeed(3C), cfsetospeed(3C), clock(3C), closedir(3C), confstr(3C), ctime(3C), difftime(3C), div(3C), drand48(3C), ecvt(3C), endgrent(3C), endpwent(3C), erand48(3C), fattach(3C), fcvt(3C), fdetach(3C), fdopen(3S), ffs(3C), fgetpos(3C), fmtmsg(3C), fnmatch(3C), free(3C), frexp(3C), fsetpos(3C), ftw(3C), gcvt(3C), getcwd(3C), getdate(3C), getenv(3C), getgrent(3C), getgrgid(3C), getgrnam(3C), getitimer(3C), getlogin(3C), getopt(3C), getpass(3C), getpwent(3C), getpwnam(3C), getpwuid(3C), getsubopt(3C), glob(3C), gmtime(3C), grantpt(3C), hcreate(3C), hdestroy(3C), hsearch(3C), iconv(3C), iconv_close(3C), iconv_open(3C), index(3C), insque(3C), isalnum(3C), isalpha(3C), isascii(3C), isastream(3C), isatty(3C), isblank(3C), iscntrl(3C), isdigit(3C), isgraph(3C), islower(3C), isnan(3C), isprint(3C), ispunct(3C), isspace(3C), isupper(3C), iswalnum(3C), iswalpha(3C), iswcntrl(3C), iswctype(3C), iswdigit(3C), iswlower(3C), iswprint(3C), iswpunct(3C), iswspace(3C), iswupper(3C), iswxdigit(3C), isxdigit(3C), jrand48(3C), l64a(3C), labs(3C), lcong48(3C), ldexp(3C), ldiv(3C), lfind(3C), llabs(3C), lldiv(3C), localeconv(3C), localtime(3C), lockf(3C), logb(3C), longjmp(3C), lrand48(3C), lsearch(3C), malloc(3C), mblen(3C), mbstowcs(3C), mbtowc(3C), memccpy(3C), memchr(3C), memcmp(3C), memcpy(3C), memmove(3C), memset(3C), mkfifo(3C), mktemp(3C), mktime(3C), modf(3C), mrand48(3C), msync(3C), nextafter(3C), nftw(3C), nl_langinfo(3C), nrand48(3C), perror(3C), ptsname(3C), putenv(3C), qsort(3C), raise(3C), rand(3C), rbt_init(3C), rbt_walk(3C), rbt_free(3C), rbt_find(3C), rbt_insert(3C), rbt_delete(3C), readdir(3C), realloc(3C), realpath(3C), regcomp(3C), remove(3C), remque(3C), rewinddir(3C), rindex(3C), scalb(3C), seed48(3C), seekdir(3C), select(3C), setgrent(3C), setitimer(3C), setjmp(3C), setlocale(3C), setregid(3C), setreuid(3C), sigaddset(3C), sigdelset(3C), sigemptyset(3C), sigfillset(3C), sigismember(3C), siglongjmp(3C), sigsetjmp(3C), sleep(3C), srand(3C), srand48(3C), strcat(3C), strchr(3C), strcmp(3C), strcoll(3C), strcpy(3C), strcspn(3C), strdup(3C), strerror(3C), strfmon(3C), strftime(3C), strlen(3C), strncat(3C), strncmp(3C), strncpy(3C), strpbrk(3C), strptime(3C), strrchr(3C), strspn(3C), strstr(3C), strtod(3C), strtok(3C), tcdrain(3C), tcflow(3C), tcflush(3C), tcgetattr(3C), tcgetpgrp(3C), tcgetsid(3C), tcsendbreak(3C), tcsetattr(3C), tcsetpgrp(3C), tdelete(3C), telldir(3C), tfind(3C), toascii(3C), tolower(3C), toupper(3C), towlower(3C), towupper(3C), tsearch(3C), ttyname(3C), ttyslot(3C), twalk(3C), tzset(3C), unlockpt(3C), valloc(3C), wcscat(3C), wcschr(3C), wcscmp(3C), wcscoll(3C), wcscpy(3C), wcscspn(3C), wcsftime(3C), wcslen(3C), wcsncat(3C), wcsncmp(3C), wcsncpy(3C), wcspbrk(3C), wcsrchr(3C), wcsspn(3C), wcstod(3C), wcstok(3C), wcstol(3C), wcstombs(3C), wcstoul(3C), wcswcs(3C), wcswidth(3C), wcsxfrm(3C), wctomb(3C), wctype(3C), wcwidth(3C), wordexp(3C)

The following are comformant with ANSI X3.159-1989 Programming Language -- C (UNIX95):

abort(3C), abs(3C), atoi(3C), atol(3C), bsearch(3C), calloc(3C), difftime(3C), div(3C), fgetpos(3C), free(3C), frexp(3C), fsetpos(3C), getenv(3C), isalnum(3C), isalpha(3C), iscntrl(3C), isdigit(3C), isgraph(3C), islower(3C), isprint(3C), ispunct(3C), isspace(3C), isxdigit(3C), ldexp(3C), ldiv(3C), longjmp(3C), malloc(3C), memchr(3C), memcmp(3C), memset(3C), mktime(3C), modf(3C), perror(3C), qsort(3C), raise(3C), rand(3C), realloc(3C), setjmp(3C), setlocale(3C), srand(3C), strcoll(3C), strerror(3C), strtol(3C), strxfrm(3C), tolower(3C), toupper(3C),

The remaining routines are not part of any currently supported standard.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004