Cross Reference: /illumos-gate/usr/src/lib/libc/port/llib-lc
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
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
/*
* CDDL HEADER START
*
* 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]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved.
* Copyright (c) 2013 Gary Mills
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
* Copyright 2015 Circonus, Inc. All rights reserved.
* Copyright 2015 Joyent, Inc.
*/
/* LINTLIBRARY */
/* PROTOLIB1 */
#define __EXTENSIONS__
#include <aio.h>
#include <alloca.h>
#include <attr.h>
#include <atomic.h>
#include <ctype.h>
#include <deflt.h>
#include <dirent.h>
#include <dlfcn.h>
#include <door.h>
#include <err.h>
#include <sys/errno.h>
#include <euc.h>
#include <fcntl.h>
#include <float.h>
#include <fmtmsg.h>
#include <fnmatch.h>
#include <ftw.h>
#include <glob.h>
#include <getwidth.h>
#include <grp.h>
#include <iconv.h>
#include <langinfo.h>
#include <libgen.h>
#include <libw.h>
#include <locale.h>
#include <memory.h>
#include <mon.h>
#include <mqueue.h>
#include <nan.h>
#include <ndbm.h>
#include <limits.h>
#include <nl_types.h>
#include <poll.h>
#include <project.h>
#include <priv.h>
#include <pwd.h>
#include <rctl.h>
#include <regex.h>
#include <rpcsvc/ypclnt.h>
#include <sched.h>
#include <search.h>
#include <semaphore.h>
#include <setjmp.h>
#include <shadow.h>
#include <siginfo.h>
#include <signal.h>
#include <stdarg.h>
#include <ucred.h>
#include <sys/ucred.h>
#include <unistd.h>
#include <ulimit.h>
#include <utime.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stropts.h>
#include <synch.h>
#include <sys/acctctl.h>
#include <sys/acl.h>
#include <sys/asynch.h>
#include <sys/byteorder.h>
#include <sys/cladm.h>
#include <sys/corectl.h>
#include <sys/dl.h>
#include <sys/epoll.h>
#include <sys/exacct.h>
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/fs/namenode.h>
#include <sys/instance.h>
#include <sys/ipc.h>
#include <sys/lwp.h>
#include <sys/mkdev.h>
#include <sys/mman.h>
#include <sys/mnttab.h>
#include <sys/mount.h>
#include <sys/msg.h>
#include <sys/param.h>
#include <sys/priocntl.h>
#include <sys/procset.h>
#include <sys/processor.h>
#include <sys/pset.h>
#include <sys/rctl_impl.h>
#include <sys/sem.h>
#include <sys/shm.h>
#include <sys/sid.h>
#include <sys/signal.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/strlog.h>
#include <sys/stropts.h>
#include <sys/syscall.h>
#include <sys/sysconfig.h>
#include <sys/syslog.h>
#include <sys/systeminfo.h>
#include <sys/task.h>
#include <sys/termio.h>
#include <sys/termios.h>
#include <sys/u8_textprep.h>
#include <sys/time.h>
#include <sys/timeb.h>
#include <sys/times.h>
#include <sys/types.h>
#include <sys/uadmin.h>
#include <sys/utsname.h>
#include <sys/vfstab.h>
#include <sys/sendfile.h>
#include <sys/zone.h>
#include <termio.h>
#include <time.h>
#include <tzfile.h>
#include <ucontext.h>
#include <utmpx.h>
#include <values.h>
#include <wait.h>
#include <wchar.h>
#include <wctype.h>
#include <widec.h>
#include <wordexp.h>
#include <thread.h>
#include <pthread.h>
#include <schedctl.h>
#include <zone.h>
#include <port.h>
#include <spawn.h>
#include <inttypes.h>
#include <getopt.h>
#include <stdio_ext.h>
#if defined(__i386)
#include <sys/sysi86.h>
#endif
#if defined(__amd64)
#include <stack_unwind.h>
#endif
#include <xlocale.h>
/*
* This really comes from the crt*.s startup modules.
*/
char **environ;
/*
* This is a GNU/Linux/BSD compatibility interface,
* not declared in any header file.
*/
const char *__progname;
/*
* POSIX versions of standard libc routines; these aren't extracted
* from the headers above since we cannot #define _POSIX_C_SOURCE.
*/
int __posix_readdir_r(DIR * _RESTRICT_KYWD, struct dirent * _RESTRICT_KYWD,
struct dirent ** _RESTRICT_KYWD);
int __posix_getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
int __posix_getgrnam_r(const char *, struct group *, char *, size_t,
struct group **);
int __posix_getpwuid_r(uid_t, struct passwd *, char *, size_t,
struct passwd **);
int __posix_getpwnam_r(const char *, struct passwd *, char *, size_t,
struct passwd **);
int __posix_sigwait(const sigset_t * _RESTRICT_KYWD, int * _RESTRICT_KYWD);
char *__posix_asctime_r(const struct tm *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
char *__posix_ctime_r(const time_t *, char *);
int __posix_ttyname_r(int, char *, size_t);
int __posix_getlogin_r(char *, int);
int __posix_getloginx_r(char *, int);
/*
* XPG4 versions of standard libc routines; these aren't extracted
* from the headers above since we cannot #define _XPG4_2.
*/
int __xpg4_putmsg(int, const struct strbuf *, const struct strbuf *, int);
int __xpg4_putpmsg(int, const struct strbuf *, const struct strbuf *, int, int);
/*
* These aren't extracted from the headers above because:
* - We cannot #define _STRPTIME_DONTZERO
* - We cannot #define _XPG5
*/
char *__strptime_dontzero(const char *, const char *, struct tm *);
long __sysconf_xpg5(int);
wchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD,
const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
size_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t,
const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD);
wint_t __fgetwc_xpg5(__FILE *);
wint_t __getwc_xpg5(__FILE *);
wint_t __getwchar_xpg5(void);
wint_t __fputwc_xpg5(wint_t, __FILE *);
wint_t __putwc_xpg5(wint_t, __FILE *);
wint_t __putwchar_xpg5(wint_t);
wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD);
int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
wint_t __ungetwc_xpg5(wint_t, __FILE *);
/*
* /usr/src/lib/libc/port/gen routines
*/
/* _ctype.c */
/* _loc_data.c */
/* _locale.c */
/* _set_tab.c */
int _set_tab(const char *loc, int cat);
/* _xftw.c */
int _xftw(int ver, const char *path, int (*fn)(), int depth);
/* a64l.c */
long a64l(const char *);
/* abort.c */
void abort(void);
/* abs.c */
int abs(int arg);
long labs(long int arg);
/* assert.c */
void _assert(const char *assertion, const char *filename, int line_num);
void __assert_c99(const char *assertion, const char *filename, int line_num,
const char *funcname);
/* atexit.c */
int atexit(void(*func)());
void _exithandle(void);
/* atof.c */
double atof(const char *p);
/* atoi.c */
int atoi(const char *p);
/* atol.c */
long atol(const char *p);
/* basename.c */
char *basename(char *s);
/* bcmp.c */
int bcmp(const void *s1, const void *s2, size_t len);
/* bcopy.c */
void bcopy(const void *s1, void *s2, size_t len);
/* bsearch.c */
void *bsearch(const void *ky, const void *bs, size_t nel,
size_t width, int (*compar)());
/* bzero.c */
void bzero(void *sp, size_t len);
/* calloc.c */
void *calloc(size_t num, size_t size);
/* catclose.c */
int catclose(nl_catd catd);
/* catgets.c */
char *catgets(nl_catd catd, int set_num, int msg_num, const char *s);
/* catopen.c */
nl_catd catopen(const char *name, int mode);
/* cfgetispeed.c */
speed_t cfgetispeed(const struct termios *termios_p);
/* cfgetospeed.c */
speed_t cfgetospeed(const struct termios *termios_p);
/* cfree.c */
void cfree(void *p, size_t num, size_t size);
/* cfsetispeed.c */
int cfsetispeed(struct termios *termios_p, speed_t speed);
/* cfsetospeed.c */
int cfsetospeed(struct termios *termios_p, speed_t speed);
/* cftime.c */
int cftime(char *buf, char *format, const time_t *t);
int ascftime(char *buf, const char *format, const struct tm *tm);
/* clock.c */
clock_t clock(void);
/* closedir.c */
int closedir(DIR *dirp);
/* confstr.c */
size_t confstr(int name, char *buf, size_t length);
/* crypt.c */
void setkey(const char *key);
void encrypt(char *block, int fake);
char *crypt(const char *key, const char *salt);
/* csetlen.c */
int csetlen(int cset);
int csetcol(int cset);
/* ctime.c */
char *ctime(const time_t *t);
char *ctime_r(const time_t *, char *buf, int);
char *asctime(const struct tm *t);
char *asctime_r(const struct tm *, char *, int);
/* ctypefcns.c */
int isalpha(int c);
int isupper(int c);
int islower(int c);
int isdigit(int c);
int isxdigit(int c);
int isalnum(int c);
int isspace(int c);
int ispunct(int c);
int isprint(int c);
int isgraph(int c);
int iscntrl(int c);
int isascii(int c);
int _toupper(int c);
int _tolower(int c);
int toascii(int c);
/* daemon.c */
int daemon(int nochdir, int noclose);
/* directio.c */
int directio(int filedes, int advice);
/* dirname.c */
char *dirname(char *s);
/* div.c */
div_t div(int numer, int denom);
ldiv_t ldiv(long int numer, long int denom);
/* drand48.c */
double drand48(void);
double erand48(unsigned short *xsubi);
long krand48(unsigned short *xsubi, unsigned int m);
long lrand48(void);
long mrand48(void);
void srand48(long seedval);
unsigned short *seed48(unsigned short seed16v[3]);
void lcong48(unsigned short param[7]);
long nrand48(unsigned short *xsubi);
long jrand48(unsigned short *xsubi);
/* dup.c */
int dup(int fildes);
int dup2(int fildes, int fildes2);
int dup3(int fildes, int fildes2, int flags);
/* ecvt.c */
char *ecvt(double value, int ndigit, int *_RESTRICT_KYWD decpt,
int *_RESTRICT_KYWDsign);
char *fcvt(double value, int ndigit, int *_RESTRICT_KYWD decpt,
int *_RESTRICT_KYWD sign);
/* err.c */
void _errfp(FILE *, int, const char *, ...);
void _verrfp(FILE *, int, const char *, va_list);
void _errxfp(FILE *, int, const char *, ...);
void _verrxfp(FILE *, int, const char *, va_list);
void _warnfp(FILE *, const char *, ...);
void _vwarnfp(FILE *, const char *, va_list);
void _warnxfp(FILE *, const char *, ...);
void _vwarnxfp(FILE *, const char *, va_list);
/* errlst.c */
/* euclen.c */
int euccol(const unsigned char *s);
int euclen(const unsigned char *s);
int eucscol(const unsigned char *s);
/* execvp.c */
/* VARARGS1 */
int execlp(const char *, const char *, ...);
int execvp(const char *name, char *const *argv);
/* fattach.c */
int fattach(int fildes, const char *path);
/* fdetach.c */
int fdetach(const char *path);
/* ffs.c */
int ffs(int field);
/* flock.c */
int flock(int filedes, int operation);
/* fmtmsg.c */
int addseverity(int value, const char *string);
int fmtmsg(long class, const char *label, int severity, const char *text,
const char *action, const char *tag);
/* ftime.c */
int ftime(struct timeb *tp);
/* ftok.c */
key_t ftok(const char *path, int id);
/* gcvt.c */
char *gcvt(double number, int ndigit, char *buf);
/* getcwd.c */
char *getcwd(char *str, size_t size);
/* getdate.c */
struct tm *getdate(const char *expression);
#ifdef getdate_err
#undef getdate_err
#endif
int getdate_err;
/* getdate_data.c */
/* getdate_gd.c */
/* getdtblsize.c */
int getdtablesize(void);
/* getenv.c */
char *getenv(const char *name);
/* getexecname.c */
const char *getexecname(void);
/* getgrnam.c */
struct group *getgrnam(const char *name);
struct group *getgrgid(gid_t gid);
struct group *fgetgrent_r(FILE *, struct group *, char *, int);
struct group *getgrent_r(struct group *, char *, int);
struct group *getgrgid_r(gid_t, struct group *, char *, int);
struct group *getgrnam_r(const char *, struct group *, char *, int);
/* gethostid.c */
long gethostid(void);
/* gethz.c */
int gethz(void);
/* getisax.c */
uint_t getisax(uint32_t *, uint_t);
/* getlogin.c */
char *getloginx(void);
char *getloginx_r(char *, int);
#ifdef getlogin
#undef getlogin
#endif /* getlogin */
char *getlogin(void);
#ifdef getlogin_r
#undef getlogin_r
#endif /* getlogin_r */
char *getlogin_r(char *, int);
/* getmntent.c */
int getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp);
int getmntent(FILE *fd, struct mnttab *mp);
/* getnetgrent.c */
int setnetgrent(const char *grp);
int endnetgrent(void);
int getnetgrent(char **machinep, char **namep, char **domainp);
/* getopt.c */
int getopt(int argc, char *const *argv, const char *opts);
/* getopt_long.c */
int getopt_clip(int argc, char *const *argv, const char *optstring,
const struct option *long_options, int *long_index);
int getopt_long(int argc, char *const *argv, const char *optstring,
const struct option *long_options, int *long_index);
int getopt_long_only(int argc, char *const *argv, const char *optstring,
const struct option *long_options, int *long_index);
/* getpagesize.c */
int getpagesize(void);
/* getpw.c */
int getpw(uid_t uid, char *buf);
/* getpwnam.c */
struct passwd *getpwnam(const char *name);
struct passwd *getpwuid(uid_t uid);
struct passwd *fgetpwent_r(FILE *, struct passwd *, char *, int);
struct passwd *getpwent_r(struct passwd *, char *, int);
struct passwd *getpwnam_r(const char *, struct passwd *, char *, int);
struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int);
/* getrusage.c */
int getrusage(int who, struct rusage *rusage);
/* gettimeofday.c */
int gettimeofday(struct timeval *_RESTRICT_KYWD tp, void *_RESTRICT_KYWD);
/* getspent.c */
void setspent(void);
void endspent(void);
struct spwd *getspent(void);
struct spwd *getspent_r(struct spwd *, char *, int);
struct spwd *fgetspent(FILE *f);
struct spwd *fgetspent_r(FILE *, struct spwd *, char *, int);
struct spwd *getspnam(const char *name);
struct spwd *getspnam_r(const char *, struct spwd *, char *, int);
int putspent(const struct spwd *p, FILE *f);
/* getspent_r.c */
int str2spwd(const char *, int, void *, char *, int);
/* getsubopt.c */
int getsubopt(char **optionsp, char *const *tokens, char **valuep);
/* gettxt.c */
char *gettxt(const char *msg_id, const char *dflt_str);
/* getusershell.c */
char *getusershell(void);
void endusershell(void);
void setusershell(void);
/* getut.c */
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *entry);
struct utmp *getutline(const struct utmp *entry);
struct utmp *pututline(const struct utmp *entry);
void setutent(void);
void endutent(void);
int utmpname(const char *newfile);
void updwtmp(const char *file, struct utmp *ut);
void getutmp(const struct utmpx *utx, struct utmp *ut);
void getutmpx(const struct utmp *ut, struct utmpx *utx);
struct utmp *makeut(struct utmp *utmp);
/* getutx.c */
struct utmpx *getutxent(void);
struct utmpx *getutxid(const struct utmpx *entry);
struct utmpx *getutxline(const struct utmpx *entry);
struct utmpx *pututxline(const struct utmpx *entry);
void setutxent(void);
void endutxent(void);
int utmpxname(const char *newfile);
void updwtmpx(const char *filex, struct utmpx *utx);
struct utmpx *makeutx(const struct utmpx *utmp);
struct utmpx *modutx(const struct utmpx *utp);
/* getvfsent.c */
int getvfsspec(FILE *fd, struct vfstab *vp, char *special);
int getvfsfile(FILE *fd, struct vfstab *vp, char *mountp);
int getvfsany(FILE *fd, struct vfstab *vgetp, struct vfstab *vrefp);
int getvfsent(FILE *fd, struct vfstab *vp);
/* getwd.c */
char *getwd(char *pathname);
/* getwidth.c */
void getwidth(eucwidth_t *eucstruct);
/* hsearch.c */
int hcreate(size_t size);
void hdestroy(void);
ENTRY *hsearch(ENTRY item, ACTION action);
/* iconv.c */
size_t iconv(iconv_t cd, const char **_RESTRICT_KYWD inbuf,
size_t *_RESTRICT_KYWD inbytesleft, char **_RESTRICT_KYWD outbuf,
size_t *_RESTRICT_KYWD outbytesleft);
int iconv_close(iconv_t cd);
iconv_t iconv_open(const char *tocode, const char *fromcode);
/* imaxabs.c */
intmax_t imaxabs(intmax_t j);
/* imaxdiv.c */
imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
/* index.c */
char *index(const char *sp, int c);
/* initgroups.c */
int initgroups(const char *uname, gid_t agroup);
/* innetgr.c */
int innetgr(const char *group, const char *machine, const char *name,
const char *domain);
/* insque.c */
void insque(void *elem, void *pred);
void remque(void *elem);
/* isaexec.c */
int isaexec(const char *, char *const *, char *const *);
/* isastream.c */
int isastream(int fd);
/* isatty.c */
int isatty(int f);
/* killpg.c */
int killpg(pid_t pgrp, int sig);
/* l64a.c */
char *l64a(long lg);
/* lckpwdf.c */
int lckpwdf(void);
int ulckpwdf(void);
/* lfind.c */
void * lfind(const void *ky, const void *bs, size_t *nelp,
size_t width, int (*compar)());
/* localeconv.c */
struct lconv *localeconv(void);
/* lsearch.c */
void * lsearch(const void *ky, void *bs, size_t *nelp,
size_t width, int (*compar)());
/* madvise.c */
int madvise(caddr_t addr, size_t len, int advice);
/* malloc.c */
void *malloc(size_t size);
void *realloc(void *old, size_t size);
void free(void *old);
/* mbstowcs.c */
size_t mbstowcs(wchar_t *_RESTRICT_KYWD pwcs, const char *_RESTRICT_KYWD s,
size_t n);
/* mbtowc.c */
int mbtowc(wchar_t *_RESTRICT_KYWD wchar, const char *_RESTRICT_KYWD s,
size_t n);
int mblen(const char *s, size_t n);
/* memalign.c */
void *memalign(size_t align, size_t nbytes);
/* memccpy.c */
void *memccpy(void *_RESTRICT_KYWDs, const void *_RESTRICT_KYWD s0, int c,
size_t n);
/* memchr.c */
void *memchr(const void *sptr, int c1, size_t n);
/* memcmp.c */
int memcmp(const void *s1, const void *s2, size_t n);
/* memcpy.c */
void *memcpy(void *_RESTRICT_KYWD s, const void *_RESTRICT_KYWD s0, size_t n);
/* memmove.c */
void *memmove(void *s, const void *s0, size_t n);
/* memset.c */
void *memset(void *sp1, int c, size_t n);
/* mkdev.c */
dev_t __makedev(const int version, const major_t majdev,
const minor_t mindev);
major_t __major(const int version, const dev_t devnum);
minor_t __minor(const int version, const dev_t devnum);
/* mkfifo.c */
int mkfifo(const char *path, mode_t mode);
/* mktemp.c */
char *mktemp(char *as);
/* mlock.c */
int mlock(caddr_t addr, size_t len);
/* mlockall.c */
int mlockall(int flags);
/* mon.c */
void monitor(int (*alowpc)(), int (*ahighpc)(), WORD *buffer,
size_t bufsize, size_t nfunc);
/* msync.c */
int msync(caddr_t addr, size_t len, int flags);
/* munlock.c */
int munlock(caddr_t addr, size_t len);
/* munlockall.c */
int munlockall(void);
/* ndbm.c */
void dbm_setdefwrite(DBM *db);
int dbm_flush(DBM *db);
int dbm_flushpag(DBM *db);
DBM *dbm_open(const char *file, int flags, mode_t mode);
void dbm_close(DBM *db);
int dbm_close_status(DBM *db);
datum dbm_fetch(DBM *db, datum key);
int dbm_delete(DBM *db, datum key);
int dbm_store(DBM *db, datum key, datum dat, int replace);
datum dbm_firstkey(DBM *db);
datum dbm_nextkey(DBM *db);
datum dbm_do_nextkey(DBM *db, datum inkey);
/* new_list.c */
/* nftw.c */
int nftw(const char *path, int (*fn)(), int depth, int flags);
/* nl_langinfo.c */
char *nl_langinfo(nl_item item);
/* opendir.c */
DIR *opendir(const char *filename);
/* opt_data.c */
/* perror.c */
void perror(const char *s);
/* pipe.c */
int pipe(int *fds);
/* psiginfo.c */
void psiginfo(const siginfo_t *sip, const char *s);
/* psignal.c */
void psignal(int sig, const char *s);
/* pt.c */
char *ptsname(int fd);
int unlockpt(int fd);
int grantpt(int fd);
/* putenv.c */
int putenv(char *change);
int setenv(const char *envname, const char *envval, int overwrite);
int unsetenv(const char *name);
/* putpwent.c */
int putpwent(const struct passwd *p, FILE *f);
/* qsort.c */
void qsort(void *base, size_t n, size_t size, int (*compar)());
/* raise.c */
int raise(int sig);
/* rand.c */
void srand(unsigned x);
int rand(void);
int rand_r(unsigned int *);
/* random.c */
void srandom(unsigned x);
char *initstate(unsigned seed, char *arg_state, size_t n);
char *setstate(const char *arg_state);
long random(void);
/* rctlops.c */
int rctl_walk(int (*callback)(const char *, void *), void *walk_data);
hrtime_t rctlblk_get_firing_time(rctlblk_t *rblk);
uint_t rctlblk_get_global_action(rctlblk_t *rblk);
uint_t rctlblk_get_global_flags(rctlblk_t *rblk);
uint_t rctlblk_get_local_action(rctlblk_t *rblk, int *signalp);
uint_t rctlblk_get_local_flags(rctlblk_t *rblk);
id_t rctlblk_get_recipient_pid(rctlblk_t *rblk);
rctl_priv_t rctlblk_get_privilege(rctlblk_t *rblk);
rctl_qty_t rctlblk_get_value(rctlblk_t *rblk);
void rctlblk_set_local_action(rctlblk_t *rblk, uint_t action, int signal);
void rctlblk_set_local_flags(rctlblk_t *rblk, uint_t flags);
void rctlblk_set_privilege(rctlblk_t *rblk, rctl_priv_t priv);
void rctlblk_set_value(rctlblk_t *rblk, rctl_qty_t val);
size_t rctlblk_size(void);
/* readdir.c */
struct dirent *readdir(DIR *dirp);
/* realpath.c */
char *realpath(const char *_RESTRICT_KYWD raw, char *_RESTRICT_KYWD canon);
/* regexpr.c */
char *re_comp(const char *sp);
int re_exec(const char *p1);
/* rindex.c */
char *rindex(const char *sp, int c);
/* rename.c */
int remove(const char *filename);
int rename(const char *old, const char *new);
/* rewinddir.c */
#undef rewinddir
void rewinddir(DIR *dirp);
/* scandir.c */
int alphasort(const struct dirent **, const struct dirent **);
int scandir(const char *dirname, struct dirent *(*namelist[]),
int (*select)(const struct dirent *),
int (*dcomp)(const struct dirent **, const struct dirent **));
/* scrwidth.c */
int scrwidth(wchar_t c);
/* seekdir.c */
void seekdir(DIR *dirp, long loc);
/* select.c */
int pselect(int nfds,
fd_set *_RESTRICT_KYWD readfds,
fd_set *_RESTRICT_KYWD writefds,
fd_set *_RESTRICT_KYWD errorfds,
const struct timespec *_RESTRICT_KYWD timeout,
const sigset_t *_RESTRICT_KYWD sigmask);
int select(int nfds,
fd_set *_RESTRICT_KYWD readfds,
fd_set *_RESTRICT_KYWD writefds,
fd_set *_RESTRICT_KYWD errorfds,
struct timeval *_RESTRICT_KYWD timeout);
/* setlocale.c */
char *setlocale(int cat, const char *loc);
/* setpriority.c */
int getpriority(int which, id_t who);
int setpriority(int which, id_t who, int prio);
/* settimeofday.c */
int settimeofday(struct timeval *tp, void *);
/* sigflag.c */
int sigflag(int sig, int flag, int on);
/* siglist.c */
/* sigsend.c */
int sigsend(idtype_t idtype, id_t id, int sig);
/* sigsetops.c */
int sigfillset(sigset_t *set);
int sigemptyset(sigset_t *set);
int sigaddset(sigset_t *set, int sig);
int sigdelset(sigset_t *set, int sig);
int sigismember(const sigset_t *set, int sig);
/* scalls.c */
unsigned sleep(unsigned sleep_tm);
/* ssignal.c */
int (*ssignal(int sig, int (*fn)())) ();
int gsignal(int sig);
/* str2id.c */
/* str2sig.c */
int str2sig(const char *s, int *sigp);
int sig2str(int i, char *s);
/* strcat.c */
char *strcat(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2);
/* strchr.c */
char *strchr(const char *sp, int c);
/* strcmp.c */
int strcmp(const char *s1, const char *s2);
/* strcpy.c */
char *strcpy(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2);
/* strcspn.c */
size_t strcspn(const char *string, const char *charset);
/* strdup.c */
char *strdup(const char *s1);
/* strerror.c */
char *strerror(int errnum);
int strerror_r(int errnum, char *strerrbuf, size_t buflen);
/* strftime.c */
size_t strftime(char *_RESTRICT_KYWD s, size_t maxsize,
const char *_RESTRICT_KYWD format,
const struct tm *_RESTRICT_KYWD tm);
/* strlen.c */
size_t strlen(const char *s);
/* strncat.c */
char *strncat(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n);
/* strncmp.c */
int strncmp(const char *s1, const char *s2, size_t n);
/* strncpy.c */
char *strncpy(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n);
/* strpbrk.c */
char *strpbrk(const char *string, const char *brkset);
/* strrchr.c */
char *strrchr(const char *sp, int c);
/* strsep.c */
char *strsep(char **stringp, const char *delim);
/* strspn.c */
size_t strspn(const char *string, const char *charset);
/* strstr.c */
char *strstr(const char *as1, const char *as2);
/* strtod.c */
double strtod(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
float strtof(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
long double strtold(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
/* strtoimax.c */
intmax_t strtoimax(const char *_RESTRICT_KYWD nptr,
char **_RESTRICT_KYWD endptr, int base);
/* strtok.c */
char *strtok(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD sepset);
char *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
char **_RESTRICT_KYWD);
/* strtol.c */
long strtol(const char *_RESTRICT_KYWD str, char **_RESTRICT_KYWD nptr,
int base);
/* strtoul.c */
unsigned long strtoul(const char *_RESTRICT_KYWD str,
char **_RESTRICT_KYWD nptr, int base);
/* strtoumax.c */
uintmax_t strtoumax(const char *_RESTRICT_KYWD nptr,
char **_RESTRICT_KYWD endptr, int base);
/* strxfrm.c */
size_t strxfrm(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2,
size_t n);
int strcoll(const char *s1, const char *s2);
/* swab.c */
void swab(const char *_RESTRICT_KYWD from, char *_RESTRICT_KYWD to, ssize_t n);
/* swapctl.c */
int swapctl(int cmd, void *arg);
/* sysconf.c */
long sysconf(int name);
/* syslog.c */
/* VARARGS2 */
void syslog(int pri, const char *fmt, ...);
void vsyslog(int pri, const char *fmt, va_list ap);
void openlog(const char *ident, int logstat, int logfac);
void closelog(void);
int setlogmask(int pmask);
/* tcdrain.c */
int tcdrain(int fildes);
/* tcflow.c */
int tcflow(int fildes, int action);
/* tcflush.c */
int tcflush(int fildes, int queue_selector);
/* tcgetattr.c */
int tcgetattr(int fildes, struct termios *termios_p);
/* tcgetpgrp.c */
pid_t tcgetpgrp(int fd);
/* tcgetsid.c */
pid_t tcgetsid(int fd);
/* tcsendbreak.c */
int tcsendbreak(int fildes, int duration);
/* tcsetattr.c */
int tcsetattr(int fildes, int optional_actions,
const struct termios *termios_p);
/* tcsetpgrp.c */
int tcsetpgrp(int fd, pid_t pgrp);
/* tell.c */
long tell(int f);
/* telldir.c */
long telldir(DIR *dirp);
/* tfind.c */
void *tfind(const void *ky, void *const *rtp, int (*compar)());
/* time_comm.c */
struct tm *localtime(const time_t *timep);
struct tm *localtime_r(const time_t *_RESTRICT_KYWD, struct tm *_RESTRICT_KYWD);
struct tm *gmtime(const time_t *clock);
struct tm *gmtime_r(const time_t *_RESTRICT_KYWD, struct tm *_RESTRICT_KYWD);
double difftime(time_t time1, time_t time0);
time_t mktime(struct tm *timeptr);
void _ltzset(time_t tim);
void tzset(void);
/* time_data.c */
/* time_gdata.c */
/* tolower.c */
int tolower(int c);
/* toupper.c */
int toupper(int c);
/* truncate.c */
int ftruncate(int fildes, off_t len);
int truncate(const char *path, off_t len);
/* tsearch.c */
void *tsearch(const void *ky, void **rtp, int (*compar)());
void *tdelete(const void *ky, void **rtp, int (*compar)());
void twalk(const void *rt, void (*action)());
/* ttyname.c */
char *ttyname(int f);
char *_ttyname_dev(dev_t rdev, char *buffer, size_t buflen);
char *ttyname_r(int, char *, int);
/* ttyslot.c */
int ttyslot(void);
/* ualarm.c */
unsigned ualarm(unsigned usecs, unsigned reload);
/* ulimit.c */
/* VARARGS1 */
long ulimit(int cmd, ...);
/* scalls.c */
int usleep(unsigned n);
/* valloc.c */
void *valloc(size_t size);
/* waitpid.c */
pid_t wait(int *stat_loc);
pid_t waitpid(pid_t pid, int *stat_loc, int options);
pid_t wait3(int *status, int options, struct rusage *rp);
pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage);
/* wcstombs.c */
size_t wcstombs(char *_RESTRICT_KYWD s, const wchar_t *_RESTRICT_KYWD pwcs,
size_t n);
/* wctomb.c */
int wctomb(char *s, wchar_t wchar);
/* wdata.c */
/* wisprint.c */
int wisprint(wchar_t c);
/* xgetwidth.c */
void _xgetwidth(void);
/*
* /usr/src/lib/libc/port/intl routines
*/
/* gettext.c */
char *bindtextdomain(const char *domain, const char *binding);
char *dcgettext(const char *domain, const char *msg_id, const int category);
char *dgettext(const char *domain, const char *msg_id);
char *gettext(const char *msg_id);
char *textdomain(const char *domain);
/*
* /usr/src/lib/libc/port/print routines
*/
/* fprintf.c */
/* VARARGS2 */
int fprintf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD format, ...);
/* printf.c */
/* VARARGS1 */
int printf(const char *_RESTRICT_KYWD format, ...);
/* snprintf.c */
/* VARARGS2 */
int snprintf(char *_RESTRICT_KYWD string, size_t n,
const char *_RESTRICT_KYWD format, ...);
/* sprintf.c */
/* VARARGS2 */
int sprintf(char *_RESTRICT_KYWD string,
const char *_RESTRICT_KYWD format, ...);
/* vfprintf.c */
/* VARARGS2 */
int vfprintf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD format,
va_list);
/* vprintf.c */
/* VARARGS1 */
int vprintf(const char *_RESTRICT_KYWD format, va_list);
/* vsnprintf.c */
/* VARARGS2 */
int vsnprintf(char *_RESTRICT_KYWD string, size_t n,
const char *_RESTRICT_KYWD format, va_list);
/* vsprintf.c */
/* VARARGS2 */
int vsprintf(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD format,
va_list);
/*
* /usr/src/lib/libc/port/regex routines
*/
/* glob.c */
extern int glob(const char *restrict pattern, int flags,
int(*errfunc)(const char *epath, int eerrno), glob_t *restrict pglob);
extern void globfree(glob_t *pglob);
/* regex.c */
char *regex(const char *regexp, const char *stringp, ...);
#ifdef __loc1
#undef __loc1
#endif
char *__loc1;
/* regcmp.c */
char *regcmp(const char *regexp, ...);
#ifdef __i_size
#undef __i_size
#endif
int __i_size;
/*
* /usr/src/lib/libc/port/stdio routines
*/
/* _filbuf.c */
int _filbuf(FILE *iop);
/* _flsbuf.c */
int _flsbuf(int ch, FILE *iop);
/* _wrtchk.c */
int _wrtchk(FILE *iop);
/* clearerr.c */
void clearerr(FILE *iop);
/* ctermid.c */
char *ctermid(char *s);
char *ctermid_r(char *s);
/* cuserid.c */
char *cuserid(char *s);
/* data.c */
/* doscan.c */
int _doscan(FILE *iop, const char *fmt, va_list va_alist);
/* fdopen.c */
FILE *fdopen(int fd, const char *type);
/* feof.c */
int feof(FILE *iop);
/* ferror.c */
int ferror(FILE *iop);
/* fgetc.c */
int fgetc(FILE *iop);
/* fgets.c */
char *fgets(char *_RESTRICT_KYWD buf, int size, FILE *_RESTRICT_KYWD iop);
/* fileno.c */
int _fileno(FILE *iop);
/* flush.c */
void _cleanup(void);
FILE *_findiop(void);
typedef unsigned char Uchar;
void _setbufend(FILE *iop, Uchar *end);
Uchar *_realbufend(FILE *iop);
void _bufsync(FILE *iop, Uchar *bufend);
int _xflsbuf(FILE *iop);
int fflush(FILE *iop);
int fclose(FILE *iop);
/* fopen.c */
FILE *fopen(const char *_RESTRICT_KYWD name, const char *_RESTRICT_KYWD type);
FILE *freopen(const char *_RESTRICT_KYWD name, const char *_RESTRICT_KYWD type,
FILE *_RESTRICT_KYWD iop);
/* fpos.c */
int fgetpos(FILE *_RESTRICT_KYWD stream, fpos_t *_RESTRICT_KYWD pos);
int fsetpos(FILE *stream, const fpos_t *pos);
/* fputc.c */
int fputc(int ch, FILE *iop);
/* fputs.c */
int fputs(const char *_RESTRICT_KYWD ptr, FILE *_RESTRICT_KYWD iop);
/* fread.c */
size_t fread(void *_RESTRICT_KYWD ptr, size_t size, size_t count,
FILE *_RESTRICT_KYWD iop);
/* fseek.c */
int fseek(FILE *iop, long offset, int ptrname);
/* ftell.c */
long ftell(FILE *iop);
/* fwrite.c */
size_t fwrite(const void *_RESTRICT_KYWD ptr1, size_t size, size_t count,
FILE *_RESTRICT_KYWD iop);
/* getc.c */
int getc(FILE *iop);
/* getchar.c */
int getchar(void);
/* getpass.c */
char *getpass(const char *prompt);
/* getpass.c */
char *getpassphrase(const char *prompt);
/* gets.c */
char *gets(char *buf);
/* getw.c */
int getw(FILE *stream);
/* popen.c */
FILE *popen(const char *cmd, const char *mode);
int pclose(FILE *ptr);
/* putc.c */
int putc(int ch, FILE *iop);
/* putchar.c */
int putchar(int ch);
/* puts.c */
int puts(const char *ptr);
/* putw.c */
int putw(int w, FILE *stream);
/* rewind.c */
void rewind(FILE *iop);
/* scanf.c */
/* VARARGS1 */
int scanf(const char *_RESTRICT_KYWD fmt, ...);
/* VARARGS2 */
int fscanf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD fmt, ...);
/* VARARGS2 */
int sscanf(const char *_RESTRICT_KYWD str, const char *_RESTRICT_KYWD fmt, ...);
/* setbuf.c */
void setbuf(FILE *_RESTRICT_KYWD iop, char *_RESTRICT_KYWD abuf);
/* setvbuf.c */
int setvbuf(FILE *_RESTRICT_KYWD iop, char *_RESTRICT_KYWD abuf, int type,
size_t size);
/* system.c */
int system(const char *s);
/* tempnam.c */
char *tempnam(const char *dir, const char *pfx);
/* tmpfile.c */
FILE *tmpfile(void);
/* tmpnam.c */
char *tmpnam(char *s);
char *tmpnam_r(char *);
/* ungetc.c */
int ungetc(int c, FILE *iop);
/*
* /usr/src/lib/libc/port/sys routines
*/
/* exacctsys.c */
size_t getacct(idtype_t idtype, id_t id, void *buf, size_t bufsize);
int putacct(idtype_t idtype, id_t id, void *buf, size_t bufsize, int flags);
int wracct(idtype_t idtype, id_t id, int flags);
/* execl.c */
/* VARARGS1 */
int execl(const char *name, const char *, ...);
/* execle.c */
int execle(const char *, const char *file, ...);
/* execv.c */
int execv(const char *file, char *const *argv);
/* lockf.c */
int lockf(int fildes, int function, off_t size);
/* meminfosys.c */
int meminfo(const uint64_t *inaddr, int addr_count, const uint_t *info_req,
int info_count, uint64_t *outdata, uint_t *validity);
/* msgsys.c */
int msgget(key_t key, int msgflg);
int msgctl(int msqid, int cmd, struct msqid_ds *buf);
ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg);
int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg);
/* nfssys.c */
/*
int exportfs(char *dir, struct export *ep);
int nfs_getfh(char *path, fhandle_t *fhp);
int nfssvc(int fd);
*/
/* psetsys.c */
int pset_create(psetid_t *npset);
int pset_destroy(psetid_t pset);
int pset_assign(psetid_t pset, processorid_t cpu, psetid_t *opset);
int pset_assign_forced(psetid_t pset, processorid_t cpu, psetid_t *opset);
int pset_info(psetid_t pset, int *type, u_int *numcpus, processorid_t *cpulist);
int pset_bind(psetid_t pset, idtype_t idtype, id_t id, psetid_t *opset);
int pset_bind_lwp(psetid_t pset, id_t id, pid_t, psetid_t *opset);
/* rctlsys.c */
int getrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk,
int flags);
int setrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk,
int flags);
/* (private functions) */
int setprojrctl(const char *name, rctlblk_t *new_rblk, size_t size, int flags);
int rctlctl(const char *, rctlblk_t *, int);
size_t rctllist(char *, size_t);
/* semsys.c */
int semctl(int semid, int semnum, int cmd, ...);
int semget(key_t key, int nsems, int semflg);
int semop(int semid, struct sembuf *sops, size_t nsops);
/* shmsys.c */
void *shmat(int shmid, const void *shmaddr, int shmflg);
int shmctl(int shmid, int cmd, struct shmid_ds *buf);
#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)
int shmdt(const void *);
#else
int shmdt(char *);
#endif /* defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4) */
int shmget(key_t key, size_t size, int shmflg);
/* tasksys.c */
taskid_t settaskid(projid_t project, uint_t flags);
taskid_t gettaskid(void);
projid_t getprojid(void);
/*
* /usr/src/lib/libc/port/widec routines
*/
/* fgetws.c */
wchar_t *fgetws(wchar_t *_RESTRICT_KYWD ptr, int size,
FILE *_RESTRICT_KYWD iop);
/* fputwc.c */
wint_t fputwc(wint_t wc, FILE *iop);
wint_t putwc(wint_t wc, FILE *iop);
/* fputws.c */
int fputws(const wchar_t *_RESTRICT_KYWD ptr, FILE *_RESTRICT_KYWD iop);
/* getwchar.c */
wint_t getwchar(void);
/* getwidth.c */
void getwidth(eucwidth_t *eucstruct);
/* getws.c */
wchar_t *getws(wchar_t *ptr);
/* iswctype.c */
int iswctype(wint_t wc, wctype_t charclass);
int iswalpha(wint_t c);
int iswupper(wint_t c);
int iswlower(wint_t c);
int iswdigit(wint_t c);
int iswxdigit(wint_t c);
int iswalnum(wint_t c);
int iswspace(wint_t c);
int iswpunct(wint_t c);
int iswprint(wint_t c);
int iswgraph(wint_t c);
int iswcntrl(wint_t c);
int isphonogram(wint_t c);
int isideogram(wint_t c);
int isenglish(wint_t c);
int isnumber(wint_t c);
int isspecial(wint_t c);
/* libwcollate.c */
/* putwchar.c */
wint_t putwchar(wint_t c);
/* putws.c */
int putws(const wchar_t *ptr);
/* scrwidth.c */
/* strtows.c */
wchar_t *strtows(wchar_t *s1, char *s2);
char *wstostr(char *s1, wchar_t *s2);
/* trwctype.c */
wint_t towupper(wint_t c);
wint_t towlower(wint_t c);
/* ungetwc.c */
wint_t ungetwc(wint_t wc, FILE *iop);
/* wcollate.c */
size_t wcsxfrm(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
size_t n);
int wcscoll(const wchar_t *s1, const wchar_t *s2);
/* wcsftime.c */
#if !defined(__amd64) /* XX64 - fix me */
size_t wcsftime(wchar_t *wcs, size_t maxsize,
const char *format, const struct tm *timeptr);
#endif /* __amd64 */
/* wcstring.c */
wint_t fgetwc(FILE *iop);
wint_t getwc(FILE *iop);
int wcwidth(wchar_t wc);
int wcswidth(const wchar_t *pwcs, size_t n);
/* wcswcs.c */
wchar_t *wcswcs(const wchar_t *ws1, const wchar_t *ws2);
/* wcsxfrm.c - empty file! */
/* wcsxfrm.xpg4.c */
/* wisprint.c */
int wisprint(wchar_t c);
/* wscasecmp.c */
int wscasecmp(const wchar_t *s1, const wchar_t *s2);
/* wscat.c */
wchar_t *wcscat(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2);
wchar_t *wscat(wchar_t *s1, const wchar_t *s2);
/* wschr.c */
wchar_t *wcschr(const wchar_t *sp, wchar_t c);
wchar_t *wschr(const wchar_t *sp, wchar_t c);
/* wscmp.c */
int wcscmp(const wchar_t *s1, const wchar_t *s2);
int wscmp(const wchar_t *s1, const wchar_t *s2);
/* wscol.c */
int wscol(const wchar_t *s1);
/* wscpy.c */
wchar_t *wcscpy(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2);
wchar_t *wscpy(wchar_t *s1, const wchar_t *s2);
/* wscspn.c */
size_t wcscspn(const wchar_t *string, const wchar_t *charset);
size_t wscspn(const wchar_t *string, const wchar_t *charset);
/* wsdup.c */
wchar_t *wsdup(const wchar_t *s1);
/* wslen.c */
size_t wcslen(const wchar_t *s);
size_t wslen(const wchar_t *s);
/* wsncasecmp.c */
int wsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
/* wsncat.c */
wchar_t *wcsncat(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
size_t n);
wchar_t *wsncat(wchar_t *s1, const wchar_t *s2, size_t n);
/* wsncmp.c */
int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
int wsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
/* wsncpy.c */
wchar_t *wcsncpy(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
size_t n);
wchar_t *wsncpy(wchar_t *s1, const wchar_t *s2, size_t n);
/* wspbrk.c */
wchar_t *wcspbrk(const wchar_t *string, const wchar_t *brkset);
wchar_t *wspbrk(const wchar_t *string, const wchar_t *brkset);
/* wsprintf.c */
int wsprintf(wchar_t *wstring, const char *format, ...);
/* wsrchr.c */
wchar_t *wcsrchr(const wchar_t *sp, wchar_t c);
wchar_t *wsrchr(const wchar_t *sp, wchar_t c);
/* wsscanf.c */
int wsscanf(wchar_t *s, const char *format, ...);
/* wssize.c */
/* wsspn.c */
size_t wcsspn(const wchar_t *string, const wchar_t *charset);
size_t wsspn(const wchar_t *string, const wchar_t *charset);
/* wstod.c */
double wcstod(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr);
float wcstof(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr);
long double wcstold(const wchar_t *_RESTRICT_KYWD cp,
wchar_t **_RESTRICT_KYWD ptr);
double wstod(const wchar_t *cp, wchar_t **ptr);
/* wstok.c */
#if !defined(__amd64) /* XX64 - fix me */
wchar_t *wcstok(wchar_t *string, const wchar_t *sepset);
wchar_t *wstok(wchar_t *string, const wchar_t *sepset);
#endif /* __amd64 */
/* wcstol.c */
long wcstol(const wchar_t *_RESTRICT_KYWD str, wchar_t **_RESTRICT_KYWD ptr,
int base);
long long wcstoll(const wchar_t *_RESTRICT_KYWD str,
wchar_t **_RESTRICT_KYWD ptr, int base);
/* wcstoul.c */
unsigned long wcstoul(const wchar_t *_RESTRICT_KYWD str,
wchar_t **_RESTRICT_KYWD ptr, int base);
unsigned long long wcstoull(const wchar_t *_RESTRICT_KYWD str,
wchar_t **_RESTRICT_KYWD ptr, int base);
/* wcstoimax.c */
intmax_t wcstoimax(const wchar_t *_RESTRICT_KYWD nptr,
wchar_t **_RESTRICT_KYWD endptr, int base);
uintmax_t wcstoumax(const wchar_t *_RESTRICT_KYWD nptr,
wchar_t **_RESTRICT_KYWD endptr, int base);
/* wstol.c */
long wstol(const wchar_t *str, wchar_t **ptr, int base);
/* wstoll.c */
long long wstoll(const wchar_t *str, wchar_t **ptr, int base);
long long watoll(const wchar_t *p);
/* wsxfrm.c */
size_t wsxfrm(wchar_t *s1, const wchar_t *s2, size_t n);
int wscoll(const wchar_t *s1, const wchar_t *s2);
/*
* /usr/src/lib/libc/port/gen/event_port.c
*/
int port_dispatch(int port, int flags, int source, int events, uintptr_t object,
void *user);
/*
* /usr/src/lib/libc/$MACH/gen routines
*/
/* alloca.s */
void *__builtin_alloca(size_t);
/*
* modctl(int arg, ...) and utssys(...) are not available from a header
* file, but our utilities which make use of it should be able to be
* lint clean.
*/
int modctl(int arg, ...);
int utssys(void *buf, int arg, int type, void *outbp);
typedef float single;
typedef unsigned extended[3];
typedef long double quadruple;
typedef unsigned fp_exception_field_type;
typedef char decimal_string[512];
enum fp_class_type {
fp_zero = 0,
fp_subnormal = 1,
fp_normal = 2,
fp_infinity = 3,
fp_quiet = 4,
fp_signaling = 5
};
enum fp_direction_type {
fp_nearest = 0,
fp_tozero = 1,
fp_positive = 2,
fp_negative = 3
};
typedef struct {
enum fp_class_type fpclass;
int sign;
int exponent;
decimal_string ds;
int more;
int ndigits;
} decimal_record;
enum decimal_form {
fixed_form,
floating_form
};
typedef struct {
enum fp_direction_type rd;
enum decimal_form df;
int ndigits;
} decimal_mode;
enum decimal_string_form {
invalid_form,
whitespace_form,
fixed_int_form,
fixed_intdot_form,
fixed_dotfrac_form,
fixed_intdotfrac_form,
floating_int_form,
floating_intdot_form,
floating_dotfrac_form,
floating_intdotfrac_form,
inf_form,
infinity_form,
nan_form,
nanstring_form
};
typedef int sigfpe_code_type;
typedef void (*sigfpe_handler_type)();
extern sigfpe_handler_type sigfpe(sigfpe_code_type, sigfpe_handler_type);
extern void single_to_decimal(single *, decimal_mode *, decimal_record *,
fp_exception_field_type *);
extern void double_to_decimal(double *, decimal_mode *, decimal_record *,
fp_exception_field_type *);
extern void extended_to_decimal(extended *, decimal_mode *,
decimal_record *, fp_exception_field_type *);
extern void quadruple_to_decimal(quadruple *, decimal_mode *,
decimal_record *, fp_exception_field_type *);
extern void decimal_to_single(single *, decimal_mode *, decimal_record *,
fp_exception_field_type *);
extern void decimal_to_double(double *, decimal_mode *, decimal_record *,
fp_exception_field_type *);
extern void decimal_to_extended(extended *, decimal_mode *,
decimal_record *, fp_exception_field_type *);
extern void decimal_to_quadruple(quadruple *, decimal_mode *,
decimal_record *, fp_exception_field_type *);
extern void string_to_decimal(char **, int, int, decimal_record *,
enum decimal_string_form *, char **);
extern void func_to_decimal(char **, int, int, decimal_record *,
enum decimal_string_form *, char **,
int (*)(void), int *, int (*)(int));
extern void file_to_decimal(char **, int, int, decimal_record *,
enum decimal_string_form *, char **,
FILE *, int *);
extern char *seconvert(single *, int, int *, int *, char *);
extern char *sfconvert(single *, int, int *, int *, char *);
extern char *sgconvert(single *, int, int, char *);
extern char *econvert(double, int, int *, int *, char *);
extern char *fconvert(double, int, int *, int *, char *);
extern char *gconvert(double, int, int, char *);
extern char *qeconvert(quadruple *, int, int *, int *, char *);
extern char *qfconvert(quadruple *, int, int *, int *, char *);
extern char *qgconvert(quadruple *, int, int, char *);
extern void __assert(const char *, const char *, int);
extern int setjmp(jmp_buf);
extern void longjmp(jmp_buf, int);
extern int sigsetjmp(sigjmp_buf, int);
extern void siglongjmp(sigjmp_buf, int);
int uname(struct utsname *);
int _uname(struct utsname *);
int errno;
int *___errno()
{ return (&errno); }
extern int getloadavg(double [], int);
extern long pcsample(uintptr_t [], long);
int fstat(int, struct stat *);
int stat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
int lstat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
int mknod(const char *, mode_t, dev_t);
extern int __init_daemon_priv(int, uid_t uid, gid_t gid, ...);
extern void __fini_daemon_priv(const char *, ...);
extern int __init_suid_priv(int, ...);
extern int __priv_bracket(priv_op_t);
extern void __priv_relinquish(void);
extern const char * __priv_getsetbynum(const void *, int);
extern char * __priv_set_to_str(void *, const priv_set_t *, char, int);
/* private interface to get the groups list for a certain user */
int _getgroupsbymember(const char *, gid_t[], int, int);
/* private interface for use only by java */
volatile sc_shared_t *volatile *_thr_schedctl(void);
/* private interface to unmount all autofs mounts */
int _autofssys(enum autofssys_op, void *);
/* label.c */
extern int is_system_labeled(void);
extern int uconv_u16tou32(const uint16_t *, size_t *, uint32_t *, size_t *,
int);
extern int uconv_u16tou8(const uint16_t *, size_t *, uchar_t *, size_t *, int);
extern int uconv_u32tou16(const uint32_t *, size_t *, uint16_t *, size_t *,
int);
extern int uconv_u32tou8(const uint32_t *, size_t *, uchar_t *, size_t *, int);
extern int uconv_u8tou16(const uchar_t *, size_t *, uint16_t *, size_t *, int);
extern int uconv_u8tou32(const uchar_t *, size_t *, uint32_t *, size_t *, int);
extern int u8_validate(char *, size_t, char **, int, int *);
extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *);
extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t,
int *);
/* private locale interfaces */
wint_t __nextwctype(wint_t, wctype_t);
int __iswrune(wint_t);