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
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2025 Oxide Computer Company
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ISO_ASSERT_ISO_H
#define _ISO_ASSERT_ISO_H
/*
* This file contains all of the portions of the assert.h implementation that we
* wish to be re-entrant safe. This is not in <assert.h> as a number of
* third-party applications have tried to use their own wrappers that use a
* header guard, which lead to us losing the definitions that we need to have.
* While those applications are potentially using the implementation namespace
* incorrectly, separating out the two logical uses is helpful nonetheless and
* hopefully makes it clearer what is what.
*
* This header should not be included directly by applications!
*/
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* This does not use _STDC_C99 as it must match the definition of assert in
* <assert.h>. Many C++ compilers on illumos have defined either a
* __STDC_VERSION__ or the internal definitions such as _STDC_C99 so mixing
* these can result in either missing the macro or the function prototype.
*/
#if (__cplusplus - 0 >= 201103L) || (__STDC_VERSION__ - 0 >= 199901L)
extern _NORETURN_KYWD void __assert_c99(const char *, const char *, int,
const char *) __NORETURN;
#else
extern _NORETURN_KYWD void __assert(const char *, const char *, int) __NORETURN;
#endif /* __cplusplus - 0 >= 201103L || (__STDC_VERSION__ - 0 >= 199901L) */
/*
* In C11 the static_assert macro is always defined, unlike the assert macro.
* Starting in C23, static_assert is a keyword, so this is no longer required.
*/
#if defined(_STDC_C11) && !defined(__cplusplus) && !defined(_STDC_C23)
#define static_assert _Static_assert
#endif /* _STDC_C11 && !defined(__cplusplus) && !_STDC_C23 */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_ASSERT_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <ctype.h>.
*/
#ifndef _ISO_CTYPE_ISO_H
#define _ISO_CTYPE_ISO_H
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
#define _U 0x00000001 /* Upper case */
#define _L 0x00000002 /* Lower case */
#define _N 0x00000004 /* Numeral (digit) */
#define _S 0x00000008 /* Spacing character */
#define _P 0x00000010 /* Punctuation */
#define _C 0x00000020 /* Control character */
#define _B 0x00000040 /* Blank */
#define _X 0x00000080 /* heXadecimal digit */
#define _ISUPPER _U
#define _ISLOWER _L
#define _ISDIGIT _N
#define _ISSPACE _S
#define _ISPUNCT _P
#define _ISCNTRL _C
#define _ISBLANK _B
#define _ISXDIGIT _X
#define _ISGRAPH 0x00002000
#define _ISALPHA 0x00004000
#define _ISPRINT 0x00008000
#define _ISALNUM (_ISALPHA | _ISDIGIT)
extern unsigned char __ctype[];
extern unsigned int *__ctype_mask;
extern int *__trans_upper;
extern int *__trans_lower;
#if __cplusplus >= 199711L
namespace std {
#endif
/*
* These used to be macros, which while more efficient, precludes operation
* with thread specific locales. The old macros will still work, but new
* code compiles to use functions. This is specifically permitted by the
* various standards. Only _tolower and _toupper were required to be
* delivered in macro form.
*/
extern int isalnum(int);
extern int isalpha(int);
extern int iscntrl(int);
extern int isdigit(int);
extern int isgraph(int);
extern int islower(int);
extern int isprint(int);
extern int ispunct(int);
extern int isspace(int);
extern int isupper(int);
extern int isxdigit(int);
#if defined(_XPG6) || defined(_STDC_C99) || !defined(_STRICT_SYMBOLS)
extern int isblank(int);
#endif
extern int tolower(int);
extern int toupper(int);
#if __cplusplus >= 199711L
} /* end of namespace std */
#endif
#ifdef __cplusplus
}
#endif
#endif /* _ISO_CTYPE_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <limits.h>.
*/
#ifndef _ISO_LIMITS_ISO_H
#define _ISO_LIMITS_ISO_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Sizes of integral types
*/
#define CHAR_BIT 8 /* max # of bits in a "char" */
#define SCHAR_MIN (-128) /* min value of a "signed char" */
#define SCHAR_MAX 127 /* max value of a "signed char" */
#define UCHAR_MAX 255 /* max value of an "unsigned char" */
#define MB_LEN_MAX 5
#if defined(_CHAR_IS_SIGNED)
#define CHAR_MIN SCHAR_MIN /* min value of a "char" */
#define CHAR_MAX SCHAR_MAX /* max value of a "char" */
#elif defined(_CHAR_IS_UNSIGNED)
#define CHAR_MIN 0 /* min value of a "char" */
#define CHAR_MAX UCHAR_MAX /* max value of a "char" */
#else
#error "chars are signed or unsigned"
#endif
#define SHRT_MIN (-32768) /* min value of a "short int" */
#define SHRT_MAX 32767 /* max value of a "short int" */
#define USHRT_MAX 65535 /* max value of "unsigned short int" */
#define INT_MIN (-2147483647-1) /* min value of an "int" */
#define INT_MAX 2147483647 /* max value of an "int" */
#define UINT_MAX 4294967295U /* max value of an "unsigned int" */
#if defined(_LP64)
#define LONG_MIN (-9223372036854775807L-1L)
/* min value of a "long int" */
#define LONG_MAX 9223372036854775807L
/* max value of a "long int" */
#define ULONG_MAX 18446744073709551615UL
/* max value of "unsigned long int" */
#else /* _ILP32 */
#define LONG_MIN (-2147483647L-1L)
/* min value of a "long int" */
#define LONG_MAX 2147483647L /* max value of a "long int" */
#define ULONG_MAX 4294967295UL /* max value of "unsigned long int" */
#endif
#if !defined(_STRICT_STDC) || defined(_STDC_C99) || defined(__EXTENSIONS__)
#define LLONG_MIN (-9223372036854775807LL-1LL)
/* min value of a long long */
#define LLONG_MAX 9223372036854775807LL
/* max value of a long long */
#define ULLONG_MAX 18446744073709551615ULL
/* max value of "unsigned long long */
#endif /* !defined(_STRICT_STDC) || defined(_STDC_C99)... */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_LIMITS_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2014 Garrett D'Amore <garrett@damore.org>
* Copyright 2014 PALO, Richard.
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <locale.h>.
*/
#ifndef _ISO_LOCALE_ISO_H
#define _ISO_LOCALE_ISO_H
#include <sys/feature_tests.h>
#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
struct lconv {
char *decimal_point;
char *thousands_sep;
char *grouping;
char *int_curr_symbol;
char *currency_symbol;
char *mon_decimal_point;
char *mon_thousands_sep;
char *mon_grouping;
char *positive_sign;
char *negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
/*
* New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
* standard. Namespace and binary compatibility dictate that visibility
* of these new members be limited, but all instances of this structure created
* by libc include space for the new fields. The new fields are excluded in a
* strictly-conforming pre-C99 environment if _LCONV_C99 is not also defined.
*/
#if !defined(_STRICT_SYMBOLS) || defined(_STDC_C99) || defined(_LCONV_C99)
char int_p_cs_precedes;
char int_p_sep_by_space;
char int_n_cs_precedes;
char int_n_sep_by_space;
char int_p_sign_posn;
char int_n_sign_posn;
#endif
};
#define LC_CTYPE 0
#define LC_NUMERIC 1
#define LC_TIME 2
#define LC_COLLATE 3
#define LC_MONETARY 4
#define LC_MESSAGES 5
#define LC_ALL 6
extern char *setlocale(int, const char *);
extern struct lconv *localeconv(void);
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_LOCALE_ISO_H */
/*
* 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 2011 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ISO_MATH_C99_H
#define _ISO_MATH_C99_H
#include <sys/isa_defs.h>
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
#undef FP_ZERO
#define FP_ZERO 0
#undef FP_SUBNORMAL
#define FP_SUBNORMAL 1
#undef FP_NORMAL
#define FP_NORMAL 2
#undef FP_INFINITE
#define FP_INFINITE 3
#undef FP_NAN
#define FP_NAN 4
#if defined(_STDC_C99) || _XOPEN_SOURCE - 0 >= 600 || defined(__C99FEATURES__)
#if defined(__GNUC__)
#undef HUGE_VAL
#define HUGE_VAL (__builtin_huge_val())
#undef HUGE_VALF
#define HUGE_VALF (__builtin_huge_valf())
#undef HUGE_VALL
#define HUGE_VALL (__builtin_huge_vall())
#undef INFINITY
#define INFINITY (__builtin_inff())
#undef NAN
#define NAN (__builtin_nanf(""))
/*
* C99 7.12.3 classification macros
*/
#undef isnan
#undef isinf
#if __GNUC__ >= 4
#define fpclassify(x) __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, \
FP_SUBNORMAL, FP_ZERO, x)
#define isnan(x) __builtin_isnan(x)
#define isinf(x) __builtin_isinf(x)
#define isfinite(x) (__builtin_isfinite(x) != 0)
#define isnormal(x) (__builtin_isnormal(x) != 0)
#define signbit(x) (__builtin_signbit(x) != 0)
#else /* __GNUC__ >= 4 */
#define isnan(x) __extension__( \
{ __typeof(x) __x_n = (x); \
__builtin_isunordered(__x_n, __x_n); })
#define isinf(x) __extension__( \
{ __typeof(x) __x_i = (x); \
__x_i == (__typeof(__x_i)) INFINITY || \
__x_i == (__typeof(__x_i)) (-INFINITY); })
#undef isfinite
#define isfinite(x) __extension__( \
{ __typeof(x) __x_f = (x); \
!isnan(__x_f) && !isinf(__x_f); })
#undef isnormal
#define isnormal(x) __extension__( \
{ __typeof(x) __x_r = (x); isfinite(__x_r) && \
(sizeof (__x_r) == sizeof (float) ? \
__builtin_fabsf(__x_r) >= __FLT_MIN__ : \
sizeof (__x_r) == sizeof (double) ? \
__builtin_fabs(__x_r) >= __DBL_MIN__ : \
__builtin_fabsl(__x_r) >= __LDBL_MIN__); })
#undef fpclassify
#define fpclassify(x) __extension__( \
{ __typeof(x) __x_c = (x); \
isnan(__x_c) ? FP_NAN : \
isinf(__x_c) ? FP_INFINITE : \
isnormal(__x_c) ? FP_NORMAL : \
__x_c == (__typeof(__x_c)) 0 ? FP_ZERO : \
FP_SUBNORMAL; })
#undef signbit
#if defined(_BIG_ENDIAN)
#define signbit(x) __extension__( \
{ __typeof(x) __x_s = (x); \
(int)(*(unsigned *)&__x_s >> 31); })
#elif defined(_LITTLE_ENDIAN)
#define signbit(x) __extension__( \
{ __typeof(x) __x_s = (x); \
(sizeof (__x_s) == sizeof (float) ? \
(int)(*(unsigned *)&__x_s >> 31) : \
sizeof (__x_s) == sizeof (double) ? \
(int)(((unsigned *)&__x_s)[1] >> 31) : \
(int)(((unsigned short *)&__x_s)[4] >> 15)); })
#endif /* defined(_BIG_ENDIAN) */
#endif /* __GNUC__ >= 4 */
/*
* C99 7.12.14 comparison macros
*/
#undef isgreater
#define isgreater(x, y) __builtin_isgreater(x, y)
#undef isgreaterequal
#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
#undef isless
#define isless(x, y) __builtin_isless(x, y)
#undef islessequal
#define islessequal(x, y) __builtin_islessequal(x, y)
#undef islessgreater
#define islessgreater(x, y) __builtin_islessgreater(x, y)
#undef isunordered
#define isunordered(x, y) __builtin_isunordered(x, y)
#else /* defined(__GNUC__) */
#undef HUGE_VAL
#define HUGE_VAL __builtin_huge_val
#undef HUGE_VALF
#define HUGE_VALF __builtin_huge_valf
#undef HUGE_VALL
#define HUGE_VALL __builtin_huge_vall
#undef INFINITY
#define INFINITY __builtin_infinity
#undef NAN
#define NAN __builtin_nan
/*
* C99 7.12.3 classification macros
*/
#undef fpclassify
#define fpclassify(x) __builtin_fpclassify(x)
#undef isfinite
#define isfinite(x) __builtin_isfinite(x)
#undef isinf
#define isinf(x) __builtin_isinf(x)
#undef isnan
#define isnan(x) __builtin_isnan(x)
#undef isnormal
#define isnormal(x) __builtin_isnormal(x)
#undef signbit
#define signbit(x) __builtin_signbit(x)
/*
* C99 7.12.14 comparison macros
*/
#undef isgreater
#define isgreater(x, y) ((x) __builtin_isgreater(y))
#undef isgreaterequal
#define isgreaterequal(x, y) ((x) __builtin_isgreaterequal(y))
#undef isless
#define isless(x, y) ((x) __builtin_isless(y))
#undef islessequal
#define islessequal(x, y) ((x) __builtin_islessequal(y))
#undef islessgreater
#define islessgreater(x, y) ((x) __builtin_islessgreater(y))
#undef isunordered
#define isunordered(x, y) ((x) __builtin_isunordered(y))
#endif /* defined(__GNUC__) */
#endif /* defined(_STDC_C99) || _XOPEN_SOURCE - 0 >= 600 || ... */
#if defined(__EXTENSIONS__) || defined(_STDC_C99) || \
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
defined(__C99FEATURES__)
#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ - 0 == 0
typedef float float_t;
typedef double double_t;
#elif __FLT_EVAL_METHOD__ - 0 == 1
typedef double float_t;
typedef double double_t;
#elif __FLT_EVAL_METHOD__ - 0 == 2
typedef long double float_t;
typedef long double double_t;
#elif defined(__sparc) || defined(__amd64)
typedef float float_t;
typedef double double_t;
#elif defined(__i386)
typedef long double float_t;
typedef long double double_t;
#endif
#undef FP_ILOGB0
#define FP_ILOGB0 (-2147483647)
#undef FP_ILOGBNAN
#define FP_ILOGBNAN 2147483647
#undef MATH_ERRNO
#define MATH_ERRNO 1
#undef MATH_ERREXCEPT
#define MATH_ERREXCEPT 2
#undef math_errhandling
#define math_errhandling MATH_ERREXCEPT
extern double acosh(double);
extern double asinh(double);
extern double atanh(double);
extern double exp2(double);
extern double expm1(double);
extern int ilogb(double);
extern double log1p(double);
extern double log2(double);
extern double logb(double);
extern double scalbn(double, int);
extern double scalbln(double, long int);
extern double cbrt(double);
extern double hypot(double, double);
extern double erf(double);
extern double erfc(double);
extern double lgamma(double);
extern double tgamma(double);
extern double nearbyint(double);
extern double rint(double);
extern long int lrint(double);
extern double round(double);
extern long int lround(double);
extern double trunc(double);
extern double remainder(double, double);
extern double remquo(double, double, int *);
extern double copysign(double, double);
extern double nan(const char *);
extern double nextafter(double, double);
extern double nexttoward(double, long double);
extern double fdim(double, double);
extern double fmax(double, double);
extern double fmin(double, double);
extern double fma(double, double, double);
extern float acosf(float);
extern float asinf(float);
extern float atanf(float);
extern float atan2f(float, float);
extern float cosf(float);
extern float sinf(float);
extern float tanf(float);
extern float acoshf(float);
extern float asinhf(float);
extern float atanhf(float);
extern float coshf(float);
extern float sinhf(float);
extern float tanhf(float);
extern float expf(float);
extern float exp2f(float);
extern float expm1f(float);
extern float frexpf(float, int *);
extern int ilogbf(float);
extern float ldexpf(float, int);
extern float logf(float);
extern float log10f(float);
extern float log1pf(float);
extern float log2f(float);
extern float logbf(float);
extern float modff(float, float *);
extern float scalbnf(float, int);
extern float scalblnf(float, long int);
extern float cbrtf(float);
extern float fabsf(float);
extern float hypotf(float, float);
extern float powf(float, float);
extern float sqrtf(float);
extern float erff(float);
extern float erfcf(float);
extern float lgammaf(float);
extern float tgammaf(float);
extern float ceilf(float);
extern float floorf(float);
extern float nearbyintf(float);
extern float rintf(float);
extern long int lrintf(float);
extern float roundf(float);
extern long int lroundf(float);
extern float truncf(float);
extern float fmodf(float, float);
extern float remainderf(float, float);
extern float remquof(float, float, int *);
extern float copysignf(float, float);
extern float nanf(const char *);
extern float nextafterf(float, float);
extern float nexttowardf(float, long double);
extern float fdimf(float, float);
extern float fmaxf(float, float);
extern float fminf(float, float);
extern float fmaf(float, float, float);
extern long double acosl(long double);
extern long double asinl(long double);
extern long double atanl(long double);
extern long double atan2l(long double, long double);
extern long double cosl(long double);
extern long double sinl(long double);
extern long double tanl(long double);
extern long double acoshl(long double);
extern long double asinhl(long double);
extern long double atanhl(long double);
extern long double coshl(long double);
extern long double sinhl(long double);
extern long double tanhl(long double);
extern long double expl(long double);
extern long double exp2l(long double);
extern long double expm1l(long double);
extern long double frexpl(long double, int *);
extern int ilogbl(long double);
extern long double ldexpl(long double, int);
extern long double logl(long double);
extern long double log10l(long double);
extern long double log1pl(long double);
extern long double log2l(long double);
extern long double logbl(long double);
extern long double modfl(long double, long double *);
extern long double scalbnl(long double, int);
extern long double scalblnl(long double, long int);
extern long double cbrtl(long double);
extern long double fabsl(long double);
extern long double hypotl(long double, long double);
extern long double powl(long double, long double);
extern long double sqrtl(long double);
extern long double erfl(long double);
extern long double erfcl(long double);
extern long double lgammal(long double);
extern long double tgammal(long double);
extern long double ceill(long double);
extern long double floorl(long double);
extern long double nearbyintl(long double);
extern long double rintl(long double);
extern long int lrintl(long double);
extern long double roundl(long double);
extern long int lroundl(long double);
extern long double truncl(long double);
extern long double fmodl(long double, long double);
extern long double remainderl(long double, long double);
extern long double remquol(long double, long double, int *);
extern long double copysignl(long double, long double);
extern long double nanl(const char *);
extern long double nextafterl(long double, long double);
extern long double nexttowardl(long double, long double);
extern long double fdiml(long double, long double);
extern long double fmaxl(long double, long double);
extern long double fminl(long double, long double);
extern long double fmal(long double, long double, long double);
#if !defined(_STRICT_STDC) && !defined(_NO_LONGLONG) || defined(_STDC_C99) || \
defined(__C99FEATURES__)
extern long long int llrint(double);
extern long long int llround(double);
extern long long int llrintf(float);
extern long long int llroundf(float);
extern long long int llrintl(long double);
extern long long int llroundl(long double);
#endif
#endif /* defined(__EXTENSIONS__) || defined(_STDC_C99) || ... */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_MATH_C99_H */
/*
* 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 2011 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ISO_MATH_ISO_H
#define _ISO_MATH_ISO_H
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(_STDC_C99) && _XOPEN_SOURCE - 0 < 600 && !defined(__C99FEATURES__)
typedef union _h_val {
unsigned long _i[sizeof (double) / sizeof (unsigned long)];
double _d;
} _h_val;
#ifdef __STDC__
extern const _h_val __huge_val;
#else
extern _h_val __huge_val;
#endif
#undef HUGE_VAL
#define HUGE_VAL __huge_val._d
#endif /* !defined(_STDC_C99) && _XOPEN_SOURCE - 0 < 600 && ... */
#if __cplusplus >= 199711L
namespace std {
#endif
extern double acos(double);
extern double asin(double);
extern double atan(double);
extern double atan2(double, double);
extern double cos(double);
extern double sin(double);
extern double tan(double);
extern double cosh(double);
extern double sinh(double);
extern double tanh(double);
extern double exp(double);
extern double frexp(double, int *);
extern double ldexp(double, int);
extern double log(double);
extern double log10(double);
extern double modf(double, double *);
extern double pow(double, double);
extern double sqrt(double);
extern double ceil(double);
extern double fabs(double);
extern double floor(double);
extern double fmod(double, double);
#if defined(__MATHERR_ERRNO_DONTCARE)
#pragma does_not_read_global_data(acos, asin, atan, atan2)
#pragma does_not_read_global_data(cos, sin, tan, cosh, sinh, tanh)
#pragma does_not_read_global_data(exp, log, log10, pow, sqrt)
#pragma does_not_read_global_data(frexp, ldexp, modf)
#pragma does_not_read_global_data(ceil, fabs, floor, fmod)
#pragma does_not_write_global_data(acos, asin, atan, atan2)
#pragma does_not_write_global_data(cos, sin, tan, cosh, sinh, tanh)
#pragma does_not_write_global_data(exp, log, log10, pow, sqrt)
#pragma does_not_write_global_data(ldexp)
#pragma does_not_write_global_data(ceil, fabs, floor, fmod)
#pragma no_side_effect(acos, asin, atan, atan2)
#pragma no_side_effect(cos, sin, tan, cosh, sinh, tanh)
#pragma no_side_effect(exp, log, log10, pow, sqrt)
#pragma no_side_effect(ldexp)
#pragma no_side_effect(ceil, fabs, floor, fmod)
#endif
#if __cplusplus >= 199711L
extern float __acosf(float);
extern float __asinf(float);
extern float __atanf(float);
extern float __atan2f(float, float);
extern float __ceilf(float);
extern float __cosf(float);
extern float __coshf(float);
extern float __expf(float);
extern float __fabsf(float);
extern float __floorf(float);
extern float __fmodf(float, float);
extern float __frexpf(float, int *);
extern float __ldexpf(float, int);
extern float __logf(float);
extern float __log10f(float);
extern float __modff(float, float *);
extern float __powf(float, float);
extern float __sinf(float);
extern float __sinhf(float);
extern float __sqrtf(float);
extern float __tanf(float);
extern float __tanhf(float);
extern long double __acosl(long double);
extern long double __asinl(long double);
extern long double __atanl(long double);
extern long double __atan2l(long double, long double);
extern long double __ceill(long double);
extern long double __cosl(long double);
extern long double __coshl(long double);
extern long double __expl(long double);
extern long double __fabsl(long double);
extern long double __floorl(long double);
extern long double __fmodl(long double, long double);
extern long double __frexpl(long double, int *);
extern long double __ldexpl(long double, int);
extern long double __logl(long double);
extern long double __log10l(long double);
extern long double __modfl(long double, long double *);
extern long double __powl(long double, long double);
extern long double __sinl(long double);
extern long double __sinhl(long double);
extern long double __sqrtl(long double);
extern long double __tanl(long double);
extern long double __tanhl(long double);
extern "C++" {
#undef __X
#undef __Y
inline double abs(double __X) { return fabs(__X); }
inline double pow(double __X, int __Y) {
return (pow(__X, (double)(__Y)));
}
inline float abs(float __X) { return __fabsf(__X); }
inline float acos(float __X) { return __acosf(__X); }
inline float asin(float __X) { return __asinf(__X); }
inline float atan(float __X) { return __atanf(__X); }
inline float atan2(float __X, float __Y) { return __atan2f(__X, __Y); }
inline float ceil(float __X) { return __ceilf(__X); }
inline float cos(float __X) { return __cosf(__X); }
inline float cosh(float __X) { return __coshf(__X); }
inline float exp(float __X) { return __expf(__X); }
inline float fabs(float __X) { return __fabsf(__X); }
inline float floor(float __X) { return __floorf(__X); }
inline float fmod(float __X, float __Y) { return __fmodf(__X, __Y); }
inline float frexp(float __X, int *__Y) { return __frexpf(__X, __Y); }
inline float ldexp(float __X, int __Y) { return __ldexpf(__X, __Y); }
inline float log(float __X) { return __logf(__X); }
inline float log10(float __X) { return __log10f(__X); }
inline float modf(float __X, float *__Y) { return __modff(__X, __Y); }
inline float pow(float __X, float __Y) { return __powf(__X, __Y); }
inline float pow(float __X, int __Y) {
return (pow((double)(__X), (double)(__Y)));
}
inline float sin(float __X) { return __sinf(__X); }
inline float sinh(float __X) { return __sinhf(__X); }
inline float sqrt(float __X) { return __sqrtf(__X); }
inline float tan(float __X) { return __tanf(__X); }
inline float tanh(float __X) { return __tanhf(__X); }
inline long double abs(long double __X) { return __fabsl(__X); }
inline long double acos(long double __X) { return __acosl(__X); }
inline long double asin(long double __X) { return __asinl(__X); }
inline long double atan(long double __X) { return __atanl(__X); }
inline long double atan2(long double __X, long double __Y) {
return (__atan2l(__X, __Y));
}
inline long double ceil(long double __X) { return __ceill(__X); }
inline long double cos(long double __X) { return __cosl(__X); }
inline long double cosh(long double __X) { return __coshl(__X); }
inline long double exp(long double __X) { return __expl(__X); }
inline long double fabs(long double __X) { return __fabsl(__X); }
inline long double floor(long double __X) { return __floorl(__X); }
inline long double fmod(long double __X, long double __Y) {
return (__fmodl(__X, __Y));
}
inline long double frexp(long double __X, int *__Y) {
return (__frexpl(__X, __Y));
}
inline long double ldexp(long double __X, int __Y) {
return (__ldexpl(__X, __Y));
}
inline long double log(long double __X) { return __logl(__X); }
inline long double log10(long double __X) { return __log10l(__X); }
inline long double modf(long double __X, long double *__Y) {
return (__modfl(__X, __Y));
}
inline long double pow(long double __X, long double __Y) {
return (__powl(__X, __Y));
}
inline long double pow(long double __X, int __Y) {
return (__powl(__X, (long double) (__Y)));
}
inline long double sin(long double __X) { return __sinl(__X); }
inline long double sinh(long double __X) { return __sinhl(__X); }
inline long double sqrt(long double __X) { return __sqrtl(__X); }
inline long double tan(long double __X) { return __tanl(__X); }
inline long double tanh(long double __X) { return __tanhl(__X); }
} /* end of extern "C++" */
#endif /* __cplusplus >= 199711L */
#if __cplusplus >= 199711L
} /* end of namespace std */
#endif
#ifdef __cplusplus
}
#endif
#endif /* _ISO_MATH_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <setjmp.h>.
*/
#ifndef _ISO_SETJMP_ISO_H
#define _ISO_SETJMP_ISO_H
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _JBLEN
/*
* The sizes of the jump-buffer (_JBLEN) and the sigjump-buffer
* (_SIGJBLEN) are defined by the appropriate, processor specific,
* ABI.
*/
#if defined(__amd64)
#define _JBLEN 8 /* ABI value */
#define _SIGJBLEN 128 /* ABI value */
#elif defined(__i386)
#define _JBLEN 10 /* ABI value */
#define _SIGJBLEN 128 /* ABI value */
#elif defined(__sparcv9)
#define _JBLEN 12 /* ABI value */
#define _SIGJBLEN 19 /* ABI value */
#elif defined(__sparc)
#define _JBLEN 12 /* ABI value */
#define _SIGJBLEN 19 /* ABI value */
#else
#error "ISA not supported"
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
#if defined(__i386) || defined(__amd64) || \
defined(__sparc) || defined(__sparcv9)
#if defined(_LP64)
typedef long jmp_buf[_JBLEN];
#else
typedef int jmp_buf[_JBLEN];
#endif
#else
#error "ISA not supported"
#endif
extern int setjmp(jmp_buf) __RETURNS_TWICE;
extern int _setjmp(jmp_buf) __RETURNS_TWICE;
extern void longjmp(jmp_buf, int) __NORETURN;
extern void _longjmp(jmp_buf, int) __NORETURN;
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#if __cplusplus >= 199711L
using std::setjmp;
#endif
#if defined(_STRICT_STDC) || __cplusplus >= 199711L
#define setjmp(env) setjmp(env)
#endif
#endif /* _JBLEN */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_SETJMP_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
*
* Copyright (c) 1998-1999, by Sun Microsystems, Inc.
* All rights reserved.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <signal.h>.
*/
#ifndef _ISO_SIGNAL_ISO_H
#define _ISO_SIGNAL_ISO_H
#include <sys/iso/signal_iso.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
typedef int sig_atomic_t;
#ifdef __cplusplus
extern "C" SIG_PF signal(int, SIG_PF);
#else
extern void (*signal(int, void (*)(int)))(int);
#endif
extern int raise(int);
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_SIGNAL_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ISO_STDARG_C99_H
#define _ISO_STDARG_C99_H
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* This header defines the va_copy variable argument macro, which is
* new in ISO C 1999, and thus not present in ISO C 1989 and ISO C++
* 1998. Because this macro is a long-standing Solaris extension, it
* is also permitted in other contexts.
*
* The varargs definitions within this header are defined in terms of
* implementation definitions. These implementation definitions reside
* in <sys/va_list.h>. This organization enables protected use of
* the implementation by other standard headers without introducing
* names into the users' namespace.
*/
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* va_copy was initially a Solaris extension to provide a portable
* way to perform a variable argument list ``bookmarking'' function.
* It is now specified in the ISO/IEC 9899:1999 standard.
*/
#if defined(__EXTENSIONS__) || defined(_STDC_C99) || \
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
defined(_XPG6)
#define va_copy(to, from) __va_copy(to, from)
#endif /* defined(__EXTENSIONS__) || defined(_STDC_C99)... */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STDARG_C99_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <stdarg.h>.
*/
#ifndef _ISO_STDARG_ISO_H
#define _ISO_STDARG_ISO_H
/*
* This header defines the ISO C 1989 and ISO C++ 1998 variable
* argument definitions.
*
* The varargs definitions within this header are defined in terms of
* implementation definitions. These implementation definitions reside
* in <sys/va_impl.h>. This organization enables protected use of
* the implementation by other standard headers without introducing
* names into the users' namespace.
*/
#include <sys/va_impl.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
namespace std {
typedef __va_list va_list;
}
#elif !defined(_VA_LIST)
#define _VA_LIST
typedef __va_list va_list;
#endif
#define va_start(list, name) __va_start(list, name)
#define va_arg(list, type) __va_arg(list, type)
#define va_end(list) __va_end(list)
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STDARG_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2014 PALO, Richard.
* Copyright 2016 Joyent, Inc.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <stddef.h.h>.
*/
#ifndef _ISO_STDDEF_ISO_H
#define _ISO_STDDEF_ISO_H
#include <sys/isa_defs.h>
#include <sys/feature_tests.h>
#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
#if !defined(_PTRDIFF_T) || __cplusplus >= 199711L
#define _PTRDIFF_T
#if defined(_LP64)
typedef long ptrdiff_t; /* pointer difference */
#else
typedef int ptrdiff_t; /* (historical version) */
#endif
#endif /* !_PTRDIFF_T */
#if !defined(_SIZE_T) || __cplusplus >= 199711L
#define _SIZE_T
#if defined(_LP64)
typedef unsigned long size_t; /* size of something in bytes */
#else
typedef unsigned int size_t; /* (historical version) */
#endif
#endif /* !_SIZE_T */
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#if !defined(_MAX_ALIGN_T)
#if !defined(_STRICT_SYMBOLS) || defined(_STDC_C11)
#define _MAX_ALIGN_T
typedef _MAX_ALIGNMENT_TYPE max_align_t;
#endif /* !_STRICT_SYMBOLS || _STDC_C11 */
#endif /* _MAX_ALIGN_T */
#if __EXT1_VISIBLE
/* ISO/IEC 9899:2011 K.3.3.2 */
#ifndef _RSIZE_T_DEFINED
#define _RSIZE_T_DEFINED
typedef size_t rsize_t;
#endif
#endif /* __EXT1_VISIBLE */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STDDEF_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2014 Garrett D'Amore <garrett@damore.org>
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in
* the C99 standard and in conflict with the C++ implementation of the
* standard header. The C++ standard may adopt the C99 standard at
* which point it is expected that the symbols included here will
* become part of the C++ std namespace.
*/
#ifndef _ISO_STDIO_C99_H
#define _ISO_STDIO_C99_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* The following have been added as a result of the ISO/IEC 9899:1999
* standard. For a strictly conforming C application, visibility is
* contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
* For non-strictly conforming C applications, there are no restrictions
* on the C namespace.
*/
#if defined(__EXTENSIONS__) || defined(_STDC_C99) || \
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
#if !defined(_LP64) && !defined(_LONGLONG_TYPE)
#ifdef __PRAGMA_REDEFINE_EXTNAME
#pragma redefine_extname snprintf _snprintf_c89
#pragma redefine_extname vsnprintf _vsnprintf_c89
#pragma redefine_extname vfscanf _vfscanf_c89
#pragma redefine_extname vscanf _vscanf_c89
#pragma redefine_extname vsscanf _vsscanf_c89
#else
#define snprintf _snprintf_c89
#define vsnprintf _vsnprintf_c89
#define vfscanf _vfscanf_c89
#define vscanf _vscanf_c89
#define vsscanf _vsscanf_c89
#endif
#endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */
extern int vfscanf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, __va_list);
extern int vscanf(const char *_RESTRICT_KYWD, __va_list);
extern int vsscanf(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
__va_list);
#endif /* defined(__EXTENSIONS__) ... */
#if defined(__EXTENSIONS__) || defined(_STDC_C99) || \
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
defined(_XPG5)
extern int snprintf(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD,
...);
extern int vsnprintf(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD,
__va_list);
#endif /* defined(__EXTENSIONS__) || defined(_STDC_C99) ... */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STDIO_C99_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2014 Garrett D'Amore <garrett@damore.org>
* Copyright 2014 PALO, Richard.
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <stdio.h>.
*/
/*
* User-visible pieces of the ANSI C standard I/O package.
*/
#ifndef _ISO_STDIO_ISO_H
#define _ISO_STDIO_ISO_H
#include <sys/feature_tests.h>
#include <sys/null.h>
#include <sys/va_list.h>
#include <stdio_tag.h>
#include <stdio_impl.h>
/*
* If feature test macros are set that enable interfaces that use types
* defined in <sys/types.h>, get those types by doing the include.
*
* Note that in asking for the interfaces associated with this feature test
* macro one also asks for definitions of the POSIX types.
*/
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(_LP64) && (_FILE_OFFSET_BITS == 64 || defined(_LARGEFILE64_SOURCE))
/*
* The following typedefs are adopted from ones in <sys/types.h> (with leading
* underscores added to avoid polluting the ANSI C name space). See the
* commentary there for further explanation.
*/
#if defined(_LONGLONG_TYPE)
typedef long long __longlong_t;
#else
/* used to reserve space and generate alignment */
typedef union {
double _d;
int _l[2];
} __longlong_t;
#endif
#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 || defined(_LARGEFILE64_SOURCE) */
#if __cplusplus >= 199711L
namespace std {
#endif
#if !defined(_FILEDEFED) || __cplusplus >= 199711L
#define _FILEDEFED
typedef __FILE FILE;
#endif
#if !defined(_SIZE_T) || __cplusplus >= 199711L
#define _SIZE_T
#if defined(_LP64)
typedef unsigned long size_t; /* size of something in bytes */
#else
typedef unsigned int size_t; /* (historical version) */
#endif
#endif /* !_SIZE_T */
#if defined(_LP64) || _FILE_OFFSET_BITS == 32
typedef long fpos_t;
#else
typedef __longlong_t fpos_t;
#endif
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#define BUFSIZ 1024
/*
* The value of _NFILE is defined in the Processor Specific ABI. The value
* is chosen for historical reasons rather than for truly processor related
* attribute. Note that the SPARC Processor Specific ABI uses the common
* UNIX historical value of 20 so it is allowed to fall through.
*/
#if defined(__i386)
#define _NFILE 60 /* initial number of streams: Intel x86 ABI */
#else
#define _NFILE 20 /* initial number of streams: SPARC ABI and default */
#endif
#define _SBFSIZ 8 /* compatibility with shared libs */
#define _IOFBF 0000 /* full buffered */
#define _IOLBF 0100 /* line buffered */
#define _IONBF 0004 /* not buffered */
#define _IOEOF 0020 /* EOF reached on read */
#define _IOERR 0040 /* I/O error from system */
#define _IOREAD 0001 /* currently reading */
#define _IOWRT 0002 /* currently writing */
#define _IORW 0200 /* opened for reading and writing */
#define _IOMYBUF 0010 /* stdio malloc()'d buffer */
#ifndef EOF
#define EOF (-1)
#endif
#define FOPEN_MAX _NFILE
#define FILENAME_MAX 1024 /* max # of characters in a path name */
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
#define TMP_MAX 17576 /* 26 * 26 * 26 */
#define L_tmpnam 25 /* (sizeof(P_tmpdir) + 15) */
extern __FILE __iob[_NFILE];
#define stdin (&__iob[0])
#define stdout (&__iob[1])
#define stderr (&__iob[2])
#if __cplusplus >= 199711L
namespace std {
#endif
#if !defined(_LP64) && !defined(_LONGLONG_TYPE)
#ifdef __PRAGMA_REDEFINE_EXTNAME
#pragma redefine_extname fprintf _fprintf_c89
#pragma redefine_extname printf _printf_c89
#pragma redefine_extname sprintf _sprintf_c89
#pragma redefine_extname vfprintf _vfprintf_c89
#pragma redefine_extname vprintf _vprintf_c89
#pragma redefine_extname vsprintf _vsprintf_c89
#pragma redefine_extname fscanf _fscanf_c89
#pragma redefine_extname scanf _scanf_c89
#pragma redefine_extname sscanf _sscanf_c89
#else
#define fprintf _fprintf_c89
#define printf _printf_c89
#define sprintf _sprintf_c89
#define vfprintf _vfprintf_c89
#define vprintf _vprintf_c89
#define vsprintf _vsprintf_c89
#define fscanf _fscanf_c89
#define scanf _scanf_c89
#define sscanf _sscanf_c89
#endif
#endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */
extern int remove(const char *);
extern int rename(const char *, const char *);
extern FILE *tmpfile(void);
extern char *tmpnam(char *);
extern int fclose(FILE *);
extern int fflush(FILE *);
extern FILE *fopen(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
extern FILE *freopen(const char *_RESTRICT_KYWD,
const char *_RESTRICT_KYWD, FILE *_RESTRICT_KYWD);
extern void setbuf(FILE *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
extern int setvbuf(FILE *_RESTRICT_KYWD, char *_RESTRICT_KYWD, int,
size_t);
/* PRINTFLIKE2 */
extern int fprintf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
/* SCANFLIKE2 */
extern int fscanf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
/* PRINTFLIKE1 */
extern int printf(const char *_RESTRICT_KYWD, ...);
/* SCANFLIKE1 */
extern int scanf(const char *_RESTRICT_KYWD, ...);
/* PRINTFLIKE2 */
extern int sprintf(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
/* SCANFLIKE2 */
extern int sscanf(const char *_RESTRICT_KYWD,
const char *_RESTRICT_KYWD, ...);
extern int vfprintf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
__va_list);
extern int vprintf(const char *_RESTRICT_KYWD, __va_list);
extern int vsprintf(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
__va_list);
extern int fgetc(FILE *);
extern char *fgets(char *_RESTRICT_KYWD, int, FILE *_RESTRICT_KYWD);
extern int fputc(int, FILE *);
extern int fputs(const char *_RESTRICT_KYWD, FILE *_RESTRICT_KYWD);
#if (__cplusplus >= 199711L && (defined(_LP64) || defined(_REENTRANT))) || \
__cplusplus < 199711L
extern int getc(FILE *);
extern int putc(int, FILE *);
#endif
#if (__cplusplus >= 199711L && defined(_REENTRANT)) || \
__cplusplus < 199711L
extern int getchar(void);
extern int putchar(int);
#endif
/*
* ISO/IEC C11 removed gets from the standard library. Therefore if a strict C11
* environment has been requested, we remove it.
*/
#if !defined(_STDC_C11) || defined(__EXTENSIONS__)
extern char *gets(char *);
#endif
extern int puts(const char *);
extern int ungetc(int, FILE *);
extern size_t fread(void *_RESTRICT_KYWD, size_t, size_t,
FILE *_RESTRICT_KYWD);
extern size_t fwrite(const void *_RESTRICT_KYWD, size_t, size_t,
FILE *_RESTRICT_KYWD);
#if !defined(__lint) || defined(_LP64) || _FILE_OFFSET_BITS == 32
extern int fgetpos(FILE *_RESTRICT_KYWD, fpos_t *_RESTRICT_KYWD);
extern int fsetpos(FILE *, const fpos_t *);
#endif
extern int fseek(FILE *, long, int);
extern long ftell(FILE *);
extern void rewind(FILE *);
#if (__cplusplus >= 199711L && (defined(_LP64) || defined(_REENTRANT))) || \
__cplusplus < 199711L
extern void clearerr(FILE *);
extern int feof(FILE *);
extern int ferror(FILE *);
#endif
extern void perror(const char *);
#ifndef _LP64
extern int __filbuf(FILE *);
extern int __flsbuf(int, FILE *);
#endif /* _LP64 */
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#if !defined(__lint)
#if !defined(_REENTRANT) && !defined(_LP64)
#if __cplusplus >= 199711L
namespace std {
inline int getc(FILE *_p) {
return (--_p->_cnt < 0 ? __filbuf(_p) : (int)*_p->_ptr++); }
inline int putc(int _x, FILE *_p) {
return (--_p->_cnt < 0 ? __flsbuf(_x, _p)
: (int)(*_p->_ptr++ = (unsigned char) _x)); }
}
#else /* __cplusplus >= 199711L */
#define getc(p) (--(p)->_cnt < 0 ? __filbuf(p) : (int)*(p)->_ptr++)
#define putc(x, p) (--(p)->_cnt < 0 ? __flsbuf((x), (p)) \
: (int)(*(p)->_ptr++ = (unsigned char) (x)))
#endif /* __cplusplus >= 199711L */
#endif /* !defined(_REENTRANT) && !defined(_LP64) */
#ifndef _REENTRANT
#if __cplusplus >= 199711L
namespace std {
inline int getchar() { return getc(stdin); }
inline int putchar(int _x) { return putc(_x, stdout); }
}
#else
#define getchar() getc(stdin)
#define putchar(x) putc((x), stdout)
#endif /* __cplusplus >= 199711L */
#ifndef _LP64
#if __cplusplus >= 199711L
namespace std {
inline void clearerr(FILE *_p) { _p->_flag &= ~(_IOERR | _IOEOF); }
inline int feof(FILE *_p) { return _p->_flag & _IOEOF; }
inline int ferror(FILE *_p) { return _p->_flag & _IOERR; }
}
#else /* __cplusplus >= 199711L */
#define clearerr(p) ((void)((p)->_flag &= ~(_IOERR | _IOEOF)))
#define feof(p) ((p)->_flag & _IOEOF)
#define ferror(p) ((p)->_flag & _IOERR)
#endif /* __cplusplus >= 199711L */
#endif /* _LP64 */
#endif /* _REENTRANT */
#endif /* !defined(__lint) */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STDIO_ISO_H */
/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
* http://www.illumos.org/license/CDDL.
*/
/*
* Copyright 2016 Joyent, Inc.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other illumos headers.
*
* The contents of this header is limited to identifiers specified in
* the C11 standard and in conflict with the C++ implementation of the
* standard header. The C++ standard may adopt the C11 standard at
* which point it is expected that the symbols included here will
* become part of the C++ std namespace.
*/
#ifndef _ISO_STDLIB_C11_H
#define _ISO_STDLIB_C11_H
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
/*
* The following have been added as a result of the ISO/IEC 9899:2011
* standard. For a strictly conforming C application, visibility is
* contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
* For non-strictly conforming C applications, there are no restrictions
* on the C namespace.
*/
/*
* Work around fix-includes and other bad actors with using multiple headers.
*/
#if !defined(_NORETURN_KYWD)
#if __STDC_VERSION__ - 0 >= 201112L
#define _NORETURN_KYWD _Noreturn
#else
#define _NORETURN_KYWD
#endif /* __STDC_VERSION__ - 0 >= 201112L */
#endif /* !defined(_NORETURN_KYWD) */
#if !defined(_STRICT_SYMBOLS) || defined(_STDC_C11)
extern void *aligned_alloc(size_t, size_t);
#endif /* !_STRICT_SYMBOLS || _STDC_C11 */
#if !defined(_STRICT_SYMBOLS) || defined(_STDC_C11) || __cplusplus >= 201103L
extern int at_quick_exit(void (*)(void));
extern _NORETURN_KYWD void quick_exit(int);
#endif /* !_STRICT_SYMBOLS || _STDC_C11 || __cplusplus >= 201103L */
#if __cplusplus >= 199711L
}
#endif
/*
* ISO C11 Annex K functions are not allowed to be in the standard
* namespace; however, it is implementation-defined as to whether or
* not they are in the global namespace and we opt to make them
* available to software.
*/
#if __EXT1_VISIBLE
#ifndef _ERRNO_T_DEFINED
#define _ERRNO_T_DEFINED
typedef int errno_t;
#endif
/* K.3.6 */
typedef void (*constraint_handler_t)(const char *_RESTRICT_KYWD,
void *_RESTRICT_KYWD, errno_t);
/* K.3.6.1.1 */
extern constraint_handler_t set_constraint_handler_s(constraint_handler_t);
/* K.3.6.1.2 */
extern _NORETURN_KYWD void abort_handler_s(const char *_RESTRICT_KYWD,
void *_RESTRICT_KYWD, errno_t);
/* K3.6.1.3 */
extern void ignore_handler_s(const char *_RESTRICT_KYWD, void *_RESTRICT_KYWD,
errno_t);
#endif /* __EXT1_VISIBLE */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STDLIB_C11_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2014 Garrett D'Amore <garrett@damore.org>
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in
* the C99 standard and in conflict with the C++ implementation of the
* standard header. The C++ standard may adopt the C99 standard at
* which point it is expected that the symbols included here will
* become part of the C++ std namespace.
*/
#ifndef _ISO_STDLIB_C99_H
#define _ISO_STDLIB_C99_H
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The following have been added as a result of the ISO/IEC 9899:1999
* standard. For a strictly conforming C application, visibility is
* contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
* For non-strictly conforming C applications, there are no restrictions
* on the C namespace.
*/
#if defined(_LONGLONG_TYPE)
typedef struct {
long long quot;
long long rem;
} lldiv_t;
#endif /* defined(_LONGLONG_TYPE) */
#if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
defined(_STDC_C99) || defined(__EXTENSIONS__)
#if !defined(_NORETURN_KYWD)
#if __STDC_VERSION__ - 0 >= 201112L
#define _NORETURN_KYWD _Noreturn
#else
#define _NORETURN_KYWD
#endif /* __STDC_VERSION__ - 0 >= 201112L */
#endif /* !defined(_NORETURN_KYWD) */
extern _NORETURN_KYWD void _Exit(int);
extern float strtof(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD);
extern long double strtold(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD);
#if defined(_LONGLONG_TYPE)
extern long long atoll(const char *);
extern long long llabs(long long);
extern lldiv_t lldiv(long long, long long);
extern long long strtoll(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD,
int);
extern unsigned long long strtoull(const char *_RESTRICT_KYWD,
char **_RESTRICT_KYWD, int);
#endif /* defined(_LONGLONG_TYPE) */
#endif /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) ... */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STDLIB_C99_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2014 Garrett D'Amore <garrett@damore.org>
* Copyright 2014 PALO, Richard.
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <locale.h>.
*/
#ifndef _ISO_STDLIB_ISO_H
#define _ISO_STDLIB_ISO_H
#include <sys/feature_tests.h>
#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
#endif
unsigned char __mb_cur_max(void);
#ifndef MB_CUR_MAX
#define MB_CUR_MAX (__mb_cur_max())
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
typedef struct {
int quot;
int rem;
} div_t;
typedef struct {
long quot;
long rem;
} ldiv_t;
#if !defined(_SIZE_T) || __cplusplus >= 199711L
#define _SIZE_T
#if defined(_LP64)
typedef unsigned long size_t; /* size of something in bytes */
#else
typedef unsigned int size_t; /* (historical version) */
#endif
#endif /* !_SIZE_T */
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#define RAND_MAX 32767
/*
* wchar_t is a built-in type in standard C++ and as such is not
* defined here when using standard C++. However, the GNU compiler
* fixincludes utility nonetheless creates its own version of this
* header for use by gcc and g++. In that version it adds a redundant
* guard for __cplusplus. To avoid the creation of a gcc/g++ specific
* header we need to include the following magic comment:
*
* we must use the C++ compiler's type
*
* The above comment should not be removed or changed until GNU
* gcc/fixinc/inclhack.def is updated to bypass this header.
*/
#if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__))
#ifndef _WCHAR_T
#define _WCHAR_T
#if defined(_LP64)
typedef int wchar_t;
#else
typedef long wchar_t;
#endif
#endif /* !_WCHAR_T */
#endif /* !defined(__cplusplus) ... */
#if !defined(_NORETURN_KYWD)
#if __STDC_VERSION__ - 0 >= 201112L
#define _NORETURN_KYWD _Noreturn
#else
#define _NORETURN_KYWD
#endif /* __STDC_VERSION__ - 0 >= 201112L */
#endif /* !defined(_NORETURN_KYWD) */
extern _NORETURN_KYWD void abort(void) __NORETURN;
extern int abs(int);
extern int atexit(void (*)(void));
extern double atof(const char *);
extern int atoi(const char *);
extern long int atol(const char *);
extern void *bsearch(const void *, const void *, size_t, size_t,
int (*)(const void *, const void *));
#if __cplusplus >= 199711L && defined(__SUNPRO_CC)
extern "C++" {
void *bsearch(const void *, const void *, size_t, size_t,
int (*)(const void *, const void *));
}
#endif /* __cplusplus >= 199711L && defined(__SUNPRO_CC) */
extern void *calloc(size_t, size_t);
extern div_t div(int, int);
extern _NORETURN_KYWD void exit(int)
__NORETURN;
extern void free(void *);
extern char *getenv(const char *);
extern long int labs(long);
extern ldiv_t ldiv(long, long);
extern void *malloc(size_t);
extern int mblen(const char *, size_t);
extern size_t mbstowcs(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
size_t);
extern int mbtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
#if __cplusplus >= 199711L && defined(__SUNPRO_CC)
extern "C++" {
void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
}
#endif /* __cplusplus >= 199711L && defined(__SUNPRO_CC) */
extern int rand(void);
extern void *realloc(void *, size_t);
extern void srand(unsigned int);
extern double strtod(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD);
extern long int strtol(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD, int);
extern unsigned long int strtoul(const char *_RESTRICT_KYWD,
char **_RESTRICT_KYWD, int);
extern int system(const char *);
extern int wctomb(char *, wchar_t);
extern size_t wcstombs(char *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
size_t);
#if __cplusplus >= 199711L
extern "C++" {
inline long abs(long _l) { return labs(_l); }
inline ldiv_t div(long _l1, long _l2) { return ldiv(_l1, _l2); }
}
#endif /* __cplusplus */
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STDLIB_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
* Copyright 2014 PALO, Richard.
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <string.h>.
*/
#ifndef _ISO_STRING_ISO_H
#define _ISO_STRING_ISO_H
#include <sys/feature_tests.h>
#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
#if !defined(_SIZE_T) || __cplusplus >= 199711L
#define _SIZE_T
#if defined(_LP64)
typedef unsigned long size_t; /* size of something in bytes */
#else
typedef unsigned int size_t; /* (historical version) */
#endif
#endif /* !_SIZE_T */
extern int memcmp(const void *, const void *, size_t);
extern void *memcpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD, size_t);
extern void *memmove(void *, const void *, size_t);
extern void *memset(void *, int, size_t);
extern char *strcat(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
extern int strcmp(const char *, const char *);
extern char *strcpy(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
extern int strcoll(const char *, const char *);
extern size_t strcspn(const char *, const char *);
extern char *strerror(int);
extern size_t strlen(const char *);
extern char *strncat(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
extern int strncmp(const char *, const char *, size_t);
extern char *strncpy(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
extern size_t strspn(const char *, const char *);
extern char *strtok(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
extern size_t strxfrm(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
/*
* The C++ Standard (ISO/IEC 14882:1998) specifies that each of the
* function signatures for the following functions be replaced by
* two declarations, both of which have the same behavior.
*/
#if __cplusplus >= 199711L
extern const void *memchr(const void *, int, size_t);
#ifndef _MEMCHR_INLINE
#define _MEMCHR_INLINE
extern "C++" {
inline void *memchr(void * __s, int __c, size_t __n) {
return (void *)memchr((const void *)__s, __c, __n);
}
}
#endif /* _MEMCHR_INLINE */
extern const char *strchr(const char *, int);
#ifndef _STRCHR_INLINE
#define _STRCHR_INLINE
extern "C++" {
inline char *strchr(char *__s, int __c) {
return (char *)strchr((const char *)__s, __c);
}
}
#endif /* _STRCHR_INLINE */
extern const char *strpbrk(const char *, const char *);
#ifndef _STRPBRK_INLINE
#define _STRPBRK_INLINE
extern "C++" {
inline char *strpbrk(char *__s1, const char *__s2) {
return (char *)strpbrk((const char *)__s1, __s2);
}
}
#endif /* _STRPBRK_INLINE */
extern const char *strrchr(const char *, int);
#ifndef _STRRCHR_INLINE
#define _STRRCHR_INLINE
extern "C++" {
inline char *strrchr(char *__s, int __c) {
return (char *)strrchr((const char *)__s, __c);
}
}
#endif /* _STRRCHR_INLINE */
extern const char *strstr(const char *, const char *);
#ifndef _STRSTR_INLINE
#define _STRSTR_INLINE
extern "C++" {
inline char *strstr(char *__s1, const char *__s2) {
return (char *)strstr((const char *)__s1, __s2);
}
}
#endif /* _STRSTR_INLINE */
#else /* __cplusplus >= 199711L */
extern void *memchr(const void *, int, size_t);
extern char *strchr(const char *, int);
extern char *strpbrk(const char *, const char *);
extern char *strrchr(const char *, int);
extern char *strstr(const char *, const char *);
#endif /* __cplusplus >= 199711L */
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
/*
* ISO C11 Annex K functions are not allowed to be in the standard
* namespace; however, it is implementation-defined as to whether or
* not they are in the global namespace and we opt to make them
* available to software.
*/
#if __EXT1_VISIBLE
#ifndef _RSIZE_T_DEFINED
#define _RSIZE_T_DEFINED
#if __cplusplus >= 199711L
typedef std::size_t rsize_t;
#else
typedef size_t rsize_t;
#endif
#endif
#ifndef _ERRNO_T_DEFINED
#define _ERRNO_T_DEFINED
typedef int errno_t;
#endif
/* ISO/IEC 9899:2011 K.3.7.4.1.1 */
extern errno_t memset_s(void *, rsize_t, int, rsize_t);
#endif /* __EXT1_VISIBLE */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STRING_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
* Copyright 2014 PALO, Richard.
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <time.h.h>.
*/
#ifndef _ISO_TIME_ISO_H
#define _ISO_TIME_ISO_H
#include <sys/feature_tests.h>
#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
#if !defined(_SIZE_T) || __cplusplus >= 199711L
#define _SIZE_T
#if defined(_LP64)
typedef unsigned long size_t; /* size of something in bytes */
#else
typedef unsigned size_t; /* (historical version) */
#endif
#endif /* !_SIZE_T */
#if !defined(_CLOCK_T) || __cplusplus >= 199711L
#define _CLOCK_T
typedef long clock_t;
#endif /* !_CLOCK_T */
#if !defined(_TIME_T) || __cplusplus >= 199711L
#define _TIME_T
typedef long time_t;
#endif /* !_TIME_T */
#define CLOCKS_PER_SEC 1000000L
struct tm { /* see ctime(3) */
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
extern char *asctime(const struct tm *);
extern clock_t clock(void);
extern char *ctime(const time_t *);
extern double difftime(time_t, time_t);
extern struct tm *gmtime(const time_t *);
extern struct tm *localtime(const time_t *);
extern time_t mktime(struct tm *);
extern time_t time(time_t *);
extern size_t strftime(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD,
const struct tm *_RESTRICT_KYWD);
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_TIME_ISO_H */
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2014 Garrett D'Amore <garrett@damore.org>
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in
* the C99 standard and in conflict with the C++ implementation of the
* standard header. The C++ standard may adopt the C99 standard at
* which point it is expected that the symbols included here will
* become part of the C++ std namespace.
*/
#ifndef _ISO_WCHAR_C99_H
#define _ISO_WCHAR_C99_H
#ifdef __cplusplus
extern "C" {
#endif
/* Introduced in ISO/IEC 9899:1999 standard */
#if !defined(_LP64) && !defined(_LONGLONG_TYPE)
#ifdef __PRAGMA_REDEFINE_EXTNAME
#pragma redefine_extname vfwscanf _vfwscanf_c89
#pragma redefine_extname vswscanf _vswscanf_c89
#pragma redefine_extname vwscanf _vwscanf_c89
#else
#define vfwscanf _vfwscanf_c89
#define vswscanf _vswscanf_c89
#define vwscanf _vwscanf_c89
#endif
#endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */
#if defined(_STDC_C99) || \
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
defined(_XPG6) || defined(__EXTENSIONS__)
extern int vfwscanf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
__va_list);
extern int vswscanf(const wchar_t *_RESTRICT_KYWD,
const wchar_t *_RESTRICT_KYWD, __va_list);
extern int vwscanf(const wchar_t *_RESTRICT_KYWD, __va_list);
extern float wcstof(const wchar_t *_RESTRICT_KYWD,
wchar_t **_RESTRICT_KYWD);
#if defined(_LONGLONG_TYPE)
extern long double wcstold(const wchar_t *_RESTRICT_KYWD,
wchar_t **_RESTRICT_KYWD);
extern long long wcstoll(const wchar_t *_RESTRICT_KYWD,
wchar_t **_RESTRICT_KYWD, int);
extern unsigned long long wcstoull(const wchar_t *_RESTRICT_KYWD,
wchar_t **_RESTRICT_KYWD, int);
#endif /* defined(_LONGLONG_TYPE) */
#endif /* defined(_STDC_C99) || (!defined(_STRICT_STDC)... */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_WCHAR_C99_H */
/*
* 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 2014 Garrett D'Amore <garrett@damore.org>
* Copyright 2014 PALO, Richard.
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <wchar.h>.
*/
#ifndef _ISO_WCHAR_ISO_H
#define _ISO_WCHAR_ISO_H
#include <sys/feature_tests.h>
#include <sys/null.h>
#include <stdio_tag.h>
#include <wchar_impl.h>
#include <iso/time_iso.h>
#if (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) || \
(!defined(__cplusplus) && !defined(_STRICT_STDC)) || \
defined(__EXTENSIONS__)
#include <stdio.h>
#endif /* (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) ... */
#if !defined(_STRICT_STDC) || defined(__EXTENSIONS__)
#include <ctype.h>
#include <stddef.h>
#endif /* !defined(_STRICT_STDC) || defined(__EXTENSIONS__) */
#include <sys/va_list.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
/*
* wchar_t is a built-in type in standard C++ and as such is not
* defined here when using standard C++. However, the GNU compiler
* fixincludes utility nonetheless creates its own version of this
* header for use by gcc and g++. In that version it adds a redundant
* guard for __cplusplus. To avoid the creation of a gcc/g++ specific
* header we need to include the following magic comment:
*
* we must use the C++ compiler's type
*
* The above comment should not be removed or changed until GNU
* gcc/fixinc/inclhack.def is updated to bypass this header.
*/
#if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__))
#ifndef _WCHAR_T
#define _WCHAR_T
#if defined(_LP64)
typedef int wchar_t;
#else
typedef long wchar_t;
#endif
#endif /* !_WCHAR_T */
#endif /* !defined(__cplusplus) ... */
#if !defined(_WINT_T) || __cplusplus >= 199711L
#define _WINT_T
#if defined(_LP64)
typedef int wint_t;
#else
typedef long wint_t;
#endif
#endif /* !defined(_WINT_T) || __cplusplus >= 199711L */
#if !defined(_SIZE_T) || __cplusplus >= 199711L
#define _SIZE_T
#if defined(_LP64)
typedef unsigned long size_t; /* size of something in bytes */
#else
typedef unsigned int size_t; /* (historical version) */
#endif
#endif /* !defined(_SIZE_T) || __cplusplus >= 199711L */
#ifndef WEOF
#if __cplusplus >= 199711L
#define WEOF ((std::wint_t)(-1))
#else
#define WEOF ((wint_t)(-1))
#endif
#endif /* WEOF */
/* not XPG4 and not XPG4v2 */
#if !defined(_XPG4) || defined(_XPG5)
#ifndef WCHAR_MAX
#define WCHAR_MAX 2147483647
#endif
#ifndef WCHAR_MIN
#define WCHAR_MIN (-2147483647-1)
#endif
#endif /* not XPG4 and not XPG4v2 */
#if !defined(_MBSTATE_T) || __cplusplus >= 199711L
#define _MBSTATE_T
typedef __mbstate_t mbstate_t;
#endif /* _MBSTATE_T */
#if defined(_XPG4) && !defined(_FILEDEFED) || __cplusplus >= 199711L
#define _FILEDEFED
typedef __FILE FILE;
#endif
#if !defined(_LP64) && !defined(_LONGLONG_TYPE)
#ifdef __PRAGMA_REDEFINE_EXTNAME
#pragma redefine_extname fwprintf _fwprintf_c89
#pragma redefine_extname swprintf _swprintf_c89
#pragma redefine_extname vfwprintf _vfwprintf_c89
#pragma redefine_extname vswprintf _vswprintf_c89
#pragma redefine_extname vwprintf _vwprintf_c89
#pragma redefine_extname wprintf _wprintf_c89
#pragma redefine_extname fwscanf _fwscanf_c89
#pragma redefine_extname swscanf _swscanf_c89
#pragma redefine_extname wscanf _wscanf_c89
#else
#define fwprintf _fwprintf_c89
#define swprintf _swprintf_c89
#define vfwprintf _vfwprintf_c89
#define vswprintf _vswprintf_c89
#define vwprintf _vwprintf_c89
#define wprintf _wprintf_c89
#define fwscanf _fwscanf_c89
#define swscanf _swscanf_c89
#define wscanf _wscanf_c89
#endif
#endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */
#if (!defined(_MSE_INT_H))
/* not XPG4 and not XPG4v2 */
#if !defined(_XPG4) || defined(_XPG5)
#ifdef __PRAGMA_REDEFINE_EXTNAME
#pragma redefine_extname fgetwc __fgetwc_xpg5
#pragma redefine_extname getwc __getwc_xpg5
#pragma redefine_extname getwchar __getwchar_xpg5
#pragma redefine_extname fputwc __fputwc_xpg5
#pragma redefine_extname putwc __putwc_xpg5
#pragma redefine_extname putwchar __putwchar_xpg5
#pragma redefine_extname fgetws __fgetws_xpg5
#pragma redefine_extname fputws __fputws_xpg5
#pragma redefine_extname ungetwc __ungetwc_xpg5
#else /* __PRAGMA_REDEFINE_EXTNAME */
extern wint_t __fgetwc_xpg5(__FILE *);
extern wint_t __getwc_xpg5(__FILE *);
extern wint_t __getwchar_xpg5(void);
extern wint_t __fputwc_xpg5(wint_t, __FILE *);
extern wint_t __putwc_xpg5(wint_t, __FILE *);
extern wint_t __putwchar_xpg5(wint_t);
extern wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int,
__FILE *_RESTRICT_KYWD);
extern int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
extern wint_t __ungetwc_xpg5(wint_t, __FILE *);
#define fgetwc __fgetwc_xpg5
#define getwc __getwc_xpg5
#define getwchar __getwchar_xpg5
#define fputwc __fputwc_xpg5
#define putwc __putwc_xpg5
#define putwchar __putwchar_xpg5
#define fgetws __fgetws_xpg5
#define fputws __fputws_xpg5
#define ungetwc __ungetwc_xpg5
#endif /* __PRAGMA_REDEFINE_EXTNAME */
#endif /* not XPG4 and not XPG4v2 */
#endif /* defined(_MSE_INT_H) */
extern wint_t fgetwc(__FILE *);
extern wchar_t *fgetws(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD);
extern wint_t fputwc(wint_t, __FILE *);
extern int fputws(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
extern wint_t ungetwc(wint_t, __FILE *);
extern wint_t getwc(__FILE *);
extern wint_t getwchar(void);
extern wint_t putwc(wint_t, __FILE *);
extern wint_t putwchar(wint_t);
extern double wcstod(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
extern long wcstol(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD,
int);
extern unsigned long wcstoul(const wchar_t *_RESTRICT_KYWD,
wchar_t **_RESTRICT_KYWD, int);
extern wchar_t *wcscat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
extern int wcscmp(const wchar_t *, const wchar_t *);
extern int wcscoll(const wchar_t *, const wchar_t *);
extern wchar_t *wcscpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
extern size_t wcscspn(const wchar_t *, const wchar_t *);
extern size_t wcslen(const wchar_t *);
extern wchar_t *wcsncat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
size_t);
extern int wcsncmp(const wchar_t *, const wchar_t *, size_t);
extern wchar_t *wcsncpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
size_t);
extern size_t wcsspn(const wchar_t *, const wchar_t *);
extern size_t wcsxfrm(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
size_t);
#if __cplusplus >= 199711L
extern const wchar_t *wcschr(const wchar_t *, wchar_t);
extern "C++" {
inline wchar_t *wcschr(wchar_t *__ws, wchar_t __wc) {
return (wchar_t *)wcschr((const wchar_t *)__ws, __wc);
}
}
extern const wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
extern "C++" {
inline wchar_t *wcspbrk(wchar_t *__ws1, const wchar_t *__ws2) {
return (wchar_t *)wcspbrk((const wchar_t *)__ws1, __ws2);
}
}
extern const wchar_t *wcsrchr(const wchar_t *, wchar_t);
extern "C++" {
inline wchar_t *wcsrchr(wchar_t *__ws, wchar_t __wc) {
return (wchar_t *)wcsrchr((const wchar_t *)__ws, __wc);
}
}
#else /* __cplusplus >= 199711L */
extern wchar_t *wcschr(const wchar_t *, wchar_t);
extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
#endif /* __cplusplus >= 199711L */
#if (!defined(_MSE_INT_H))
#if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */
extern wchar_t *wcstok(wchar_t *, const wchar_t *);
extern size_t wcsftime(wchar_t *, size_t, const char *, const struct tm *);
#else /* XPG4 or XPG4v2 */
#ifdef __PRAGMA_REDEFINE_EXTNAME
#pragma redefine_extname wcstok __wcstok_xpg5
#pragma redefine_extname wcsftime __wcsftime_xpg5
extern wchar_t *wcstok(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
wchar_t **_RESTRICT_KYWD);
extern size_t wcsftime(wchar_t *_RESTRICT_KYWD, size_t,
const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD);
#else /* __PRAGMA_REDEFINE_EXTNAME */
extern wchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD,
const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
extern size_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t,
const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD);
#define wcstok __wcstok_xpg5
#define wcsftime __wcsftime_xpg5
#endif /* __PRAGMA_REDEFINE_EXTNAME */
#endif /* XPG4 or XPG4v2 */
#endif /* !defined(_MSE_INT_H) */
/* not XPG4 and not XPG4v2 */
#if !defined(_XPG4) || defined(_XPG5)
extern wint_t btowc(int);
extern int fwprintf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
...);
extern int fwscanf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
...);
extern int fwide(__FILE *, int);
extern int mbsinit(const mbstate_t *);
extern size_t mbrlen(const char *_RESTRICT_KYWD, size_t,
mbstate_t *_RESTRICT_KYWD);
extern size_t mbrtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
size_t, mbstate_t *_RESTRICT_KYWD);
extern size_t mbsrtowcs(wchar_t *_RESTRICT_KYWD, const char **_RESTRICT_KYWD,
size_t, mbstate_t *_RESTRICT_KYWD);
extern int swprintf(wchar_t *_RESTRICT_KYWD, size_t,
const wchar_t *_RESTRICT_KYWD, ...);
extern int swscanf(const wchar_t *_RESTRICT_KYWD,
const wchar_t *_RESTRICT_KYWD, ...);
extern int vfwprintf(__FILE *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
__va_list);
extern int vwprintf(const wchar_t *_RESTRICT_KYWD, __va_list);
extern int vswprintf(wchar_t *_RESTRICT_KYWD, size_t,
const wchar_t *_RESTRICT_KYWD, __va_list);
extern size_t wcrtomb(char *_RESTRICT_KYWD, wchar_t,
mbstate_t *_RESTRICT_KYWD);
extern size_t wcsrtombs(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD,
size_t, mbstate_t *_RESTRICT_KYWD);
#if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
extern size_t wcsnrtombs(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD,
size_t, size_t, mbstate_t *_RESTRICT_KYWD);
#endif
extern int wctob(wint_t);
extern int wmemcmp(const wchar_t *, const wchar_t *, size_t);
extern wchar_t *wmemcpy(wchar_t *_RESTRICT_KYWD,
const wchar_t *_RESTRICT_KYWD, size_t);
extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
extern wchar_t *wmemset(wchar_t *, wchar_t, size_t);
extern int wprintf(const wchar_t *_RESTRICT_KYWD, ...);
extern int wscanf(const wchar_t *_RESTRICT_KYWD, ...);
#if __cplusplus >= 199711L
extern const wchar_t *wcsstr(const wchar_t *, const wchar_t *);
extern "C++" {
inline wchar_t *wcsstr(wchar_t *__ws1, const wchar_t *__ws2) {
return (wchar_t *)wcsstr((const wchar_t *)__ws1, __ws2);
}
}
extern const wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
extern "C++" {
inline wchar_t *wmemchr(wchar_t *__ws, wchar_t __wc, size_t __n) {
return (wchar_t *)wmemchr((const wchar_t *)__ws, __wc, __n);
}
}
#else /* __cplusplus >= 199711L */
extern wchar_t *wcsstr(const wchar_t *_RESTRICT_KYWD,
const wchar_t *_RESTRICT_KYWD);
extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
#endif /* __cplusplus >= 199711L */
#endif /* not XPG4 and not XPG4v2 */
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_WCHAR_ISO_H */
/*
* 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
*/
/* wctype.h 1.13 89/11/02 SMI; JLE */
/* from AT&T JAE 2.1 */
/* definitions for international functions */
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
* The contents of this header is limited to identifiers specified in the
* C Standard. Any new identifiers specified in future amendments to the
* C Standard must be placed in this header. If these new identifiers
* are required to also be in the C++ Standard "std" namespace, then for
* anything other than macro definitions, corresponding "using" directives
* must also be added to <wctype.h>.
*/
#ifndef _ISO_WCTYPE_ISO_H
#define _ISO_WCTYPE_ISO_H
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
#if !defined(_WINT_T) || __cplusplus >= 199711L
#define _WINT_T
#if defined(_LP64)
typedef int wint_t;
#else
typedef long wint_t;
#endif
#endif /* !defined(_WINT_T) || __cplusplus >= 199711L */
#if !defined(_WCTYPE_T) || __cplusplus >= 199711L
#define _WCTYPE_T
typedef int wctype_t;
#endif
typedef unsigned int wctrans_t;
/* not XPG4 and not XPG4v2 */
#if !defined(_XPG4) || defined(_XPG5)
#ifndef WEOF
#if __cplusplus >= 199711L
#define WEOF ((std::wint_t)(-1))
#else
#define WEOF ((wint_t)(-1))
#endif
#endif /* WEOF */
#endif /* not XPG4 and not XPG4v2 */
extern int iswalnum(wint_t);
extern int iswalpha(wint_t);
extern int iswcntrl(wint_t);
extern int iswdigit(wint_t);
extern int iswgraph(wint_t);
extern int iswlower(wint_t);
extern int iswprint(wint_t);
extern int iswpunct(wint_t);
extern int iswspace(wint_t);
extern int iswupper(wint_t);
extern int iswxdigit(wint_t);
#if (__cplusplus >= 201103L) || defined(_STDC_C99) || defined(_XPG6) || \
!defined(_STRICT_SYMBOLS)
extern int iswblank(wint_t);
#endif
/* tow* also become functions */
extern wint_t towlower(wint_t);
extern wint_t towupper(wint_t);
extern wctrans_t wctrans(const char *);
extern wint_t towctrans(wint_t, wctrans_t);
extern int iswctype(wint_t, wctype_t);
extern wctype_t wctype(const char *);
/* bit definition for character class */
#define _E1 0x00000100 /* phonogram (international use) */
#define _E2 0x00000200 /* ideogram (international use) */
#define _E3 0x00000400 /* English (international use) */
#define _E4 0x00000800 /* number (international use) */
#define _E5 0x00001000 /* special (international use) */
#define _E6 0x00002000 /* other characters (international use) */
#define _E7 0x00004000 /* reserved (international use) */
#define _E8 0x00008000 /* reserved (international use) */
#define _E9 0x00010000
#define _E10 0x00020000
#define _E11 0x00040000
#define _E12 0x00080000
#define _E13 0x00100000
#define _E14 0x00200000
#define _E15 0x00400000
#define _E16 0x00800000
#define _E17 0x01000000
#define _E18 0x02000000
#define _E19 0x04000000
#define _E20 0x08000000
#define _E21 0x10000000
#define _E22 0x20000000
#define _E23 0x40000000
#define _E24 0x80000000
#if __cplusplus >= 199711L
}
#endif /* end of namespace std */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_WCTYPE_ISO_H */
|