1Intro(3)               Introduction to Library Functions              Intro(3)
2
3
4

NAME

6       Intro, intro - introduction to functions and libraries
7

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 abbre‐
14       viation of the library name) after the section number.  Collections  of
15       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       (3LIBUCB)
40
41           The SunOS/BSD Compatibility libraries described in this section are
42           implemented as a shared object. See (3LIB) above.
43
44
45       (3HEAD)
46
47           The headers described  in  this  section  are  used  by  functions,
48           macros,  and  external  variables.  Headers contain function proto‐
49           types, definitions of symbolic constants, common  structures,  pre‐
50           processor macros, and defined types. Each function described in the
51           remaining five volumes specifies the headers  that  an  application
52           must  include in order to use that function. In most cases only one
53           header is required. These headers are  present  on  an  application
54           development system; they do have to be present on the target execu‐
55           tion system.
56
57
58   Basic Library Functions
59       The functions described in this volume are the core C library functions
60       that are basic to application development.
61
62       (3C)
63
64           These  functions,  together with those of Section 2, constitute the
65           standard C library, libc, which is automatically linked  by  the  C
66           compilation  system.  The  standard  C  library is implemented as a
67           shared object, libc.so. See libc(3LIB) and the "C Compilation  Sys‐
68           tem"  chapter  of  the  ANSI C Programmer's Guide for a discussion.
69           Some functions behave differently in  standard-conforming  environ‐
70           ments.  This  behavior is noted on the individual manual pages. See
71           standards(5).
72
73           The libpthread and libthread libraries are filter libraries on libc
74           that  are  used for building multithreaded applications: libpthread
75           implements the POSIX (see standards(5)) threads interface,  whereas
76           libthread  implements  the  Solaris  threads  interface. See MULTI‐
77           THREADED APPLICATIONS, below.
78
79
80       (3C_DB)
81
82           These functions constitute the threads debugging library,  libc_db.
83           This  library is implemented as a shared object, libc_db.so, but is
84           not automatically linked  by  the  C  compilation  system.  Specify
85           -lc_db  on  the  cc  command  line  to  link with this library. See
86           libc_db(3LIB).
87
88
89       (3MALLOC)
90
91           These functions constitute the various memory allocation libraries:
92           libmalloc,  libbsdmalloc,  libmapmalloc,  libmtmalloc, and libumem.
93           Each of these libraries is implemented as a shared object  (libmal‐
94           loc.so,   libbsdmalloc.so,   libmapmalloc.so,  libmtmalloc.so,  and
95           libumem.so). These libraries are not automatically linked by the  C
96           compilation  system.  Specify  -lmalloc,  -lbsdmalloc, -lmapmalloc,
97           -lmtmalloc, and -lumem to link with, respectively, libmalloc, libb‐
98           sdmalloc,  libmapmalloc,  libmtmalloc,  and  libumem.  See  libmal‐
99           loc(3LIB),   libbsdmalloc(3LIB),   libmapmalloc(3LIB),    libmtmal‐
100           loc(3LIB), and libumem(3LIB).
101
102
103       (3UCB)
104
105           These functions constitute the source compatibility (with BSD func‐
106           tions) library. It is implemented as a  shared  object,  libucb.so,
107           but  is not automatically linked by the C compilation system. Spec‐
108           ify -lucb on the cc command line to link with this  library,  which
109           is  located  in the /usr/ucb subdirectory. Headers for this library
110           are located within /usr/ucbinclude. See libucb(3LIBUCB).
111
112
113   Networking Library Functions
114       The functions described in this volume comprise the various  networking
115       libraries.
116
117       (3COMMPUTIL)
118
119           These functions constitute the communication protocol parser utili‐
120           ties library, libcommputil. This library is implemented as a shared
121           object,  libcommputil.so, but it is not automatically linked by the
122           C compilation system. Specify -lcommputil on the cc command line to
123           link with this library. See libcommputil(3LIB).
124
125
126       (3DLPI)
127
128           These   functions  constitute  the  data  link  provider  interface
129           library, libdlpi. This library is implemented as a  shared  object,
130           libdlpi.so, but it is not automatically linked by the C compilation
131           system. Specify -ldlpi on the cc command line  to  link  with  this
132           library. See libdlpi(3LIB).
133
134
135       (3DNS_SD)
136
137           These  functions  constitute  the  DNS  service  discovery library,
138           libdns_sd.  This  library  is  implemented  as  a  shared   object,
139           libdns_sd.so,  but it is not automatically linked by the C compila‐
140           tion system. Specify -ldns_sd on the cc command line to  link  with
141           this library. See libdns_sd(3LIB).
142
143
144       (3GSS)
145
146           These  functions  constitute the generic security services library.
147           This library is implemented as a shared object, libgss.so,  but  it
148           is  not  automatically  linked by the C compilation system. Specify
149           -lgss on the cc  command  line  to  link  with  this  library.  See
150           libgss(3LIB).
151
152
153       (3LDAP)
154
155           These  functions constitute the lightweight directory access proto‐
156           col library, libldap. This  library  is  implemented  as  a  shared
157           object, libldap.so, but is not automatically linked by the C compi‐
158           lation system. Specify -lldap on the cc command line to  link  with
159           this library. See ldap(3LDAP).
160
161
162       (3NSL)
163
164           These  functions  constitute  the  network service library, libnsl.
165           This library is implemented as a shared object, libnsl.so,  but  is
166           not automatically linked by the C compilation system. Specify -lnsl
167           on the cc command line to link with this library. See libnsl(3LIB).
168
169           Many base networking functions are also  available  in  the  X/Open
170           networking  interfaces  library, libxnet. See section (3XNET) below
171           for more information on the libxnet interfaces.
172
173
174       (3RESOLV)
175
176           These functions constitute the resolver  library,  libresolv.  This
177           library is implemented as a shared object, libresolv.so, but is not
178           automatically linked by the C compilation system. Specify  -lresolv
179           on  the  cc  command  line  to  link  with this library. See libre‐
180           solv(3LIB).
181
182
183       (3RPC)
184
185           These functions constitute the  remote  procedure  call  libraries,
186           librpcsvc  and  librpcsoc. The latter is provided for compatibility
187           only; new applications should not link to it.  Both  libraries  are
188           implemented  as  shared  objects,  librpcsvc.so  and  librpcsoc.so,
189           respectively. Neither library is automatically linked by the C com‐
190           pilation  system.  Specify  -lrpcsvc  or -lrpcsoc on the cc command
191           line to link with these libraries. See librpcsvc(3LIB) and  librpc‐
192           soc(3LIBUCB).
193
194
195       (3SASL)
196
197           These  functions  constitute the simple authentication and security
198           layer library, libsasl. This library is  implemented  as  a  shared
199           object,  libsasl.so,  but  it  is not automatically linked by the C
200           compilation system. Specify -lsasl on the cc command line  to  link
201           with this library. See libsasl(3LIB).
202
203
204       (3SIP)
205
206           These functions constitute the session initiation protocol library,
207           libsip. This library is implemented as a shared object,  libsip.so,
208           but  it  is  not  automatically linked by the C compilation system.
209           Specify -lsip on the cc command line to link with this library. See
210           libsip(3LIB).
211
212
213       (3SLP)
214
215           These  functions  constitute the service location protocol library,
216           libslp. This library is implemented as a shared object,  libslp.so,
217           but  it  is  not  automatically linked by the C compilation system.
218           Specify -lslp on the cc command line to link with this library. See
219           libslp(3LIB).
220
221
222       (3SOCKET)
223
224           These  functions  constitute  the  sockets library, libsocket. This
225           library is implemented as a shared object, libsocket.so, but is not
226           automatically  linked by the C compilation system. Specify -lsocket
227           on the cc  command  line  to  link  with  this  library.  See  lib‐
228           socket(3LIB).
229
230
231       (3XNET)
232
233           These  functions constitute X/Open networking interfaces which com‐
234           ply with the X/Open CAE Specification, Networking Services, Issue 4
235           (September,  1994). This library is implemented as a shared object,
236           libxnet.so, but is not automatically linked by  the  C  compilation
237           system.  Specify  -lxnet  on  the cc command line to link with this
238           library. See libxnet(3LIB) and standards(5) for compilation  infor‐
239           mation.
240
241
242
243       Under all circumstances, the use of the Sockets API is recommended over
244       the XTI and TLI APIs.  If  portability  to  other  XPGV4v2  (see  stan‐
245       dards(5))  systems  is  a  requirement,  the  application  must use the
246       libxnet interfaces. If portability is not required, the sockets  inter‐
247       faces  in  libsocket  and libnsl are recommended over those in libxnet.
248       Between the XTI and  TLI  APIs,  the  XTI  interfaces  (available  with
249       libxnet)  are  recommended over the TLI interfaces (available with lib‐
250       nsl).
251
252   Curses Library Functions
253       The functions described in this volume comprise the libraries that pro‐
254       vide graphics and character screen updating capabilities.
255
256       (3CURSES)
257
258           The functions constitute the following libraries:
259
260           libcurses
261
262               These  functions constitute the curses library, libcurses. This
263               library is implemented as a shared object, libcurses.so, but is
264               not  automatically  linked by the C compilation system. Specify
265               -lcurses on the cc command line to link with this library.  See
266               libcurses(3LIB).
267
268
269           libform
270
271               These  functions  constitute  the  forms library, libform. This
272               library is implemented as a shared object, libform.so,  but  is
273               not  automatically  linked by the C compilation system. Specify
274               -lform on the cc command line to link with  this  library.  See
275               libform(3LIB).
276
277
278           libmenu
279
280               These  functions  constitute  the  menus library, libmenu. This
281               library is implemented as a shared object, libmenu.so,  but  is
282               not  automatically  linked by the C compilation system. Specify
283               -lmenu on the cc command line to link with  this  library.  See
284               libmenu(3LIB).
285
286
287           libpanel
288
289               These  functions  constitute the panels library, libpanel. This
290               library is implemented as a shared object, libpanel.so, but  is
291               not  automatically  linked by the C compilation system. Specify
292               -lpanel on the cc command line to link with this  library.  See
293               libpanel(3LIB).
294
295
296
297       (3PLOT)
298
299           These  functions  constitute  the  grapnics  library, libplot. This
300           library is implemented as a shared object, libplot.so, but  is  not
301           automatically linked by the C compilation system. Specify -lplot on
302           the cc command line to link with this library. See libplot(3LIB).
303
304
305       (3XCURSES)
306
307           These functions constitute the X/Open curses  library,  located  in
308           /usr/xpg4/lib/libcurses.so. This library provides a set of interna‐
309           tionalized functions and macros for creating  and  modifying  input
310           and output to a terminal screen. Included in this library are func‐
311           tions for creating  windows,  highlighting  text,  writing  to  the
312           screen,  reading  from  user  input,  and moving the cursor. X/Open
313           Curses is designed to optimize screen update activities. The X/Open
314           Curses  library  conforms fully with Issue 4 of the X/Open Extended
315           Curses specification. See libcurses(3XCURSES).
316
317
318   Extended Library Functions, Vol. 1
319       The functions described in this volume comprise the following  special‐
320       ized libraries:
321
322       (3BSM)
323
324           These  functions  constitute  the Solaris auditing library, libbsm.
325           This library is implemented as a shared object, libbsm.so,  but  is
326           not automatically linked by the C compilation system. Specify -lbsm
327           on the cc command line to link with this library. See libbsm(3LIB).
328
329
330       (3CFGADM)
331
332           These  functions  constitute   the   configuration   administration
333           library, libcfgadm. This library is implemented as a shared object,
334           libcfgadm.so, but is not automatically linked by the C  compilation
335           system.  Specify  -lcfgadm on the cc command line to link with this
336           library. See libcfgadm(3LIB).
337
338
339       (3CONTRACT)
340
341           These functions constitute the contract management library, libcon‐
342           tract.  This  library  is  implemented  as a shared object, libcon‐
343           tract.so, but is not automatically linked by the C compilation sys‐
344           tem.  Specify  -lcontract  on the cc command line to link with this
345           library. See libcontract(3LIB).
346
347
348       (3CPC)
349
350           These functions constitute the  CPU  performance  counter  library,
351           libcpc,  and  the process context library, libpctx. These libraries
352           are  implemented  as  shared  objects,  libcpc.so  and  libpctx.so,
353           respectively, but are not automatically linked by the C compilation
354           system. Specify -lcpc or -lpctx on the cc command line to link with
355           these libraries. See libcpc(3LIB) and libpctx(3LIB).
356
357
358       (3DAT)
359
360           These  functions  constitute  the  direct access transport library,
361           libdat. This library is implemented as a shared object,  libdat.so,
362           but  is not automatically linked by the C compilation system. Spec‐
363           ify -ldat on the cc command line to link  with  this  library.  See
364           libdat(3LIB).
365
366
367       (3DEVID)
368
369           These  functions  constitute  the device ID library, libdevid. This
370           library is implemented as a shared object, libdevid.so, but is  not
371           automatically  linked  by the C compilation system. Specify -ldevid
372           on the cc command line  to  link  with  this  library.  See  libde‐
373           vid(3LIB).
374
375
376       (3DEVINFO)
377
378           These  functions constitute the device information library, libdev‐
379           info. This library is  implemented  as  a  shared  object,  libdev‐
380           info.so,  but is not automatically linked by the C compilation sys‐
381           tem. Specify -ldevinfo on the cc command line  to  link  with  this
382           library. See libdevinfo(3LIB).
383
384
385       (3ELF)
386
387           These  functions constitute the ELF access library, libelf, (Exten‐
388           sible Linking Format). This library provides the interface for  the
389           creation  and  analyses  of  "elf" files; executables, objects, and
390           shared  objects.  libelf  is  implemented  as  a   shared   object,
391           libelf.so,  but  is  not  automatically linked by the C compilation
392           system. Specify -lelf on the cc command  line  to  link  with  this
393           library. See libelf(3LIB).
394
395
396       (3EXACCT)
397
398           These  functions constitute the extended accounting access library,
399           libexacct, and the project  database  access  library,  libproject.
400           These libraries are implemented as shared objects, libexacct.so and
401           libproject.so, respectively, but are not  automatically  linked  by
402           the  C  compilation system. Specify -lexacct or -lproject on the cc
403           command line to link with these libraries. See libexacct(3LIB)  and
404           libproject(3LIB).
405
406
407       (3FCOE)
408
409           These  functions  constitute the Fibre  Channel  over Ethernet port
410           management library. This library is implemented as a shared object,
411           libfcoe.so,  but  is  not automatically linked by the C compilation
412           system. Specify -lfcoe on the cc command line  to  link  with  this
413           library. See libfcoe(3LIB).
414
415
416       (3FSTYP)
417
418           These  functions  constitute  the  file  system type identification
419           library. This library is implemented  as  a  shared  object,  libf‐
420           styp.so,  but is not automatically linked by the C compilation sys‐
421           tem. Specify -lfstyp on the cc  command  line  to  link  with  this
422           library. See libfstyp(3LIB).
423
424
425   Extended Library Functions, Vol. 2
426       The  functions described in this volume comprise the following special‐
427       ized libraries:
428
429       (3GEN)
430
431           These functions constitute the string pattern-matching and pathname
432           manipulation  library,  libgen.  This  library  is implemented as a
433           shared object, libgen.so, but is not automatically linked by the  C
434           compilation  system.  Specify  -lgen on the cc command line to link
435           with this library. See libgen(3LIB).
436
437
438       (3HBAAPI)
439
440           These functions constitute the common fibre channel HBA information
441           library, libhbaapi. This library is implemented as a shared object,
442           libhbaapi.so, but is not automatically linked by the C  compilation
443           system.  Specify  -lhbaapi on the cc command line to link with this
444           library. See libhbaapi(3LIB).
445
446
447       (3ISCSIT)
448
449           These functions constitute the iSCSI Management library, libiscsit.
450           This  library  is implemented as a shared object, libiscsit.so, but
451           is not automatically linked by the C  compilation  system.  Specify
452           -liscsit  on  the  cc  command  line to link with this library. See
453           libiscsit(3LIB).
454
455
456       (3KSTAT)
457
458           These functions constitute the kernel statistics library, which  is
459           implemented  as  a shared object, libkstat.so, but is not automati‐
460           cally linked by the C compilation system. Specify -lkstat on the cc
461           command line to link with this library. See libkstat(3LIB).
462
463
464       (3KVM)
465
466           These  functions  allow  access  to  the  kernel's  virtual  memory
467           library, which is implemented as a shared object, libkvm.so, but is
468           not automatically linked by the C compilation system. Specify -lkvm
469           on the cc command line to link with this library. See libkvm(3LIB).
470
471
472       (3LAYOUT)
473
474           These functions constitute the layout  service  library,  which  is
475           implemented  as a shared object, liblayout.so, but is not automati‐
476           cally linked by the C compilation system. Specify -llayout  on  the
477           cc command line to link with this library. See liblayout(3LIB).
478
479
480       (3LGRP)
481
482           These  functions  constitute  the  locality group library, which is
483           implemented as a shared object, liblgrp.so, but  is  not  automati‐
484           cally  linked by the C compilation system. Specify -llgrp on the cc
485           command line to link with this library. See liblgrp(3LIB).
486
487
488       (3M)
489
490           These functions constitute the  mathematical  library,  libm.  This
491           library  is  implemented  as  a  shared object, libm.so, but is not
492           automatically linked by the C compilation system.  Specify  -lm  on
493           the cc command line to link with this library. See libm(3LIB).
494
495
496       (3MAIL)
497
498           These  functions  constitute  the  user mailbox management library,
499           libmail. This library is  implemented  as  a  shared  object,  lib‐
500           mail.so,  but is not automatically linked by the C compilation sys‐
501           tem. Specify -lmail on the  cc  command  line  to  link  with  this
502           library. See libmail(3LIB).
503
504
505       (3MP)
506
507           These functions constitute the integer mathematical library, libmp.
508           This library is implemented as a shared object,  libmp.so,  but  is
509           not  automatically linked by the C compilation system. Specify -lmp
510           on the cc command line to link with this library. See libmp(3LIB).
511
512
513       (3MPAPI)
514
515           These  functions  constitute  the  Common   Mulitipath   Management
516           library,  libMPAPI. This library is implemented as a shared object,
517           libMPAPI.so, but is not automatically linked by the  C  compilation
518           system.  Specify  -lMPAPI  on the cc command line to link with this
519           library. See libMPAPI(3LIB).
520
521
522       (3MVEC)
523
524           These functions constitute the vector  mathematical  library,  lib‐
525           mvec.  This  library is implemented as a shared object, libmvec.so,
526           but is not automatically linked by the C compilation system.  Spec‐
527           ify  -lmvec  on  the cc command line to link with this library. See
528           libmvec(3LIB).
529
530
531   Extended Library Functions, Vol. 3
532       The functions described in this volume comprise the following  special‐
533       ized libraries:
534
535       (3NVPAIR)
536
537           These  functions constitute the name-value pair library, libnvpair.
538           This library is implemented as a shared object,  libnvpair.so,  but
539           is  not  automatically  linked by the C compilation system. Specify
540           -lnvpair on the cc command line to link with this library. See lib‐
541           nvpair(3LIB).
542
543
544       (3PAM)
545
546           These  functions  constitute  the  pluggable  uuthentication module
547           library, libpam. This library is implemented as  a  shared  object,
548           libpam.so,  but  is  not  automatically linked by the C compilation
549           system. Specify -lpam on the cc command  line  to  link  with  this
550           library. See libpam(3LIB).
551
552
553       (3PAPI)
554
555           These  functions  constitute the Free Standards Group Open Printing
556           API (PAPI) library, libpapi.  This  library  is  implemented  as  a
557           shared object, libpapi.so, but is not automatically linked by the C
558           compilation system. Specify -lpapi on the cc command line  to  link
559           with this library. See libpapi(3LIB).
560
561
562       (3PICL)
563
564           These  functions constitute the PICL library, libpicl. This library
565           is implemented as a shared object, libpicl.so, but is not automati‐
566           cally  linked by the C compilation system. Specify -lpicl on the cc
567           command line to link  with  this  library.  See  libpicl(3LIB)  and
568           libpicl(3PICL).
569
570
571       (3PICLTREE)
572
573           These  functions  constitute the PICL plug-in library, libpicltree.
574           This library is implemented as a shared object, libpicltree.so, but
575           is  not  automatically  linked by the C compilation system. Specify
576           -lpicltree on the cc command line to link with  this  library.  See
577           libpicltree(3LIB) and libpicltree(3PICLTREE).
578
579
580       (3POOL)
581
582           These  functions  constitute  the  pool  configuration manipulation
583           library, libpool. This library is implemented as a  shared  object,
584           libpool.so,  but  is  not automatically linked by the C compilation
585           system. Specify -lpool on the cc command line  to  link  with  this
586           library. See libpool(3LIB).
587
588
589       (3PROJECT)
590
591           These  functions  constitute  the  project database access library,
592           libproject. This library is implemented as a shared object, libpro‐
593           ject.so,  but is not automatically linked by the C compilation sys‐
594           tem. Specify -lproject on the cc command line  to  link  with  this
595           library. See libproject(3LIB).
596
597
598       (3RSM)
599
600           These  functions  constitute  the  remote  shared  memory  library,
601           librsm. This library is implemented as a shared object,  librsm.so,
602           but  is not automatically linked by the C compilation system. Spec‐
603           ify -lrsm on the cc command line to link  with  this  library.  See
604           librsm(3LIB).
605
606
607   Extended Library Functions, Vol. 4
608       The  functions described in this volume comprise the following special‐
609       ized libraries:
610
611       (3SCF)
612
613           These functions constitute  the  object-caching  memory  allocation
614           library,  libscf.  This  library is implemented as a shared object,
615           libscf.so, but is not automatically linked  by  the  C  compilation
616           system.  Specify  -lscf  on  the  cc command line to link with this
617           library. See libscf(3LIB).
618
619
620       (3SEC)
621
622           These functions constitute the file access control library, libsec.
623           This  library  is implemented as a shared object, libsec.so, but is
624           not automatically linked by the C compilation system. Specify -lsec
625           on the cc command line to link with this library. See libsec(3LIB).
626
627
628       (3SECDB)
629
630           These   functions   constitute  the  security  attributes  database
631           library, libsecdb. This library is implemented as a shared  object,
632           libsecdb.so,  but  is not automatically linked by the C compilation
633           system. Specify -lsecdb on the cc command line to  link  with  this
634           library. See libsecdb(3LIB).
635
636
637       (3SMARTCARD)
638
639           These  functions  constitute  the  smartcard library, libsmartcard.
640           This library is implemented as a  shared  object,  libsmartcard.so,
641           but  is not automatically linked by the C compilation system. Spec‐
642           ify -lsmartcard on the cc command line to link with  this  library.
643           See libsmartcard(3LIB).
644
645
646       (3SNMP)
647
648           These  functions constitute the SNMP libraries, libssagent and lib‐
649           ssasnmp. These libraries are implemented as  shared  objects,  lib‐
650           ssagent.so  and  libssasnmp.so, respectively, but are not automati‐
651           cally linked by the C  compilation  system.  Specify  -lssagent  or
652           -lssasnmp  on the cc command line to link with these libraries. See
653           libssagent(3LIB) and libssasnmp(3LIB).
654
655
656       (3STMF)
657
658           These functions constitute the SCSI Target Mode Framework  library,
659           libstmf.  This  library  is  implemented  as  a shared object, lib‐
660           stmf.so, but is not automatically linked by the C compilation  sys‐
661           tem.  Specify  -lstmf  on  the  cc  command  line to link with this
662           library. See libstmf(3LIB).
663
664
665       (3SYSEVENT)
666
667           These functions constitute the system event  library,  libsysevent.
668           This library is implemented as a shared object, libsysevent.so, but
669           is not automatically linked by the C  compilation  system.  Specify
670           -lsysevent  on  the  cc command line to link with this library. See
671           libsysevent(3LIB).
672
673
674       (3TECLA)
675
676           These  functions  constitute  the  interactive  command-line  input
677           library,  libtecla. This library is implemented as a shared object,
678           libtecla.so, but is not automatically linked by the  C  compilation
679           system.  Specify  -ltecla  on the cc command line to link with this
680           library. See libtecla(3LIB).
681
682
683       (3TNF)
684
685           These functions constitute the TNF  libraries,  libtnf,  libtnfctl,
686           and libtnfprobe. These libraries are implemented as shared objects,
687           libtnf.so, libtnfctl.so, and libtnfprobe.so, respectively, but  are
688           not  automatically  linked  by  the  C  compilation system. Specify
689           -ltnf, -ltnfctl, or -ltnfprobe on the cc command line to link  with
690           these libraries. See libtnfctl(3TNF) and libtnfctl(3LIB).
691
692
693       (3TSOL)
694
695           These functions constitute the Trusted Extensions library, libtsol,
696           and  the  Trusted  Extensions  network  library,  libtsnet.   These
697           libraries  are  implemented as shared objects, libtsol.so and libt‐
698           snet.so, but are not automatically linked by the C compilation sys‐
699           tem.  Specify -ltsol or -ltsnet on the cc command line to link with
700           these libraries. See libtsol(3LIB) and libtsnet(3LIB).
701
702
703       (3UUID)
704
705           These  functions  constitute  the  universally  unique   identifier
706           library,  libuuid.  This library is implemented as a shared object,
707           libuuid.so, but is not automatically linked by  the  C  compilation
708           system.  Specify  -luuid  on  the cc command line to link with this
709           library. See libuuid(3LIB).
710
711
712       (3VOLMGT)
713
714           These functions constitute  the  volume  management  library,  lib‐
715           volmgt.  This  library  is  implemented  as  a  shared object, lib‐
716           volmgt.so, but is not automatically linked  by  the  C  compilation
717           system.  Specify  -lvolmgt on the cc command line to link with this
718           library. See libvolmgt(3LIB).
719
720
721       (3WSREG)
722
723           These functions constitute the product  install  registry  library,
724           libwsreg.  This  library  is implemented as a shared object, libws‐
725           reg.so, but is not automatically linked by the C  compilation  sys‐
726           tem.  Specify  -lwsreg  on  the  cc  command line to link with this
727           library. See libwsreg(3LIB).
728
729
730       (3XTSOL)
731
732           These functions constitute the Trusted Extensions to the X  windows
733           library,  libXtsol. This library is implemented as a shared object,
734           libXtsol.so, but is not automatically linked by the  C  compilation
735           system.  Specify  -lX11  and then -lXtsol on the cc command line to
736           link with this library. See libXtsol(3LIB).
737
738
739   Multimedia Library Functions
740       (3MLIB)
741
742           These functions constitute  the  mediaLib  library,  libmlib.  This
743           library  is  implemented as a shared object, libmlib.so, but is not
744           automatically linked by the C compilation system. Specify -lmlib on
745           the cc command line to link with this library. See libmlib(3LIB).
746
747
748       (3MMS)
749
750           These  functions  constitute  the  Media Management System library,
751           libmms. This library is implemented as a shared object,  libmms.so,
752           but  is not automatically linked by the C compilation system. Spec‐
753           ify -lmms on the cc command line to link  with  this  library.  See
754           libmms(3LIB).
755
756

DEFINITIONS

758       A  character is any bit pattern able to fit into a byte on the machine.
759       In some international languages, however, a "character"  might  require
760       more than one byte, and is represented in multi-bytes.
761
762
763       The  null  character is a character with value 0, conventionally repre‐
764       sented in the C language as \0. A character  array  is  a  sequence  of
765       characters.  A null-terminated character array (a string) is a sequence
766       of characters, the last of which is the null character. The null string
767       is  a character array containing only the terminating null character. A
768       null pointer is the value that is obtained by casting 0 into a pointer.
769       C  guarantees  that  this  value  will not match that of any legitimate
770       pointer, so many functions that return pointers return NULL to indicate
771       an  error.  The  macro  NULL is defined in <stdio.h>. Types of the form
772       size_t are defined in the appropriate headers.
773

MULTITHREADED APPLICATIONS

775       Both POSIX threads and Solaris threads can  be  used  within  the  same
776       application.  Their implementations are completely compatible with each
777       other; however, only  POSIX  threads  guarantee  portability  to  other
778       POSIX-conforming environments.
779
780
781       The  libpthread(3LIB)  and libthread(3LIB) libraries are implemented as
782       filters on libc(3LIB).
783
784
785       When compiling a multithreaded application,  the  -mt  option  must  be
786       specified on the command line.
787
788
789       There is no need for a multithreaded application to link with -lthread.
790       An application must link with -lpthread only when POSIX  semantics  for
791       fork(2)  are  desired.  When an application is linked with -lpthread, a
792       call to fork() assumes the behavior fork1(2) rather  than  the  default
793       behavior that forks all threads.
794
795
796       When    compiling    a   POSIX-conforming   application,   either   the
797       _POSIX_C_SOURCE or _POSIX_PTHREAD_SEMANTICS option must be specified on
798       the  command  line.  For  POSIX.1c-conforming  applications, define the
799       _POSIX_C_SOURCE flag to be >= 199506L:
800
801         cc -mt [ flag... ] file... -D_POSIX_C_SOURCE=199506L -lpthread
802
803
804
805       For POSIX behavior with the Solaris  fork()  and  fork1()  distinction,
806       compile as follows:
807
808         cc -mt [ flag... ] file... -D_POSIX_PTHREAD_SEMANTICS
809
810
811
812       For Solaris threads behavior, compile as follows:
813
814         cc -mt [ flag... ] file...
815
816
817
818       Unsafe  interfaces should be called only from the main thread to ensure
819       the application's safety.
820
821
822       MT-Safe interfaces are denoted in the ATTRIBUTES section of  the  func‐
823       tions  and libraries manual pages (see attributes(5)). If a manual page
824       does not state explicitly that an interface is MT-Safe, the user should
825       assume that the interface is unsafe.
826

REALTIME APPLICATIONS

828       The environment variable LD_BIND_NOW must be set to a non-null value to
829       enable early binding. Refer to the  "When  Relocations  are  Processed"
830       chapter in Linker and Libraries Guide for additional information.
831

FILES

833       INCDIR         usually /usr/include
834
835
836       LIBDIR         usually  either  /lib  or  /usr/lib  (32-bit)  or either
837                      /lib/64 or /usr/lib/64 (64-bit)
838
839
840       LIBDIR/*.so    shared libraries
841
842

ACKNOWLEDGMENTS

844       Sun Microsystems, Inc. gratefully acknowledges The Open Group for  per‐
845       mission  to reproduce portions of its copyrighted documentation. Origi‐
846       nal documentation from  The  Open  Group  can  be  obtained  online  at
847       http://www.opengroup.org/bookstore/.
848
849
850       The  Institute  of  Electrical  and  Electronics Engineers and The Open
851       Group, have given us permission to reprint portions of their documenta‐
852       tion.
853
854
855       In the following statement, the phrase ``this text'' refers to portions
856       of the system documentation.
857
858
859       Portions of this text are reprinted and reproduced in  electronic  form
860       in  the  SunOS  Reference  Manual,  from IEEE Std 1003.1, 2004 Edition,
861       Standard for Information Technology -- Portable Operating System Inter‐
862       face (POSIX), The Open Group Base Specifications Issue 6, Copyright (C)
863       2001-2004 by the Institute of Electrical and Electronics Engineers, Inc
864       and The Open Group.  In the event of any discrepancy between these ver‐
865       sions and the original IEEE and The Open Group Standard,  the  original
866       IEEE and The Open Group Standard is the referee document.  The original
867       Standard    can    be    obtained    online     at     http://www.open
868       group.org/unix/online.html.
869
870
871       This notice shall appear on any product containing this material.
872

SEE ALSO

874       ar(1), ld(1), fork(2), stdio(3C), attributes(5), standards(5)
875
876
877       Linker and Libraries Guide
878
879
880       Performance Profiling Tools
881
882
883       ANSI C Programmer's Guide
884

DIAGNOSTICS

886       For  functions that return floating-point values, error handling varies
887       according to compilation mode. Under the -Xt (default)  option  to  cc,
888       these  functions  return  the conventional values 0, ±HUGE, or NaN when
889       the function is undefined for the given arguments or when the value  is
890       not  representable.  In the -Xa and -Xc compilation modes, ±HUGE_VAL is
891       returned instead of ±HUGE. (HUGE_VAL and HUGE are defined in math.h  to
892       be  infinity and the largest-magnitude single-precision number, respec‐
893       tively.)
894

NOTES

896       None of the functions, external variables, or macros  should  be  rede‐
897       fined  in  the user's programs. Any other name can be redefined without
898       affecting the behavior of other library functions, but  such  redefini‐
899       tion might conflict with a declaration in an included header.
900
901
902       The  headers  in  INCDIR provide function prototypes (function declara‐
903       tions including the types of  arguments)  for  most  of  the  functions
904       listed  in this manual. Function prototypes allow the compiler to check
905       for correct usage of these functions in the user's  program.  The  lint
906       program  checker can also be used and will report discrepancies even if
907       the headers are not included with #include statements. Definitions  for
908       Sections  2  and 3C are checked automatically. Other definitions can be
909       included by using the -l option to lint.  (For  example,  -lm  includes
910       definitions  for libm.) Use of lint is highly recommended. See the lint
911       chapter in Performance Profiling Tools
912
913
914       Users should carefully note the difference between STREAMS and  stream.
915       STREAMS  is  a set of kernel mechanisms that support the development of
916       network services and data communication  drivers.  It  is  composed  of
917       utility  routines,  kernel  facilities, and a set of data structures. A
918       stream is a file with its associated buffering. It is declared to be  a
919       pointer to a type FILE defined in <stdio.h>.
920
921
922       In  detailed  definitions  of  components, it is sometimes necessary to
923       refer to symbolic names that are implementation-specific, but which are
924       not  necessarily  expected  to be accessible to an application program.
925       Many of these symbolic names describe boundary  conditions  and  system
926       limits.
927
928
929       In  this section, for readability, these implementation-specific values
930       are given symbolic names. These names always appear enclosed  in  curly
931       brackets  to  distinguish them from symbolic names of other implementa‐
932       tion-specific constants that are accessible to application programs  by
933       headers.  These  names are not necessarily accessible to an application
934       program through a header, although they can be defined in the  documen‐
935       tation for a particular system.
936
937
938       In  general,  a  portable application program should not refer to these
939       symbolic names in its code. For example, an application  program  would
940       not  be expected to test the length of an argument list given to a rou‐
941       tine to determine if it was greater than {ARG_MAX}.
942
943
944
945SunOS 5.11                        1 Apr 2009                          Intro(3)
Impressum