summaryrefslogtreecommitdiff
path: root/usr/src/man/man3/Intro.3
blob: 4e7a4fb259781732cbd65916b9ba7c0f272b8f48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
'\" te
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH Intro 3 "1 Apr 2009" "SunOS 5.11" "Introduction to Library Functions"
.SH NAME
Intro, intro \- introduction to functions and libraries
.SH DESCRIPTION
.sp
.LP
This section describes functions found in various Solaris libraries, other than
those functions described in Section 2 of this manual that directly invoke UNIX
system primitives. Function declarations can be obtained from the
\fB#include\fR files indicated on each page. Pages are grouped by library and
are identified by the library name (or an abbreviation of the library name)
after the section number. Collections of related libraries are grouped into
volumes as described below. The first volume contains pages describing the
contents of each shared library and each header used by the functions, macros,
and external variables described in the remaining volumes.
.SS "Library Interfaces and Headers"
.sp
.LP
This volume describes the contents of each shared library and each header used
by functions, macros, and external variables described in the remaining
volumes.
.sp
.ne 2
.mk
.na
\fB(3LIB)\fR
.ad
.sp .6
.RS 4n
The libraries described in this section are implemented as shared objects.
.sp
Descriptions of shared objects can include a definition of the global symbols
that define the shared objects' public interface, for example \fBSUNW_1.1\fR.
Other interfaces can exist within the shared object, for example
\fBSUNWprivate.1.1\fR. The public interface provides a stable, committed set of
symbols for application development. The private interfaces are for internal
use only, and could change at any time.
.RE

.sp
.ne 2
.mk
.na
\fB(3LIBUCB)\fR
.ad
.sp .6
.RS 4n
The SunOS/BSD Compatibility libraries described in this section are implemented
as a shared object. See (3LIB) above.
.RE

.sp
.ne 2
.mk
.na
\fB(3HEAD)\fR
.ad
.sp .6
.RS 4n
The headers described in this section are used by functions, macros, and
external variables. Headers contain function prototypes, definitions of
symbolic constants, common structures, preprocessor macros, and defined types.
Each function described in the remaining five volumes specifies the headers
that an application must include in order to use that function. In most cases
only one header is required. These headers are present on an application
development system; they do have to be present on the target execution system.
.RE

.SS "Basic Library Functions"
.sp
.LP
The functions described in this volume are the core C library functions that
are basic to application development.
.sp
.ne 2
.mk
.na
\fB(3C)\fR
.ad
.sp .6
.RS 4n
These functions, together with those of Section 2, constitute the standard C
library, \fBlibc\fR, which is automatically linked by the C compilation system.
The standard C library is implemented as a shared object, \fBlibc.so\fR. See
\fBlibc\fR(3LIB) and the "C Compilation System" chapter of the \fIANSI C
Programmer's Guide\fR for a discussion. Some functions behave differently in
standard-conforming environments. This behavior is noted on the individual
manual pages. See \fBstandards\fR(5).
.sp
The \fBlibpthread\fR and \fBlibthread\fR libraries are filter libraries on
\fBlibc\fR that are used for building multithreaded applications:
\fBlibpthread\fR implements the POSIX (see \fBstandards\fR(5)) threads
interface, whereas \fBlibthread\fR implements the Solaris threads interface.
See \fBMULTITHREADED APPLICATIONS\fR, below.
.RE

.sp
.ne 2
.mk
.na
\fB(3C_DB)\fR
.ad
.sp .6
.RS 4n
These functions constitute the threads debugging library, \fBlibc_db\fR. This
library is implemented as a shared object, \fBlibc_db.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lc_db\fR on the
\fBcc\fR command line to link with this library. See \fBlibc_db\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3MALLOC)\fR
.ad
.sp .6
.RS 4n
These functions constitute the various memory allocation libraries:
\fBlibmalloc\fR, \fBlibbsdmalloc\fR, \fBlibmapmalloc\fR, \fBlibmtmalloc\fR, and
\fBlibumem\fR. Each of these libraries is implemented as a shared object
(\fBlibmalloc.so\fR, \fBlibbsdmalloc.so\fR, \fBlibmapmalloc.so\fR,
\fBlibmtmalloc.so\fR, and \fBlibumem.so\fR). These libraries are not
automatically linked by the C compilation system. Specify \fB-lmalloc\fR,
\fB-lbsdmalloc\fR, \fB-lmapmalloc\fR, \fB-lmtmalloc\fR, and \fB-lumem\fR to
link with, respectively, \fBlibmalloc\fR, \fBlibbsdmalloc\fR,
\fBlibmapmalloc\fR, \fBlibmtmalloc\fR, and \fBlibumem\fR. See
\fBlibmalloc\fR(3LIB), \fBlibbsdmalloc\fR(3LIB), \fBlibmapmalloc\fR(3LIB),
\fBlibmtmalloc\fR(3LIB), and \fBlibumem\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3UCB)\fR
.ad
.sp .6
.RS 4n
These functions constitute the source compatibility (with BSD functions)
library. It is implemented as a shared object, \fBlibucb.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lucb\fR on the
\fBcc\fR command line to link with this library, which is located in the
\fB/usr/ucb\fR subdirectory. Headers for this library are located within
\fB/usr/ucbinclude\fR. See \fBlibucb\fR(3LIBUCB).
.RE

.SS "Networking Library Functions"
.sp
.LP
The functions described in this volume comprise the various networking
libraries.
.sp
.ne 2
.mk
.na
\fB(3COMMPUTIL)\fR
.ad
.sp .6
.RS 4n
These functions constitute the communication protocol parser utilities library,
\fBlibcommputil\fR. This library is implemented as a shared object,
\fBlibcommputil.so\fR, but it is not automatically linked by the C compilation
system. Specify \fB-lcommputil\fR on the \fBcc\fR command line to link with
this library. See \fBlibcommputil\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3DLPI)\fR
.ad
.sp .6
.RS 4n
These functions constitute the data link provider interface library,
\fBlibdlpi\fR. This library is implemented as a shared object,
\fBlibdlpi.so\fR, but it is not automatically linked by the C compilation
system. Specify \fB-ldlpi\fR on the \fBcc\fR command line to link with this
library. See \fBlibdlpi\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3DNS_SD)\fR
.ad
.sp .6
.RS 4n
These functions constitute the DNS service discovery library, \fBlibdns_sd\fR.
This library is implemented as a shared object, \fBlibdns_sd.so\fR, but it is
not automatically linked by the C compilation system. Specify \fB-ldns_sd\fR on
the \fBcc\fR command line to link with this library. See \fBlibdns_sd\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3GSS)\fR
.ad
.sp .6
.RS 4n
These functions constitute the generic security services library. This library
is implemented as a shared object, \fBlibgss.so\fR, but it is not automatically
linked by the C compilation system. Specify \fB-lgss\fR on the \fBcc\fR command
line to link with this library. See \fBlibgss\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3LDAP)\fR
.ad
.sp .6
.RS 4n
These functions constitute the lightweight directory access protocol library,
\fBlibldap\fR. This library is implemented as a shared object,
\fBlibldap.so\fR, but is not automatically linked by the C compilation system.
Specify \fB-lldap\fR on the \fBcc\fR command line to link with this library.
See \fBldap\fR(3LDAP).
.RE

.sp
.ne 2
.mk
.na
\fB(3NSL)\fR
.ad
.sp .6
.RS 4n
These functions constitute the network service library, \fBlibnsl\fR. This
library is implemented as a shared object, \fBlibnsl.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lnsl\fR on the
\fBcc\fR command line to link with this library. See \fBlibnsl\fR(3LIB).
.sp
Many base networking functions are also available in the X/Open networking
interfaces library, \fBlibxnet\fR. See section (3XNET) below for more
information on the \fBlibxnet\fR interfaces.
.RE

.sp
.ne 2
.mk
.na
\fB(3RESOLV)\fR
.ad
.sp .6
.RS 4n
These functions constitute the resolver library, \fBlibresolv\fR. This library
is implemented as a shared object, \fBlibresolv.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lresolv\fR on the \fBcc\fR
command line to link with this library. See \fBlibresolv\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3RPC)\fR
.ad
.sp .6
.RS 4n
These functions constitute the remote procedure call libraries, \fBlibrpcsvc\fR
and \fBlibrpcsoc\fR. The latter is provided for compatibility only; new
applications should not link to it. Both libraries are implemented as shared
objects, \fBlibrpcsvc.so\fR and \fBlibrpcsoc.so\fR, respectively. Neither
library is automatically linked by the C compilation system. Specify
\fB-lrpcsvc\fR or \fB-lrpcsoc\fR on the \fBcc\fR command line to link with
these libraries. See \fBlibrpcsvc\fR(3LIB) and \fBlibrpcsoc\fR(3LIBUCB).
.RE

.sp
.ne 2
.mk
.na
\fB(3SASL)\fR
.ad
.sp .6
.RS 4n
These functions constitute the simple authentication and security layer
library, \fBlibsasl\fR. This library is implemented as a shared object,
\fBlibsasl.so\fR, but it is not automatically linked by the C compilation
system. Specify \fB-lsasl\fR on the \fBcc\fR command line to link with this
library. See \fBlibsasl\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3SIP)\fR
.ad
.sp .6
.RS 4n
These functions constitute the session initiation protocol library,
\fBlibsip\fR. This library is implemented as a shared object, \fBlibsip.so\fR,
but it is not automatically linked by the C compilation system. Specify
\fB-lsip\fR on the \fBcc\fR command line to link with this library. See
\fBlibsip\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3SLP)\fR
.ad
.sp .6
.RS 4n
These functions constitute the service location protocol library, \fBlibslp\fR.
This library is implemented as a shared object, \fBlibslp.so\fR, but it is not
automatically linked by the C compilation system. Specify \fB-lslp\fR on the
\fBcc\fR command line to link with this library. See \fBlibslp\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3SOCKET)\fR
.ad
.sp .6
.RS 4n
These functions constitute the sockets library, \fBlibsocket\fR. This library
is implemented as a shared object, \fBlibsocket.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lsocket\fR on the \fBcc\fR
command line to link with this library. See \fBlibsocket\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3XNET)\fR
.ad
.sp .6
.RS 4n
These functions constitute X/Open networking interfaces which comply with the
X/Open CAE Specification, Networking Services, Issue 4 (September, 1994). This
library is implemented as a shared object, \fBlibxnet.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lxnet\fR on the
\fBcc\fR command line to link with this library. See \fBlibxnet\fR(3LIB) and
\fBstandards\fR(5) for compilation information.
.RE

.sp
.LP
Under all circumstances, the use of the Sockets API is recommended over the XTI
and TLI APIs. If portability to other XPGV4v2 (see \fBstandards\fR(5)) systems
is a requirement, the application must use the \fBlibxnet\fR interfaces. If
portability is not required, the sockets interfaces in \fBlibsocket\fR and
\fBlibnsl\fR are recommended over those in \fBlibxnet\fR. Between the XTI and
TLI APIs, the \fBXTI\fR interfaces (available with \fBlibxnet\fR) are
recommended over the \fBTLI\fR interfaces (available with \fBlibnsl\fR).
.SS "Curses Library Functions"
.sp
.LP
The functions described in this volume comprise the libraries that provide
graphics and character screen updating capabilities.
.sp
.ne 2
.mk
.na
\fB(3CURSES)\fR
.ad
.sp .6
.RS 4n
The functions constitute the following libraries:
.sp
.ne 2
.mk
.na
\fB\fBlibcurses\fR\fR
.ad
.sp .6
.RS 4n
These functions constitute the curses library, \fBlibcurses\fR. This library is
implemented as a shared object, \fBlibcurses.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lcurses\fR on the \fBcc\fR
command line to link with this library. See \fBlibcurses\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB\fBlibform\fR\fR
.ad
.sp .6
.RS 4n
These functions constitute the forms library, \fBlibform\fR. This library is
implemented as a shared object, \fBlibform.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lform\fR on the \fBcc\fR
command line to link with this library. See \fBlibform\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB\fBlibmenu\fR\fR
.ad
.sp .6
.RS 4n
These functions constitute the menus library, \fBlibmenu\fR. This library is
implemented as a shared object, \fBlibmenu.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lmenu\fR on the \fBcc\fR
command line to link with this library. See \fBlibmenu\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB\fBlibpanel\fR\fR
.ad
.sp .6
.RS 4n
These functions constitute the panels library, \fBlibpanel\fR. This library is
implemented as a shared object, \fBlibpanel.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lpanel\fR on the \fBcc\fR
command line to link with this library. See \fBlibpanel\fR(3LIB).
.RE

.RE

.sp
.ne 2
.mk
.na
\fB(3PLOT)\fR
.ad
.sp .6
.RS 4n
These functions constitute the grapnics library, \fBlibplot\fR. This library is
implemented as a shared object, \fBlibplot.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lplot\fR on the \fBcc\fR
command line to link with this library. See \fBlibplot\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3XCURSES)\fR
.ad
.sp .6
.RS 4n
These functions constitute the X/Open curses library, located in
\fB/usr/xpg4/lib/libcurses.so\fR. This library provides a set of
internationalized functions and macros for creating and modifying input and
output to a terminal screen. Included in this library are functions for
creating windows, highlighting text, writing to the screen, reading from user
input, and moving the cursor. X/Open Curses is designed to optimize screen
update activities. The X/Open Curses library conforms fully with Issue 4 of the
X/Open Extended Curses specification. See \fBlibcurses\fR(3XCURSES).
.RE

.SS "Extended Library Functions, Vol. 1"
.sp
.LP
The functions described in this volume comprise the following specialized
libraries:
.sp
.ne 2
.mk
.na
\fB(3BSM)\fR
.ad
.sp .6
.RS 4n
These functions constitute the Solaris auditing library, \fBlibbsm\fR. This
library is implemented as a shared object, \fBlibbsm.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lbsm\fR on the
\fBcc\fR command line to link with this library. See \fBlibbsm\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3CFGADM)\fR
.ad
.sp .6
.RS 4n
These functions constitute the configuration administration library,
\fBlibcfgadm\fR. This library is implemented as a shared object,
\fBlibcfgadm.so\fR, but is not automatically linked by the C compilation
system. Specify \fB-lcfgadm\fR on the \fBcc\fR command line to link with this
library. See \fBlibcfgadm\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3CONTRACT)\fR
.ad
.sp .6
.RS 4n
These functions constitute the contract management library, \fBlibcontract\fR.
This library is implemented as a shared object, \fBlibcontract.so\fR, but is
not automatically linked by the C compilation system. Specify \fB-lcontract\fR
on the \fBcc\fR command line to link with this library. See
\fBlibcontract\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3CPC)\fR
.ad
.sp .6
.RS 4n
These functions constitute the CPU performance counter library, \fBlibcpc\fR,
and the process context library, \fBlibpctx\fR. These libraries are implemented
as shared objects, \fBlibcpc.so\fR and \fBlibpctx.so\fR, respectively, but are
not automatically linked by the C compilation system. Specify \fB-lcpc\fR or
\fB-lpctx\fR on the \fBcc\fR command line to link with these libraries. See
\fBlibcpc\fR(3LIB) and \fBlibpctx\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3DAT)\fR
.ad
.sp .6
.RS 4n
These functions constitute the direct access transport library, \fBlibdat\fR.
This library is implemented as a shared object, \fBlibdat.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-ldat\fR on the
\fBcc\fR command line to link with this library. See \fBlibdat\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3DEVID)\fR
.ad
.sp .6
.RS 4n
These functions constitute the device \fBID\fR library, \fBlibdevid\fR. This
library is implemented as a shared object, \fBlibdevid.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-ldevid\fR on the
\fBcc\fR command line to link with this library. See \fBlibdevid\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3DEVINFO)\fR
.ad
.sp .6
.RS 4n
These functions constitute the device information library, \fBlibdevinfo\fR.
This library is implemented as a shared object, \fBlibdevinfo.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-ldevinfo\fR on
the \fBcc\fR command line to link with this library. See
\fBlibdevinfo\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3ELF)\fR
.ad
.sp .6
.RS 4n
These functions constitute the ELF access library, \fBlibelf\fR, (Extensible
Linking Format). This library provides the interface for the creation and
analyses of "elf" files; executables, objects, and shared objects. \fBlibelf\fR
is implemented as a shared object, \fBlibelf.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lelf\fR on the \fBcc\fR command
line to link with this library. See \fBlibelf\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3EXACCT)\fR
.ad
.sp .6
.RS 4n
These functions constitute the extended accounting access library,
\fBlibexacct\fR, and the project database access library, \fBlibproject\fR.
These libraries are implemented as shared objects, \fBlibexacct.so\fR and
\fBlibproject.so\fR, respectively, but are not automatically linked by the C
compilation system. Specify \fB-lexacct\fR or \fB-lproject\fR on the \fBcc\fR
command line to link with these libraries. See \fBlibexacct\fR(3LIB) and
\fBlibproject\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3FCOE)\fR
.ad
.sp .6
.RS 4n
These functions constitute the Fibre  Channel  over Ethernet port management
library. This library is implemented as a shared object, \fBlibfcoe.so\fR, but
is not automatically linked by the C compilation system. Specify \fB-lfcoe\fR
on the \fBcc\fR command line to link with this library. See
\fBlibfcoe\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3FSTYP)\fR
.ad
.sp .6
.RS 4n
These functions constitute the file system type identification library. This
library is implemented as a shared object, \fBlibfstyp.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lfstyp\fR on the
\fBcc\fR command line to link with this library. See \fBlibfstyp\fR(3LIB).
.RE

.SS "Extended Library Functions, Vol. 2"
.sp
.LP
The functions described in this volume comprise the following specialized
libraries:
.sp
.ne 2
.mk
.na
\fB(3GEN)\fR
.ad
.sp .6
.RS 4n
These functions constitute the string pattern-matching and pathname
manipulation library, \fBlibgen\fR. This library is implemented as a shared
object, \fBlibgen.so\fR, but is not automatically linked by the C compilation
system. Specify \fB-lgen\fR on the \fBcc\fR command line to link with this
library. See \fBlibgen\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3HBAAPI)\fR
.ad
.sp .6
.RS 4n
These functions constitute the common fibre channel HBA information library,
\fBlibhbaapi\fR. This library is implemented as a shared object,
\fBlibhbaapi.so\fR, but is not automatically linked by the C compilation
system. Specify \fB-lhbaapi\fR on the \fBcc\fR command line to link with this
library. See \fBlibhbaapi\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3ISCSIT)\fR
.ad
.sp .6
.RS 4n
These functions constitute the iSCSI Management library, \fBlibiscsit\fR. This
library is implemented as a shared object, \fBlibiscsit.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-liscsit\fR on the
\fBcc\fR command line to link with this library. See \fBlibiscsit\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3KSTAT)\fR
.ad
.sp .6
.RS 4n
These functions constitute the kernel statistics library, which is implemented
as a shared object, \fBlibkstat.so\fR, but is not automatically linked by the C
compilation system. Specify \fB-lkstat\fR on the \fBcc\fR command line to link
with this library. See \fBlibkstat\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3KVM)\fR
.ad
.sp .6
.RS 4n
These functions allow access to the kernel's virtual memory library, which is
implemented as a shared object, \fBlibkvm.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lkvm\fR on the \fBcc\fR command
line to link with this library. See \fBlibkvm\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3LAYOUT)\fR
.ad
.sp .6
.RS 4n
These functions constitute the layout service library, which is implemented as
a shared object, \fBliblayout.so\fR, but is not automatically linked by the C
compilation system. Specify \fB-llayout\fR on the \fBcc\fR command line to link
with this library. See \fBliblayout\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3LGRP)\fR
.ad
.sp .6
.RS 4n
These functions constitute the locality group library, which is implemented as
a shared object, \fBliblgrp.so\fR, but is not automatically linked by the C
compilation system. Specify \fB-llgrp\fR on the \fBcc\fR command line to link
with this library. See \fBliblgrp\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3M)\fR
.ad
.sp .6
.RS 4n
These functions constitute the mathematical library, \fBlibm\fR. This library
is implemented as a shared object, \fBlibm.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lm\fR on the \fBcc\fR command
line to link with this library. See \fBlibm\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3MAIL)\fR
.ad
.sp .6
.RS 4n
These functions constitute the user mailbox management library, \fBlibmail\fR.
This library is implemented as a shared object, \fBlibmail.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lmail\fR on the
\fBcc\fR command line to link with this library. See \fBlibmail\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3MP)\fR
.ad
.sp .6
.RS 4n
These functions constitute the integer mathematical library, \fBlibmp\fR. This
library is implemented as a shared object, \fBlibmp.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lmp\fR on the
\fBcc\fR command line to link with this library. See \fBlibmp\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3MPAPI)\fR
.ad
.sp .6
.RS 4n
These functions constitute the Common Mulitipath Management library,
\fBlibMPAPI\fR. This library is implemented as a shared object,
\fBlibMPAPI.so\fR, but is not automatically linked by the C compilation system.
Specify \fB-lMPAPI\fR on the \fBcc\fR command line to link with this library.
See \fBlibMPAPI\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3MVEC)\fR
.ad
.sp .6
.RS 4n
These functions constitute the vector mathematical library, \fBlibmvec\fR. This
library is implemented as a shared object, \fBlibmvec.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lmvec\fR on the
\fBcc\fR command line to link with this library. See \fBlibmvec\fR(3LIB).
.RE

.SS "Extended Library Functions, Vol. 3"
.sp
.LP
The functions described in this volume comprise the following specialized
libraries:
.sp
.ne 2
.mk
.na
\fB(3NVPAIR)\fR
.ad
.sp .6
.RS 4n
These functions constitute the name-value pair library, \fBlibnvpair\fR. This
library is implemented as a shared object, \fBlibnvpair.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lnvpair\fR on the
\fBcc\fR command line to link with this library. See \fBlibnvpair\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3PAM)\fR
.ad
.sp .6
.RS 4n
These functions constitute the pluggable uuthentication module library,
\fBlibpam\fR. This library is implemented as a shared object, \fBlibpam.so\fR,
but is not automatically linked by the C compilation system. Specify
\fB-lpam\fR on the \fBcc\fR command line to link with this library. See
\fBlibpam\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3PAPI)\fR
.ad
.sp .6
.RS 4n
These functions constitute the Free Standards Group Open Printing API (PAPI)
library, \fBlibpapi\fR. This library is implemented as a shared object,
\fBlibpapi.so\fR, but is not automatically linked by the C compilation system.
Specify \fB-lpapi\fR on the \fBcc\fR command line to link with this library.
See \fBlibpapi\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3PICL)\fR
.ad
.sp .6
.RS 4n
These functions constitute the PICL library, \fBlibpicl\fR. This library is
implemented as a shared object, \fBlibpicl.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lpicl\fR on the \fBcc\fR
command line to link with this library. See \fBlibpicl\fR(3LIB) and
\fBlibpicl\fR(3PICL).
.RE

.sp
.ne 2
.mk
.na
\fB(3PICLTREE)\fR
.ad
.sp .6
.RS 4n
These functions constitute the PICL plug-in library, \fBlibpicltree\fR. This
library is implemented as a shared object, \fBlibpicltree.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lpicltree\fR on
the \fBcc\fR command line to link with this library. See
\fBlibpicltree\fR(3LIB) and \fBlibpicltree\fR(3PICLTREE).
.RE

.sp
.ne 2
.mk
.na
\fB(3POOL)\fR
.ad
.sp .6
.RS 4n
These functions constitute the pool configuration manipulation library,
\fBlibpool\fR. This library is implemented as a shared object,
\fBlibpool.so\fR, but is not automatically linked by the C compilation system.
Specify \fB-lpool\fR on the \fBcc\fR command line to link with this library.
See \fBlibpool\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3PROJECT)\fR
.ad
.sp .6
.RS 4n
These functions constitute the project database access library,
\fBlibproject\fR. This library is implemented as a shared object,
\fBlibproject.so\fR, but is not automatically linked by the C compilation
system. Specify \fB-lproject\fR on the \fBcc\fR command line to link with this
library. See \fBlibproject\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3RSM)\fR
.ad
.sp .6
.RS 4n
These functions constitute the remote shared memory library, \fBlibrsm\fR. This
library is implemented as a shared object, \fBlibrsm.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lrsm\fR on the
\fBcc\fR command line to link with this library. See \fBlibrsm\fR(3LIB).
.RE

.SS "Extended Library Functions, Vol. 4"
.sp
.LP
The functions described in this volume comprise the following specialized
libraries:
.sp
.ne 2
.mk
.na
\fB(3SCF)\fR
.ad
.sp .6
.RS 4n
These functions constitute the object-caching memory allocation library,
\fBlibscf\fR. This library is implemented as a shared object, \fBlibscf.so\fR,
but is not automatically linked by the C compilation system. Specify
\fB-lscf\fR on the \fBcc\fR command line to link with this library. See
\fBlibscf\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3SEC)\fR
.ad
.sp .6
.RS 4n
These functions constitute the file access control library, \fBlibsec\fR. This
library is implemented as a shared object, \fBlibsec.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lsec\fR on the
\fBcc\fR command line to link with this library. See \fBlibsec\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3SECDB)\fR
.ad
.sp .6
.RS 4n
These functions constitute the security attributes database library,
\fBlibsecdb\fR. This library is implemented as a shared object,
\fBlibsecdb.so\fR, but is not automatically linked by the C compilation system.
Specify \fB-lsecdb\fR on the \fBcc\fR command line to link with this library.
See \fBlibsecdb\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3SMARTCARD)\fR
.ad
.sp .6
.RS 4n
These functions constitute the smartcard library, \fBlibsmartcard\fR. This
library is implemented as a shared object, \fBlibsmartcard.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lsmartcard\fR on
the \fBcc\fR command line to link with this library. See
\fBlibsmartcard\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3SNMP)\fR
.ad
.sp .6
.RS 4n
These functions constitute the SNMP libraries, \fBlibssagent\fR and
\fBlibssasnmp\fR. These libraries are implemented as shared objects,
\fBlibssagent.so\fR and \fBlibssasnmp.so\fR, respectively, but are not
automatically linked by the C compilation system. Specify \fB-lssagent\fR or
\fB-lssasnmp\fR on the \fBcc\fR command line to link with these libraries. See
\fBlibssagent\fR(3LIB) and \fBlibssasnmp\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3STMF)\fR
.ad
.sp .6
.RS 4n
These functions constitute the SCSI Target Mode Framework library,
\fBlibstmf\fR. This library is implemented as a shared object,
\fBlibstmf.so\fR, but is not automatically linked by the C compilation system.
Specify \fB-lstmf\fR on the \fBcc\fR command line to link with this library.
See \fBlibstmf\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3SYSEVENT)\fR
.ad
.sp .6
.RS 4n
These functions constitute the system event library, \fBlibsysevent\fR. This
library is implemented as a shared object, \fBlibsysevent.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lsysevent\fR on
the \fBcc\fR command line to link with this library. See
\fBlibsysevent\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3TECLA)\fR
.ad
.sp .6
.RS 4n
These functions constitute the interactive command-line input library,
\fBlibtecla\fR. This library is implemented as a shared object,
\fBlibtecla.so\fR, but is not automatically linked by the C compilation system.
Specify \fB-ltecla\fR on the \fBcc\fR command line to link with this library.
See \fBlibtecla\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3TNF)\fR
.ad
.sp .6
.RS 4n
These functions constitute the TNF libraries, \fBlibtnf\fR, \fBlibtnfctl\fR,
and \fBlibtnfprobe\fR. These libraries are implemented as shared objects,
\fBlibtnf.so\fR, \fBlibtnfctl.so\fR, and \fBlibtnfprobe.so\fR, respectively,
but are not automatically linked by the C compilation system. Specify
\fB-ltnf\fR, \fB-ltnfctl\fR, or \fB-ltnfprobe\fR on the \fBcc\fR command line
to link with these libraries. See \fBlibtnfctl\fR(3TNF) and
\fBlibtnfctl\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3TSOL)\fR
.ad
.sp .6
.RS 4n
These functions constitute the Trusted Extensions library, \fBlibtsol\fR, and
the Trusted Extensions network library, \fBlibtsnet\fR. These libraries are
implemented as shared objects, \fBlibtsol.so\fR and \fBlibtsnet.so\fR, but are
not automatically linked by the C compilation system. Specify \fB-ltsol\fR or
\fB-ltsnet\fR on the \fBcc\fR command line to link with these libraries. See
\fBlibtsol\fR(3LIB) and \fBlibtsnet\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3UUID)\fR
.ad
.sp .6
.RS 4n
These functions constitute the universally unique identifier library,
\fBlibuuid\fR. This library is implemented as a shared object,
\fBlibuuid.so\fR, but is not automatically linked by the C compilation system.
Specify \fB-luuid\fR on the \fBcc\fR command line to link with this library.
See \fBlibuuid\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3VOLMGT)\fR
.ad
.sp .6
.RS 4n
These functions constitute the volume management library, \fBlibvolmgt\fR. This
library is implemented as a shared object, \fBlibvolmgt.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lvolmgt\fR on the
\fBcc\fR command line to link with this library. See \fBlibvolmgt\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3WSREG)\fR
.ad
.sp .6
.RS 4n
These functions constitute the product install registry library,
\fBlibwsreg\fR. This library is implemented as a shared object,
\fBlibwsreg.so\fR, but is not automatically linked by the C compilation system.
Specify \fB-lwsreg\fR on the \fBcc\fR command line to link with this library.
See \fBlibwsreg\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3XTSOL)\fR
.ad
.sp .6
.RS 4n
These functions constitute the Trusted Extensions to the X windows library,
\fBlibXtsol\fR. This library is implemented as a shared object,
\fBlibXtsol.so\fR, but is not automatically linked by the C compilation system.
Specify \fB-lX11\fR and then \fB-lXtsol\fR on the \fBcc\fR command line to link
with this library. See \fBlibXtsol\fR(3LIB).
.RE

.SS "Multimedia Library Functions"
.sp
.ne 2
.mk
.na
\fB(3MLIB)\fR
.ad
.sp .6
.RS 4n
These functions constitute the mediaLib library, \fBlibmlib\fR. This library is
implemented as a shared object, \fBlibmlib.so\fR, but is not automatically
linked by the C compilation system. Specify \fB-lmlib\fR on the \fBcc\fR
command line to link with this library. See \fBlibmlib\fR(3LIB).
.RE

.sp
.ne 2
.mk
.na
\fB(3MMS)\fR
.ad
.sp .6
.RS 4n
These functions constitute the Media Management System library, \fBlibmms\fR.
This library is implemented as a shared object, \fBlibmms.so\fR, but is not
automatically linked by the C compilation system. Specify \fB-lmms\fR on the
\fBcc\fR command line to link with this library. See \fBlibmms\fR(3LIB).
.RE

.SH DEFINITIONS
.sp
.LP
A character is any bit pattern able to fit into a byte on the machine. In some
international languages, however, a "character" might require more than one
byte, and is represented in multi-bytes.
.sp
.LP
The null character is a character with value 0, conventionally represented in
the C language as \fB\e\|0\fR\&. A character array is a sequence of characters.
A null-terminated character array (a \fIstring\fR) 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 \fB0\fR into a pointer. C guarantees that this
value will not match that of any legitimate pointer, so many functions that
return pointers return \fINULL\fR to indicate an error. The macro \fINULL\fR is
defined in <\fBstdio.h\fR>. Types of the form \fBsize_t\fR are defined in the
appropriate headers.
.SH MULTITHREADED APPLICATIONS
.sp
.LP
Both POSIX threads and Solaris threads can be used within the same application.
Their implementations are completely compatible with each other; however, only
POSIX threads guarantee portability to other POSIX-conforming environments.
.sp
.LP
The \fBlibpthread\fR(3LIB) and \fBlibthread\fR(3LIB) libraries are implemented
as filters on \fBlibc\fR(3LIB).
.sp
.LP
When compiling a multithreaded application, the \fB-mt\fR option must be
specified on the command line.
.sp
.LP
There is no need for a multithreaded application to link with \fB-lthread\fR.
An application must link with \fB-lpthread\fR only when POSIX semantics for
\fBfork\fR(2) are desired. When an application is linked with \fB-lpthread\fR,
a call to \fBfork()\fR assumes the behavior \fBfork1\fR(2) rather than the
default behavior that forks all threads.
.sp
.LP
When compiling a POSIX-conforming application, either the \fB_POSIX_C_SOURCE\fR
or \fB_POSIX_PTHREAD_SEMANTICS\fR option must be specified on the command line.
For POSIX.1c-conforming applications, define the \fB_POSIX_C_SOURCE\fR flag to
be >= 199506L:
.sp
.in +2
.nf
\fBcc\fR \fB-mt\fR [ \fIflag\fR... ] \fIfile\fR... \fB-D_POSIX_C_SOURCE=199506L\fR \fB-lpthread\fR
.fi
.in -2

.sp
.LP
For POSIX behavior with the Solaris \fBfork()\fR and \fBfork1()\fR distinction,
compile as follows:
.sp
.in +2
.nf
\fBcc\fR \fB-mt\fR [ \fIflag\fR... ] \fIfile\fR... \fB-D_POSIX_PTHREAD_SEMANTICS\fR
.fi
.in -2

.sp
.LP
For Solaris threads behavior, compile as follows:
.sp
.in +2
.nf
\fBcc\fR \fB-mt\fR [ \fIflag\fR... ] \fIfile\fR...
.fi
.in -2

.sp
.LP
Unsafe interfaces should be called only from the main thread to ensure the
application's safety.
.sp
.LP
MT-Safe interfaces are denoted in the \fBATTRIBUTES\fR section of the functions
and libraries manual pages (see \fBattributes\fR(5)). If a manual page does not
state explicitly that an interface is MT-Safe, the user should assume that the
interface is unsafe.
.SH REALTIME APPLICATIONS
.sp
.LP
The environment variable \fBLD_BIND_NOW\fR must be set to a non-null value to
enable early binding. Refer to the "When Relocations are Processed" chapter in
\fILinker and Libraries Guide\fR for additional information.
.SH FILES
.sp
.ne 2
.mk
.na
\fB\fIINCDIR\fR\fR
.ad
.RS 15n
.rt  
usually \fB/usr/include\fR
.RE

.sp
.ne 2
.mk
.na
\fB\fILIBDIR\fR\fR
.ad
.RS 15n
.rt  
usually either \fB/lib\fR or \fB/usr/lib\fR (32-bit) or either \fB/lib/64\fR or
\fB/usr/lib/64\fR (64-bit)
.RE

.sp
.ne 2
.mk
.na
\fB\fILIBDIR\fR\fB/*.so\fR\fR
.ad
.RS 15n
.rt  
shared libraries
.RE

.SH ACKNOWLEDGMENTS
.sp
.LP
Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to
reproduce portions of its copyrighted documentation. Original documentation
from The Open Group can be obtained online at
http://www.opengroup.org/bookstore/\&.
.sp
.LP
The Institute of Electrical and Electronics Engineers and The Open Group, have
given us permission to reprint portions of their documentation.
.sp
.LP
In the following statement, the phrase ``this text'' refers to portions of the
system documentation.
.sp
.LP
Portions of this text are reprinted and reproduced in electronic form in the
SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for
Information Technology -- Portable Operating System Interface (POSIX), The Open
Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group.  In the event of
any discrepancy between these versions and the original IEEE and The Open Group
Standard, the original IEEE and The Open Group Standard is the referee
document.  The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html\&.
.sp
.LP
This notice shall appear on any product containing this material.
.SH SEE ALSO
.sp
.LP
\fBar\fR(1), \fBld\fR(1), \fBfork\fR(2), \fBstdio\fR(3C), \fBattributes\fR(5),
\fBstandards\fR(5)
.sp
.LP
\fILinker and Libraries Guide\fR
.sp
.LP
\fIPerformance Profiling Tools\fR
.sp
.LP
\fIANSI C Programmer's Guide\fR
.SH DIAGNOSTICS
.sp
.LP
For functions that return floating-point values, error handling varies
according to compilation mode. Under the \fB-Xt\fR (default) option to
\fBcc\fR, these functions return the conventional values \fB0\fR,
\fB\(+-HUGE\fR, or \fBNaN\fR when the function is undefined for the given
arguments or when the value is not representable. In the \fB-Xa\fR and
\fB-Xc\fR compilation modes, \fB\(+-HUGE_VAL\fR is returned instead of
\fB\(+-HUGE\fR\&. (\fBHUGE_VAL\fR and \fBHUGE\fR are defined in \fBmath.h\fR to
be infinity and the largest-magnitude single-precision number, respectively.)
.SH NOTES
.sp
.LP
None of the functions, external variables, or macros should be redefined in the
user's programs. Any other name can be redefined without affecting the behavior
of other library functions, but such redefinition might conflict with a
declaration in an included header.
.sp
.LP
The headers in \fIINCDIR\fR provide function prototypes (function declarations
including the types of arguments) for most of the functions listed in this
manual. Function prototypes allow the compiler to check for correct usage of
these functions in the user's program. The \fBlint\fR program checker can also
be used and will report discrepancies even if the headers are not included with
\fB#include\fR statements. Definitions for Sections 2 and 3C are checked
automatically. Other definitions can be included by using the \fB-l\fR option
to \fBlint\fR. (For example, \fB-lm\fR includes definitions for \fBlibm\fR.)
Use of \fBlint\fR is highly recommended. See the \fBlint\fR chapter in
\fIPerformance Profiling Tools\fR
.sp
.LP
Users should carefully note the difference between STREAMS and \fIstream\fR.
STREAMS is a set of kernel mechanisms that support the development of network
services and data communication drivers. It is composed of utility routines,
kernel facilities, and a set of data structures. A \fIstream\fR is a file with
its associated buffering. It is declared to be a pointer to a type \fBFILE\fR
defined in \fB<stdio.h>\fR.
.sp
.LP
In detailed definitions of components, it is sometimes necessary to refer to
symbolic names that are implementation-specific, but which are not necessarily
expected to be accessible to an application program. Many of these symbolic
names describe boundary conditions and system limits.
.sp
.LP
In this section, for readability, these implementation-specific values are
given symbolic names. These names always appear enclosed in curly brackets to
distinguish them from symbolic names of other implementation-specific constants
that are accessible to application programs by headers. These names are not
necessarily accessible to an application program through a header, although
they can be defined in the documentation for a particular system.
.sp
.LP
In general, a portable application program should not refer to these symbolic
names in its code. For example, an application program would not be expected to
test the length of an argument list given to a routine to determine if it was
greater than {\fBARG_MAX\fR}.