1 INTRO(3)               Introduction to Library Functions              INTRO(3)
   2 
   3 
   4 
   5 NAME
   6        Intro, intro - introduction to functions and libraries
   7 
   8 DESCRIPTION
   9        This section describes functions found in various Solaris libraries,
  10        other than those functions described in Section 2 of this manual that
  11        directly invoke UNIX system primitives. Function declarations can be
  12        obtained from the #include files indicated on each page. Pages are
  13        grouped by library and are identified by the library name (or an
  14        abbreviation of the library name) after the section number. Collections
  15        of related libraries are grouped into volumes as described below. The
  16        first volume contains pages describing the contents of each shared
  17        library and each header used by the functions, macros, and external
  18        variables described in the remaining volumes.
  19 
  20    Library Interfaces and Headers
  21        This volume describes the contents of each shared library and each
  22        header used by functions, macros, and external variables described in
  23        the remaining volumes.
  24 
  25        (3LIB)
  26 
  27            The libraries described in this section are implemented as shared
  28            objects.
  29 
  30            Descriptions of shared objects can include a definition of the
  31            global symbols that define the shared objects' public interface,
  32            for example SUNW_1.1.  Other interfaces can exist within the shared
  33            object, for example SUNWprivate.1.1. The public interface provides
  34            a stable, committed set of symbols for application development. The
  35            private interfaces are for internal use only, and could change at
  36            any time.
  37 
  38 
  39        (3HEAD)
  40 
  41            The headers described in this section are used by functions,
  42            macros, and external variables. Headers contain function
  43            prototypes, definitions of symbolic constants, common structures,
  44            preprocessor macros, and defined types.  Each function described in
  45            the remaining five volumes specifies the headers that an
  46            application must include in order to use that function. In most
  47            cases only one header is required. These headers are present on an
  48            application development system; they do have to be present on the
  49            target execution system.
  50 
  51 
  52    Basic Library Functions
  53        The functions described in this volume are the core C library functions
  54        that are basic to application development.
  55 
  56        (3C)
  57 
  58            These functions, together with those of Section 2, constitute the
  59            standard C library, libc, which is automatically linked by the C
  60            compilation system.  The standard C library is implemented as a
  61            shared object, libc.so. See libc(3LIB) and the "C Compilation
  62            System" chapter of the ANSI C Programmer's Guide for a discussion.
  63            Some functions behave differently in standard-conforming
  64            environments. This behavior is noted on the individual manual
  65            pages. See standards(5).
  66 
  67            The libpthread and libthread libraries are filter libraries on libc
  68            that are used for building multithreaded applications: libpthread
  69            implements the POSIX (see standards(5)) threads interface, whereas
  70            libthread implements the Solaris threads interface.  See
  71            MULTITHREADED APPLICATIONS, below.
  72 
  73 
  74        (3C_DB)
  75 
  76            These functions constitute the threads debugging library, libc_db.
  77            This library is implemented as a shared object, libc_db.so, but is
  78            not automatically linked by the C compilation system. Specify
  79            -lc_db on the cc command line to link with this library. See
  80            libc_db(3LIB).
  81 
  82 
  83        (3MALLOC)
  84 
  85            These functions constitute the various memory allocation libraries:
  86            libmalloc, libbsdmalloc, libmapmalloc, libmtmalloc, and libumem.
  87            Each of these libraries is implemented as a shared object
  88            (libmalloc.so, libbsdmalloc.so, libmapmalloc.so, libmtmalloc.so,
  89            and libumem.so). These libraries are not automatically linked by
  90            the C compilation system. Specify -lmalloc, -lbsdmalloc,
  91            -lmapmalloc, -lmtmalloc, and -lumem to link with, respectively,
  92            libmalloc, libbsdmalloc, libmapmalloc, libmtmalloc, and libumem.
  93            See libmalloc(3LIB), libbsdmalloc(3LIB), libmapmalloc(3LIB),
  94            libmtmalloc(3LIB), and libumem(3LIB).
  95 
  96 
  97    Networking Library Functions
  98        The functions described in this volume comprise the various networking
  99        libraries.
 100 
 101        (3COMMPUTIL)
 102 
 103            These functions constitute the communication protocol parser
 104            utilities library, libcommputil. This library is implemented as a
 105            shared object, libcommputil.so, but it is not automatically linked
 106            by the C compilation system. Specify -lcommputil on the cc command
 107            line to link with this library. See libcommputil(3LIB).
 108 
 109 
 110        (3DLPI)
 111 
 112            These functions constitute the data link provider interface
 113            library, libdlpi. This library is implemented as a shared object,
 114            libdlpi.so, but it is not automatically linked by the C compilation
 115            system. Specify -ldlpi on the cc command line to link with this
 116            library. See libdlpi(3LIB).
 117 
 118 
 119        (3DNS_SD)
 120 
 121            These functions constitute the DNS service discovery library,
 122            libdns_sd.  This library is implemented as a shared object,
 123            libdns_sd.so, but it is not automatically linked by the C
 124            compilation system. Specify -ldns_sd on the cc command line to link
 125            with this library. See libdns_sd(3LIB).
 126 
 127 
 128        (3GSS)
 129 
 130            These functions constitute the generic security services library.
 131            This library is implemented as a shared object, libgss.so, but it
 132            is not automatically linked by the C compilation system. Specify
 133            -lgss on the cc command line to link with this library. See
 134            libgss(3LIB).
 135 
 136 
 137        (3LDAP)
 138 
 139            These functions constitute the lightweight directory access
 140            protocol library, libldap. This library is implemented as a shared
 141            object, libldap.so, but is not automatically linked by the C
 142            compilation system.  Specify -lldap on the cc command line to link
 143            with this library.  See ldap(3LDAP).
 144 
 145 
 146        (3NSL)
 147 
 148            These functions constitute the network service library, libnsl.
 149            This library is implemented as a shared object, libnsl.so, but is
 150            not automatically linked by the C compilation system. Specify -lnsl
 151            on the cc command line to link with this library. See libnsl(3LIB).
 152 
 153            Many base networking functions are also available in the X/Open
 154            networking interfaces library, libxnet. See section (3XNET) below
 155            for more information on the libxnet interfaces.
 156 
 157 
 158        (3RESOLV)
 159 
 160            These functions constitute the resolver library, libresolv. This
 161            library is implemented as a shared object, libresolv.so, but is not
 162            automatically linked by the C compilation system. Specify -lresolv
 163            on the cc command line to link with this library. See
 164            libresolv(3LIB).
 165 
 166 
 167        (3RPC)
 168 
 169            These functions constitute the remote procedure call libraries,
 170            librpcsvc and librpcsoc. The latter is provided for compatibility
 171            only; new applications should not link to it. Both libraries are
 172            implemented as shared objects, librpcsvc.so and librpcsoc.so,
 173            respectively. Neither library is automatically linked by the C
 174            compilation system. Specify -lrpcsvc or -lrpcsoc on the cc command
 175            line to link with these libraries. See librpcsvc(3LIB).
 176 
 177 
 178        (3SASL)
 179 
 180            These functions constitute the simple authentication and security
 181            layer library, libsasl. This library is implemented as a shared
 182            object, libsasl.so, but it is not automatically linked by the C
 183            compilation system. Specify -lsasl on the cc command line to link
 184            with this library. See libsasl(3LIB).
 185 
 186 
 187        (3SIP)
 188 
 189            These functions constitute the session initiation protocol library,
 190            libsip. This library is implemented as a shared object, libsip.so,
 191            but it is not automatically linked by the C compilation system.
 192            Specify -lsip on the cc command line to link with this library. See
 193            libsip(3LIB).
 194 
 195 
 196        (3SLP)
 197 
 198            These functions constitute the service location protocol library,
 199            libslp.  This library is implemented as a shared object, libslp.so,
 200            but it is not automatically linked by the C compilation system.
 201            Specify -lslp on the cc command line to link with this library. See
 202            libslp(3LIB).
 203 
 204 
 205        (3SOCKET)
 206 
 207            These functions constitute the sockets library, libsocket. This
 208            library is implemented as a shared object, libsocket.so, but is not
 209            automatically linked by the C compilation system. Specify -lsocket
 210            on the cc command line to link with this library. See
 211            libsocket(3LIB).
 212 
 213 
 214        (3XNET)
 215 
 216            These functions constitute X/Open networking interfaces which
 217            comply with the X/Open CAE Specification, Networking Services,
 218            Issue 4 (September, 1994). This library is implemented as a shared
 219            object, libxnet.so, but is not automatically linked by the C
 220            compilation system. Specify -lxnet on the cc command line to link
 221            with this library. See libxnet(3LIB) and standards(5) for
 222            compilation information.
 223 
 224 
 225 
 226        Under all circumstances, the use of the Sockets API is recommended over
 227        the XTI and TLI APIs. If portability to other XPGV4v2 (see
 228        standards(5)) systems is a requirement, the application must use the
 229        libxnet interfaces. If portability is not required, the sockets
 230        interfaces in libsocket and libnsl are recommended over those in
 231        libxnet. Between the XTI and TLI APIs, the XTI interfaces (available
 232        with libxnet) are recommended over the TLI interfaces (available with
 233        libnsl).
 234 
 235    Curses Library Functions
 236        The functions described in this volume comprise the libraries that
 237        provide graphics and character screen updating capabilities.
 238 
 239        (3CURSES)
 240 
 241            The functions constitute the following libraries:
 242 
 243            libcurses
 244 
 245                These functions constitute the curses library, libcurses. This
 246                library is implemented as a shared object, libcurses.so, but is
 247                not automatically linked by the C compilation system. Specify
 248                -lcurses on the cc command line to link with this library. See
 249                libcurses(3LIB).
 250 
 251 
 252            libform
 253 
 254                These functions constitute the forms library, libform. This
 255                library is implemented as a shared object, libform.so, but is
 256                not automatically linked by the C compilation system. Specify
 257                -lform on the cc command line to link with this library. See
 258                libform(3LIB).
 259 
 260 
 261            libmenu
 262 
 263                These functions constitute the menus library, libmenu. This
 264                library is implemented as a shared object, libmenu.so, but is
 265                not automatically linked by the C compilation system. Specify
 266                -lmenu on the cc command line to link with this library. See
 267                libmenu(3LIB).
 268 
 269 
 270            libpanel
 271 
 272                These functions constitute the panels library, libpanel. This
 273                library is implemented as a shared object, libpanel.so, but is
 274                not automatically linked by the C compilation system. Specify
 275                -lpanel on the cc command line to link with this library. See
 276                libpanel(3LIB).
 277 
 278 
 279 
 280        (3XCURSES)
 281 
 282            These functions constitute the X/Open curses library, located in
 283            /usr/xpg4/lib/libcurses.so. This library provides a set of
 284            internationalized functions and macros for creating and modifying
 285            input and output to a terminal screen. Included in this library are
 286            functions for creating windows, highlighting text, writing to the
 287            screen, reading from user input, and moving the cursor. X/Open
 288            Curses is designed to optimize screen update activities. The X/Open
 289            Curses library conforms fully with Issue 4 of the X/Open Extended
 290            Curses specification. See libcurses(3XCURSES).
 291 
 292 
 293    Extended Library Functions
 294        The functions described in this volume comprise the following
 295        specialized libraries:
 296 
 297        (3BSM)
 298 
 299            These functions constitute the auditing library, libbsm. This
 300            library is implemented as a shared object, libbsm.so, but is not
 301            automatically linked by the C compilation system. Specify -lbsm on
 302            the cc command line to link with this library. See libbsm(3LIB).
 303 
 304 
 305        (3CFGADM)
 306 
 307            These functions constitute the configuration administration
 308            library, libcfgadm. This library is implemented as a shared object,
 309            libcfgadm.so, but is not automatically linked by the C compilation
 310            system. Specify -lcfgadm on the cc command line to link with this
 311            library. See libcfgadm(3LIB).
 312 
 313 
 314        (3CONTRACT)
 315 
 316            These functions constitute the contract management library,
 317            libcontract.  This library is implemented as a shared object,
 318            libcontract.so, but is not automatically linked by the C
 319            compilation system. Specify -lcontract on the cc command line to
 320            link with this library. See libcontract(3LIB).
 321 
 322 
 323        (3CPC)
 324 
 325            These functions constitute the CPU performance counter library,
 326            libcpc, and the process context library, libpctx. These libraries
 327            are implemented as shared objects, libcpc.so and libpctx.so,
 328            respectively, but are not automatically linked by the C compilation
 329            system. Specify -lcpc or -lpctx on the cc command line to link with
 330            these libraries. See libcpc(3LIB) and libpctx(3LIB).
 331 
 332 
 333        (3DAT)
 334 
 335            These functions constitute the direct access transport library,
 336            libdat.  This library is implemented as a shared object, libdat.so,
 337            but is not automatically linked by the C compilation system.
 338            Specify -ldat on the cc command line to link with this library. See
 339            libdat(3LIB).
 340 
 341 
 342        (3DEVID)
 343 
 344            These functions constitute the device ID library, libdevid. This
 345            library is implemented as a shared object, libdevid.so, but is not
 346            automatically linked by the C compilation system. Specify -ldevid
 347            on the cc command line to link with this library. See
 348            libdevid(3LIB).
 349 
 350 
 351        (3DEVINFO)
 352 
 353            These functions constitute the device information library,
 354            libdevinfo.  This library is implemented as a shared object,
 355            libdevinfo.so, but is not automatically linked by the C compilation
 356            system. Specify -ldevinfo on the cc command line to link with this
 357            library. See libdevinfo(3LIB).
 358 
 359 
 360        (3ELF)
 361 
 362            These functions constitute the ELF access library, libelf,
 363            (Extensible Linking Format). This library provides the interface
 364            for the creation and analyses of "elf" files; executables, objects,
 365            and shared objects. libelf is implemented as a shared object,
 366            libelf.so, but is not automatically linked by the C compilation
 367            system. Specify -lelf on the cc command line to link with this
 368            library. See libelf(3LIB).
 369 
 370 
 371        (3EXACCT)
 372 
 373            These functions constitute the extended accounting access library,
 374            libexacct, and the project database access library, libproject.
 375            These libraries are implemented as shared objects, libexacct.so and
 376            libproject.so, respectively, but are not automatically linked by
 377            the C compilation system. Specify -lexacct or -lproject on the cc
 378            command line to link with these libraries. See libexacct(3LIB) and
 379            libproject(3LIB).
 380 
 381 
 382        (3FCOE)
 383 
 384            These functions constitute the Fibre Channel over Ethernet port
 385            management library. This library is implemented as a shared object,
 386            libfcoe.so, but is not automatically linked by the C compilation
 387            system. Specify -lfcoe on the cc command line to link with this
 388            library. See libfcoe(3LIB).
 389 
 390 
 391        (3FSTYP)
 392 
 393            These functions constitute the file system type identification
 394            library. This library is implemented as a shared object,
 395            libfstyp.so, but is not automatically linked by the C compilation
 396            system. Specify -lfstyp on the cc command line to link with this
 397            library. See libfstyp(3LIB).
 398 
 399 
 400        (3GEN)
 401 
 402            These functions constitute the string pattern-matching and pathname
 403            manipulation library, libgen. This library is implemented as a
 404            shared object, libgen.so, but is not automatically linked by the C
 405            compilation system. Specify -lgen on the cc command line to link
 406            with this library. See libgen(3LIB).
 407 
 408 
 409        (3HBAAPI)
 410 
 411            These functions constitute the common fibre channel HBA information
 412            library, libhbaapi. This library is implemented as a shared object,
 413            libhbaapi.so, but is not automatically linked by the C compilation
 414            system. Specify -lhbaapi on the cc command line to link with this
 415            library. See libhbaapi(3LIB).
 416 
 417 
 418        (3ISCSIT)
 419 
 420            These functions constitute the iSCSI Management library, libiscsit.
 421            This library is implemented as a shared object, libiscsit.so, but
 422            is not automatically linked by the C compilation system. Specify
 423            -liscsit on the cc command line to link with this library. See
 424            libiscsit(3LIB).
 425 
 426 
 427        (3KSTAT)
 428 
 429            These functions constitute the kernel statistics library, which is
 430            implemented as a shared object, libkstat.so, but is not
 431            automatically linked by the C compilation system. Specify -lkstat
 432            on the cc command line to link with this library. See
 433            libkstat(3LIB).
 434 
 435 
 436        (3KVM)
 437 
 438            These functions allow access to the kernel's virtual memory
 439            library, which is implemented as a shared object, libkvm.so, but is
 440            not automatically linked by the C compilation system. Specify -lkvm
 441            on the cc command line to link with this library. See libkvm(3LIB).
 442 
 443 
 444        (3LGRP)
 445 
 446            These functions constitute the locality group library, which is
 447            implemented as a shared object, liblgrp.so, but is not
 448            automatically linked by the C compilation system. Specify -llgrp on
 449            the cc command line to link with this library. See liblgrp(3LIB).
 450 
 451 
 452        (3M)
 453 
 454            These functions constitute the mathematical library, libm. This
 455            library is implemented as a shared object, libm.so, but is not
 456            automatically linked by the C compilation system. Specify -lm on
 457            the cc command line to link with this library. See libm(3LIB).
 458 
 459 
 460        (3MAIL)
 461 
 462            These functions constitute the user mailbox management library,
 463            libmail.  This library is implemented as a shared object,
 464            libmail.so, but is not automatically linked by the C compilation
 465            system. Specify -lmail on the cc command line to link with this
 466            library. See libmail(3LIB).
 467 
 468 
 469        (3MP)
 470 
 471            These functions constitute the integer mathematical library, libmp.
 472            This library is implemented as a shared object, libmp.so, but is
 473            not automatically linked by the C compilation system. Specify -lmp
 474            on the cc command line to link with this library. See libmp(3LIB).
 475 
 476 
 477        (3MPAPI)
 478 
 479            These functions constitute the Common Multipath Management library,
 480            libMPAPI. This library is implemented as a shared object,
 481            libMPAPI.so, but is not automatically linked by the C compilation
 482            system.  Specify -lMPAPI on the cc command line to link with this
 483            library.  See libMPAPI(3LIB).
 484 
 485 
 486        (3MVEC)
 487 
 488            These functions constitute the vector mathematical library,
 489            libmvec. This library is implemented as a shared object,
 490            libmvec.so, but is not automatically linked by the C compilation
 491            system. Specify -lmvec on the cc command line to link with this
 492            library. See libmvec(3LIB).
 493 
 494 
 495        (3NVPAIR)
 496 
 497            These functions constitute the name-value pair library, libnvpair.
 498            This library is implemented as a shared object, libnvpair.so, but
 499            is not automatically linked by the C compilation system. Specify
 500            -lnvpair on the cc command line to link with this library. See
 501            libnvpair(3LIB).
 502 
 503 
 504        (3PAM)
 505 
 506            These functions constitute the pluggable authentication module
 507            library, libpam. This library is implemented as a shared object,
 508            libpam.so, but is not automatically linked by the C compilation
 509            system. Specify -lpam on the cc command line to link with this
 510            library. See libpam(3LIB).
 511 
 512 
 513        (3PAPI)
 514 
 515            These functions constitute the Free Standards Group Open Printing
 516            API (PAPI) library, libpapi. This library is implemented as a
 517            shared object, libpapi.so, but is not automatically linked by the C
 518            compilation system.  Specify -lpapi on the cc command line to link
 519            with this library.  See libpapi(3LIB).
 520 
 521 
 522        (3PICL)
 523 
 524            These functions constitute the PICL library, libpicl. This library
 525            is implemented as a shared object, libpicl.so, but is not
 526            automatically linked by the C compilation system. Specify -lpicl on
 527            the cc command line to link with this library. See libpicl(3LIB)
 528            and libpicl(3PICL).
 529 
 530 
 531        (3PICLTREE)
 532 
 533            These functions constitute the PICL plug-in library, libpicltree.
 534            This library is implemented as a shared object, libpicltree.so, but
 535            is not automatically linked by the C compilation system. Specify
 536            -lpicltree on the cc command line to link with this library. See
 537            libpicltree(3LIB) and libpicltree(3PICLTREE).
 538 
 539 
 540        (3POOL)
 541 
 542            These functions constitute the pool configuration manipulation
 543            library, libpool. This library is implemented as a shared object,
 544            libpool.so, but is not automatically linked by the C compilation
 545            system.  Specify -lpool on the cc command line to link with this
 546            library.  See libpool(3LIB).
 547 
 548 
 549        (3PROC)
 550 
 551            These functions constitute the process manipulation library,
 552            libproc. This library is implemented as a shared object,
 553            libproc.so, but it is not automatically linked by the C compilation
 554            system. Specify -lproc on the cc command line to link with this
 555            library. See libproc(3LIB).
 556 
 557 
 558        (3PROJECT)
 559 
 560            These functions constitute the project database access library,
 561            libproject. This library is implemented as a shared object,
 562            libproject.so, but is not automatically linked by the C compilation
 563            system. Specify -lproject on the cc command line to link with this
 564            library. See libproject(3LIB).
 565 
 566 
 567        (3RSM)
 568 
 569            These functions constitute the remote shared memory library,
 570            librsm. This library is implemented as a shared object, librsm.so,
 571            but is not automatically linked by the C compilation system.
 572            Specify -lrsm on the cc command line to link with this library. See
 573            librsm(3LIB).
 574 
 575 
 576        (3SCF)
 577 
 578            These functions constitute the service configuration facility
 579            library, libscf. This library is implemented as a shared object,
 580            libscf.so, but is not automatically linked by the C compilation
 581            system. Specify -lscf on the cc command line to link with this
 582            library. See libscf(3LIB).
 583 
 584 
 585        (3SEC)
 586 
 587            These functions constitute the file access control library, libsec.
 588            This library is implemented as a shared object, libsec.so, but is
 589            not automatically linked by the C compilation system. Specify -lsec
 590            on the cc command line to link with this library. See libsec(3LIB).
 591 
 592 
 593        (3SECDB)
 594 
 595            These functions constitute the security attributes database
 596            library, libsecdb. This library is implemented as a shared object,
 597            libsecdb.so, but is not automatically linked by the C compilation
 598            system.  Specify -lsecdb on the cc command line to link with this
 599            library.  See libsecdb(3LIB).
 600 
 601 
 602        (3STMF)
 603 
 604            These functions constitute the SCSI Target Mode Framework library,
 605            libstmf. This library is implemented as a shared object,
 606            libstmf.so, but is not automatically linked by the C compilation
 607            system.  Specify -lstmf on the cc command line to link with this
 608            library.  See libstmf(3LIB).
 609 
 610 
 611        (3SYSEVENT)
 612 
 613            These functions constitute the system event library, libsysevent.
 614            This library is implemented as a shared object, libsysevent.so, but
 615            is not automatically linked by the C compilation system. Specify
 616            -lsysevent on the cc command line to link with this library. See
 617            libsysevent(3LIB).
 618 
 619 
 620        (3TECLA)
 621 
 622            These functions constitute the interactive command-line input
 623            library, libtecla. This library is implemented as a shared object,
 624            libtecla.so, but is not automatically linked by the C compilation
 625            system.  Specify -ltecla on the cc command line to link with this
 626            library.  See libtecla(3LIB).
 627 
 628 
 629        (3TNF)
 630 
 631            These functions constitute the TNF libraries, libtnf, libtnfctl,
 632            and libtnfprobe. These libraries are implemented as shared objects,
 633            libtnf.so, libtnfctl.so, and libtnfprobe.so, respectively, but are
 634            not automatically linked by the C compilation system. Specify
 635            -ltnf, -ltnfctl, or -ltnfprobe on the cc command line to link with
 636            these libraries. See libtnfctl(3TNF) and libtnfctl(3LIB).
 637 
 638 
 639        (3TSOL)
 640 
 641            These functions constitute the Trusted Extensions library, libtsol,
 642            and the Trusted Extensions network library, libtsnet. These
 643            libraries are implemented as shared objects, libtsol.so and
 644            libtsnet.so, but are not automatically linked by the C compilation
 645            system. Specify -ltsol or -ltsnet on the cc command line to link
 646            with these libraries. See libtsol(3LIB) and libtsnet(3LIB).
 647 
 648 
 649        (3UUID)
 650 
 651            These functions constitute the universally unique identifier
 652            library, libuuid. This library is implemented as a shared object,
 653            libuuid.so, but is not automatically linked by the C compilation
 654            system.  Specify -luuid on the cc command line to link with this
 655            library.  See libuuid(3LIB).
 656 
 657 
 658        (3VOLMGT)
 659 
 660            These functions constitute the volume management library,
 661            libvolmgt. This library is implemented as a shared object,
 662            libvolmgt.so, but is not automatically linked by the C compilation
 663            system. Specify -lvolmgt on the cc command line to link with this
 664            library. See libvolmgt(3LIB).
 665 
 666 
 667 DEFINITIONS
 668        A character is any bit pattern able to fit into a byte on the machine.
 669        In some international languages, however, a "character" might require
 670        more than one byte, and is represented in multi-bytes.
 671 
 672 
 673        The null character is a character with value 0, conventionally
 674        represented in the C language as \0. A character array is a sequence of
 675        characters.  A null-terminated character array (a string) is a sequence
 676        of characters, the last of which is the null character. The null string
 677        is a character array containing only the terminating null character. A
 678        null pointer is the value that is obtained by casting 0 into a pointer.
 679        C guarantees that this value will not match that of any legitimate
 680        pointer, so many functions that return pointers return NULL to indicate
 681        an error. The macro NULL is defined in <stdio.h>. Types of the form
 682        size_t are defined in the appropriate headers.
 683 
 684 MULTITHREADED APPLICATIONS
 685        Both POSIX threads and Solaris threads can be used within the same
 686        application.  Their implementations are completely compatible with each
 687        other; however, only POSIX threads guarantee portability to other
 688        POSIX-conforming environments.
 689 
 690 
 691        The libpthread(3LIB) and libthread(3LIB) libraries are implemented as
 692        filters on libc(3LIB).
 693 
 694 
 695        When compiling a multithreaded application, the -mt option must be
 696        specified on the command line.
 697 
 698 
 699        There is no need for a multithreaded application to link with -lthread.
 700        An application must link with -lpthread only when POSIX semantics for
 701        fork(2) are desired. When an application is linked with -lpthread, a
 702        call to fork() assumes the behavior fork1(2) rather than the default
 703        behavior that forks all threads.
 704 
 705 
 706        When compiling a POSIX-conforming application, either the
 707        _POSIX_C_SOURCE or _POSIX_PTHREAD_SEMANTICS option must be specified on
 708        the command line.  For POSIX.1c-conforming applications, define the
 709        _POSIX_C_SOURCE flag to be >= 199506L:
 710 
 711          cc -mt [ flag... ] file... -D_POSIX_C_SOURCE=199506L -lpthread
 712 
 713 
 714 
 715        For POSIX behavior with the Solaris fork() and fork1() distinction,
 716        compile as follows:
 717 
 718          cc -mt [ flag... ] file... -D_POSIX_PTHREAD_SEMANTICS
 719 
 720 
 721 
 722        For Solaris threads behavior, compile as follows:
 723 
 724          cc -mt [ flag... ] file...
 725 
 726 
 727 
 728        Unsafe interfaces should be called only from the main thread to ensure
 729        the application's safety.
 730 
 731 
 732        MT-Safe interfaces are denoted in the ATTRIBUTES section of the
 733        functions and libraries manual pages (see attributes(5)). If a manual
 734        page does not state explicitly that an interface is MT-Safe, the user
 735        should assume that the interface is unsafe.
 736 
 737 REALTIME APPLICATIONS
 738        The environment variable LD_BIND_NOW must be set to a non-null value to
 739        enable early binding. Refer to the "When Relocations are Processed"
 740        chapter in Linker and Libraries Guide for additional information.
 741 
 742 FILES
 743        INCDIR
 744                       usually /usr/include
 745 
 746 
 747        LIBDIR
 748                       usually either /lib or /usr/lib (32-bit) or either
 749                       /lib/64 or /usr/lib/64 (64-bit)
 750 
 751 
 752        LIBDIR/*.so
 753                       shared libraries
 754 
 755 
 756 ACKNOWLEDGMENTS
 757        Sun Microsystems, Inc. gratefully acknowledges The Open Group for
 758        permission to reproduce portions of its copyrighted documentation.
 759        Original documentation from The Open Group can be obtained online at
 760        http://www.opengroup.org/bookstore/.
 761 
 762 
 763        The Institute of Electrical and Electronics Engineers and The Open
 764        Group, have given us permission to reprint portions of their
 765        documentation.
 766 
 767 
 768        In the following statement, the phrase ``this text'' refers to portions
 769        of the system documentation.
 770 
 771 
 772        Portions of this text are reprinted and reproduced in electronic form
 773        in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
 774        Standard for Information Technology -- Portable Operating System
 775        Interface (POSIX), The Open Group Base Specifications Issue 6,
 776        Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
 777        Engineers, Inc and The Open Group.  In the event of any discrepancy
 778        between these versions and the original IEEE and The Open Group
 779        Standard, the original IEEE and The Open Group Standard is the referee
 780        document.  The original Standard can be obtained online at
 781        http://www.opengroup.org/unix/online.html.
 782 
 783 
 784        This notice shall appear on any product containing this material.
 785 
 786 SEE ALSO
 787        ar(1), ld(1), fork(2), stdio(3C), attributes(5), standards(5)
 788 
 789 
 790        Linker and Libraries Guide
 791 
 792 
 793        Performance Profiling Tools
 794 
 795 
 796        ANSI C Programmer's Guide
 797 
 798 DIAGNOSTICS
 799        For functions that return floating-point values, error handling varies
 800        according to compilation mode. Under the -Xt (default) option to cc,
 801        these functions return the conventional values 0, +-HUGE, or NaN when
 802        the function is undefined for the given arguments or when the value is
 803        not representable. In the -Xa and -Xc compilation modes, +-HUGE_VAL is
 804        returned instead of +-HUGE. (HUGE_VAL and HUGE are defined in math.h to
 805        be infinity and the largest-magnitude single-precision number,
 806        respectively.)
 807 
 808 NOTES
 809        None of the functions, external variables, or macros should be
 810        redefined in the user's programs. Any other name can be redefined
 811        without affecting the behavior of other library functions, but such
 812        redefinition might conflict with a declaration in an included header.
 813 
 814 
 815        The headers in INCDIR provide function prototypes (function
 816        declarations including the types of arguments) for most of the
 817        functions listed in this manual. Function prototypes allow the compiler
 818        to check for correct usage of these functions in the user's program.
 819        The lint program checker can also be used and will report discrepancies
 820        even if the headers are not included with #include statements.
 821        Definitions for Sections 2 and 3C are checked automatically. Other
 822        definitions can be included by using the -l option to lint. (For
 823        example, -lm includes definitions for libm.)  Use of lint is highly
 824        recommended. See the lint chapter in Performance Profiling Tools
 825 
 826 
 827        Users should carefully note the difference between STREAMS and stream.
 828        STREAMS is a set of kernel mechanisms that support the development of
 829        network services and data communication drivers. It is composed of
 830        utility routines, kernel facilities, and a set of data structures. A
 831        stream is a file with its associated buffering. It is declared to be a
 832        pointer to a type FILE defined in <stdio.h>.
 833 
 834 
 835        In detailed definitions of components, it is sometimes necessary to
 836        refer to symbolic names that are implementation-specific, but which are
 837        not necessarily expected to be accessible to an application program.
 838        Many of these symbolic names describe boundary conditions and system
 839        limits.
 840 
 841 
 842        In this section, for readability, these implementation-specific values
 843        are given symbolic names. These names always appear enclosed in curly
 844        brackets to distinguish them from symbolic names of other
 845        implementation-specific constants that are accessible to application
 846        programs by headers. These names are not necessarily accessible to an
 847        application program through a header, although they can be defined in
 848        the documentation for a particular system.
 849 
 850 
 851        In general, a portable application program should not refer to these
 852        symbolic names in its code. For example, an application program would
 853        not be expected to test the length of an argument list given to a
 854        routine to determine if it was greater than {ARG_MAX}.
 855 
 856 
 857 
 858                                 August 19, 2019                       INTRO(3)