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
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
|
2003-12-04 Christopher Faylor <cgf@redhat.com>
* path.cc (slash_unc_prefix_p): Allow '.' as a valid character after
'\\' in a UNC path.
2003-12-04 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (setup_handler): Remove ill-advised debugging output.
2003-12-04 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/types.h (struct __fcntl64): Fix datatype of l_start.
2003-12-03 Corinna Vinschen <corinna@vinschen.de>
Substitute 0x7fffffff and 0xffffffff by INT32_MAX and UINT32_MAX
throughout, except in assembler code.
2003-12-03 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::lock): Use UINT32_MAX
instead of 0xffffffff. Accomodate Win 9x bug in evaluating length
of area to lock when given length is 0.
2003-12-03 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_disk_file.cc (fhandler_disk_file::lock): Interchange
values of off_low and off_high.
2003-12-03 Corinna Vinschen <corinna@vinschen.de>
* fcntl.cc (fcntl_worker): Remove static storage class.
* flock.cc (flock): Use struct __flock64. Call fcntl_worker.
Use Cygwin errno functions instead of accessing errno directly.
* winsup.h: Declare fcntl_worker.
2003-12-03 Corinna Vinschen <corinna@vinschen.de>
* fcntl.cc: Whitespace cleanup.
2003-12-03 Christopher Faylor <cgf@redhat.com>
* cygthread.cc (cygthread::stub): Properly establish _threadinfo
environment.
(cygthread::stub2): New function.
(cygthread::simplestub): Ditto.
(cygthread::simplestub2): New function.
* cygthread.h (cygthread::stub2): Declare new function.
(cygthread::simplestub2): Ditto.
* cygtls.h (_threadinfo::call): Declare new function.
(_threadinfo::call2): Ditto.
* dcrt0.cc (dll_crt0_1): Accommodate new _threadinfo::init which
doesn't return pointer to tls.
(_dll_crt0): Remove obsolete DECLARE_TLS_STORAGE.
(dll_crt0): Ditto.
* exceptions.cc (_threadinfo::call): New function.
(_threadinfo::call2): Ditto.
(_threadinfo::init): Don't return pointer.
* thread.cc (pthread::thread_init_wrapper): Properly establish
_threadinfo environment.
(pthread::thread_init_wrapper2): New function.
* thread.h (pthread::thread_init_wrapper): Remove noreturn attribute
(pthread::thread_init_wrapper2): Declare new function.
* winbase.h: Remove obsolete code.
2003-12-02 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Change the way that -f options are appended to CFLAGS,
slightly.
2003-12-02 Christopher Faylor <cgf@redhat.com>
* fcntl.cc (_fcntl): Silence a compiler warning.
2003-12-02 Pierre Humblet <pierre.humblet@ieee.org>
* pinfo.cc (pinfo::init): Use shared_name to construct the mapname.
2003-12-01 Thomas Pfaff <tpfaff@gmx.net>
* thread.cc (pthread_rwlock::add_reader): Remove mx parameter for
List_insert call.
(pthread::prepare): Ensure race safeness when adding function
pointers to atfork lists by using List_insert.
* thread.h (List_insert): Use InterlockedCompareExchangePointer to
ensure race safeness without using a mutex.
(List_remove): Use InterlockedCompareExchangePointer to
ensure race safeness with List_insert.
(List::insert): Remove mx parameter for List_insert call.
2003-12-01 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (OBSOLETE_FUNCTIONS): Add fcntl.
(NEW_FUNCTIONS): Add fcntl64.
* cygwin.din: Export fcntl64. Make fcntl being SIGFE.
* fcntl.cc (fcntl_worker): New function.
(fcntl64): New function.
(_fcntl): Call fcntl_worker. Convert 32 bit flock structure into
64 bit flock structure and vice versa.
* fhandler.cc (fhandler_base::lock): Change 2nd parameter to
struct __flock64 *.
* fhandler_disk_file.cc (fhandler_disk_file::lock): Ditto. Rework
to be 64 bit aware.
* fhandler.h: Accomodate above method argument changes.
* include/cygwin/types.h: Add struct __flock32 and __flock64.
Define struct flock according to setting of __CYGWIN_USE_BIG_TYPES__.
* include/cygwin/version.h: Bump API minor number.
2003-12-01 Corinna Vinschen <corinna@vinschen.de>
* cygheap.cc (cygheap_init): Set cygheap->shared_prefix.
* cygheap.h (struct init_cygheap): Add shared_prefix.
* shared.cc (shared_name): Use cygheap->shared_prefix.
2003-12-01 Pierre Humblet <pierre.humblet@ieee.org>
* shared.cc (shared_name): Take into account the SE_CREATE_GLOBAL_NAME
privilege when building the name string.
(open_shared): Remove the call to OpenFileMapping.
(shared_info::initialize): Move cygheap initialization to ...
(memory_init): ... here. Suppress now useless shared_h variable.
(user_shared_initialize): Make tu a cygpsid.
2003-12-01 Dr. Volker Zell <Dr.Volker.Zell@oracle.com>
* include/tzfile.h: Remove duplicate definition of TM_SUNDAY.
* localtime.cc: Point TZDIR to the /usr/share/zoneinfo directory used
by the tzcode package.
2003-11-30 Corinna Vinschen <corinna@vinschen.de>
* flock.cc: Renamed from flock.c.
2003-11-29 Christopher Faylor <cgf@redhat.com>
* pinfo.h: Remove global_sigs declaration.
* siginfo.h: Move global_sigs declaration here.
* Makefile.in: Remove duplicate compiler flag.
2003-11-29 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (_threadinfo::pop): Zero *contents* of popped stack
location rather than the actual stack pointer.
2003-11-29 Nicholas Wourms <nwourms@netscape.net>
* Makefile.in: (DLL_OFILES): Add flock.o.
* cygwin.din: Export flock.
* flock.c: New file.
* include/sys/file.h: Include sys/cdefs.h.
Add function prototype for flock().
Add some comments from BSD's header for further clarity.
(L_SET, L_CURR, L_INCR, L_XTND): Redefine as the macros
SEEK_SET, SEEK_CUR, SEEK_CUR, & SEEK_END respectively.
(LOCK_SH,LOCK_EX,LOCK_NB,LOCK_UN): New macros for flock().
* include/cygwin/version.h: Bump API minor number.
2003-11-28 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (no_signals_available): Fix so that non-zero exit state is
a true condition rather than errnoneously only checking other states
when exist_state was zero.
2003-11-28 Christopher Faylor <cgf@redhat.com>
* pinfo.h (_pinfo::getthread2signal): Remove obsolete function.
* cygtls.h (_threadinfo): Define tid more precisely.
(_threadinfo::operator HANDLE): Define.
* exceptions.cc (_threadinfo::interupt_now): Use _threadinfo HANDLE
operator to derive thread handle.
(setup_handler): Ditto.
* sigproc.cc: Reorganize includes.
2003-11-28 Christopher Faylor <cgf@redhat.com>
* pinfo.h (_pinfo::getsig): Remove obsolete function, here and
throughout.
* exceptions.cc: Ditto.
* fhandler_termios.cc: Ditto.
* signal.cc: Ditto.
* sigproc.cc: Ditto.
* Makefile.in: Revert previous change which made a cygwin.din newer
than a version.h a warning rather than an error.
2003-11-28 Christopher Faylor <cgf@redhat.com>
* cygwin.din: Re-add inexplicably missing semaphore/msg functions.
2003-11-28 Christopher Faylor <cgf@redhat.com>
* gendevices: Issue error when shilka is missing.
2003-11-28 Christopher Faylor <cgf@redhat.com>
* include/cygwin/signal.h: New file.
2003-11-28 Christopher Faylor <cgf@redhat.com>
Eliminate use of sigframe and sigthread throughout.
* Makefile.in (DLL_OFILES): Add sigfe.o. Remove reliance on cygwin.def
from cygwin0.dll dependency since dependence on sigfe.o implies that.
Generate def file on the fly using 'gendef'.
* configure.in: Don't auto-generate cygwin.def.
* configure: Regenerate.
* cygwin.din: Add SIGFE stuff where appropriate.
* dcrt0.cc (dll_crt0_1): Initialize cygwin tls early in process
startup. Set _main_tls to address of the main thread's cygwin tls.
* debug.h: Remove now unneeded WFSO and WFMO declarations.
* exceptions.cc (_last_thread): Define.
(set_thread_state_for_signals): New function.
(reset_thread_exception_for_signals): Ditto.
(init_thread_for_signals): Ditto.
(delete_thread_for_signals): Ditto.
(capture_thread_for_signals): Ditto.
(handle_exceptions): Set return address explicitly for exceptions prior
to calling sig_send.
(interrupt_on_return): Eliminate.
(setup_handler): Add preliminary implementation for dealing with
thread-specific signals by querying _main_tls.
(signal_exit): Use cygthread::main_thread_id instead of mainthread.id.
(call_signal_handler_now): For now, just handle the main thread.
* fork.cc (vfork): Save and restore main _my_tls.
* gendef: New file. Generates def file and sigfe.s file.
* gentls_offsets: New file. Generates offsets for perl to use in
sigfe.s.
* how-signals-work.txt: Mention that info is obsolete.
* init.cc (dll_entry): Initialize cygwin tls storage here.
* miscfuncs.cc (low_priority_sleep): Make a C function for easier
calling from asm.
* perthread.h (vfork_save::tls): New element.
* signal.cc (nanosleep): Replace previous use of
sigframe.call_signal_handler_now with straight call to
call_signal_handler_now.
(abort): Ditto.
* syscalls.cc (readv): Ditto.
* termios.cc (tcsetattr): Ditto.
* wait.cc (wait4): Ditto.
* sigproc.cc (sig_dispatch_pending): Ditto.
(sig_send): Ditto.
* sigproc.h: Declare call_signal_handler_now.
* thread.cc (pthread::thread_init_wrapper): Initialize cygwin tls.
Remove obsolete and unworking signal stuff.
* thread.h (verifyable_object::sigs): Eliminate.
(verifyable_object::sigmask): Eliminate.
(verifyable_object::sigtodo): Eliminate.
(verifyable_object::exit): Make attribute noreturn.
(verifyable_object::thread_init_wrapper): Ditto.
(pthread_null::exit): Ditto.
* winbase.h (__stackbase): Always define.
* winsup.h (low_priority_sleep): Declare as a "C" function.
* include/cygwin/version.h: Bump API version to reflect sigwait export.
* include/sys/queue.h: Protect SLIST_ENTRY from previous declaration.
* signal.cc (sigwait): Implement.
* select.cc (fhandler_base::ready_for_read): Add debugging output.
* devices.h: Define more device pointers via their storage.
* devices.in: Don't parse things like /dev/inet/tcp, as they really
have no meaning.
* devices.cc: Regenerate.
* gendevices: Set proper protection for output file.
* cygtls.h: New file.
* gendef: New file.
* gentls_offsets: New file.
* tlsoffsets.h: New file. Autogenerated.
* config/i386/longjmp.c: Remove. File subsumed by gendef output.
* config/i386/makefrag: Remove obsolete file.
* fhandler.cc: Remove spurious access_worker declaration.
* spawn.cc (spawnve): Make debugging output more accurate.
* cygwin-gperf: Remove.
* devices.cc: Remove.
2003-11-28 Christopher Faylor <cgf@redhat.com>
* speclib: Use correct EOF marker. Ensure that directory is actually
deleted when running under Windows.
2003-11-27 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (fhandler_disk_file::readdir): Reorganize to
avoid inappropriate .lnk extensions with munged filenames under managed
mode.
2003-11-26 Corinna Vinschen <corinna@vinschen.de>
* sec_helper.cc (set_process_privilege): Rename restore_priv to
priv_luid.
2003-11-26 Pierre Humblet <pierre.humblet@ieee.org>
* sec_helper.cc (set_process_privilege): Call LookupPrivilegeValue
before opening the token.
2003-11-26 Corinna Vinschen <corinna@vinschen.de>
* dir.cc (mkdir): Use local security_descriptor. Call
set_security_attribute appropriately.
* external.cc (cygwin_internal): Ditto.
* fhandler.cc (fhandler_base::open): Ditto.
* fhandler_socket.cc (fhandler_socket::bind): Ditto.
* path.cc (symlink_worker): Ditto.
* sec_acl.cc (setacl): Ditto. Call read_sd appropriately.
(getace): Ditto.
* sec_helper.cc (security_descriptor::malloc): New method.
(security_descriptor::realloc): New method.
(security_descriptor::free): New method.
* security.cc (read_sd): Get security_descriptor as parameter instead
of PSECURITY_DESCRIPTOR and a size. Drop unnecessary parameter check.
Allocate the security_descriptor buffer according to size returned by
a call to GetFileSecurity. Return buffer size on success.
(write_sd): Get security_descriptor as parameter instead of
PSECURITY_DESCRIPTOR and a size.
(get_nt_attribute): Use local security_descriptor.
(get_nt_object_attribute): Ditto in case of type == SE_REGISTRY_KEY.
Allocate security_descriptor buffer according to size returned by
a call to RegGetKeySecurity.
(alloc_sd): Make static. Get security_descriptor as parameter instead
of PSECURITY_DESCRIPTOR and a size. Drop unnecessary parameter check.
(set_security_attribute): Get security_descriptor as parameter instead
of PSECURITY_DESCRIPTOR and a size.
(set_nt_attribute): Use local security_descriptor.
(check_file_access): Ditto.
* security.h: Add class security_descriptor.
(read_sd): Change declaration to get security_descriptor as parameter
instead of PSECURITY_DESCRIPTOR and a size.
(write_sd): Ditto.
(set_security_attribute): Ditto.
(alloc_sd): Remove declaration.
* thread.cc (semaphore::semaphore): Use local security_descriptor. Call
set_security_attribute appropriately.
2003-11-26 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.h (getace): Use FILE_*_BITS as permission mask.
* security.cc (get_attribute_from_acl): Ditto.
* security.h (FILE_READ_BITS): Define to match also GENERIC bits.
(FILE_WRITE_BITS): Ditto.
(FILE_EXEC_BITS): Ditto.
2003-11-25 Christopher Faylor <cgf@redhat.com>
* thread.cc: Minor whitespace cleanup. Remove some obsolete code.
2003-11-24 Christopher Faylor <cgf@redhat.com>
* dtable.cc (build_fh_name): Set error in dummy fhandler when one is
noted during path_conv.
* fhandler.h (fhandler_base::set_error): New method.
2003-11-24 Christopher Faylor <cgf@redhat.com>
* configure.in: Avoid using cygserver unless hosting on cygwin.
2003-11-23 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (sig_send): Correct below checkin. Use
thisframe.call_signal_handler.
2003-11-23 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (proc_exists): A zombie process does not exist.
(sig_send): Improve debugging output. Wait for pipe to be created
before trying to send to it. Call call_signal_handler_now if sending a
signal to myself.
2003-11-22 Christopher Faylor <cgf@redhat.com>
* dcrt0.cc (check_sanity_and_sync): Correct api major version check so
that newer dlls will work with older apps but not vice versa.
2003-11-21 Christopher Faylor <cgf@redhat.com>
* sem.cc: Always include signal.h to handle SIGSYS raise when
!USE_SERVER.
* shm.cc: Ditto.
2003-11-21 Christopher Faylor <cgf@redhat.com>
* msg.cc: Always include signal.h to handle SIGSYS raise when
!USE_SERVER.
2003-11-20 Christopher Faylor <cgf@redhat.com>
* configure.in: Make --use-server the default. Remove powerpc target.
* configure: Regenerate.
2003-11-20 Corinna Vinschen <corinna@vinschen.de>
* msg.cc (msgctl): Raise SIGSYS if call not available.
(msgget): Ditto.
(msgrcv): Ditto.
(msgsnd): Ditto.
* sem.cc (semctl): Ditto.
(semget): Ditto.
(semop): Ditto.
* shm.cc (shmat): Ditto.
(shmctl): Ditto.
(shmget): Ditto.
(shmdt): Ditto.
2003-11-19 Corinna Vinschen <corinna@vinschen.de>
* cygserver.h (client_request::request_code_t): Add
CYGSERVER_REQUEST_MSG and CYGSERVER_REQUEST_SEM.
(admininstrator_group_sid): Add extern declaration.
* cygserver_ipc.h: Rewrite.
* cygserver_msg.h: New file.
* cygserver_sem.h: New file.
* cygserver_shm.h: More or less rewrite.
* cygwin.din: Add msgctl, msgget, msgrcv, msgsnd, semctl, semget and
semop.
* msg.cc: Rewrite.
* safe_memory.h: Remove.
* sem.cc: Rewrite.
* shm.cc: Rewrite.
* include/cygwin/ipc.h: Use appropriate guard.
(struct ipc_perm): Add seq.
(IPCID_TO_IX): New define from BSD.
(IPCID_TO_SEQ): Ditto.
(IXSEQ_TO_IPCID): Ditto.
(IPC_R): Ditto.
(IPC_W): Ditto.
(IPC_M): Ditto.
* include/cygwin/msg.h: Use appropriate guard. #ifdef _KERNEL all stuff
not explicitely defined by SUSv3. Use signed types in structs to match
types used in BSD.
(msgqnum_t): Define unsigned.
(msglen_t): Ditto.
(struct msqid_ds): Add msg_first and msg_last.
(struct msginfo): Remove msgpool. Add msgssz and msgseg.
* include/cygwin/sem.h: Use appropriate guard. #ifdef _KERNEL all stuff
not explicitely defined by SUSv3. Use signed types in structs to match
types used in BSD.
(SEM_UNDO): Define appropriately.
(struct semid_ds): Add sem_base.
(struct seminfo): Add semmap and semusz.
(SEM_A): New define from BSD.
(SEM_R): Ditto.
(SEM_ALLOC): Ditto.
(union semun): Define.
* include/cygwin/shm.h: Use appropriate guard. #ifdef _KERNEL all stuff
not explicitely defined by SUSv3. Use signed types in structs to match
types used in BSD.
(SHMLBA): Define using cygwin_internal(CW_GET_SHMLBA) call.
(struct shmid_ds): Add shm_internal.
(struct shm_info): Rename shm_ids to used_ids as in BSD. Add define
for shm_ids.
* include/cygwin/sysproto.h: New file.
* include/cygwin/version.h: Bump API minor number.
* include/sys/ipc.h: New file.
* include/sys/msg.h: New file.
* include/sys/queue.h: New file from BSD.
* include/sys/sem.h: New file.
* include/sys/shm.h: New file.
* include/sys/sysproto.h: New file.
2003-11-19 Corinna Vinschen <corinna@vinschen.de>
* dtable.cc (build_fh_pc): Resurrect accidentally removed
DEV_CYGDRIVE_MAJOR case.
2003-11-17 Brian Ford <ford@vss.fsi.com>
* fhandler.cc (fhandler_base::lseek): Include high order offset
bits in return value.
2003-11-17 Corinna Vinschen <corinna@vinschen.de>
* bsdlib.cc (getprogname): New function.
(setprogname): New funtion.
* cygwin.din: Export getprogname and setprogname.
* include/cygwin/version.h: Bumb API version number.
2003-11-15 Christopher Faylor <cgf@redhat.com>
* include/limits.h: Revert unsanctioned changes below.
* include/cygwin/config.h: Ditto.
* include/sys/param.h: Ditto.
2003-11-14 Robert Collins <rbtcollins@hotmail.com>
Ron Parker <rdparker@butlermfg.com>
* bsdlib.cc: Update throughout to use CYG_MAX_PATH rather than MAX_PATH.
* cygheap.h: Ditto.
* dcrt0.cc: Ditto.
* delqueue.cc: Ditto.
* dlfcn.cc: Ditto.
* dll_init.cc: Ditto.
* dll_init.h: Ditto.
* dtable.cc: Ditto.
* environ.cc: Ditto.
* environ.h: Ditto.
* exceptions.cc: Ditto.
* external.cc: Ditto.
* fhandler_disk_file.cc: Ditto.
* fhandler_proc.cc: Ditto.
* fhandler_process.cc: Ditto.
* fhandler_raw.cc: Ditto.
* fhandler_registry.cc: Ditto.
* fhandler_socket.cc: Ditto.
* fhandler_virtual.cc: Ditto.
* miscfuncs.cc: Ditto.
* mmap.cc: Ditto.
* netdb.cc: Ditto.
* path.cc: Ditto.
* path.h: Ditto.
* pinfo.cc: Ditto.
* pinfo.h: Ditto.
* pthread.cc: Ditto.
* registry.cc: Ditto.
* shared.cc: Ditto.
* shared_info.h: Ditto.
* smallprint.c: Ditto.
* spawn.cc: Ditto.
* strace.cc: Ditto.
* syscalls.cc: Ditto.
* thread.h: Ditto.
* uinfo.cc: Ditto.
* winsup.h: Ditto.
* include/limits.h: Ditto.
* include/cygwin/config.h: Ditto.
* include/sys/param.h: Ditto.
2003-11-12 Brian Ford <ford@vss.fsi.com>
* dtable.cc (build_fh_pc): Use DEV_SERIAL_MAJOR to catch all serial
ports. Remove redundant FH_CYGDRIVE case since it is handled by
DEV_CYGDRIVE_MAJOR.
2003-11-11 Christopher Faylor <cgf@redhat.com>
Thomas Pfaff <tpfaff@gmx.net>
* thread.cc (pthread::exit): Cleanup on thread exit.
(__reent_t::init_clib): Set thread local clib __cleanup var
appropriately.
2003-11-10 Christopher Faylor <cgf@redhat.com>
* miscfuncs.cc (low_priority_sleep): Make a "C" function.
* winsup.h (low_priority_sleep): Revert previous change to declaration.
2003-11-10 Corinna Vinschen <corinna@vinschen.de>
* winsup.h (low_priority_sleep): Fix declaration to avoid linker
warning.
2003-11-10 Thomas Pfaff <tpfaff@gmx.net>
* thread.cc (__reent_t::init_clib): Set thread local clib
__sdidinit var appropriately.
2003-11-08 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (ftruncate64): Log length as long long.
(logout): Erase ut_host. Don't write wtmp entry. Return 1 only
if matching utmp entry has been found, 0 otherwise.
2003-11-08 Corinna Vinschen <corinna@vinschen.de>
* external.cc (cygwin_internal): Add CW_GET_UID_FROM_SID and
CW_GET_GID_FROM_SID handling.
* include/cygwin/version.h: Bump API minor number.
* include/sys/cygwin.h (cygwin_getinfo_types): Add
CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID.
2003-11-07 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Reorganize to
handle freeing of memory on error condition.
2003-11-07 Christopher Faylor <cgf@redhat.com>
* cygthread.cc (cygthread::freerange): Set inuse count. Avoid setting
ev from h as h would be NULL at this point.
(cygthread::operator new): Issue debugging info when overflowing the
thread pool.
(cygthread::cygthread): Set ev from h here after h has been initialized.
2003-11-06 Corinna Vinschen <corinna@vinschen.de>
* bsdlib.cc (_vwarnx): New function.
(vwarn): Ditto.
(vwarnx): Ditto.
(warn): Ditto.
(warnx): Ditto.
(verr): Ditto.
(verrx): Ditto.
(err): Ditto.
(errx): Ditto.
* cygwin.din: Export above functions.
* include/err.h: New file.
* include/cygwin/version.h: Bump API minor number.
2003-11-06 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (getshmlba): New function.
* external.cc (cygwin_internal): Add CW_GET_SHMLBA handling.
* mmap.cc (mmap64): Call getshmlba to evaluate granularity.
* winsup.h (getshmlba): Add declaration.
* include/cygwin/version.h: Bump API minor number.
* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_SHMLBA.
2003-11-06 Christopher Faylor <cgf@redhat.com>
* winsup.h: Declare access_worker.
2003-11-05 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/types.h: Fix preprocessor guards for vm_offset_t and
vm_size_t. Add typedef for vm_object_t.
2003-11-05 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Detect attempt
to open a directory which lacks read privileges.
2003-11-04 Corinna Vinschen <corinna@vinschen.de>
* external.cc (cygwin_internal): Add CW_GET_POSIX_SECURITY_ATTRIBUTE
handling.
* include/cygwin/version.h: Bump API minor number.
* include/sys/cygwin.h (cygwin_getinfo_types): Add
CW_GET_POSIX_SECURITY_ATTRIBUTE.
* exceptions.cc (init_global_security): Move from here...
* sec_helper.cc (init_global_security): ...to here.
2003-11-04 Christopher Faylor <cgf@redhat.com>
* net.cc (dup_ent): Use IsBadStringPtr for alignment checks. Don't use
a known bad pointer.
2003-11-03 Corinna Vinschen <corinna@vinschen.de>
* net.cc (dup_ent): Move Win 95 misalignment recogition before
trying to evaluate string length.
2003-10-31 Thomas Pfaff <tpfaff@gmx.net>
* thread.cc (pthread::thread_init_wrapper): Initialize exception
handling.
2003-10-31 Thomas Pfaff <tpfaff@gmx.net>
Rename pthread::running to pthread::valid throughout.
* thread.h: (pthread::suspend_all_except_self): New static method.
(pthread::resume_all): Ditto.
(pthread::suspend_except_self): New method.
(pthread::resume): Ditto.
* thread.cc (pthread::suspend_except_self): Implement.
(pthread::resume): Ditto.
2003-10-29 Danny Smith <dannysmith@users.sourceforege.net>
* include/stdint.h: Prevent signed->unsigned conversion for 32 and
64 bit min value constants.
2003-10-28 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* path.cc (dot_special_chars): New global variable.
(special_name): Make files ending in "." special.
(fnunmunge): Allow encoded ".".
(mount_item::fnmunge): Handle trailing ".".
2003-10-28 Christopher Faylor <cgf@redhat.com>
* include/stdint.h: Duplicate below effort for rest of *64_*.
2003-10-28 Christopher Faylor <cgf@redhat.com>
* include/stdint.h: Correctly define INT64_MAX.
2003-10-27 Thomas Pfaff <tpfaff@gmx.net>
* thread.h (fast_mutex::init): Initialize lock_counter.
2003-10-27 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (OBSOLETE_FUNCTION): Add tmpfile.
(NEW_FUNCTIONS): Add _tmpfile64 -> tmpfile translation.
* cygwin.din: Export _tmpfile64
* include/cygwin/version.h: Bump api minor number.
2003-10-27 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Add sem_close, sem_getvalue, sem_open and sem_timedwait.
* pthread.cc (+mangle_sem_name): New function.
(sem_open): Ditto.
(sem_close: Ditto.
(sem_timedwait): Ditto.
(sem_getvalue): Ditto.
* thread.cc (semaphore::semaphore): Rearrange member initialization.
Use appropriate security attribute for process shared semaphores.
(semaphore::semaphore): New constructor for named semaphores.
(semaphore::~semaphore): Care for semaphore name.
(semaphore::_post): Accomodate failing ReleaseSemaphore. Use value
returned by ReleaseSemaphore vor currentvalue.
(semaphore::_getvalue): New method.
(semaphore::_timedwait): Ditto.
(semaphore::_fixup_after_fork): Rearrange. Don't fail for process
shared semaphores.
(semaphore::open): New method.
(semaphore::timedwait): Ditto.
(semaphore::post): Fix return value. Set errno appropriately.
(semaphore::getvalue): New method.
* thread.h (class semaphore): Add prototypes for open, getvalue,
timedwait, _getvalue, _timedwait. Add prototypes for new constructor.
Add name member.
* include/semaphore.h: Add prototypes for sem_open, sem_close,
sem_timedwait and sem_getvalue.
include/cygwin/version.h: Bump API minor number.
2003-10-27 Corinna Vinschen <corinna@vinschen.de>
* miscfunc.cc (__check_invalid_read_ptr): New function.
* winsup.h: Declare.
2003-10-26 Corinna Vinschen <corinna@vinschen.de>
* security.h (cygpsid::debug_print): Avoid compiler warnings.
2003-10-25 Corinna Vinschen <corinna@vinschen.de>
* path.cc (normalize_posix_path): Test runs of more than two
dots for being a run of only dots. Let it pass if not.
2003-10-25 Brian Ford <ford@vss.fsi.com>
* fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.
2003-10-24 Thomas Pfaff <tpfaff@gmx.net>
Rename native_mutex to fast_mutex throughout.
Rename pthread_key::save_key_to_buffer to
pthread_key::_fixup_before_fork throughout.
Rename pthread_key::recreate_key_from_buffer to
pthread_key::_fixup_after_fork throughout.
* thread.cc (native_mutex::init): Remove.
(native_mutex::lock): Ditto.
(native_mutex::unlock): Ditto.
(pthread::push_cleanup_handler): InterlockedExchangePointer
is not needed here.
(pthread_rwlock::pthread_rwlock): Initialize readers list mutex.
(pthread_rwlock::add_reader): Add reader via List_insert.
(pthread_rwlock::lookup_reader): Lock list while walking through.
(pthread_cond::init): Locking the init mutex is now void.
(pthread_rwlock::init): Ditto.
(pthread_mutex::init): Ditto.
* thread.h: Include security.h.
(fast_mutex): New class. Replacement for native_mutex.
(List_insert): New template function.
(List_remove): Ditto.
(List::List): Initialize synchronising mutex.
(List::fixup_after_fork): New method.
(List::insert): Add node via List_insert.
(List::remove): Remove node via List_remove.
(List::pop): Remove.
(List::for_each): Lock list while walking through.
(List::mx_init): New method.
(pthread_mutex::fixup_after_fork): Fixup mutex list after fork.
(pthread::fixup_after_fork): Ditto.
(pthread_conds::fixup_after_fork): Ditto.
(pthread_rwlock::fixup_after_fork): Ditto.
(semaphore::fixup_after_fork): Ditto.
(pthread_rwlock::readers_mx): New member.
2003-10-24 Brian Ford <ford@vss.fsi.com>
* fhandler.cc (fhandler_base::fcntl): Don't clobber O_APPEND when
both O_NONBLOCK/O_NDELAY are set for F_SETFL.
2003-10-24 Corinna Vinschen <corinna@vinschen.de>
* path.cc (win32_device_name): Fix comment.
2003-10-23 Christopher Faylor <cgf@redhat.com>
* fhandler_tty.cc (fhandler_tty_slave::ioctl): Properly set return
value in FIONBIO case.
2003-10-23 Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc (format_proc_partitions): Use new device code
to get major and minor device numbers. Fix size evaluation.
2003-10-22 Corinna Vinschen <corinna@vinschen.de>
* external.cc (cygwin_internal): Add CW_GET_ERRNO_FROM_WINERROR
handling.
* include/cygwin/version.h: Bump API minor number.
* include/sys/cygwin.h (cygwin_getinfo_types): Add
CW_GET_ERRNO_FROM_WINERROR.
2003-10-22 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in: Add $(LIBSERVER) rule.
* cygserver.h: Moved from include/cygwin to here.
* cygserver_ipc.h: Moved from ../cygserver to here.
* cygserver_shm.h: Ditto.
* cygwin.din: Add shmat, shmctl, shmdt and shmget.
* fhandler_tty.cc (fhandler_tty_slave::open): Don't warn about handle
dup'ing if not build with USE_SERVER.
* shm.cc: Include cygerrno.h unconditionally.
(shmat): Set errno to ENOSYS and return -1 if not build with
USE_SERVER.
(shmctl): Ditto.
(shmdt): Ditto.
(shmget): Ditto.
* woutsup.h: Remove.
* include/cygwin/cygserver_process.h: Moved to ../cygserver directory.
* include/cygwin/cygserver_transport.h: Ditto.
* include/cygwin/cygserver_transport_pipes.h: Ditto.
* include/cygwin/cygserver_transport_sockets.h: Ditto.
* include/cygwin/version.h: Bump API minor number.
2003-10-16 Pierre Humblet <pierre.humblet@ieee.org>
* syscalls.cc (seteuid32): Always construct a default DACL including
the new sid, Admins and SYSTEM and copy it to the new thread token.
* security.cc (create_token): Use a NULL default DACL in NtCreateToken.
2003-10-14 Micha Nelissen <M.Nelissen@student.tue.nl>
* dcrt0.cc: Remove local variable alternate_charset_active.
* fhandler.h: Add variable alternate_charset_active, functions
str_to_con, con_to_str to dev_console structure.
* fhandler_console.cc (con_to_str): Move function into dev_console
class.
(str_to_con): Ditto.
(fhandler_console::read): Call con_to_str on dev_state.
(fhandler_console::write_normal): Call str_to_con on dev_state.
(fhandler_console::char_command): Change active_charset_active
assignment to be on dev_state.
* winsup.h: Remove global external variable alternate_charset_active.
2003-10-13 Micha Nelissen <M.Nelissen@student.tue.nl>
* fhandler_console.cc (char_command): Add escape sequence for codepage
ansi <-> oem switching for ncurses frame drawing capabilities.
* dcrt0.cc: Add local variable alternate_charset_active.
* winsup.h: Add global external variable alternate_charset_active.
2003-10-14 Corinna Vinschen <corinna@vinschen.de>
* exceptions.cc (ctrl_c_handler): Don't send SIGHUP on
CTRL_LOGOFF_EVENT to processes running in invisible Windows Stations.
* window.cc (has_visible_window_station): New function.
* winsup.h: Add declaration for has_visible_window_station.
2003-10-10 Christopher Faylor <cgf@redhat.com>
* fhandler_tty.cc (fhandler_tty_slave::open): Don't create a new window
station if one already exists.
2003-10-10 Christopher Faylor <cgf@redhat.com>
* shared.cc (shared_info::initialize): Remove myself check since
hMainProc initialization will allow user initialization to work.
2003-10-09 Yitzchak Scott-Thoennes <sthoenna@efn.org>
* include/sys/mman.h (MAP_FAILED): Define as void *.
2003-10-08 Christopher Faylor <cgf@redhat.com>
* dcrt0.cc (hMainProc): Initialize to useful value for use when dll is
dynamically loaded.
* shared.cc (shared_info::initialize): Don't initialize user stuff if
myself doesn't exist.
2003-10-08 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (unlink): Don't even try DELETE_ON_CLOSE technique on
systems not supporting it.
2003-10-02 Christopher Faylor <cgf@redhat.com>
* dcrt0.cc (dll_crt0_1): Call newlib __sinit routine to ensure that
stdio buffers are initialized to avoid thread initialization races.
2003-10-01 Christopher Faylor <cgf@redhat.com>
* path.cc (win32_device_name): Only fill out destination buffer when
it's really a device.
2003-09-30 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Add YA method for generating devices.cc.
* child_info.h: YA update of another magic number.
* gendevices: New file.
* devices.in: New file.
* devices.cc: Regenerate.
* devices.shilka: Remove.
* devices.h: Correctly define device pointers.
(device): Remove now obsolete fields.
(device::native): Renamed from device::fmt.
* dtable.cc (build_fh_dev): Simplify in light of new unit parsing
scheme.
(build_fh_pc): Ditto.
* path.cc (win32_device_name): Ditto.
* fhandler.h (fhandler_base::get_native_name): Reflect renaming of fmt
to native.
* fhandler_tty.cc (fhandler_tty_mster::init): Initialize slave device
prior to reporting unit.
2003-09-30 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::fstat): Drop FH_FLOPPY case.
2003-09-30 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (class fhandler_dev_raw): Add method fstat.
* fhandler_raw.cc (fhandler_dev_raw::fstat): New method.
2003-09-30 Corinna Vinschen <corinna@vinschen.de>
* devices.h (enum fh_devices): Remove DEV_RAWDRIVE_MAJOR and
FH_RAWDRIVE.
* devices.shilka (dev_rawdrive_storage): Remove.
(unit_devices): Remove pointer to dev_rawdrive_storage.
(uniq_devices): Remove rawdrive entry.
* dtable.cc (build_fh_pc): Remove DEV_RAWDRIVE_MAJOR case.
* path.cc (win32_device_name): ditto.
2003-09-29 Corinna Vinschen <corinna@vinschen.de>
* syslog.cc (vsyslog): Print debug message if ReportEventA fails.
2003-09-28 Pierre Humblet <pierre.humblet@ieee.org>
* sigproc.cc (proc_subproc): Restrict permissions on ppid_handle.
2003-09-28 Christopher Faylor <cgf@redhat.com>
* devices.shilka (device::parse): Restore check for tty in unit
handling, but without the previous typo.
* devices.cc: Regenerate.
* devices.h (DEV_CYGDRIVE_MAJOR): Change major number to one used by
linux for "user-mode virtual block device".
2003-09-28 Corinna Vinschen <corinna@vinschen.de>
* devices.h: Move a few device major numbers. Fix typo of FH_UDP.
* device.shilka: Remove /dev/hd device entries, rename all device_hd*
to device_sd*.
(device::parse): Disallow units outside lower and upper bounds.
* dtable.cc (build_fh_pc): Fix typo of FH_UDP.
* path.cc (win32_device_name): Fix win32 name creation to match new
device handling.
2003-09-27 Christopher Faylor <cgf@redhat.com>
* device.shilka (device::parse): Allow units on other than tty.
2003-09-27 Corinna Vinschen <corinna@vinschen.de>
* wincap.cc (wincapc::init): Allow requesting server info for NT4 SP6.
2003-09-27 Christopher Faylor <cgf@redhat.com>
* path.cc (symlink_info::check): Use new introducer for mknod'ed files.
(parse_device): Ditto.
* syscalls.cc (mknod_worker): Ditto.
2003-09-27 Christopher Faylor <cgf@redhat.com>
* devices.shilka: Add /dev/sda disk devices.
* devices.cc: Regenerate.
2003-09-27 Christopher Faylor <cgf@redhat.com>
* cygwin-shilka: Remove '#line directives' or suffer debugging oddities.
Use -length option so that device prefixes are used.
* devices.cc: Regenerate.
* syscalls.cc (ttyname): Add debugging output.
2003-09-26 Vaclav Haisman <V.Haisman@sh.cvut.cz>
* Makefile.in: Add libusr32.a to DLL_IMPORTS.
* wincap.h (wincaps::is_server): New flag.
(wincapc::version): Change type to OSVERSIONINFOEX.
(wincapc::is_server): New function.
* wincap.cc (wincap_unknown::is_server): New initializer.
(wincap_95): Ditto.
(wincap_95osr2): Ditto.
(wincap_98): Ditto.
(wincap_me): Ditto.
(wincap_nt3): Ditto.
(wincap_nt4): Ditto.
(wincap_nt4sp4): Ditto.
(wincap_2000): Ditto.
(wincap_xp): Ditto.
(wincapc::init): Adapt to OSVERSIONINFOEX. Add detection of NT server
systems.
* sched.cc: Include windows.h and registry.h.
(sched_rr_get_interval): Re-implement for NT systems.
2003-09-26 Christopher Faylor <cgf@redhat.com>
* fhandler_tty.cc (fhandler_tty_slave::ioctl): Properly set
ioctl_request event when window size changes. Store failing errno in
ioctl_retval (needed?).
2003-09-26 Pavel Tsekov <ptsekov@gmx.net>
* fhandler_console.c (fhandler_console::read): Record the state of the
SHIFT, CTRL and ALT keys at the time of the last keyboard input event.
(fhandler_console::ioctl): Handle requests to retrieve the keyboard
modifiers via the TIOCLINUX command.
* fhandler_tty.c (fhandler_tty_slave::read): Ditto.
* include/sys/termios.h (TIOCLINUX): New macro definition.
2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
* pinfo.cc (pinfo::init): Do not give FILE_MAP_WRITE access to Everybody.
* exceptions.cc (sig_handle_tty_stop): Do not create pinfo parent with
PID_MAP_WRITE.
* fhandler_process.cc (fhandler_process::fill_filebuf): Ditto for pinfo p.
* signal.cc (kill_worker): Ditto for pinfo dest.
2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
* pinfo.h (pinfo::set_acl): Declare.
* pinfo.cc (pinfo_fixup_after_fork): Duplicate with no rights.
(pinfo::set_acl): New.
* spawn.cc (spawn_guts): Call myself.set_acl.
2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
* uinfo.cc (cygheap_user::init): Make sure the current user appears
in the default DACL. Rearrange to decrease the indentation levels.
Initialize the effec_cygsid directly.
(internal_getlogin): Do not reinitialize myself->gid. Open the process
token with the required access.
* cygheap.h (class cygheap_user): Delete members pid and saved_psid.
Create members effec_cygsid and saved_cygsid.
(cygheap_user::set_sid): Define inline.
(cygheap_user::set_saved_sid): Ditto.
(cygheap_user::sid): Modify.
(cygheap_user::saved_sid): Modify.
* cygheap.cc (cygheap_user::set_sid): Delete.
(cygheap_user::set_saved_sid): Ditto.
* sec_helper.cc (sec_acl): Set the correct acl size.
* autoload.cc (FindFirstFreeAce): Add.
* security.h: Define ACL_DEFAULT_SIZE.
2003-09-26 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (munmap): Use correct address and length parameters when
calling fhandler's munmap.
2003-09-26 Corinna Vinschen <corinna@vinschen.de>
* spawn.cc (spawn_guts): Set errno to E2BIG if command line is
longer than CreateProcess allows (32K).
2003-09-25 Christopher Faylor <cgf@redhat.com>
* dtable.cc (build_fh_name): Return pointer to a 'nodevice' rather than
a NULL pointer or suffer SEGVs with invalid paths.
2003-09-25 Christopher Faylor <cgf@redhat.com>
* fork.cc (fork_parent): Detect failed pinfo constructor.
* spawn.cc (spawn_guts): Don't overwrite ENOMEM errno on failed pinfo
constructor.
2003-09-25 Christopher Faylor <cgf@redhat.com>
* spawn.cc (spawnve): Remove vfork short circuit and let caller deal
with error return.
2003-09-25 Pierre Humblet <pierre.humblet@ieee.org>
Christopher Faylor <cgf@redhat.com>
* spawn.cc (spawn_guts): Catch potential error from pinfo.remember.
Change debug messages to make sense. Pass correct value to pinfo
constructor. Ensure cleanup after errors. Always reimpersonate after
errors.
2003-09-25 Christopher Faylor <cgf@redhat.com>
* spawn.cc (spawn_guts): Move system signal handling stuff after
CreateProcess error check.
2003-09-25 Pierre Humblet <pierre.humblet@ieee.org>
* shared_info.h: Update CURR_USER_MAGIC, CURR_SHARED_MAGIC and
SHARED_INFO_CB.
(mount_info::cb): Delete.
(mount_info::version): Delete.
(shared_info::delqueue): Delete.
* Makefile.in: Do magic for USER_MAGIC, class user_info, instead
of for mount_info.
2003-09-24 Christopher Faylor <cgf@redhat.com>
* include/tzfile.h: Add some missing entries.
2003-09-24 Christopher Faylor <cgf@redhat.com>
* include/paths.h: Add some missing entries.
2003-09-24 Christopher Faylor <cgf@redhat.com>
* shared_info.h (CURR_MOUNT_MAGIC): Fix.
* sigproc.cc (sigpacket): New structure.
(sig_send): Fill out sigpacket structure to send to signal thread
rather than racily sending separate packets.
(wait_sig): Use sigpacket structure to receive info from signal sender.
2003-09-24 Pierre Humblet <pierre.humblet@ieee.org>
* shared_info.h (class user_info): New.
(cygwin_user_h): New.
(user_shared): New.
(enum shared_locations): Replace SH_MOUNT_TABLE by SH_USER_SHARED;
(mount_table): Change from variable to macro.
* shared.cc: Use sizeof(user_info) in "offsets".
(user_shared_initialize): Add "reinit" argument to indicate need
to reinitialize the mapping. Replace "mount_table" by "user_shared"
throughout. Call user_shared->mountinfo.init and
user_shared->delqueue.init.
(shared_info::initialize): Do not call delqueue.init.
(memory_init): Add argument to user_shared_initialize.
* child_info.h (child_info::mount_h): Delete.
(child_info::user_h): New.
* sigpproc.cc (init_child_info): Use user_h instead of mount_h.
* dcrt0.cc (_dll_crt0): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::close): Use
user_shared->delqueue instead of cygwin_shared->delqueue.
* fhandler_virtual.cc (fhandler_virtual::close): Ditto.
* syscalls.cc (close_all_files): Ditto.
(unlink): Ditto.
(seteuid32): Add argument to user_shared_initialize.
2003-09-24 Christopher Faylor <cgf@redhat.com>
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file.
2003-09-24 Christopher Faylor <cgf@redhat.com>
Reorganize headers so that path.h precedes fhandler.h throughout.
Remove device argument and unit arguments from fhandler constructors
throughout. Remove pc arguments to fhandler functions and use internal
pc element instead, throughout. Use dev element in pc throughout. Use
major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather
than directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor
numbers. Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_*
type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or
build_fh_name to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name.
Move out of dtable class. Don't accept a path_conv argument. Just
build it here and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable
class. Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of
dtable class. Simplify arguments to just take new 'device' type and a
name. Just return pointer to fhandler rather than trying to insert
into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument
differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set
normalized path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than
get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and,
instead, just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base
class from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in
debugging output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy
standard urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device
argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods
Check for FH_FS rather than FH_BAD to indicate when to fill in
filesystem stuff. where appropriate rather than direct access. Use
set_normalized_path to set normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the
heavy lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for
accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline
methods to accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling
fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before
closing it.
(handler_pipe::create): Rename from make_pipe. Change arguments to
accept fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather
than indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an
on-filesystem device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an
on-filesystem device and handle appropriately. Use chmod_device to set
mode of in-filesystem devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to
construct fhandler. Use fh->error() rather than pc->error to detect
errors in fhandler construction.
(access_worker): New function pulled from access. Accommodate
in-filesystem devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an
on-filesystem device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and
don't worry about pending_signals since sig_dispatch_pending should
always do the right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to
SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless
already in signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff.
Close signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe
to send signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-22 Christopher Faylor <cgf@redhat.com>
* dcrt0.cc (do_exit): Eliminate "C" linkage. Call events_terminate
early.
(exit_states): Move out of source file into header file.
* winsup.h: Move exit_states here. Remove "C" linkage from do_exit
declaration.
* debug.cc (lock_debug): Remove explicit (and incorrect) external for
exit_state.
* sigproc.cc (sig_dispatch_pending): Don't flush signals if exiting.
2003-09-20 Christopher Faylor <cgf@redhat.com>
* spawn.cc (pthread_cleanup): New struct.
(do_cleanup): New function.
(spawn_guts): Initialize struct for pthread_cleanup handling to ensure
proper restoration of signals if/when thread is cancelled. Restore
settings using pthread_cancel_pop.
2003-09-19 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 6.
2003-09-19 Christopher Faylor <cgf@redhat.com>
* thread.h (__reent_t::init_clib): Declare new function.
* thread.cc (__reent_t::init_clib): Define new function.
(pthread::thread_init_wrapper): Use __reent_t::init_clib to init local
clib storage and set std{in,out,err} appropriately.
2003-09-19 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (system): Strip signal considerations from here so that
they are not inherited by a child process.
* spawn.cc (spawn_guts): Handle system() signal stuff here.
* winsup.h (_P_SYSTEM): Define.
2003-09-18 Corinna Vinschen <corinna@vinschen.de>
* fhandler_tty.cc (fhandler_pty_master::process_slave_output):
Handle buf == NULL as flushing the buffer.
(fhandler_tty_slave::read): Handle ptr == NULL as flushing the buffer.
(fhandler_tty_slave::tcflush): Implement input queue flushing by
calling read with NULL buffer.
(fhandler_pty_master::tcflush): Ditto, calling process_slave_output.
* termios.cc (tcflush): Check for legal `queue' value. Return
EINVAL otherwise.
2003-09-16 Brian Ford <ford@vss.fsi.com>
* syscalls.cc (gethostid): Add lpFreeBytesAvailable argument to
GetDiskFreeSpaceEx call since NT4 requires it.
2003-09-16 Christopher Faylor <cgf@redhat.com>
* fhandler_process.cc (fhandler_process::fill_filebuf): Open pinfo with
PID_MAP_RW.
* sigproc.cc (talktome): Ditto for winpids.
2003-09-16 Christopher Faylor <cgf@redhat.com>
* pinfo.h (winpids::pid_access): New element.
(winpids::winpids): Rejigger to set pinfo_access.
* pinfo.cc (winpids::add): Try to open shared memory region with
supplied pinfo_access first, then default to readonly.
* fhandler_termios.cc (tty_min::kill_pgrp): When getting list of pids
to work with, suggest opening with PID_MAP_RW.
* signal.cc (kill_pgrp): Ditto.
* sigproc.cc (sig_send): Perform a write check on todo prior to
attempting to increment it. Return EACCES if we can't write to it.
2003-09-16 Corinna Vinschen <corinna@vinschen.de>
* cygheap.cc (cygheap_user::set_saved_sid): Rename from set_orig_sid.
* cygheap.h (class cygheap_user): Rename orig_psid, orig_uid and
orig_gid to saved_psid, saved_uid and saved_gid respectively.
Rename methods orig_sid and set_orig_sid to saved_sid and set_saved_sid
respectively.
* sec_helper.cc (sec_acl): Accomodate above changes.
* spawn.cc (spawn_guts): Ditto.
* uinfo.cc (uinfo_init): Ditto.
2003-09-15 Christopher Faylor <cgf@redhat.com>
* getopt.c (opterr): Reinstate initialization.
(optind): Ditto.
(optopt): Ditto.
* pinfo.cc: Include cygheap.h or suffer compile error.
* shared.h: Reset magic number.
2003-09-15 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (sig_handle_tty_stop): Fix boneheaded mistake by using
correct check for parent state rather than inverted check.
2003-09-15 Pierre Humblet <pierre.humblet@ieee.org>
* security.h (__sec_user): Add "access2" argument.
(sec_acl): Add "original" and "access2" arguments.
(sec_user): Add "sid2" and "access2" argument. Remove dependence on
allow_ntsec.
(sec_user_nih): Ditto.
* sec_helper.cc (__sec_user): Add "has_security" test.
Call sec_acl with new arguments, letting it handle original_sid.
(sec_acl): Add "original" and "access2" arguments. Handle original_sid
depending on flag but avoiding duplicates. Use "access2" for sid2.
* pinfo.cc (pinfo::init): Use security attributes created by sec_user
when creating the mapping.
* security.cc (create_token): Adjust arguments in call to sec_acl.
Call sec_user instead of __sec_user.
* syscall.cc (seteuid32): Adjust arguments in call to sec_acl. Remove
now unnecessary test. Remove useless conversions to psid.
* dcrt0.cc (dll_crt0_1): Call cygsid::init before pinfo_init.
2003-09-13 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Make malloc_wrapper -fomit-frame-pointer.
* cygwin.din: Remove extraneous mallinfo definition.
* dcrt0.cc (quoted): Use strechr for efficiency.
* fhandler.cc (fhandler_base::write): Correctly use get_output_handle
rather than get_handle.
(fhandler_base::lseek): Use method for accessing name in debug output.
2003-09-13 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (path_conv::ndisk_links): Fix potential
off-by-one problem when first file in a directory is a directory.
2003-09-13 Pierre Humblet <pierre.humblet@ieee.org>
* include/sys/cygwin.h: Rename PID_UNUSED to PID_MAP_RW.
* pinfo.cc (pinfo_init): Initialize myself->gid.
(pinfo::init): Create the "access" variable, set it appropriately and
use it to specify the requested access.
* exceptions.cc (sig_handle_tty_stop): Add PID_MAP_RW in pinfo parent.
* signal.cc (kill_worker): Ditto for pinfo dest.
* syscalls.cc (setpgid): Ditto for pinfo p.
2003-09-13 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 5.
2003-09-12 Christopher Faylor <cgf@redhat.com>
* thread.cc (MTinterface::fixup_after_fork): Remove code which
potentially overwrote _impure pointer with contents of thread which
invoked fork since this eliminates important information like the
pointer to the atexit queue.
2003-09-12 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (path_conv::ndisk_links): Fix problem where
search characters overwrote the path instead of being tacked on the
end.
2003-09-12 Christopher Faylor <cgf@redhat.com>
* dcrt0.cc (_dll_crt0): Accommodate breaking apart of early_stuff_init.
* exceptions.cc (early_stuff_init): Delete.
(init_console_handler): New function - top half of early_stuff_init.
(init_global_security): New function - bottom half of early_stuff_init.
(sig_handle): Avoid special hExeced test for SIGINT. Just terminate
the captive process.
(signal_exit): Add debugging output.
* fhandler_tty.cc (fhandler_tty_slave::open): Don't allocate a console
if one already seems to exist. Properly initialize ctrl-c handling if
we do allocate a console.
* winsup.h (early_stuff_init): Delete declaration.
(init_console_handler): New declaration.
(init_global_security): New declaration.
2003-09-11 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (path_conv::ndisk_links): Rename from
num_entries. Accept an argument and calculate any extra links needed
based on missing . and .. entries.
(fhandler_disk_file::fstat_helper): Always call pc->ndisks_links() to
calculate the number of links.
* path.h (path_conv::ndisk_links): Declare.
2003-09-11 Christopher Faylor <cgf@redhat.com>
* path.cc (normalize_posix_path): Put check for '//' prefix back to
denote a UNC path.
(slash_unc_prefix_p): Remove vestige of old //c method for accessing
drives.
2003-09-11 Christopher Faylor <cgf@redhat.com>
* dir.cc (rmdir): Add more samba workarounds.
2003-09-11 Corinna Vinschen <corinna@vinschen.de>
* shared.cc (user_shared_initialize): Revert length attribute for name
variable to be just UNLEN + 1.
2003-09-10 Pierre Humblet <pierre.humblet@ieee.org>
* shared_info.h (shared_info::initialize): Remove argument.
* cygheap.h (cygheap_user::init): New declaration.
* uinfo.cc (cygheap_user::init): New.
(internal_getlogin): Move functionality to cygheap_user::init. Open
the process token to update the group sid.
* shared.cc (user_shared_initialize): Get the user information from
cygheap->user.
(shared_info::initialize): Remove argument. Call cygheap->user.init
instead of cygheap->user.set_name.
(memory_init): Do not get the user name and do not pass it to
shared_info::initialize.
* registry.cc (get_registry_hive_path): Make csid a cygpsid.
(load_registry_hive): Ditto.
2003-09-10 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (num_entries): Take . and .. into account if
they do not exist since cygwin simulates them.
(fhandler_cygdrive::fstat): Ditto.
(fhandler_cygdrive::readdir): Don't do any specific tests on
__d_position when seeing if a drive exists.
2003-09-10 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (DLL_OFILES): Add getopt.o and iruserok.o.
* cygwin.din: Export __check_rhosts_file, __rcmd_errstr, optarg,
opterr, optind, optopt, optreset, getopt, getopt_long, iruserok
and ruserok.
* getopt.c: Moved from lib to here. Define opt* variables as
dllexport.
* iruserok.c: Moved from lib to here. Rearrange function order.
Prefer using 64/32 bit functions.
* syscalls.cc (shell_fp): Define as struct __sFILE64.
(getusershell): Use fopen64 instead of fopen.
* winsup.h: Add declarations for seteuid32, fopen64,
cygwin_gethostbyname and cygwin_inet_addr.
* include/getopt.h: Declare opt* variables dllimport.
* include/cygwin/version.h: Bump API minor number.
2003-09-10 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (sig_handle_tty_stop): Check parent PID_NOCLDSTOP
rather than erroneously checking *my own* sigtodo.
2003-09-10 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Add some more -fomit-frame-pointer files.
* path.cc (conv_path_list_buf_size): Free normalized_path or suffer
memory leak.
* syscalls.cc (chroot): Ditto.
2003-09-10 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (DLL_OFILES): Add bsdlib.o.
* autoload.cc (RegisterServiceProcess): Add.
* bsdlib.cc: New file.
(daemon): New function.
(login_tty): Ditto.
(openpty): Ditto.
(forkpty): Ditto.
* cygwin.din: Export daemon, forkpty, login_tty, logwtmp, updwtmp,
openpty and revoke.
* syscalls.cc (updwtmp): New function, writing to wtmp exclusively.
(logwtmp): Ditto.
(login): Call updwtmp instead of writing to wtmp by itself.
(logout): Ditto.
* tty.cc (revoke): New funtion.
* include/paths.h: Define _PATH_DEVNULL.
* include/pty.h: New header.
* include/cygwin/version.h: Bump API minor number.
* include/sys/utmp.h: Declare logwtmp with const arguments.
Declare updwtmp.
* lib/iruserok.c: New file.
(ruserok): New function.
(iruserok): Ditto.
(__ivaliduser): Ditto.
(__icheckhost): Ditto.
2003-09-10 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::fstat): Don't use PC_POSIX.
2003-09-09 Pierre Humblet <pierre.humblet@ieee.org>
* shared_info.h: Include security.h.
(open_shared): Add psa argument.
(user_shared_initialize): New declaration.
* security.h: Add _SECURITY_H guard.
(sec_user): Use sec_none in the no ntsec case.
* spawn.cc (spawn_guts): Remove call to load_registry_hive.
* syscalls (seteuid32): If warranted, call load_registry_hive,
user_shared_initialize and RegCloseKey(HKEY_CURRENT_USER).
* shared.cc (user_shared_initialize): New.
(open_shared): Add and use psa argument.
(memory_init): Move mount table initialization to
user_shared_initialize. Call it.
2003-09-09 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap64): Change address types from caddr_t to void *
according to SUSv3.
(mmap): Ditto.
(munmap): Ditto.
(msync): Ditto.
(mprotect): Ditto. Move to before the fhandler methods.
* include/sys/mman.h: Change prototypes accordingly.
2003-09-08 Christopher Faylor <cgf@redhat.com>
* dcrt0.cc (dlL_crt0_1): Set __argc_safe after __argc is absolutely
know to be set.
* exceptions.cc (sig_handle_tty_stop): Don't reset sigCONT event since
it is reset automatically.
* fork.cc (fork): Remove obsolete usage of PID_SPLIT_HEAP.
* include/sys/cygwin.h: Ditto.
* sigproc.cc (sig_send): Use sigframe init method to set frame since it
checks for previous ownership of the frame.
* sigproc.h (sigframe::init): Accept an "is_exception" argument.
2003-09-08 Christopher Faylor <cgf@redhat.com>
* dir.cc (readdir): Reinstate setting of old ino field for legacy
applications.
* dirent.h (dirent): Rename unused field to __ino32.
2003-09-08 Christopher Faylor <cgf@redhat.com>
* passwd.cc (getpwnam_r): Initialize pw_comment field.
2003-09-08 Christopher Faylor <cgf@redhat.com>
* passwd.cc (getpwuid_r32): Initialize pw_comment field.
2003-09-08 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (wait_sig_inited): Remove assertion since it is racy.
2003-09-08 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export endusershell, getusershell and setusershell.
* syscalls.cc (getusershell): New function.
(setusershell): Ditto.
(endusershell): Ditto.
* include/cygwin/version.h: Bump API minor number.
2003-09-08 Nicholas Wourms <nwourms@netscape.net>
* cygwin.din: Export argz_add argz_add_sep argz_append argz_count
argz_create argz_create_sep argz_delete argz_extract argz_insert
argz_next argz_replace argz_stringify envz_add envz_entry envz_get
envz_merge envz_remove envz_strip
* include/cygwin/version.h: Bump api minor number.
2003-09-07 Christopher Faylor <cgf@redhat.com>
Throughout, remove __d_u.__d_data fields from DIR structure.
* include/sys/dirent.h (dirent): Remvoe old_d_ino.
(DIR): Make __d_dirhash a 64 bit value. Remove __d_data and __d_u.
Add __flags.
* dir.cc (opendir_states): New enum.
(opendir): Clear new DIR __flags field.
(readdir): Fill in '.' and '..' entries if we hit EOF and we haven't
seen them already. Nuke setting of old_d_ino.
(rewinddir): Reset DIR __flags field.
(seekdir64): Ditto.
* fhandler_disk_file.cc (fhandler_cygdrive::fhandler_cygdrive): Remove
special handling of "." and ".." since they are now handled
automatically.
2003-09-07 Christopher Faylor <cgf@redhat.com>
* include/cygwin/in.h: Don't define ipv6 stuff unless we call for it
specifically since it isn't really implemented yet.
2003-09-07 Christopher Faylor <cgf@redhat.com>
* cygheap.cc (_csbrk): More left coercion cleanup.
* fhandler_tty.cc (fhandler_tty_slave::read): Ditto.
(fhandler_tty_slave::write): Ditto.
* fhandler_windows.cc (fhandler_windows::read): Ditto.
* heap.cc (sbrk): Ditto.
2003-09-07 Pierre Humblet <pierre.humblet@ieee.org>
* signal.cc (nanosleep): Improve test for valid values. Round delay up
to resolution. Fix test for negative remainder. Use timeGetTime
through gtod.
(sleep): Round up return value.
2003-09-07 Pierre Humblet <pierre.humblet@ieee.org>
Christopher Faylor <cgf@redhat.com>
* hires.h (HIRES_DELAY_MAX): Define.
(hires_ms::minperiod): Declare static.
(hires_ms::resolution): New.
(hires_ms::dmsecs): New.
(hires_ms::prime): Return UINT.
(gtod): Declare.
* times.cc (hires_ms::prime): Always calculate minperiod and set it to
1 in case of failure. Return minperiod.
(hires_ms::resolution): Define.
(hires_ms::~hires_ms): Delete.
(hires_ms::usecs): Check minperiod to prime.
(gtod) Define as global.
2003-09-06 Christopher Faylor <cgf@redhat.com>
Remove left coercion throughout.
2003-09-04 Pierre Humblet <pierre.humblet@ieee.org>
* hires.h (hires_ms::~hires_ms): Delete declaration.
* times.cc (hires_ms::~hires_ms): Delete definition..
2003-09-04 Christopher Faylor <cgf@redhat.com>
* dcrt0.cc (__argc_safe): New variable.
(dll_crt0_1): Store argc in __argc_safe, which will theoretically
remain untouched by the user.
* fhandler_console.cc (fhandler_console::read): Silence some compiler
warnings.
* fhandler_raw.cc (fhandler_dev_raw::raw_read): Ditto.
* pinfo.cc (_pinfo::commune_recv): Carefully bound argv scan and check
for potentially bad pointers since user could have set argv cell to
anythinw.
* cygheap.h (CYGHEAPSIZE): Bump up size.
2003-09-04 Corinna Vinschen <corinna@vinschen.de>
* sysconf.cc (sysconf): Return more accurate value for _SC_AVPHYS_PAGES.
2003-09-04 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc: Restructure. Add, remove and rewrite comments throughout
for better readability. Change function names for better
understanding.
(MAP_SET): Accomodate name change from map_map_ to page_map_.
(MAP_CLR): Ditto.
(MAP_ISSET): Ditto.
(mmap_record::page_map_): Rename from page_map_.
(mmap_record::get_map): Remove.
(mmap_record::alloc_page_map): Rename from alloc_map. Return bool
indicating success of cygheap memory allocation.
(mmap_record::free_page_map): Rename from free_map.
(mmap_record::fixup_page_map): Rename from fixup_map.
(mmap_record::find_unused_pages): Rename from find_empty.
(mmap_record::map_pages): Rename from map_map.
(mmap_record::unmap_pages): Rename from unmap_map.
(class list): Make all class members private.
(list::list): Remove.
(list::~list): Remove.
(list::get_fd): New attribute reader.
(list::get_hash): Ditto.
(list::get_record): Ditto.
(list::add_record): Manage all allocation for mmap_records. Check
for failed memory allocation and return NULL if so.
(list::set): New function.
(list::del_record): Rename from erase. Return true if last mmap_record
has been deleted, false otherwise. Check for legal incoming index
value.
(list::erase): Remove erase/0.
(list::search_record): Rename from match.
(map::map): Remove.
(map::~map): Remove.
(map::add_list): Manage all allocation for lists. Check for failed
memory allocation and return NULL if so.
(map::get_list): New method.
(map::del_list): Rename from erase. Check for legal incoming index
value.
(mmap64): Check for failed mmap_record memory allocation. Return
with MAP_FAILED and errno set to ENOMEM if so.
(munmap): Rearrange loop using new list and mmap_record accessor
functions. Rename loop index variables for better understanding.
Check if list can be deleted after last mmap_record in it has been
deleted.
(msync): Rearrange loop using new list and mmap_record accessor
functions. Rename loop index variables for better understanding.
(fixup_mmaps_after_fork): Ditto.
2003-09-03 Christopher Faylor <cgf@redhat.com>
* cxx.cc (new): Fix formatting. Just return result of ccalloc rather
than calling memset explicitly.
2003-09-03 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (set_process_mask): Set pending signals only when
signals become unmasked.
* sigproc.cc (pending_signals): Flip back to a global.
(wait_sig): Don't set pending signals when there is an armed semaphore
or signal is blocked.
* shared.cc (shared_info::initialize): Add a username parameter for
user-mode mounts. Reorganize to try to avoid startup race.
(memory_init): Move some stuff into shared_info::initialize.
* shared_info.h (shared_info::initialize): Change declaration.
(CURR_SHARED_MAGIC): Update.
2003-09-01 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 4.
2003-09-01 Christopher Faylor <cgf@redhat.com>
* net.cc (dup_ent): Restore check for NULL input.
2003-08-31 Christopher Faylor <cgf@redhat.com>
* include/sys/cygwin.h: Don't define cygwin-specific things if
!__CYGWIN__.
2003-08-31 Christopher Faylor <cgf@redhat.com>
* cygheap.cc (cygheap_init): Allocate space for sigaction array in
cygheap.
* cygheap.h (cygheap_types): Add HEAP_SIGS.
* exceptions.cc (signal_fixup_after_exec): Remove from this file.
* pinfo.h (pinfo::getsig): Just return global_sigs array.
(pinfo::sigs): Delete.
* sigproc.cc (signal_fixup_after_exec): Move it here.
(global_sigs): New global array, moved from pinfo structure.
(sigalloc): New function. Allocate global sigaction array here.
(proc_subproc): Remove copysigs call. It's automatic now.
* include/sys/cygwin.h (PID_NOCLDSTOP): New value.
* signal.cc (sigaction): Set myself->PID_NODCLDSTOP when appropriate.
* sigproc.h (sigalloc): Declare.
* fnmatch.c (fnmatch): Use C90 parameters.
(rangematch): Ditto.
* fhandler.cc (fhandler_base::raw_read): Use right coercion to avoid a
compiler warning.
2003-08-31 Christopher Faylor <cgf@redhat.com>
* net.cc (dup_ent): Make debugging output consistent.
2003-08-31 Christopher Faylor <cgf@redhat.com>
Use dup_ent rather than specific dup_*_ptr functions throughout.
* (gen_ent): Delete.
(dup_ent): Subsume gen_ent functionality.
(dup_host_ptr): Delete.
(dup_proto_ptr): Ditto.
(dup_servent_ptr): Ditto.
2003-08-31 Christopher Faylor <cgf@redhat.com>
* net.cc (gen_ent): Invert sense of null check so that debug output
makes sense.
2003-08-31 Christopher Faylor <cgf@redhat.com>
* net.cc (free_char_list): Delete.
(dup_addr_list): Delete.
(dup_char_list): Delete.
(free_hostent_ptr): Delete.
(free_protoent_ptr): Delete.
(free_servent_ptr): Delete.
(DWORD_round): New function.
(strlen_round): New function. Returns strlen rounded up to word size.
(dup_ent): New, generic function to duplicate a {host,proto,serv}ent
structure.
(gen_ent): New macro. Generates a generic dup_{host,proto,serv}ent_ptr
function.
(cygwin_getservbyname): Remove call to free_servent_ptr, pass
servent_buf to dup_servent_ptr.
(cygwin_getservbyport): Ditto.
(cygwin_gethostbyname): Ditto for hostent.
(cygwin_gethostbyaddr): Ditto.
(cygwin_getprotobyname): Ditto for protoent.
(cygwin_getprotobynumber): Ditto.
2003-08-31 Christopher Faylor <cgf@redhat.com>
* Makefile.in (MALLOC_OFILES): Always fill in with correct malloc
object.
* configure.in: Fill in MALLOC_OFILES with either debugging or regular
malloc.
* configure: Regenerate.
* dlmalloc.c: Make various fruitless changes to attempt to get to work.
* dlmalloc.h: Ditto.
* malloc.cc (free): Check malloc pool when debugging.
* path.cc (win32_device_name): Eliminate compiler warning.
* sigproc.cc (sig_dispatch_pending): Remove use of was_pending. Let
thisframe.call_signal_handler decide if handler should be called rather
than using bogus was_pending check.
* exceptions.cc (interrupt_setup): Remove accidentally checked in
debugging code.
2003-08-30 Christopher Faylor <cgf@redhat.com>
* heap.cc (sbrk): Save rounded addess in user_heap_max.
2003-08-30 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (sig_dispatch_pending): Remove explicit call to
thisframe.call_signal_handler.
2003-08-30 Christopher Faylor <cgf@redhat.com>
Remove some cygserver files.
2003-08-28 Christopher Faylor <cgf@redhat.com>
* sigproc.h: Make some functions regparm.
* sigproc.cc (checkstate): Make regparm.
(getevent): Change parameters in declaration, rename from getsem, make regparm.
(sig_send): Recognize that nosync is now an event. Remove some old
cruft from previous interrupt anywhere signal handler.
(getevent): Change parameters in definition, rename from getsem.
Allocate event rather than semaphore.
(wait_sig): Treat sigcatch_nosync as an event.
2003-08-28 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (sigreturn): Fix problem where old return address was
not properly restored for a nested signal.
2003-08-27 Christopher Faylor <cgf@redhat.com>
* autoload.cc (SwitchToThread): Declare as autoload function.
* cygthread.h (cygthread::main_thread_id): Make public.
* exceptions.cc (setup_handler): Remove unneeded priority stuff.
Rename label to reflect what it does. Add debugging for idiotic
Windows NT problem. Change debugging output to include signal number.
* miscfuncs.cc (low_priority_sleep): If available, use SwitchToThread
function to give time slice to other threads.
* wincap.cc: Properly define have_switch_to_thread throughout.
* wincap.h (wincap::switch_to_thread): New element.
2003-08-27 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (mount): Don't check win32_path when doing cygdrive
mount.
2003-08-27 Christopher Faylor <cgf@redhat.com>
* specdir: Correctly remove temporary directory prior to use.
2003-08-27 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (wait_sig): Count number of iterations through
'more_signals' loop and issue a warning if DEBUGGING and excessive.
(WFSO): When debugging and infinite timeout, loop.
2003-08-26 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/stat.h: Allow definition of internal stat structures
also when compiling newlib.
2003-08-25 Christopher Faylor <cgf@redhat.com>
Throughout, change USE_CYGSERVER to USE_SERVER.
* Makefile.in (LIBSERVER): Define and use.
* configure.in: Set LIBSERVER as appropriate.
* configure: Regenerate.
* acconfig.h: Regenerate.
* environ.cc: Rename allow_daemon to allow_server. Only recognize when
USE_SERVER is defined.
2003-08-23 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (_remove_r): Define.
2003-08-22 Corinna Vinschen <corinna@vinschen.de>
* cygheap.h (enum cygheap_types): Add HEAP_MMAP.
(CYGHEAPSIZE): Add another 64K.
* mmap.cc: Use cmalloc, ccalloc and crealloc with HEAP_MMAP type
throughout.
2003-08-22 Christopher Faylor <cgf@redhat.com>
* cygheap.cc (user_heap_info::max): New field.
* heap.cc (heap_init): Save pointer to end of heap reserved memory.
(sbrk): Don't attempt to commit memory beyond end of heap reserved
memory. Attempt to honor comment and reserve commitbytes if heapchunk
fails.
2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
* exceptions.cc (sigreturn): Don't clobber ebp in recursive signal
calls.
2003-08-22 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (sig_handle): Change so that default signals indicate
success.
2003-08-21 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (wait_sig): Remove redundant test in do/while.
2003-08-21 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (wait_sig): Avoid infinite loop.
2003-08-20 Christopher Faylor <cgf@redhat.com>
* speclib: Reenable removal of temp files.
2003-08-20 Christopher Faylor <cgf@redhat.com>
* miscfuncs.cc (low_priority_sleep): Sleep at same priority as main
thread.
* sigproc.cc (wait_sig): Keep looping if there are more signals to
consider and we are flushing signals.
(sig_send): Put nonsync signals in the correct bucket.
2003-08-20 Christopher Faylor <cgf@redhat.com>
* speclib: Fix created lib to avoid "File truncated" problems.
2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
* exceptions.cc (interrupt_setup): Set sigsave.sig last to avoid a
race.
2003-08-20 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (wait_sig): Ensure that myself->getsigtodo array is
flushed on a __SIGFLUSH.
2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
Christopher Faylor <cgf@redhat.com>
* exceptions.cc (_sigreturn): Handle nested signals without growing the
stack.
2003-08-19 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (pending_signals): Remove unneeded declaration.
* sigproc.cc (pending_signals): Make static.
(wait_sig): Use defined values rather than integers for rc. Never scan
both todo arrays as this could cause hangs if signals arrive from two
different sources. Rename saw_pending_signals to saw_failed_interrupt.
Exit loop when signal found. Enter low-priority sleep, if necessary,
after finished signalling completion. Set pending_signals when blocked
(from Pierre Humblet).
2003-08-19 Christopher Faylor <cgf@redhat.com>
* signal.cc (sigpending): Move.
* sigproc.cc (sigpending): To here.
(getlocal_sigtodo): Return process-local signal array.
(sigpending): Accommodate new process-local signal array.
(sig_send): Ditto.
(sig_set_pending): Ditto.
(wait_sig): Ditto.
2003-08-19 Christopher Faylor <cgf@redhat.com>
Throughout, eliminate argument to sig_dispatch_pending.
* exceptions.cc (setup_handler): Move non-interruptible condition
handling (back) to wait_sig.
(set_process_mask): Don't worry about calling sig_dispatch_pending from
sigthread since it is detected in the function anyway.
(sig_handle): Eliminate thisproc arg. Don't call sig_dispatch_pending
on SIGCONT since that should happen automatically.
* sigproc.cc (sig_dispatch_pending): Eliminate justwake argument. Just
return when called from sigthread.
(wait_sig): Change some variables to bool. Change inner while to an
if. Move uninterruptible signal handling here.
(sigproc_terminate): Don't call sig_dispatch_pending. Just increment
semaphore on exit.
* speclib: Use slightly different (but still flawed) method for
determining symbols to extract from libraries.
2003-08-18 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (sigdelayed): Fix race where signal handler could get
the wrong mask (as suggested by Pierre Humblet).
2003-08-18 Christopher Faylor <cgf@redhat.com>
* path.cc (mount): Add null/empty check for input parameters.
(umount): Add null/empty check for input parameters.
2003-08-17 Pierre Humblet <pierre.humblet@ieee.org>
* grp.cc (read_group): Revert previous change.
* uinfo.cc (pwdgrp::load): Always reset curr_lines.
2003-08-17 Corinna Vinschen <corinna@vinschen.de>
* errno.cc (errmap): Map ERROR_INVALID_BLOCK_LENGTH to EIO.
* fhandler_raw.cc (fhandler_dev_raw::raw_read): Set more accurate
errnos instead of EACCES.
(fhandler_dev_raw::raw_write): Ditto.
2003-08-17 Christopher Faylor <cgf@redhat.com>
* path.cc (special_name): Accommodate all special names with
extensions.
2003-08-15 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap64): Avoid crash if file size is less than requested
map length.
2003-08-13 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* path.cc (special_name): Add checks for some specials followed by
a "." and a FIXME comment.
2003-08-13 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Accommodate change from cygwin_lstat to lstat.
* syscalls.cc: Add defines to avoid declaration issues when
renaming cygwin_lstat back to lstat.
(lstat): Reverted name change from cygwin_lstat.
2003-08-12 Corinna Vinschen <corinna@vinschen.de>
* include/sys/param.h (NBBY): Define if not defined.
2003-08-12 Nicholas Wourms <nwourms@netscape.net>
* include/sys/param.h (setbit): Add new bitmap related macro.
(clrbit): Likewise.
(isset): Likewise.
(isclr): Likewise.
(howmany): Add new counting/rounding macro.
(rounddown): Likewise.
(roundup): Likewise.
(roundup2): Likewise.
(powerof2): Likewise
(MIN): Add macro for calculating min.
(MAX): Add macro for calculating max.
2003-08-09 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 3.
2003-08-08 Gerrit P. Haase <gp@familiehaase.de>
* include/stdint.h: Correctly define INT32_MIN.
2003-08-08 David Rothenberger <daveroth@acm.org>
* grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr
after free() is called.
2003-08-05 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Rework to accommodate new speclib arguments.
* speclib: Rework to extract everything from libcygwin.a rather than
building things from existing object files.
2003-08-05 Pavel Tsekov <ptsekov@gmx.net>
* path.cc (cygdrive_getmntent): Do not skip over drives of type
DRIVE_REMOVABLE.
2003-08-05 Christopher Faylor <cgf@redhat.com>
* fhandler.cc (fhandler_base::lseek): Be more paranoid when
constructing offsets from 64 bit value.
* syscalls.cc (logout): Avoid temp buffer memcpy since new scheme does
not require it.
(utmp_data): Rework as a macro which returns a pointer into a buffer.
(getutent): Use new buffer allocation mechanism to grab a utmp buffer.
(getutid): Ditto.
(pututline): Ditto.
2003-08-05 Pavel Tsekov <ptsekov@gmx.net>
* fhandler_disk_file.cc (fhandler_cygdrive::readdir): Do not change
'errno' if end of directory condition is encountered as per SUSv2.
* fhandler_proc.cc (fhandler_proc::readdir): Ditto.
* fhandler_process (fhandler_process::readdir): Ditto.
* fhandler_registry (fhandler_registry::readdir): Ditto.
2003-07-30 Christopher Faylor <cgf@redhat.com>
* dcrt0.cc (_dll_crt0): Move strace.microseconds initialization to
after pthread initialization.
(dll_crt0_1): i.e., here.
2003-07-28 Christopher Faylor <cgf@redhat.com>
* fhandler_base.cc (fhandler_base::readv): Rework to properly return
number of bytes from read.
2003-07-28 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 2.
2003-07-26 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (ctrl_c_handler): Send SIGHUP when events occur only if
there is a tty associated with the process. Send SIGHUP on
CTRL_LOGOFF_EVENT.
* fhandler_tty.cc (fhandler_tty_slave::open): Adjust console open
handle counter regardless of whether this is a pty or tty.
(fhandler_tty_slave::open): Ditto.
(fhandler_tty_slave::dup): Ditto.
(fhandler_tty_common::set_close_on_exec): Ditto.
(fhandler_tty_master::init_console): Decrement console open handle
counter after init since it will now be handled by all tty open.
* syscalls.cc (setsid): Rework debugging output slightly.
2003-07-25 Christopher Faylor <cgf@redhat.com>
* configure.in: Use 'install-sh -c'.
* configure: Regenerate.
2003-07-25 Christopher Faylor <cgf@redhat.com>
* configure.in: Always use install-sh.
* configure: Regenerate.
2003-07-25 Christopher Faylor <cgf@redhat.com>
* include/cygwin/socket.h: Conditionalize [AP]F_INET6 define.
2003-07-25 Christopher Faylor <cgf@redhat.com>
* Makefile.in (OBSOLETE_FUNCTION): Add fdopen.
2003-07-25 Christopher Faylor <cgf@redhat.com>
* cygwin.din: Export _fdopen64
* Makefile.in (NEW_FUNCTIONS): Add _fdopen64 -> fdopen translation.
* include/cygwin/version.h: Bump api minor number.
* ntdll.h: Remove (now) duplicate FILE_SYNCHRONOUS_IO_NONALERT
definition.
2003-07-24 Christopher Faylor <cgf@redhat.com>
* environ.cc (check_case_init): Use strncasematch.
* cygwin.din: Export __mempcpy.
* cygwin/version.h: Bump api minor number.
2003-07-21 Pavel Tsekov <ptsekov@gmx.net>
* mmap.cc: Use proper format specifiers for _off64_t and size_t in
format strings passed to syscall_printf () and debug_printf ()
throughout.
2003-07-18 Pierre Humblet <pierre.humblet@ieee.org>
* security.cc (verify_token): Fix white space and style.
Use type bool instead of BOOL and char. Use alloca
instead of malloc and free for my_grps.
2003-07-17 Corinna Vinschen <corinna@vinschen.de>
* sysconf.cc (sysconf): Fix OPEN_MAX patch. Return page size on
_SC_PAGESIZE again.
2003-07-14 Corinna Vinschen <corinna@vinschen.de>
* cygheap.h (class cygheap_user): Use INVALID_HANDLE_VALUE as invalid
value for tokens.
* syscalls.cc (seteuid32): Ditto. Set new_token to process token if
process token is suitable.
* uinfo.cc (uinfo_init): Initialize tokens in cygheap user info
to INVALID_HANDLE_VALUE.
2003-07-14 Pierre Humblet <pierre.humblet@ieee.org>
* cygheap.h (enum impersonation): Delete.
(cygheap_user::impersonation_state): Delete.
(cygheap_user::current_token): New.
(cygheap_user::issetuid): Modify to use current_token.
(cygheap_user::token): Ditto.
(cygheap_user::deimpersonate): Ditto.
(cygheap_user::reimpersonate): Ditto.
(cygheap_user::has_impersonation_tokens): Ditto.
(cygheap_user::close_impersonation_tokens): Ditto.
* security.cc (cygwin_set_impersonation_token): Always set the token.
(verify_token): Change type of gsid to cygpsid.
(get_file_attribute): Use the effective ids.
* syscalls.cc (seteuid32): Modify to use cygheap_user::current_token.
* uinfo.cc (uinfo_init) Do not set cygheap->user.impersonation_state.
2003-07-12 Christopher Faylor <cgf@redhat.com>
* pinfo.cc (_pinfo::commune_send): Fix bounds test so that poll of
communicating pid actually stops eventually.
2003-07-10 Christopher Faylor <cgf@redhat.com>
* path.cc (get_device_number): Remove special com? consideration.
(special_chars): Make static.
(special_introducers): New.
(special_char): Allow specified valid_chars args.
(fnunmunge): Handle aux-like filenames correctly.
(special_name): Add con, conin$, conout$.
(mount_item::fnmunge): Use __small_sprintf return value to calculate
increments.
2003-07-09 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 1.
2003-07-09 Christopher Faylor <cgf@redhat.com>
* fhandler_proc.cc (format_proc_stat): Use correctly sized constants
for filling in zeros on 98.
2003-07-09 Christopher Faylor <cgf@redhat.com>
* fhandler_proc.cc (fhandler_proc::fill_filebuf): Allocate more space
for stat buffer.
(format_proc_stat): Reorganize to accumulate and report on all cpus.
2003-07-09 Christopher Faylor <cgf@redhat.com>
* sysconf.cc (sysconf): Return processors online rather than bitmask
for _SC_NPROCESSORS_ONLN.
2003-07-08 Christopher Faylor <cgf@redhat.com>
* cygheap.cc (creturn): Set appropriate errno when out of memory.
(ccalloc): Only issue system_printf when debugging.
* dtable.cc (dtable::extend): Only allocate 100 * the incremental growth
size max. Set errno appropriately.
(dtable::build_fhandler): Check for error from set_name.
* fhandler.cc (fhandler_base::set_name): Set errno and return error on OOM.
* fhandler.h (fhandler_base::set_name): Change to bool.
* fhandler_process.cc (format_process_stat): Fix formatting.
* resource.cc (getrlimit): Return greater of OPEN_MAX or fd table size.
* sysconf.cc (sysconf): Ditto.
2003-07-07 Christopher Faylor <cgf@redhat.com>
* rmsym: Don't use ranlib.
2003-07-07 Christopher Faylor <cgf@redhat.com>
* newsym: Reenable removal of tmp directory. Just use ar to generate
archive index.
* Makefile.in: Don't send ranlib to newsym or rmsym.
2003-07-07 Christopher Faylor <cgf@redhat.com>
* newsym: Create objects that are closer to those created by dlltool so
as not to confuse --export-all-symbols.
* rmsym: Be a little more accepting of object filenames now that
dlltool can create different format files.
2003-07-06 Christopher Faylor <cgf@redhat.com>
* newsym: Oops. Revert below change.
2003-07-06 Christopher Faylor <cgf@redhat.com>
* newsym: Use correct prefix for generating imports.
* pinfo.cc (_pinfo::commune_send): Don't wait forever for a response
from another process.
2003-07-06 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (gethostid): Set thread affinity so that results are
predictable.
2003-07-05 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (list::match): Add parameters to return valid address and
length back to munmap(). Evaluate intersection between given
area and mapped area and return it, if any.
(mmap64): On regular files, don't allow mappings beginning beyond
EOF. Return with errno set to ENXIO instead.
(munmap): Rewrite SUSv3 conformant. Check if given memory area is
valid. Unmap all maps inside given memory area. Don't return error
if no mapping has been unmapped.
2003-07-05 N Stephens <nigel@mips.com>
* fhandler.h (fhandler_socket::get_connect_state): New method to
return socket connection state.
* fhandler_socket.cc (dup): Copy socket connect state to new file
handle.
* net.cc (cygwin_rcmd): Mark file handles of sockets returned by
rcmd() as CONNECTED state.
(cygwin_rexec): Similarly for rexec().
(socketpair): Mark both ends of a new socket pair as CONNECTED.
2003-07-04 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (fhandler_disk_file::mmap): Fix address test.
2003-07-03 Christopher Faylor <cgf@redhat.com>
* path.cc (fillout_mntent): Change "posix" to "managed".
2003-07-02 Christopher Faylor <cgf@redhat.com>
* fhandler.h (FH_ENC): New enum.
(fhandler_base::get_encoded): New function.
(fhandler_base::set_encoded): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Set encoded flag
in fhandler, as appropriate.
(fhandler_disk_file::readdir): Unmunge filename as appropriate based on
new encoding flag.
* path.cc (normalize_posix_path): Don't punt on files with colons.
(special_char): New function.
(mount_item::fnmunge): Ditto.
(fnunmunge): Ditto.
(special_name): Ditto.
(mount_item::build_win32): Avoid drive considerations when file is
encoded.
(mount_info::conv_to_win32_path): Handle encoded filenames.
(mount_info::conv_to_posix_path): Ditto.
(fillout_mntent): Add posix string when directory is encoded.
* path.h (fnunmunge): Declare.
(path_conv::is_encoded): Declare.
2003-07-03 Christopher Faylor <cgf@redhat.com>
* fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize a little
more of the cygserver stuff so that ttys actually work.
2003-07-03 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap64): Allow MAP_FIXED with pagesize granularity (4K).
If a non-zero addr is given, align it to the next lower 64K boundary.
(fhandler_disk_file::mmap): If a non-zero address is given, try
mapping using the given address first. If it fails and flags is not
MAP_FIXED, try again with NULL address.
2003-07-01 Christopher Faylor <cgf@redhat.com>
* thread.cc: Remove _MT_SAFE conditional.
2003-07-01 Christopher Faylor <cgf@redhat.com>
* configure.in: Fix --enable-server option.
* configure: Regenerate.
2003-07-01 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Remove cygserver stuff.
* acconfig.h: Add USE_CYGSERVER define.
* config.h.in: Regenerate.
* configure.in: Add --enable-server setting.
* configure: Regenerate.
* fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
compilation of cygserver stuff.
* fork.cc (fork_child): Ditto.
* shm.cc: Ditto.
* tty.cc (tty::common_init): Ditto.
* dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
definitions.
* environ.cc: Ditto.
* ntea.cc: Ditto.
* security.cc: Ditto.
* security.h: Ditto.
* syscalls.cc (check_posix_perm): Remove externs that were already
declared in a header.
* winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
cygwin should always be _MT_SAFE.
2003-07-01 Christopher Faylor <cgf@redhat.com>
* thread.cc: Remove _MT_SAFE conditional.
2003-07-01 Christopher Faylor <cgf@redhat.com>
* configure.in: Fix --enable-server option.
* configure: Regenerate.
2003-07-01 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Remove cygserver stuff.
* acconfig.h: Add USE_CYGSERVER define.
* config.h.in: Regenerate.
* configure.in: Add --enable-server setting.
* configure: Regenerate.
* fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
compilation of cygserver stuff.
* fork.cc (fork_child): Ditto.
* shm.cc: Ditto.
* tty.cc (tty::common_init): Ditto.
* dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
definitions.
* environ.cc: Ditto.
* ntea.cc: Ditto.
* security.cc: Ditto.
* security.h: Ditto.
* syscalls.cc (check_posix_perm): Remove externs that were already
declared in a header.
* winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
cygwin should always be _MT_SAFE.
2003-06-30 Pierre Humblet <pierre.humblet@ieee.org>
* cygheap.h (enum impersonation): New enum.
(cygheap_user::token): Delete.
(cygheap_user::impersonated): Delete.
(cygheap_user::external_token): New member.
(cygheap_user::internal_token): New member.
(cygheap_user::impersonation_state): New member.
(cygheap_user::issetuid): Modify.
(cygheap_user::token): New method.
(cygheap_user::deimpersonate): New method.
(cygheap_user::reimpersonate): New method.
(cygheap_user::has_impersonation_tokens): New method.
(cygheap_user::close_impersonation_tokens): New method.
* dtable.cc (dtable::vfork_child_dup): Use new cygheap_user methods.
* fhandler_socket.cc (fhandler_socket::dup): Ditto.
* fork.cc (fork_child): Ditto.
(fork_parent): Ditto.
* grp.cc (internal_getgroups): Ditto.
* security.cc (verify_token): Ditto.
(check_file_access): Ditto.
(cygwin_set_impersonation_token): Detect conflicts. Set
user.external_token.
* spawn.cc (spawn_guts): Use new cygheap_user methods.
* syscalls.cc (seteuid32): Rearrange to use the two tokens
in cygheap_user.
(setegid32): Use new cygheap_user methods.
* uinfo.cc: (internal_getlogin): Ditto.
2003-06-25 Doru Carastan <doru.carastan@mvista.com>
* Makefile.in: Use INSTALL_PROGRAM to install the cygwin DLL.
2003-06-24 Thomas Pfaff <tpfaff@gmx.net>
* thread.cc (MTinterface::fixup_after_fork): Fix thread list after
fork.
(pthread::threads): Instantiate.
(pthread::pthread): Initialize running and suspendend.
Initialize next with NULL.
Add thread to thread list if it is not the null_pthread.
(pthread::~pthread): Remove thread from thread list if it is
not the null_pthread.
(pthread::postcreate): Set running flag.
(pthread::exit): Reset running flag.
(pthread::cancel): Try to cancel thread only if still running.
(pthread::_fixup_after_fork): Implement.
(pthread::detach): Check if thread is still running before detach.
* thread.h (pthread::running): New member.
(pthread::next): Ditto.
(pthread::fixup_after_fork): New static method.
(pthread::threads): New static method.
(pthread::_fixup_after_fork): New method.
2003-06-20 Christopher Faylor <cgf@redhat.com>
* pinfo.cc (_pinfo::commune_send): Don't attempt to communicate with a
pure windows process.
2003-06-18 Pierre Humblet <pierre.humblet@ieee.org>
* autoload.cc (GetNetworkParams): Add.
* net.cc (getdomainname): Call GetNetworkParams and read the
DhcpDomain registry value if warranted.
2003-06-17 Christopher Faylor <cgf@redhat.com>
* path.cc (mount): Do more strict checking on posix path arguments.
2003-06-15 Christopher Faylor <cgf@redhat.com>
Throughout, remove "include <errno.h>" from files which already include
cygerrno.h.
2003-06-15 Thomas Pfaff <tpfaff@gmx.net>
* include/cygwin/config.h (__DYNAMIC_REENT__): Define.
* include/cygwin/version.h: Bump API minor version.
* cygwin.din: Export __getreent
* cygerrno.h: Include errno.h. Fix places where _impure_ptr is used
directly to store the errno value.
* debug.cc (__set_errno): Ditto.
* errno.cc: Remove _RRENT_ONLY define to get errno.cc compiled.
* signal.cc: Rename _reent_clib to _REENT throughout.
* thread.h (reent_clib): Remove prototype.
* thread.cc (reent_clib): Rename reent_clib to __getreent. Return
_impure_ptr until MTinterface is initialized.
(reent_winsup): Fix a possible SEGV when _r == NULL. Return NULL
instead.
* MTinterface::fixup_after_fork: Switch reent back to _impure_ptr to
keep signal handling running when fork is called from a thread other
than the mainthread.
2003-06-12 Thomas Pfaff <tpfaff@gmx.net>
* thread.cc (pthread_attr_init): Revert change from 2003-06-11
to return 0 if attribute is already initialized back to EBUSY.
(pthread_condattr_init): Ditto.
(pthread_rwlockattr_init): Ditto.
(pthread_mutexattr_init): Ditto.
2003-06-12 Corinna Vinschen <corinna@vinschen.de>
* exceptions.cc (ctrl_c_handler): Don't send a signal on
CTRL_SHUTDOWN_EVENT. Add a comment to rationalize the patch.
2003-06-11 Thomas Pfaff <tpfaff@gmx.net>
* thread.cc (pthread_attr_init): Return 0 if attribute is already
initialized.
Fix return code if out of memory.
(pthread_condattr_init): Ditto.
(pthread_rwlockattr_init): Ditto.
(pthread_mutexattr_init): Return 0 if attribute is already
initialized.
2003-06-09 Pierre Humblet <pierre.humblet@ieee.org>
* spawn.cc (spawn_guts): Call CreateProcess while impersonated,
when the real {u,g}ids and the groups are original.
Move RevertToSelf and ImpersonateLoggedOnUser to the main line.
* uinfo.cc (uinfo_init): Reorganize. If CreateProcess was called
while impersonated, preserve the uids and gids and call
ImpersonateLoggedOnUser. Preserve the uids and gids on Win9X.
* exceptions.cc (error_start_init): Quote the pgm in the command.
2003-06-07 Christopher Faylor <cgf@redhat.com>
* poll.cc: Define FD_SETSIZE to ridiculously large number so that there
will be no artificially small limits.
2003-06-07 Christopher Faylor <cgf@redhat.com>
* fhandler_tty.cc (fhandler_tty_slave::close): Free the console when
last tty closes.
2003-06-07 Thomas Pfaff <tpfaff@gmx.net>
* fhandler_socket.cc (fhandler_socket::connect): Change error
handling for nonblocking connects to return EALREADY when
connect is called more than once for the same socket.
2003-06-06 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Add vsyslog.
* fhandler.cc (fhandler_base::write): Only make file sparse if the
seeked area is >= 128K.
* syslog.cc (vsyslog): New function, overtaking functionality from
syslog.
(syslog): Just call vsyslog.
* include/cygwin/version.h: Bump API minor.
* include/sys/syslog.h: Add vsyslog declaration.
2003-06-05 Christopher Faylor <cgf@redhat.com>
* cygthread.cc (cygthread::terminate_thread): Change system_printf to
debug_printf.
2003-06-04 Christopher Faylor <cgf@redhat.com>
* shared.cc (shared_info::heap_chunk_size): Be really defensive about
making sure that heap_chunk is set.
2003-06-04 Christopher Faylor <cgf@redhat.com>
* path.cc (conv_path_list): Use correct value when calculating length
to avoid a potential SEGV.
2003-06-03 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc
as non-executable if the file cannot be opened for read. Retry query
open only if errno is EACCES. Never change the mode, even if it is 000
when query open() fails.
2003-06-03 Christopher Faylor <cgf@redhat.com>
* configure.in: Allow any i?86 variant.
* configure: Regenerate.
2003-06-03 Corinna Vinschen <corinna@vinschen.de>
Thomas Pfaff <tpfaff@gmx.net>
* fhandler_socket.cc (connect_thread): Remove.
(accept_thread): Remove.
(fhandler_socket::connect): Remove all special blocking handling.
(fhandler_socket::accept): Ditto.
* net.cc (cygwin_connect): Make blocking sockets temporarily
non-blocking and call cygwin_select on them to be interruptible.
(cygwin_accept): Ditto.
2003-06-02 Christopher Faylor <cgf@redhat.com>
* spawn.cc (spawn_guts): Don't hang around if the parent doesn't exist.
2003-06-02 Christopher Faylor <cgf@redhat.com>
* cygthread.h (cygthread::terminate_thread): Mark private.
* cygthread.cc (cygthread::terminate_thread): Deallocate free_range
thread stuff.
2003-06-02 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
to `interrupted' as used in fhandler_socket::connect.
2003-06-02 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::connect): Simplify previous
patch.
(fhandler_socket::accept): Ditto.
2003-06-02 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc: Include cygthread.h.
(class sock_event): Remove.
(thread_connect): New function.
(thread_accept): Ditto.
(fhandler_socket::connect): Use cygthread instead of socket event
handling for blocking sockets.
(fhandler_socket::accept): Ditto.
2003-06-02 Christopher Faylor <cgf@redhat.com>
* fhandler.cc (fhandler_base::write): Correct minor printf formatting
style glitch.
2003-06-01 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Assume
an existing directory is a root if FindFirstFile fails.
2003-05-30 Christopher Faylor <cgf@redhat.com>
* path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok
was actually valid. Fix it.
2003-05-30 Christopher Faylor <cgf@redhat.com>
* cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's
have problems with.
* path.cc (path_conv::check): Rework has_acls logic slightly. Uncouple
exec tests away from filesystem tests.
2003-05-30 Corinna Vinschen <corinna@vinschen.de>
* include/sys/param.h: Add DEV_BSIZE.
2003-05-29 Pierre Humblet <pierre.humblet@ieee.org>
Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::dup): Rearrange. Fix
conditional.
2003-05-28 Christopher Faylor <cgf@redhat.com>
* mkvers.sh: Avoid "-dontuse" tags.
* path.cc (path_conv::check): Set exec state based on known situations.
* path.cc (mount_item::fnmunge): New function.
(mount_item::build_win32): New function.
(mount_info::conv_to_win32_path): Use build_win32 to build windows
path.
* path.h (mount_item::fnmunge): Declare new function.
(mount_item::build_win32): Ditto.
* sys/mount.h (MOUNT_ENC): Define.
2003-05-28 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::dup): If running impersonated,
revert to original account before calling fixup_before_fork_exec
and impersonate again afterwards. Change comment accordingly.
Clean up error handling and debug output.
2003-05-27 Thomas Pfaff <tpfaff@gmx.net>
* fhandler_socket.cc (sock_event::~sock_event): New method.
(sock_event::load): Change to void. Check if winsock2 is available.
(socke_event::wait): Return 0 if interruptible mode is not available.
(fhandler_socket::connect): Remove checks for winsock2 availability.
(fhandler_socket::accept): Ditto.
2003-05-27 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::dup): First try duplicating
using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
2003-05-27 Bill C. Riemers <cygwin@docbill.net>
* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
permissions through umask on FAT or if ntsec is off.
2003-05-26 Pierre Humblet <pierre.humblet@ieee.org>
* syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace.
2003-05-26 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE
instead of numeric constant.
2003-05-26 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::connect): Guard calls to
sock_event methods by a check for WinSock2 availability.
(fhandler_socket::accept): Ditto.
2003-05-26 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h: Rename FH_W95LSBUG flag to FH_LSEEKED.
(fhandler_base::set_did_lseek): Rename from set_check_win95_lseek_bug.
(fhandler_base::get_did_lseek): Rename from get_check_win95_lseek_bug.
(fhandler_base::set_fs_flags): New method.
(fhandler_base::get_fs_flags): Ditto.
* fhandler.cc (fhandler_base::write): Make 64 bit clean. Convert file
to a "sparse" file when writing after a long lseek (>64K) beyond EOF.
(fhandler_base::lseek): Call set_did_lseek() instead of
set_check_win95_lseek_bug().
(fhandler_base::fhandler_base): Initialize fs_flags to 0.
* fhandler_disk_file.cc (fhandler_disk_file::open): Don't create files
as "sparse" unconditionally. Set fs_flags member.
2003-05-25 Pierre Humblet <pierre.humblet@ieee.org>
* autoload.cc (GetDiskFreeSpaceEx): Add.
* syscalls.cc (statfs): Call full_path.root_dir() instead of
rootdir(full_path). Use GetDiskFreeSpaceEx when available and
report space available in addition to free space.
* fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name):
Do not call FindFirstFile for disk root directories.
2003-05-24 Joe Buehler <jhpb@draco.hekimian.com>
* fhandler_process.cc (format_process_stat): Use PagefileUsage
instead of VirtualSize.
(get_mem_values): Ditto.
2003-05-21 Corinna Vinschen <corinna@vinschen.de>
* shared_info.h: Match shared_name declaration with below change.
* shared.cc (shared_name): Use incoming char * parameter instead of
local static buffer.
(open_shared): Accommodate new calling convention for shared_name.
* exceptions.cc (events_init): Ditto.
* sigproc.cc (getsem): Ditto.
* syscalls.cc (login): Ditto.
(logout): Ditto.
(pututline): Ditto.
2003-05-20 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (secret_event_name): Return void. Use incoming
char * parameter instead of local static buffer.
(fhandler_socket::create_secret_event): Accommodate new calling
convention for secret_event_name.
(fhandler_socket::close_secret_event): Ditto.
2003-05-20 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (SECRET_EVENT_NAME): Remove.
(ENTROPY_SOURCE_NAME): Ditto.
(secret_event_name): New static function. Create shared event name
with "Global\" prefix on systems supporting terminal services.
(fhandler_socket::set_connect_secret): Fix conditional.
(fhandler_socket::create_secret_event): Create secret event using
secret_event_name().
(fhandler_socket::close_secret_event): Ditto.
* shared.cc (shared_name): Create shared object name with "Global\"
prefix on systems supporting terminal services.
* wincap.cc: Set has_terminal_services capability throughout.
(wincap_2003): New global object representing Windows 2003 Server
capabilities.
(wincapc::init): Accommodate Windows 2003 Server.
* wincap.h (struct wincaps): Add has_terminal_services capability.
2003-05-20 Charles Wilson <cygwin@cwilson.fastmail.fm>
* winsup/cygwin/include/cygwin/version.h: Bump API minor version.
* winsup/cygwin/include/cygwin/types.h: Define key_t as long long.
* winsup/cygwin/cygwin.din: Add ftok, _ftok.
* winsup/cygwin/ipc.cc (ftok): Rework implementation.
2003-05-18 Joe Buehler <jhpb@hekimian.com>
* spawn.cc (spawn_guts): Show more of command line in strace output.
2003-05-15 Thomas Pfaff <tpfaff@gmx.net>
* thread.h (pthread::init_mainthread): Remove function parameter.
(MTinterface::Init): Ditto.
* thread.cc (MTinterface::Init): Remove function parameter.
Always initialize reent_key.
(pthread::init_mainthread): Remove function parameter.
(MTinterface::fixup_after_fork): Fix pthread::init_mainthread call.
* dcrt0.cc (dll_crt_0_1) Fix calls to MTinterface::Init and
pthread::init_mainthread.
Call pthread::init_mainthread only when not forked.
2003-05-15 Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc (format_proc_meminfo): Make swap memory output
Linux style values.
2003-05-13 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.
2003-05-12 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (CYGWIN_START): Define as crt0.o. Add to TARGET_LIBS.
* fhandler.h (fhandler_virtual::fstat): Remove useless declaration.
* fhandler_virtual.cc: Remove _COMPILING_NEWLIB define.
* ipc.cc (ftok): Use stat64.
* syscalls.cc (_fstat64): Remove alias.
(_fstat): Ditto.
(_stat): Ditto.
(_fstat64_r): New function.
(_fstat_r): Ditto.
(_stat64_r): Ditto.
(stat_r): Ditto.
* crt0.o: New file, moved from newlib.
* include/sys/param.h: Ditto.
* include/sys/utime.h: Ditto.
* include/sys/utmp.h: Ditto.
* include/sys/dirent.h: Ditto. Expose different struct dirent,
dependening of the environment.
2003-05-11 Corinna Vinschen <corinna@vinschen.de>
Replace ino_t by __ino64_t throughout.
2003-05-11 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/types.h: Add key_t typedef.
2003-05-10 Christopher Faylor <cgf@redhat.com>
* dir.cc (readdir): Fill out new old_d_ino field.
* fhandler.h (fhandler_base::namehash): Define as ino_t.
(fhandler_base::get_namehash): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate
new 64 bit st_ino.
* fhandler_socket.cc (fhandler_socket::fstat): Ditto.
* path.cc (hash_path_name): Return ino_t.
* syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit.
* winsup.h (hash_path_name): Declare as returning ino_t.
* include/cygwin/stat.h (__stat32): Use 32 bit st_ino.
(__stat64): Use 64 bit st_ino.
* include/cygwin/types.h (__ino64_t): Define.
(__ino32_t): Ditto.
(ino_t): Define appropriately.
2003-05-10 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (NEW_FUNCTIONS): All 32/64 from 0.79 API get
leading underscore.
* cygwin.din: Ditto.
* include/cygwin/version.h: Bump API minor number.
2003-05-09 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/config.h: New file.
2003-05-09 Christopher Faylor <cgf@redhat.com>
* cygthread.cc (cygthread::detach): Prioritize waiting for I/O
completion over waiting for signal delivery.
2003-05-06 Thomas Pfaff <tpfaff@gmx.net>
* signal.cc (nanosleep): Do not wait twice for signal arrival.
2003-05-03 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/types.h: Fix erroneous definition of ino_t from
2003-04-28.
2003-05-03 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (chown_worker): Allow chown'ing of socket files.
2003-04-30 Thomas Pfaff <tpfaff@gmx.net>
* Makefile.in: Revert patch from 2003-04-17.
2003-04-28 Brian Ford <ford@vss.fsi.com>
* profil.h (PROFADDR): Prevent overflow when text segments are larger
than 256k.
* profil.c (profthr_func): Raise thread priority for more accurate
sampling.
2003-04-26 Christopher Faylor <cgf@redhat.com>
* path.cc (hash_path_name): Use ino_t as type.
2003-04-26 Christopher Faylor <cgf@redhat.com>
* errno.cc (_sys_nerr): Fix compile error erroneously checked in on
2003-04-23.
2003-04-25 Corinna Vinschen <corinna@vinschen.de>
* include/netinet/ip.h: Include netinet/in_systm.h and netinet/in.h
to allow standalone usage (autoconf).
2003-04-23 Christopher Faylor <cgf@redhat.com>
* fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef
sense throughout.
2003-04-22 Christopher Faylor <cgf@redhat.com>
* select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is
called for successful non-blocking pipe reads.
2003-04-22 Corinna Vinschen <corinna@vinschen.de>
* include/inttypes.h: New file.
* include/stdint.h: New file.
* include/cygwin/in.h: Include stdint.h instead of sys/types.h.
* include/cygwin/types.h: Include stdint.h. Remove typedefs for
intN_t and uintN_t since these are defined in stdint.h now.
2003-04-21 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL major number to 1005. Change DLL
minor number to 0. Bump API minor number.
2003-04-20 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (CreateWindowStationA): Add.
(SetProcessWindowStation): Add.
2003-04-19 Christopher Faylor <cgf@redhat.com>
* wincap.h (wincaps:pty_needs_alloc_console): New element.
(wincapc:pty_needs_alloc_console): New function.
* wincap.cc: Add pty_needs_alloc_console throughout.
* fhandler_tty.cc (fhandler_tty_slave::open): Open an "invisible"
console on first pty allocation.
2003-04-18 Christopher Faylor <cgf@redhat.com>
* fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console
whenever a pty is allocated.
2003-04-18 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Use ${nostdlib} variable.
2003-04-18 Diego Biurrun <diego@biurrun.de>
* fhandler_proc.cc (format_proc_cpuinfo): Change /proc/cpuinfo "vendor
id" string to "vendor_id" to conform with Linux systems.
2003-04-17 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
* Makefile.in: Add finline-functions optimization to CXXFLAGS.
* autoload.cc (LoadDLLprime): Rename std_dll_init to
_std_dll_init.
(std_dll_init): Remove name mangling prototype. Add attributes
used and noinline.
(wsock_init): Ditto.
Change wsock_init to _wsock_init in wsock32 and ws2_32
LoadDLLprime.
* exceptions.cc (unused_sig_wrapper): Remove prototype. Add
attributes used and noinline.
* pwdgrp.h ((pwdgrp (passwd *&)): Remove inline code.
(pwdgrp (__group32 *&)): Ditto.
* grp.cc (pwdgrp (passwd *&)): Outline constructor.
(pwdgrp (__group32 *&)): Ditto.
2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
* thread.h (pthread::equal): New static method.
* thread.cc: Rename pthread_equal to pthread::equal throughout.
(pthread_equal): Use pthread::equal to compare threads ids.
2003-04-15 Christopher Faylor <cgf@redhat.com>
* termios.cc (setspeed): New function.
(cfsetospeed): Use setspeed to set speed.
(cfsetispeed): Use setspeed to set speed.
2003-04-15 Chris January <chris@atomice.net>
* autoload.cc: Add load statement for UuidCreate, and
UuidCreateSequential.
* cpuid.h: New file.
* cygwin.din: Export gethostid.
* fhandler_proc.cc (cpuid): Move to cpuid.h.
(can_set_flag): Move to cpuid.h.
* syscalls.cc (gethostid): New function.
* version.h: Bump api minor version number to 83.
2003-04-15 Thomas Pfaff <tpfaff@gmx.net>
* thread.h (pthread_rwlock::release): New method.
* thread.cc (pthread_rwlock::unlock): Use release to signal waiting
threads.
(pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
cancelation.
(pthread_rwlock::wrlock_cleanup): Ditto.
2003-04-13 Pierre Humblet <pierre.humblet@ieee.org>
* mkvers.sh: Prefix day with 0 in date only when day < 10.
2003-04-11 Pierre Humblet <pierre.humblet@ieee.org>
* security.cc (get_info_from_sd): New function.
(get_nt_attribute): Only call read_sd and get_info_from_sd.
Return void.
(get_file_attribute): Move sd error handling to get_info_from_sd.
and symlink handling to fhandler_disk_file::fstat_helper.
(get_nt_object_attribute): Only call read_sd and get_info_from_sd.
Return void.
(get_object_attribute): Remove symlink handling and simply return -1
when ntsec is off.
* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): For
symlinks set the attribute, call get_file_attribute to get the ids
and return. In the normal case call get_file_attribute with the
addresses of the buffer ids and do not recheck if the file is a socket.
2003-04-10 Christopher Faylor <cgf@redhat.com>
* cygthread.cc (cygthread::stub): Initialize stack pointer earlier.
(cygthread::simplestub): Initialize stack pointer.
(cygthread::terminate_thread): Account for possibility that stack
pointer has not been set. Issue warnings for unusual conditions.
2003-04-10 Corinna Vinschen <corinna@vinschen.de>
* regex/regex.h: Define regoff_t as _off_t.
* regex/regex2.h: Ditto.
2003-04-10 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wcscoll, wcswidth and wcwidth.
* include/cygwin/version.h: Bump API minor number.
2003-04-10 Christopher Faylor <cgf@redhat.com>
* cygthread.h: Change 'avail' cygthread element to 'inuse' throughout.
* cygthread.cc: Ditto.
(cygthread::stub): Don't initialize already initialized events.
(cygthread::freerange): Don't create thread here.
(cygthread::cygthread): Create thread here. Die if thread not created.
(cygthread::operator new): Simplify. Just grab a thread structure from
the pool. Don't try to start the thread.
(cygthread::terminate_thread): Don't close event handles. Just reuse
them. Call MEM_RELEASE rather than MEM_DECOMMIT (from Joe uehler).
2003-04-08 Bob Cassels <bcassels@abinitio.com>
* fhandler_console.cc (fhandler_console::read) Handle certain key up
events, to allow pasting accented characters and typing them using the
"alt + numerics" sequences.
2003-04-07 Christopher Faylor <cgf@redhat.com>
* include/limits.h (IOV_MAX): Set to a number which is small enough to
use in an array.
2003-04-04 Christopher Faylor <cgf@redhat.com>
* cygthread.h (cygthread::avail): Make LONG for easier use with
Interlocked* functions.
* cygthread.cc (cygthread::init): Eliminate unneeded muto.
(cygthread::operator new): Don't lock. Instead change use of avail
variable into tri-state: available (1), not available (-1),
uninitialized (0).
(cygthread::terminate_thread): Set avail to uninitialized.
(cygthread::detach): Eliminate local 'avail'. Always set avail to 1
unless signalled.
2003-04-04 Christopher Faylor <cgf@redhat.com>
* cygthread.cc (cygthread::operator new): Be more defensive when messing with
threads that are marked "unavailable".
2003-04-03 Christopher Faylor <cgf@redhat.com>
* fhandler_console.cc (CONVERT_LIMIT): Use a size for the 21st century.
2003-04-03 Corinna Vinschen <corinna@vinschen.de>
* external.cc (check_ntsec): Return general ntsec state on NULL
filename. Check wincap.is_security() additionally.
2003-04-02 Christopher Faylor <cgf@redhat.com>
* Makefile.in (EXTRA_OFILES): Remove debugging object.
2003-04-02 Jason Tishler <jason@tishler.net>
Christopher Faylor <cgf@redhat.com>
* external.cc (check_ntsec): New function.
(cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec()
from applications.
* include/cygwin/version.h: Bump API minor number.
* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
2003-04-02 Christopher Faylor <cgf@redhat.com>
* cygthread.cc (cygthread::new): Add more defensive debugging.
2003-04-01 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler.cc (fhandler_base::fstat): Set the uid and gid fields
from the current effective ids.
* fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set
by fhandler_base::fstat.
* security.cc (get_nt_attribute): Do not test wincap.has_security ().
(get_nt_object_attribute): Ditto.
(get_file_attribute): Add test for wincap.has_security ().
(get_object_attribute): Ditto.
2003-04-01 Corinna Vinschen <corinna@vinschen.de>
* dir.cc: Change __off32_t to _off_t and __off64_t to _off64_t
throughout.
* fhandler.cc: Ditto.
* fhandler.h: Ditto.
* fhandler_clipboard.cc: Ditto.
* fhandler_disk_file.cc: Ditto.
* fhandler_dsp.cc: Ditto.
* fhandler_floppy.cc: Ditto.
* fhandler_mem.cc: Ditto.
* fhandler_proc.cc: Ditto.
* fhandler_process.cc: Ditto.
* fhandler_random.cc: Ditto.
* fhandler_registry.cc: Ditto.
* fhandler_tape.cc: Ditto.
* fhandler_termios.cc: Ditto.
* fhandler_virtual.cc: Ditto.
* fhandler_zero.cc: Ditto.
* mmap.cc: Ditto.
* pipe.cc: Ditto.
* syscalls.cc: Ditto.
* winsup.h: Ditto.
* include/cygwin/stat.h: Ditto.
* include/cygwin/types.h: Ditto. Remove definition of __off32_t
and __off64_t.
2003-03-31 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (setup_handler): Make sure winapi lock is released when
exiting loop.
2003-03-30 Christopher Faylor <cgf@redhat.com>
* include/cygwin/fs.h: Remove unneeded include.
* include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
2003-03-29 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (login): Fix comment.
(logout): Ditto.
2003-03-29 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc: Slightly cleanup all utmp functions.
(login): Use mutex to secure against concurrent access to wtmp file.
(logout): Rewrite using POSIX calls.
(utmp_fd): Initialized to -1 now. Any value < 0 is treated as closed
in subsequent functions.
(utmp_readonly): New variable, indicating utmp file open for reading
only.
(internal_setutent): New function implementing setutent().
(setutent): Call internal_setutent now.
(endutent): Reset utmp_readonly.
(getutent): Return immediately if utmp file can't be opened.
(getutid): Ditto.
(getutline): Ditto.
(pututline): Ditto. Use mutex to secure against concurrent access to
utmp file.
2003-03-28 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s suffix.
* configure.in: Remove EXE_LDFLAGS.
* configure: Regenerate.
2003-03-28 Christopher Faylor <cgf@redhat.com>
* include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
* external.cc (cygwin_internal): Define as unsigned long.
2003-03-27 Christopher Faylor <cgf@redhat.com>
* include/sys/cygwin.h: Move cygwin_internal outside of WINVER
conditional.
2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
* thread.cc: Change 1==foo equations to foo==1 throughout.
2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
* thread.h: Change class names, methods, members and local vars
according to the GNU coding style.
* thread.cc: Ditto.
* dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
pthread::init_mainthread.
* pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
call to pthread::is_good_object.
2003-03-27 Joe Buehler <jhpb@draco.hekimian.com>
* autoload.cc: Add RegGetKeySecurity().
* security.cc (get_nt_object_attribute): Use RegGetKeySecurity() for
performance.
2003-03-25 Christopher Faylor <cgf@redhat.com>
Joe Buehler <jhpb@draco.hekimian.com>
* fork.cc (fork_parent): Don't copy signals from parent to child here.
* sigproc.cc (proc_subproc): Copy signals from parent to child pinfo
here.
2003-03-23 Thomas Pfaff <tpfaff@gmx.net>
* thread.h (class List): Move inline code inside class declaration.
(List::forEach): Change callback parameter to template class member
function pointer.
(pthread_keys::fixup_before_fork): Change to inline. Use List::forEach
to fixup keys.
(pthread_keys::fixup_after_fork): Ditto.
(pthread_keys::runAllDestructors): Ditto.
(pthread_key::saveAKey): Remove.
(pthread_key::restoreAKey): Ditto.
(pthread_key::destroyAKey): Ditto.
(pthread_key::run_destructor): Rename to runDestructor.
(pthread_mutex::fixup_after_fork): Change to inline. Use List::forEach
to fixup mutexes after a fork.
(pthread_mutex::FixupAfterFork): New method.
(pthread_mutex::mutexes): New member.
(pthread_cond::fixup_after_fork): Change to inline. Use List::forEach
to fixup conds after a fork.
(pthread_cond::FixupAfterFork): New method.
(pthread_cond::conds): New member.
(pthread_rwlock::fixup_after_fork): Change to inline. Use
List::forEach to fixup rwlocks after a fork.
(pthread_rwlock::FixupAfterFork): New method.
(pthread_rwlock::rwlocks): New member.
(semaphore::fixup_after_fork): Change to inline. Use List::forEach to
fixup mutexes after a fork.
(semaphore::FixupAfterFork): New method.
(semaphore::semaphores): New member.
(MTinterface::mutexs): Remove.
(MTinterface::conds): Ditto.
(MTinterface::rwlocks): Ditto.
(MTinterface::semaphores): Ditto.
(pthread_equal): Add extern "C".
(pthread_mutex_lock): Ditto.
* thread.cc (MTinterface::fixup_after_fork): Change fixup_after_fork
calls for pthread objects.
(semaphore::conds): Instantiate.
(pthread_cond::pthread_cond): Use List::Insert rather than custom list
code.
(pthread_cond::~pthread_cond): Use List::Remove rather than custom list
code.
(pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
(pthread_rwlock::rwlocks): Instantiate.
(pthread_rwlock::pthread_crwlock): Use List::Insert rather than custom
list code.
(pthread_rwlock::~pthread_rwlock): Use List::Remove rather than custom
list code.
(pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
(pthread_key::saveAKey): Remove.
(pthread_key::fixup_before_fork): Ditto.
(pthread_key::restoreAKey): Ditto.
(pthread_key::fixup_after_fork): Ditto.
(pthread_key::destroyAKey): Ditto.
(pthread_key::runAllDestructors): Ditto.
(pthread_key::run_destructor): Rename to runDestructor.
(pthread_mutex::mutexes): Instantiate.
(pthread_mutex::pthread_mutex): Use List::Insert rather than custom
list code.
(pthread_mutex::~pthread_mutex): Use List::Remove rather than custom
list code.
(pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
(semaphore::conds): Instantiate.
(semaphore::semaphore): Use List::Insert rather than custom list code.
(semaphores::~semaphore): Use List::Remove rather than custom list
code.
(semaphore::fixup_after_fork): Rename to FixupAfterFork.
2003-03-22 Christopher Faylor <cgf@redhat.com>
* pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
exist.
2003-03-22 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (unlink): Be more defensive when SetFileAttributes is
called. Fix typo in debugging output.
2003-03-21 Christopher Faylor <cgf@redhat.com>
* fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
necessary for newer versions of bash.
2003-03-20 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
SIGPIPE handling to connection oriented sockets. Add comment.
2003-03-19 Christopher Faylor <cgf@redhat.com>
* sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
* exceptions.cc (signal_fixup_after_exec): Eliminate argument in
definition. Don't reset signal handlers after spawm. Just treat like
fork/exec.
* dcrt0.cc (dll_crt0_1): Don't pass PROC_SPAWN argument to
signal_fixup_after_exec.
* syscalls.cc (unlink): Don't change attributes of file if not readonly/system.
Ditto for resetting of arguments.
2003-03-19 Corinna Vinschen <corinna@vinschen.de>
* glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
throughout.
2003-03-19 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Fix
wrong usage of S_IFDIR.
* security.cc (get_attribute_from_acl): Ditto.
(get_file_attribute): Fix wrong usage of S_IFLNK.
(get_object_attribute): Ditto.
(alloc_sd): Fix wrong usage of S_IFDIR.
* syscalls.cc (chmod): Allow chmod'ing of socket files.
2003-03-19 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
Define.
* glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES
instead of numerical constants.
(g_stat): Ditto.
2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
* pthread.cc (pthread_attr_init): Remove
(pthread_attr_destroy): Ditto.
(pthread_attr_setdetachstate): Ditto.
(pthread_attr_getdetachstate): Ditto.
(pthread_attr_setstacksize): Ditto.
(pthread_attr_getstacksize): Ditto.
(pthread_attr_setinheritsched): Ditto.
(pthread_attr_getinheritsched): Ditto.
(pthread_attr_setschedparam): Ditto.
(pthread_attr_getschedparam): Ditto.
(pthread_attr_setschedpolicy): Ditto.
(pthread_attr_getschedpolicy): Ditto.
(pthread_attr_setscope): Ditto.
(pthread_attr_getscope): Ditto.
(pthread_attr_setstackaddr): Ditto.
(pthread_attr_getstackaddr): Ditto.
(pthread_key_create): Ditto.
(pthread_key_delete): Ditto.
(pthread_setspecific): Ditto.
(pthread_getspecific): Ditto.
(pthread_kill): Ditto.
(pthread_sigmask): Ditto.
(pthread_equal): Ditto.
(pthread_mutex_lock): Ditto.
(pthread_mutex_trylock): Ditto.
(pthread_mutex_unlock): Ditto.
(pthread_mutex_destroy): Ditto.
(pthread_mutex_setprioceiling): Ditto.
(pthread_mutex_getprioceiling): Ditto.
(pthread_mutexattr_destroy): Ditto.
(pthread_mutexattr_getprioceiling): Ditto.
(pthread_mutexattr_getprotocol): Ditto.
(pthread_mutexattr_getpshared): Ditto.
(pthread_mutexattr_gettype): Ditto.
(pthread_mutexattr_init): Ditto.
(pthread_mutexattr_setprioceiling): Ditto.
(pthread_mutexattr_setprotocol): Ditto.
(pthread_mutexattr_setpshared): Ditto.
(pthread_mutexattr_settype): Ditto.
(pthread_cond_destroy): Ditto.
(pthread_cond_signal): Ditto.
(pthread_cond_broadcast): Ditto.
(pthread_condattr_init): Ditto.
(pthread_condattr_destroy): Ditto.
(pthread_condattr_getpshared): Ditto.
(pthread_condattr_setpshared): Ditto.
(pthread_rwlock_destroy): Ditto.
(pthread_rwlock_rdlock): Ditto.
(pthread_rwlock_tryrdlock): Ditto.
(pthread_rwlock_wrlock): Ditto.
(pthread_rwlock_trywrlock): Ditto.
(pthread_rwlock_unlock): Ditto.
(pthread_rwlockattr_init): Ditto.
(pthread_rwlockattr_getpshared): Ditto.
(pthread_rwlockattr_setpshared): Ditto.
(pthread_rwlockattr_destroy): Ditto.
(pthread_getconcurrency): Ditto.
(pthread_setconcurrency): Ditto.
(pthread_getschedparam): Ditto.
(pthread_setschedparam): Ditto.
* thread.h (__pthread_attr_init): Remove prototype.
(__pthread_attr_destroy): Ditto.
(__pthread_attr_setdetachstate): Ditto.
(__pthread_attr_getdetachstate): Ditto.
(__pthread_attr_setstacksize): Ditto.
(__pthread_attr_getstacksize): Ditto.
(__pthread_attr_setinheritsched): Ditto.
(__pthread_attr_getinheritsched): Ditto.
(__pthread_attr_setschedparam): Ditto.
(__pthread_attr_getschedparam): Ditto.
(__pthread_attr_setschedpolicy): Ditto.
(__pthread_attr_getschedpolicy): Ditto.
(__pthread_attr_setscope): Ditto.
(__pthread_attr_getscope): Ditto.
(__pthread_attr_setstackaddr): Ditto.
(__pthread_attr_getstackaddr): Ditto.
(__pthread_key_create): Ditto.
(__pthread_key_delete): Ditto.
(__pthread_setspecific): Ditto.
(__pthread_getspecific): Ditto.
(__pthread_kill): Ditto.
(__pthread_sigmask): Ditto.
(__pthread_equal): Ditto.
(__pthread_mutex_lock): Ditto.
(__pthread_mutex_trylock): Ditto.
(__pthread_mutex_unlock): Ditto.
(__pthread_mutex_destroy): Ditto.
(__pthread_mutex_setprioceiling): Ditto.
(__pthread_mutex_getprioceiling): Ditto.
(__pthread_mutexattr_destroy): Ditto.
(__pthread_mutexattr_getprioceiling): Ditto.
(__pthread_mutexattr_getprotocol): Ditto.
(__pthread_mutexattr_getpshared): Ditto.
(__pthread_mutexattr_gettype): Ditto.
(__pthread_mutexattr_init): Ditto.
(__pthread_mutexattr_setprioceiling): Ditto.
(__pthread_mutexattr_setprotocol): Ditto.
(__pthread_mutexattr_setpshared): Ditto.
(__pthread_mutexattr_settype): Ditto.
(__pthread_cond_destroy): Ditto.
(__pthread_cond_signal): Ditto.
(__pthread_cond_broadcast): Ditto.
(__pthread_condattr_init): Ditto.
(__pthread_condattr_destroy): Ditto.
(__pthread_condattr_getpshared): Ditto.
(__pthread_condattr_setpshared): Ditto.
(__pthread_rwlock_destroy): Ditto.
(__pthread_rwlock_rdlock): Ditto.
(__pthread_rwlock_tryrdlock): Ditto.
(__pthread_rwlock_wrlock): Ditto.
(__pthread_rwlock_trywrlock): Ditto.
(__pthread_rwlock_unlock): Ditto.
(__pthread_rwlockattr_init): Ditto.
(__pthread_rwlockattr_getpshared): Ditto.
(__pthread_rwlockattr_setpshared): Ditto.
(__pthread_rwlockattr_destroy): Ditto.
(__pthread_getconcurrency): Ditto.
(__pthread_setconcurrency): Ditto.
(__pthread_getschedparam): Ditto.
(__pthread_setschedparam): Ditto.
* thread.cc: Rename __pthread_equal to pthread_equal throughout.
Change pthread_self parameter appropriate.
(__pthread_attr_init): Remove __ prefix. Change to extern "C".
(__pthread_attr_destroy): Ditto.
(__pthread_attr_setdetachstate): Ditto.
(__pthread_attr_getdetachstate): Ditto.
(__pthread_attr_setstacksize): Ditto.
(__pthread_attr_getstacksize): Ditto.
(__pthread_attr_setinheritsched): Ditto.
(__pthread_attr_getinheritsched): Ditto.
(__pthread_attr_setschedparam): Ditto.
(__pthread_attr_getschedparam): Ditto.
(__pthread_attr_setschedpolicy): Ditto.
(__pthread_attr_getschedpolicy): Ditto.
(__pthread_attr_setscope): Ditto.
(__pthread_attr_getscope): Ditto.
(__pthread_attr_setstackaddr): Ditto.
(__pthread_attr_getstackaddr): Ditto.
(__pthread_key_create): Ditto.
(__pthread_key_delete): Ditto.
(__pthread_setspecific): Ditto.
(__pthread_getspecific): Ditto.
(__pthread_kill): Ditto.
(__pthread_sigmask): Ditto.
(__pthread_equal): Ditto.
(__pthread_mutex_lock): Ditto.
(__pthread_mutex_trylock): Ditto.
(__pthread_mutex_unlock): Ditto.
(__pthread_mutex_destroy): Ditto.
(__pthread_mutex_setprioceiling): Ditto.
(__pthread_mutex_getprioceiling): Ditto.
(__pthread_mutexattr_destroy): Ditto.
(__pthread_mutexattr_getprioceiling): Ditto.
(__pthread_mutexattr_getprotocol): Ditto.
(__pthread_mutexattr_getpshared): Ditto.
(__pthread_mutexattr_gettype): Ditto.
(__pthread_mutexattr_init): Ditto.
(__pthread_mutexattr_setprioceiling): Ditto.
(__pthread_mutexattr_setprotocol): Ditto.
(__pthread_mutexattr_setpshared): Ditto.
(__pthread_mutexattr_settype): Ditto.
(__pthread_cond_destroy): Ditto.
(__pthread_cond_signal): Ditto.
(__pthread_cond_broadcast): Ditto.
(__pthread_condattr_init): Ditto.
(__pthread_condattr_destroy): Ditto.
(__pthread_condattr_getpshared): Ditto.
(__pthread_condattr_setpshared): Ditto.
(__pthread_rwlock_destroy): Ditto.
(__pthread_rwlock_rdlock): Ditto.
(__pthread_rwlock_tryrdlock): Ditto.
(__pthread_rwlock_wrlock): Ditto.
(__pthread_rwlock_trywrlock): Ditto.
(__pthread_rwlock_unlock): Ditto.
(__pthread_rwlockattr_init): Ditto.
(__pthread_rwlockattr_getpshared): Ditto.
(__pthread_rwlockattr_setpshared): Ditto.
(__pthread_rwlockattr_destroy): Ditto.
(__pthread_getconcurrency): Ditto.
(__pthread_setconcurrency): Ditto.
(__pthread_getschedparam): Ditto.
(__pthread_setschedparam): Ditto.
2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
* cygwin.din: Add pthread_rwlock_destroy, pthread_rwlock_init,
pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
pthread_rwlock_unlock, pthread_rwlockattr_init,
pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
and pthread_rwlockattr_destroy.
* include/cygwin/version.h: Bump API minor number.
* include/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Define a
reasonable value.
Add prototypes for pthread_rwlock_destroy, pthread_rwlock_init,
pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
pthread_rwlock_unlock, pthread_rwlockattr_init,
pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
and pthread_rwlockattr_destroy.
* thread.h (PTHREAD_ONCE_MAGIC): Remove superflous semicolon.
(PTHREAD_RWLOCK_MAGIC): New define.
(PTHREAD_RWLOCKATTR_MAGIC): Ditto.
(pthread_rwlockattr): New class.
(pthread_rwlock): Ditto.
(MTinterface::rwlocks): New member.
(MTinterface::MTinterface): Initialize rwlocks.
Add prototypes for __pthread_rwlock_destroy,
__pthread_rwlock_wrlock, __pthread_rwlock_trywrlock,
__pthread_rwlock_unlock, __pthread_rwlockattr_init,
__pthread_rwlockattr_getpshared, __pthread_rwlockattr_setpshared,
and __pthread_rwlockattr_destroy.
* thread.cc (MTinterface::Init): Initialize rwlock internal mutex.
(MTinterface::fixup_after_fork): Fixup rwlocks after fork.
(pthread_rwlockattr::isGoodObject): Implement.
(pthread_rwlockattr::pthread_rwlockattr): Ditto.
(pthread_rwlockattr::~pthread_rwlockattr): Ditto.
(pthread_rwlock::initMutex): Ditto.
(pthread_rwlock::pthread_rwlock): Ditto.
(pthread_rwlock::~pthread_rwlock): Ditto.
(pthread_rwlock::RdLock): Ditto.
(pthread_rwlock::TryRdLock): Ditto.
(pthread_rwlock::WrLock): Ditto.
(pthread_rwlock::TryWrLock): Ditto.
(pthread_rwlock::UnLock): Ditto.
(pthread_rwlock::addReader): Ditto.
(pthread_rwlock::removeReader): Ditto.
(pthread_rwlock::lookupReader): Ditto.
(pthread_rwlock::RdLockCleanup): Ditto.
(pthread_rwlock::WrLockCleanup): Ditto.
(pthread_rwlock::fixup_after_fork): Ditto.
(pthread_rwlock::isGoodObject): Ditto.
(pthread_rwlock::isGoodInitializer): Ditto.
(pthread_rwlock::isGoodInitializerOrObject): Ditto.
(pthread_rwlock::isGoodInitializerOrBadObject): Ditto.
(__pthread_rwlock_destroy): Ditto.
(pthread_rwlock::init): Ditto.
(__pthread_rwlock_rdlock): Ditto.
(__pthread_rwlock_tryrdlock): Ditto.
(__pthread_rwlock_wrlock): Ditto.
(__pthread_rwlock_trywrlock): Ditto.
2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
* thread.h (pthread_cond::ExitingWait): Remove.
(pthread_cond::mutex): Ditto.
(pthread_cond::cond_access): Ditto.
(pthread_cond::win32_obj_id): Ditto.
(pthread_cond::TimedWait): Ditto.
(pthread_cond::BroadCast): Ditto.
(pthread_cond::Signal): Ditto.
(pthread_cond::waiting): Change type to unsigned long.
(pthread_cond::pending): New member.
(pthread_cond::semWait): Ditto.
(pthread_cond::mtxIn): Ditto.
(pthread_cond::mtxOut): Ditto.
(pthread_cond::mtxCond): Ditto.
(pthread_cond::UnBlock): New method.
(pthread_cond::Wait): Ditto.
* thread.cc: Update list of cancellation points.
(pthread_cond::pthread_cond): Rewrite.
(pthread_cond::~pthread_cond): Ditto.
(pthread_cond::TimedWait): Remove.
(pthread_cond::BroadCast): Ditto.
(pthread_cond::Signal): Ditto.
(pthread_cond::UnBlock): Implement.
(pthread_cond::Wait): Ditto.
(pthread_cond::fixup_after_fork): Rewrite.
(pthread_mutex::fixup_after_fork): Remove DETECT_BAD_APP
conditional.
(__pthread_cond_broadcast): Just return 0 if the condition is
not initialized. Call pthread_cond::UnBlock to release blocked
threads.
(__pthread_cond_signal): Ditto.
(__pthread_cond__dowait): Rewrite.
(pthread_cond_timedwait): Add pthread_testcancel call. Fix
waitlength calculation.
(pthread_cond_wait): Add pthread_testcancel call.
2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
* include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.
* thread.cc: Remove errno.h include.
(pthread::precreate): Change internal mutex type to normal.
(pthread_mutex::canBeUnlocked): Implement.
(pthread_mutex::pthread_mutex): Initialize lock_counter with 0.
(pthread_mutex::Lock): Rename to _Lock. Add self parameter.
Change lock_counter logic. Update SetOwner call.
(pthread_mutex::TryLock): Rename to _TryLock. Add self parameter.
Change lock_counter logic. Update SetOwner call.
(pthread_mutex::UnLock): Rename to _UnLock. Add self parameter.
Change lock_counter logic.
(pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call.
(pthread_mutex::SetOwner): Move to thread.h as inline.
(pthread_mutex::LockRecursive): Ditto.
(pthread_mutex::fixup_after_fork): Change lock_counter logic.
(__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid
types check.
* thread.h: Include errno.h and limits.h.
(MUTEX_LOCK_COUNTER_INITIAL): Remove.
(MUTEX_OWNER_ANONYMOUS): New define.
(pthread_mutex::canBeUnlocked): New static method.
(pthread_mutex::lock_counter): Change type to unsigned long.
(pthread_mutex::GetPthreadSelf): New method.
(pthread_mutex::Lock): Call _Lock with pthread_self pointer.
(pthread_mutex::TryLock): Call _TryLock with pthread_self pointer.
(pthread_mutex::UnLock): Call _UnLock with pthread_self pointer.
(pthread_mutex::Destroy): Call _Destroy with pthread_self pointer.
(pthread_mutex::SetOwner): Moved from thread.cc as inline.
(pthread_mutex::LockRecursive): Ditto.
(pthread_mutex::_Lock): New method.
(pthread_mutex::_TryLock): New method.
(pthread_mutex::_UnLock): New method.
(pthread_mutex::_Destroy): New method.
2003-03-18 Christopher January <chris@atomice.net>
* fhandler_proc.cc (format_proc_cpuinfo): Use IsProcessorFeaturePresent
only on Windows NT. Read CPU Mhz value only on NT. Revert previous
change so cpuid instruction is called even on non-NT systems.
2003-03-17 Corinna Vinschen <corinna@vinschen.de>
* glob.c (g_lstat): Change API minor test to match API minor number
change in previous patch.
(g_stat): Ditto.
2003-03-17 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Reorganize last two api versions so that
btowc and trunc exports show up before previous bump since there has
been no exported version of the DLL with the 64 bit changes yet but
1.3.22 will have the btowc and trunc.
2003-03-17 Christopher Faylor <cgf@redhat.com>
* cygwin.din: Export btowc, trunc.
* include/cygwin/version.h: Reflect new exports.
* syscalls.cc (_stat): Rename to stat to avoid newlib wrapper.
* syscalls.cc (_fstat): Ditto.
2003-03-16 Christopher Faylor <cgf@redhat.com>
* fhandler_console.cc (fhandler_console::close): Correct check for
current tty. Add debugging output when console is freed.
(set_console_state_for_spawn): Add debugging output.
* fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console
open flag when vforking.
* sigproc.cc (sigproc_terminate): Fix debugging output.
* spawn.cc (handle): Eliminate second argument.
(spawn_guts): Reflect elimination of argument change to handle.
* syscalls.cc (setsid): Add debugging output when console is freed.
2003-03-14 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
Win9x.
2003-03-13 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 23.
2003-03-13 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (IsProcessorFeaturePresent): Add.
* fhandler_proc.cc (format_proc_cpuinfo): Add case for 9x systems.
2003-03-13 Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc (format_proc_cpuinfo): Fix vendor id in cpuid case.
2003-03-13 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_rcmd): Use correct file descriptor in call to fdsock.
(cygwin_rexec): Ditto.
2003-03-13 Christopher Faylor <cgf@redhat.com>
* fhandler_tty.cc (fhandler_tty_slave::close): Fix typo in debug
output.
* syscalls.cc (rename): Assume that DELETE_ON_CLOSE works on Win9x.
2003-03-11 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::dup): Don't call
fhandler_base::dup() but call DuplicateHandle directly instead to have
control over socket inheritence.
2003-03-11 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
using WinSock2 socket duplication methods. Add comment.
2003-03-11 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_socket.cc (fhandler_socket::fixup_after_fork):
Set io_handle to INVALID_SOCKET in case of failure.
(fhandler_socket::dup): Return 0 if the io_handle is valid.
2003-03-10 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc (setacl): Don't handle DELETE flag specially.
* security.cc (alloc_sd): Ditto.
2003-03-09 Corinna Vinschen <corinna@vinschen.de>
* winver.rc: Change Copyright hint to include 2003.
2003-03-09 Corinna Vinschen <corinna@vinschen.de>
Switch to 32/64 datatypes:
* Makefile.in (OBSOLETE_FUNCTIONS): Add open acl aclcheck aclfrommode
aclfrompbits aclfromtext aclsort acltomode acltopbits acltotext chown
facl fchown fgetpos fopen freopen fseeko fsetpos fstat ftello
ftruncate getegid geteuid getgid getgrent getgrgid getgrnam getgroups
getpwuid getpwuid_r getuid initgroups lchown lseek lstat mknod mmap
seekdir setegid seteuid setgid setgroups setregid setreuid setuid stat
telldir truncate.
(NEW_FUNCTIONS): Add _open64 acl32 aclcheck32 aclfrommode32
aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
acltotext32 chown32 facl32 fchown32 fgetpos64 fopen64 freopen64
fseeko64 fsetpos64 fstat64 ftello64 ftruncate64 getegid32 geteuid32
getgid32 getgrent32 getgrgid32 getgrnam32 getgroups32 getpwuid32
getpwuid_r32 getuid32 initgroups32 lchown32 lseek64 lstat64 mknod32
mmap64 seekdir64 setegid32 seteuid32 setgid32 setgroups32 setregid32
setreuid32 setuid32 stat64 telldir64 truncate64 to substitute the
above.
* cygserver_shm.h (class client_request_shm): Change uid_t and gid_t
members to __uid32_t and __gid32_t.
* cygwin.din: Add symbols acl32 aclcheck32 aclfrommode32
aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
acltotext32 facl32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64
_fstat64 ftello64 _lseek64 mknod32 _open64.
* glob.c: Include perprocess.h.
(globtilde): Call getpwuid32 and getuid32 instead of getpwuid and
getuid.
(g_lstat): Check for applications API version to call the appropriate
typed gl_lstat function.
(g_stat): Ditto for gl_stat.
* shm.cc (client_request_shm::client_request_shm): Call geteuid32
and getegid32 instead of geteuid and getegid throughout.
* syscalls.cc (_open64): New alias for open.
(_lseek64): New alias for lseek64.
(_fstat64): New alias for fseek64.
(mknod32): New function.
(mknod): Calls mknod32 now.
* winsup.h: Make function declarations for getuid32, geteuid32,
and getpwuid32 accessible for plain C sources. Add declarations
for getegid32 and getpwnam.
* include/cygwin/version.h: Bum API minor number to 78.
* include/sys/cygwin.h: Guard C++ specific members of struct
per_process against inclusion in plain C sources.
* include/sys/mman.h (mman): Add guard to avoid type clash when
compiling Cygwin.
2003-03-09 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 22.
2003-03-09 Christopher Faylor <cgf@redhat.com>
Do some minor reformatting of 'extern "C"' use throughout.
2003-03-06 Christopher January <chris@atomice.net>
* autoload.cc (GetSystemTimes): Define new autoload function.
* fhandler_proc.cc (proc_listing): Add cpuinfo and partitions entries.
(fhandler_proc::fill_filebuf): Add PROC_CPUINFO and PROC_PARTITIONS
cases.
(format_proc_uptime): Use GetSystemTimes if available.
(read_value): New macro.
(print): New macro.
(cpuid): New function.
(can_set_flag): New function.
(format_proc_cpuinfo): New function.
(format_proc_partitions): New function.
2003-03-09 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (unlink): Attempt to be more clever about setting
attributes of file. Only open file in query mode to avoid having to
mess with security stuff for reading.
2003-03-09 Corinna Vinschen <corinna@vinschen.de>
* rmsym: Fix regular expression.
2003-03-09 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Change from using new-* to cygwin0 for temporary
targets.
2003-03-09 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.
2003-03-08 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (unlink): Always attempt to use FILE_FLAG_CLOSE_ON_DELETE
to delete files since this allows us to preserve the protection of hard
linked files.
(link): Generate full path for potentially recalculated .lnk target.
2003-03-08 Christopher Faylor <cgf@redhat.com>
Revert below changes regarding _pinfo::cmdline.
2003-03-08 Corinna Vinschen <corinna@vinschen.de>
* external.cc (cygwin_internal): Change n to __off64_t to match change
of _pinfo::cmdline.
* fhandler.h (class fhandler_virtual): Change filesize member to
__off64_t.
* fhandler_proc.cc (format_proc_meminfo): Change to return __off64_t.
(format_proc_stat): Ditto.
(format_proc_uptime): Ditto.
* fhandler_process.cc (format_process_stat): Ditto.
(format_process_status): Ditto.
(format_process_statm): Ditto.
* pinfo.cc (_pinfo::cmdline): Expect __off64_t parameter.
* pinfo.h (class _pinfo): Change declaration of cmdline accordingly.
2003-03-07 Christopher Faylor <cgf@redhat.com>
* path.h (PATH_LNK): New enum val.
(path_conv::is_lnk_symlink): New function. True if path represents
.lnk style symlink.
* path.cc (check_shortcut): Set PATH_LNK in pflags when appropriate.
(symlink_info::check): Ditto. Remove PATH_LNK from pflags initially.
* syscalls.cc (unlink): Always remove readonly attribute from a symlink
regardless of type.
(link): (from Corinna Vinschen) Allow links to symlinks. Reset
attributes on a symlink after successful link creation.
(chmod): Use is_lnk_symlink where appropriate.
(rename): Ditto.
2003-03-07 Pierre Humblet <pierre.humblet@ieee.org>
* tty.cc (create_tty_master): Call GetComputerName instead of
cygwin_gethostname. Set ut_id.
* syscalls.cc (login): Call endutent.
(setutent): Do not seek after a fresh open.
2003-03-07 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (seteuid32): Fix formatting.
2003-03-04 Thomas Pfaff <tpfaff@gmx.net>
* thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
prior to pthread objects.
2003-03-04 Jason Tishler <jason@tishler.net>
* fhandler_socket.cc (fhandler_socket::dup): Initialize type.
2003-03-03 Christopher Faylor <cgf@redhat.com>
* fhandler.h (fhandler_tty_slave::close): Declare new function.
(fhandler_tty_slave::dup): Declare new function.
(fhandler_tty_slave::fixup_after_function): Declare new function.
* fhandler_tty.cc (fhandler_tty_slave_open): Only increment
fhandler_console::open_fhs when associated with a pty.
(fhandler_tty_slave::close): Define new function. Decrement
fhandler_console::open_fhs when associated with a pty.
(fhandler_tty_slave::dup): Define new function. Increment
fhandler_console::open_fhs when associated with a pty.
(fhandler_tty_slave::fixup_after_fork): Define new function. Increment
fhandler_console::open_fhs when associated with a pty.
2003-03-03 Christopher Faylor <cgf@redhat.com>
* fhandler_tty.cc (fhandler_pty_slave::open): Grudgingly increment
fhandler_console::open_fhs here.
(fhandler_pty_slave::close): Ditto for close.
2003-03-02 Christopher Faylor <cgf@redhat.com>
* lib/getopt.c: Refresh from NetBSD sources.
2003-03-02 Christopher Faylor <cgf@redhat.com>
* fhandler_console.cc (fhandler_console::close): Don't decrement
in use counter if in vfork fixup stage.
2003-03-02 Christopher Faylor <cgf@redhat.com>
* lib/getopt.c: Nuke use of unneeded BSDisms.
2003-03-02 Christopher Faylor <cgf@redhat.com>
* dll_init.cc (dll_list::load_after_fork): Don't revert to LoadLibrary
if LoadLibraryEx fails.
* dtable.cc (dtable::dec_console_fds): Eliminate.
(dtable::release): Don't treat console specially.
(dtable::build_fhandler): Ditto.
* dtable.h (console_fds): Eliminate.
(dtable::dec_console_fds): Eliminate.
(dtable::inc_console_fds): Eliminate.
* fhandler.h (fhandler_console::open_fhs): New static element.
* fhandler_console.cc (fhandler_console::open): Increment open_fs.
(fhandler_console::close): Call FreeConsole if no more open consoles
and ctty is not associated with the console.
* syscalls.cc (setsid): Simplify check for when to call FreeConsole.
(check_pty_fds): Eliminate definition.
* winsup.h (check_pty_fds): Eliminate declaration.
2003-03-02 Christopher Faylor <cgf@redhat.com>
* dll_init.cc (dll_list::load_after_fork): Fix typo where result of
LoadLibrary was ignored.
2003-03-01 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::bind): Open and write socket
file using Win32 calls.
2003-03-01 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (get_inet_addr): Open and read socket file using
Win32 calls.
2003-02-28 Christopher Faylor <cgf@redhat.com>
* cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.
* dcrt0.cc (cygwin_atexit): New function.
(cygwin_exit): Ditto.
2003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
* syscalls.cc (fstat64): Pass get_name () to pc.
(access): Pass fn to stat_worker.
2003-03-27 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (class sock_event): New class managing Winsock
events for interruptible socket calls.
(fhandler_socket::connect): Move support for interruptible call to
class sock_event. Use class object instead.
(fhandler_socket::accept): Ditto. Remove useless casts.
2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
* fhandler_socket.cc (fhandler_socket::connect): Add support for
an interruptable connect.
2003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
* uinfo.cc (internal_getlogin): Only update user.groups.pgsid
if the call to set the primary group succeeds.
2003-02-27 Christopher Faylor <cgf@redhat.com>
* cygthread::detach: Improve error message.
2003-02-26 Pierre Humblet <pierre.humblet@ieee.org>
* sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
2003-02-25 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap64): Fix returned address by taking the granularity
into account.
2003-02-23 Pierre Humblet <pierre.humblet@ieee.org>
* syslog.cc (syslog): Do not unlock the file before closing it
and remove debug_printf about stream errors.
2003-02-22 Christopher Faylor <cgf@redhat.com>
* cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
# cygwin.din: Export mallinfo.
# malloc_wrapper.cc (mallinfo): New function.
2003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
* syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
pid as an unsigned decimal. On Win95 print a timestamp and attempt to
lock the file up to four times in 3 ms.
2003-02-21 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compiler
warning.
(fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective
uid/gid of current process in case of open sockets.
2003-02-21 Corinna Vinschen <corinna@vinschen.de>
* dtable.cc (dtable::build_fhandler_from_name): Set some fhandler
data on sockets to evaluate AF_LOCAL sockets correctly.
(dtable::build_fhandler): Set unit number on sockets.
* fhandler.h (fhandler_socket): Add unit number.
(fhandler_socket::get_unit): New method.
* fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit
number.
(fhandler_socket::fstat): Reorganize to return more Linux-like
values.
* net.cc: include ctype.h.
(fdsock): Set unit number when building fhandler.
* path.cc (path_conv::check): Set device type to FH_SOCKET if file
is a AF_UNIX socket.
(get_devn): Evaluate unit for virtual socket devices.
(win32_device_name): Set windows path for sockets to unix_path with
just backslashes to keep the different names.
* syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev
for sockets.
(stat_worker): Ditto.
2003-02-21 Pierre Humblet <pierre.humblet@ieee.org>
* autoload.cc (AccessCheck): Add.
(DuplicateToken): Add.
* security.h (check_file_access): Declare.
* syscalls.cc (access): Convert path to Windows, check existence
and readonly attribute. Call check_file_access instead of acl_access.
* security.cc (check_file_access): Create.
* sec_acl (acl_access): Delete.
2003-02-19 Christopher Faylor <cgf@redhat.com>
* fhandler.cc (fhandler_base::open): Move some filesystem specific
stuff.
(fhandler_disk_file::open): Accept some filesystem specific stuff.
* sigproc.cc (wait_for_sigthread): Become slightly more thread safe.
(sig_send): Don't assume that signal thread is ready.
2003-02-20 Corinna Vinschen <corinna@vinschen.de>
* wincap.h (wincap): Remove unnecessary definition of
supports_sparse_files.
* wincap.cc: Ditto.
2003-02-20 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Check descriptor
created by cygheap_fdnew constructor.
* fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
* fhandler_socket.cc (fhandler_socket::accept): Ditto and move
creation of file descriptor behind blocking OS call.
* net.cc (cygwin_socket): Ditto.
(cygwin_rcmd): Ditto.
(cygwin_rresvport): Ditto.
(cygwin_rexec): Ditto.
(socketpair): Ditto.
2003-02-20 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (GetCompressedFileSize): Add.
* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Compute
st_blocks value from GetCompressedFileSize() if available.
2003-02-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
* wincap.h (wincaps::supports_sparse_files): New flag.
(wincapc::supports_sparse_files): New method.
* wincap.cc (wincap_unknown): Define value for the new flag.
(wincap_95): Ditto.
(wincap_95osr2): Ditto.
(wincap_98): Ditto.
(wincap_98se): Ditto.
(wincap_me): Ditto.
(wincap_nt3): Ditto.
(wincap_nt4): Ditto.
(wincap_nt4sp4): Ditto.
(wincap_2000): Ditto.
(wincap_xp): Ditto.
* path.h (path_conv::fs_flags): New method.
* fhandler_disk_file.cc: Include winioctl.h for DeviceIoControl.
(fhandler_disk_file::open): Set newly created and truncated files as
sparse on platforms that support it.
2003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
* grp.cc (internal_getgroups): Handle properly tokens with
no groups. Fix bug introduced on 2003-02-04.
2003-02-16 Christopher Faylor <cgf@redhat.com>
* cygwin.din: Export all appropriate newlib libm functions. Sort.
* include/cygwin/version.h: Bump API minor number.
2003-02-15 Christopher Faylor <cgf@redhat.com>
* cygwin.din: Export all appropriate newlib libc functions.
* include/cygwin/version.h: Bump API minor number.
2003-02-14 Jason Tishler <jason@tishler.net>
* mmap.cc (mprotect): Add missing break.
2003-02-13 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (try_to_debug): Don't reset priority when returning
from non-waitloop call.
2003-02-13 Vaclav Haisman <V.Haisman@sh.cvut.cz>
Christopher Faylor <cgf@redhat.com>
* fhandler_console.cc (fhandler_console::write_normal): Use MessageBeep
for bell sound.
* autoload.cc (MessageBeep): Add.
2003-02-13 Christopher Faylor <cgf@redhat.com>
* include/cygwin/types.h: Use correct ifdef guard for u_ definitions.
2003-02-13 Christopher Faylor <cgf@redhat.com>
* environ.cc (environ_init): Use strechr.
2003-02-13 Christopher Faylor <cgf@redhat.com>
* include/cygwin/in.h (sockaddr_in): Fix typo.
2003-02-12 Christopher Faylor <cgf@redhat.com>
* path.h (path_conv): Reorganize slightly.
2003-02-12 Christopher Faylor <cgf@redhat.com>
* fhandler_tty.cc (process_input): Add sanity check to ensure that
console typeahead is cleared on signal.
2003-02-12 Christopher Faylor <cgf@redhat.com>
* spawn.cc (linebuf::~linebuf): Resurrect commented out (for
debugging?) code.
2003-02-10 Ralf Habacker <ralf.habacker@freenet.de>
* include/cygwin/in.h (in_attr_t): Define new type.
* include/arpa/inet.h (inet_addr): Change return type to in_addr_t.
(inet_lnaof): Ditto.
(inet_netof): Ditto.
(inet_network): Ditto.
2003-02-10 Christopher Faylor <cgf@redhat.com>
* include/cygwin/types.h: Move many *_t typedefs here. Protect them
with ifdefs.
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to mode_t.
* security.cc (get_attribute_from_acl): Accept mode_t attribute.
(get_nt_attribute): Ditto.
(get_file_attribute): Ditto.
(get_nt_object_attribute): Ditto.
(get_object_attribute): Ditto.
* security.h: Reflect above changes.
* syscalls.cc (chown_worker): Change attrib to mode_t.
2003-02-08 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 21.
2003-02-07 Christopher Faylor <cgf@redhat.com>
* malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below
changes.
2003-02-07 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap_record::alloc_map): De-inline. Add offset and length
parameter. Only protect pages actually unused currently. Do job
of map_map() when initializing a map.
(mmap_record::map_map): Reduce functionality for the reuse case
of private anonymous mapping.
(mmap_record::fixup_map): Format change.
(list::add_record): Add offset and length parameter to call
mmap_record::alloc_map() correctly.
(mmap64): Rename `l' variable to `map_list'. Accommodate above changes.
(munmap): Rename `l' variable to `map_list'.
(msync): Ditto.
(fhandler_disk_file::mmap): Streamline code.
(mprotect): Ditto.
(fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
2003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
Christopher Faylor <cgf@redhat.com>
* exceptions.cc (try_to_debug): Set priority of current thread rather
than the main thread. Make busy waiting loop less busy. Restore
priority when function returns.
2003-02-07 Christopher Faylor <cgf@redhat.com>
* malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
2003-02-07 Christopher Faylor <cgf@redhat.com>
* pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
2003-02-06 Christopher Faylor <cgf@redhat.com>
* heap.cc (heap_init): Remove debugging code.
2003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
* security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
declaration of is_grp_member.
* uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
* passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
* grp.cc (pwdgrp::read_group): Change group name to provide better
feedback.
(getgrgid): Use gid16togid32.
* sec_helper.cc (is_grp_member): Delete.
2003-02-05 Christopher Faylor <cgf@redhat.com>
* path.cc: Change 'to_posix_p' to 'to_posix' throughout.
(conv_path_list_buf_size): Accommodate relative paths.
2003-02-05 Christopher Faylor <cgf@redhat.com>
* path.cc (etc::dir_changed): Fix debug printf.
2003-02-05 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc (setacl): Move all permission settings to beginning of
loop. Set default rights to same values as in alloc_sd(). Set DELETE
for owner and default owner only if S_IWOTH is given.
2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
* sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
wrapper function definitions. Replace call to the aclXYZ functions by
calls aclXYZ32.
(searchace): Change type of third argument to __uid32_t and use
ILLEGAL_UID instead of -1;
(setacl): Remove some initializations. Only give STANDARD_RIGHTS_WRITE
for S_IWOTH. Replace -1 by ILLEGAL_UID.
(getacl): Change type of owner_sid, group_sid and ace_sid to cygpsid.
In last else clause, suppress second call to ace_sid.get_id and use
TRUE in first call. Replace EqualSid by ==.
(acl_access): Call internal_getgroups in USER and GROUP cases.
(acecmp: Define static.
(acl32): Create from 16 bit type.
(facl32): Ditto.
(lacl32): Ditto.
(aclcheck32): Ditto.
(aclsort32): Ditto.
(acltomode32): Ditto.
(aclfrommode32): Ditto.
(acltopbits32): Ditto.
(aclfrompbits32): Ditto.
(acltotext32): Ditto.
(aclfromtext32): Ditto, and use strechr.
(acl16to32): Create.
(acl): Make it a wrapper function.
(facl): Ditto.
(lacl): Ditto.
(aclcheck): Ditto.
(aclsort): Ditto.
(acltomode): Ditto.
(aclfrommode): Ditto.
(acltopbits): Ditto.
(aclfrompbits): Ditto.
(acltotext): Ditto.
(aclfromtext): Ditto.
* security.cc (write_sd): Call set_process_privilege and check
ownership.
(alloc_sd): Remove call to set_process_privilege and the owner check.
2003-02-05 Christopher Faylor <cgf@redhat.com>
* include/sys/cygwin.h: Use C-style comments.
2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
* sec_helper.cc (get_sids_info): New function.
* security.cc (extract_nt_dom_user): Simplify with strechr.
(get_user_groups): Initialize glen to MAX_SID_LEN.
(get_user_local_groups): Ditto.
(get_attribute_from_acl): Define ace_sid as cygpsid.
(get_nt_attribute): Define owner_sid and group_sid as cygpsid.
Call get_sids_info instead of cygsid.get_{u,g}id and is_grp_member.
(get_nt_object_attribute): Ditto.
(alloc_sd): Define ace_sid as cygpsid.
2003-02-04 Thomas Pfaff <tpfaff@gmx.net>
* syscalls.cc (struct system_cleanup_args): New struct.
(system_cleanup): New function.
(system): Use pthread_cleanup_push and _pop to save and restore
signal handlers and sigprocmask.
2003-02-04 Corinna Vinschen <corinna@vinschen.de>
* path.cc (symlink): Create security attributes so that only the
user can modify the symlink.
* security.cc (set_security_attribute): Remove symlink special
handling.
2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
* grp.cc (internal_getgroups): Do not return without closing
the process handle.
2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
* security.h (class cygpsid): New class.
(class cygsid): Use cygpsid as base. Remove members psid, get_id,
get_uid, get_gid, string, debug_printf and the == and != operators.
(cygsidlist::clear_supp): Only do work if setgroups has been called.
* sec_helper.cc: Define sid_auth NO_COPY.
(cygpsid::operator==): New operator.
(cygpsid::get_id): New function.
(cygpsid::string): New function.
(cygsid::string): Delete.
(cygsid::get_id): Delete.
* pwdgrp.h: Change arguments of internal_getpwsid,
internal_getgrsid and internal_getgroups to cygpsid.
* passwd.cc (internal_getpwsid): Change argument from cygsid to cygpsid.
* grp.cc (internal_getgrsid): Ditto.
(internal_getgroups): Ditto.
2003-02-03 Christopher Faylor <cgf@redhat.com>
Eliminate most unneeded this-> pointers throughout.
2003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
* security.h: Add third argument to set_process_privilege.
* autoload.cc: Add OpenThreadToken.
* sec_helper.cc (set_process_privilege): Add and use use_thread
argument.
* security.cc (alloc_sd): Modify call to set_process_privilege.
Remember the result in each process. If failed and file owner is not
the user, fail.
2003-02-03 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::recvfrom): Return buffer
length and don't set errno in case of WSAEMSGSIZE error.
(fhandler_socket::recvmsg): Ditto.
2003-02-01 Christopher Faylor <cgf@redhat.com>
* grp.cc (getgrent32): Only refresh group entries when at beginning.
(internal_getgrsid): Only refresh if uninitialized.
(internal_getgrent): Ditto.
* passwd.cc (getpwent): Only refresh passwd entries when at beginning.
(pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
(internal_getpwsid): Only refresh if uninitialized.
(getpass): No need to refresh passwd data here.
* pwdgrp.h (refresh): Eliminate default.
2003-01-31 Christopher Faylor <cgf@redhat.com>
* dlfcn.cc (dlerror): Only report load errors once per error.
2003-01-31 Christopher Faylor <cgf@redhat.com>
* fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
of res.
* termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
2003-01-31 Troy Curtiss <troyc@usa.net>
* fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking
so that if any Win32 SetComm*() calls fail, errno gets set to EINVAL
and tcsetattr() returns -1. Catch invalid bitrates, mostly. If baud
rate setting is B0, just drop DTR and leave Win32 DCB bitrate as-is
since 0 is not a valid Win32 setting.
(fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as
B0, otherwise get it from the DCB.
2003-01-31 Christopher Faylor <cgf@redhat.com>
* passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
Pierre Humblet).
* pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already
have lock since that means we are in the process of reading the file.
2003-01-31 Jason Tishler <jason@tishler.net>
* shared.cc (shared_info::heap_chunk_size): Use correct variable when
reading HKLM.
2003-01-30 Christopher Faylor <cgf@redhat.com>
* fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
error when inspecting path.
2003-01-29 Christopher Faylor <cgf@redhat.com>
* lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
behavior.
2003-01-28 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::accept): On successful execution
set connection state of returned socket to CONNECTED.
2003-01-27 Christopher Faylor <cgf@redhat.com>
* passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
non-numeric fields.
2003-01-26 Christopher Faylor <cgf@redhat.com>
* uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no
longer a valid return from next_str.
(pwdgrp::add_line): Duh. Revert to use strchr.
2003-01-26 Christopher Faylor <cgf@redhat.com>
* string.h (strechr): New function.
* uinfo.cc (pwdgrp::next_str): Search only for input char in string.
Return EOS on failure. Don't check for NULL since it shouldn't be
possible.
(pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
(pwdgrp::next_num): Pass explicit separator character to next_str.
* grp.cc (pwdgrp::parse_group): Ditto.
* passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage
input.
* pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
2003-01-26 Christopher Faylor <cgf@redhat.com>
* uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
CreateFile failure.
2003-01-26 Christopher Faylor <cgf@redhat.com>
* passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The
structure should always be completely filled out.
* grp.cc (pwdgrp::parse_group): Ditto.
2003-01-26 Christopher Faylor <cgf@redhat.com>
* grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
gr_mem.
2003-01-26 Christopher Faylor <cgf@redhat.com>
* include/sys/strace.h (paranoid_printf): Define as not being part of
"all" output.
2003-01-25 Christopher Faylor <cgf@redhat.com>
* pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns
true/false if parse operation succeeded.
(pwdgrp::reparse): Remove.
(pwdgrp::raw_ptr): New function. Returns pointer in line.
(pwdgrp::next_num): New functions for parsing other than unsigned long.
* grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.
Don't fill in fields with NULL and assign empty gr_mem to known pointer
rather than doing a pointless calloc. Streamline gr_mem parsing.
Don't increment curr_lines here.
* passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.
Don't increment curr_lines here.
* uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
(pwdgrp::reparse): Remove.
(pwdgrp::next_num): Rename from next_int. Return bool indicating
success of parse, argument returns value parsed.
(pwdgrp::add_line): Increment curr_lines here on successful parse.
(pwdgrp::load): (from Pierre Humblet) Don't return status. Just report
it here.
2003-01-25 Christopher Faylor <cgf@redhat.com>
* pwdgrp.cc (pwdgrp::reparse): Declare.
* uinfo.cc (pwdgrp::reparse): Define.
* grp.cc (pwdgrp::parse_group): Use reparse.
2003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
* syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
update the euid and call cygheap->user.set_name. Remove special
handling of ILLEGAL_UID.
(setgid32): Add a debug_printf. On Win95, always set the egid.
Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
* child_info.h (class cygheap_exec_info): Remove uid.
* spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
* dcrto.cc (dll_crt0_1): Always call uinfo_init.
* uinfo.cc (uinfo_init): Reorganize and close handle if needed.
(cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
2003-01-24 Christopher Faylor <cgf@redhat.com>
* fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
scroll region if size changes.
2003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
Jason Tishler <jason@tishler.net>
* cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
* syscalls.cc (setreuid32): New function.
(setreuid): Ditto.
(setregid32): Ditto.
(setregid): Ditto.
* include/cygwin/version.h: Bump API minor number.
2003-01-23 Christopher Faylor <cgf@redhat.com>
* pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
2003-01-23 Christopher Faylor <cgf@redhat.com>
* grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
instead. Use next_str and next_int to parse arguments.
* passwd.cc (pwdgrp::parse_passwd): Ditto.
(grab_string): Eliminate.
(grab_int): Ditto.
* pwdgrp.h (pwdgrp::parse): Eliminate input arg.
(pwdgrp::parse_passwd): Reflect above change.
(pwdgrp::parse_group): Reflect above change.
(pwdgrp::next_str): New function.
(pwdgrp::next_int): Ditto.
(pwdgrp::gets): Eliminate.
* uinfo.cc (pwdgrp::next_str): New function.
(pwdgrp::next_int): Ditto.
(pwdgrp::add_line): Subsume gets.
(pwdgrp::gets): Eliminate.
(pwdgrp::load): Just call add_line to parse input buffer.
2003-01-22 Thomas Pfaff <tpfaff@gmx.net>
* include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
2003-01-09 mutex patch.
(PTHREAD_MUTEX_ERRORCHECK): Ditto.
2003-01-22 Corinna Vinschen <corinna@vinschen.de>
* cygrun.c: Move from here to ../testsuite.
* Makefile.in: Remove cygrun.exe dependencies.
2003-01-21 Jason Tishler <jason@tishler.net>
* cygwin.din: Export nanosleep().
* signal.cc (nanosleep): New function.
(sleep): Move old functionality to nanosleep(). Call nanosleep().
(usleep): Remove old functionality. Call nanosleep().
* include/cygwin/version.h: Bump API minor number.
2003-01-21 Christopher Faylor <cgf@redhat.com>
* grp.cc: Call gr.refresh() rather than doing isunitialized tests
throughout.
(gr): Use constructor (sigh).
(pwdgrp::parse_group): Rename from parse_grp.
(pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
with a single argument.
* passwd.cc: Call pr.refresh() rather than doing isunitialized tests
throughout.
(pr): Use constructor (sigh).
(pwdgrp::parse_passwd): Rename from "parse_pwd".
(pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
with a single argument.
* pwdgrp.h (pwdgrp_state): Eliminate.
(pwdgrp): Reflect above renamings.
(pwdgrp::etc_ix): Rename from pwd_ix.
(pwdgrp::read): New element.
(pwdgrp::lock): New element.
(pwdgrp::refresh): New function.
(pwdgrp::load): Eliminate variations which take buffer arguments.
(pwdgrp::pwdgrp): New constructors. Initialize mutex here.
* uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
(pwdgrp::load): Set initialized state to true rather than setting state
to loaded.
2003-01-21 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number.
2003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
* path.h (etc::change_possible): Revert the type to bool.
(etc::set_last_modified): Remove obsolete function.
* path.cc (etc::change_possible): Revert type to bool.
(etc::test_file_change): Do not test for negative values of
change_possible and do not set it to -res.
(etc::dir_changed): When the handle is NULL, call memset instead of
test_file_changed. When the handle is invalid, return true. Detect
filename change in /etc.
(etc::file_changed): Remove unneeded check for !fn[n].
* uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
* pwdgrp.h (pwdgrp::operator =): Eliminate.
2003-01-19 Christopher Faylor <cgf@redhat.com>
* pwdgrp.h (etc): Move to path.h.
(pwdgrp::max_lines): New field.
(pwdgrp::curr_lines): New field.
(pwdgrp::pwdgrp_buf): Ditto.
(pwdgrp_buf_elem_size): Ditto.
(pwdgrp_parse): Ditto.
(pwdgrp::gets): Just declare here.
(pwdgrp::load): Ditto. Just take one argument.
(pwdgrp::load): Define overloaded function accepting passwd buf.
(pwdgrp::load): Define overloaded function accepting group buf.
* grp.cc: Use pwdgrp elements rather than standalone static variables
throughout.
(curr_lines): Eliminate.
(max_lines): Ditto.
(add_grp_line): Ditto.
(parse_grp): Define as returning boolean. Accept void * arg and line
count. Coerce first argument into __group32 buf reference. Increment
curr_line as appropriate.
(read_etc_group): Pass pwdgrp buffer to gr.load.
* passwd.cc: Use pwdgrp elements rather than standalone static variables
throughout.
(curr_lines): Eliminate.
(max_lines): Ditto.
(add_grp_line): Ditto.
(parse_passwd): Define as returning boolean. Accept void * arg and line
count. Coerce first argument into passwd buf reference. Increment
curr_line as appropriate.
(read_etc_group): Pass pwdgrp buffer to pr.load.
* path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
zero.
(etc::last_modified): Ditto.
(etc::change_possible): Ditto. Renamed from sawchange. Change to
signed char since elements are now tri-state.
(etc::init): Assume "handle" is 1 based rather than 0.
(etc::test_file_change): New function. Sets change_possible based on
file date comparison.
(etc::dir_changed): Check file states immediately after changed_h is
initialized to avoid a race.
(etc::file_changed): Use test_file_change to detect if file needs to be
updated.
* path.h (etc): Move class here from pwdgrp.h.
* uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
here.
(pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
(pwdgrp::add_line): New function.
(pwdgrp::load): Call generic add_line function which will call correct
parser.
2003-01-17 Christopher Faylor <cgf@redhat.com>
* cygheap.cc: Change most 'int's to 'unsigned's.
(_cmalloc): Only check for size of malloced region when calculating
bucket. Add overhead when performing the sbrk. Previous change broke
_crealloc.
2003-01-17 Christopher Faylor <cgf@redhat.com>
* dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
* grp.cc: Change most statics to NO_COPY throughout.
* passwd.cc: Ditto.
2003-01-17 Christopher Faylor <cgf@redhat.com>
* pwdgrp.h: Change some BOOLs to bools.
(pwdgrp::pwdgrp): Remove unneeded constructor.
* passwd.cc: Change BOOL to bool throughout.
2003-01-17 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Add strerror_r.
* include/cygwin/version.h: Bump API minor number.
2003-01-17 Christopher Faylor <cgf@redhat.com>
* uinfo.cc (etc::dir_changed): Don't print a warning if can't open
/etc, unless debugging.
2003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
* grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
"unknown" to "mkgroup".
(internal_getgrgid): Do not return default in nontsec case.
(internal_getgroups): Add argument srchsid and look for it in groups if
not NULL.
* passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
same default uid for Win95 and NT. Call cygheap_user::ontherange to
initialize HOME.
2003-01-16 Christopher Faylor <cgf@redhat.com>
* cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
* cygheap.h (init_cygheap::etc_changed_h): Remove.
(init_cygheap::etc_changed): Ditto.
* grp.cc (group_state): Remove. Use gr instead throughout.
(gr): Define as class pwdgrp.
(read_etc_group): Remove gr definition. Remove calls to
set_last_modified and close. Pass add_grp to gr.load to load file.
* passwd.cc (passwd_state): Remove. Use pr instead, throughout.
(pr): Define as class pwdgrp.
(read_etc_passwd): Remove pr definition. Remove calls to
set_last_modified and close. Pass add_pwd_line to pr.load to load
file.
* pwdgrp.h (etc): New helper class for pwdgrp.
(pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
file_w32 and last_modified fields.
(pwdgrp::set_last_modified): Remove.
(pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
etc::file_changed.
(pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
scanning. Close file handle after reading buffer into memory. Parse
buffer by calling second argument.
(pwdgrp::gets): Reorganize slightly to rely on eptr starting at
beginning of buffer.
(pwdgrp::close): Remove.
* uinfo.cc (etc::dir_changed): New function.
(etc::init): Ditto.
(etc::file_changed): Ditto.
(etc::set_last_modified): Ditto.
2003-01-16 Jason Tishler <jason@tishler.net>
* mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
ReadProcessMemory() error codes that trigger a retry with temporary
PAGE_READONLY access. Note that this can occur on NT 4.0.
2003-01-15 Christopher Faylor <cgf@redhat.com>
* path.cc (normalize_posix_path): Convert win32 path separators to
slashes when full path is specified.
2003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
* cmalloc.cc (_cmalloc): Fix memory leak.
2003-01-15 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc: Fix copyright date.
* fhandler_dsp.cc: Ditto.
* mmap.cc: Ditto.
* net.cc: Ditto.
* ntdll.h: Ditto.
* signal.cc: Ditto.
* syscalls.cc: Ditto.
* uname.cc: Ditto.
* wait.cc: Ditto.
2003-01-14 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
Change ambiguous debug output.
2003-01-14 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap_record::access): Change argument type to caddr_t
for strictness.
(mprotect): Protect against calling VirtualProtect() for shared
pages on 9x/Me.
(fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
change protection of parent page to PAGE_READONLY, then try again.
Revert protection afterwards.
2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
* syscalls.cc (system): Add pthread_testcancel call.
* thread.cc: Update list of cancellation points.
2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
* wait.cc: Include thread.h
(wait4): Add pthread_testcancel call.
Wait for child process and cancellation event.
* thread.cc: Update list of cancellation points.
2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
* signal.cc (sleep): Add pthread_testcancel call.
Wait for signal and cancellation event.
(usleep): Ditto.
2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
* exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
Wait for signal and cancellation event.
* thread.cc: Update list of cancellation points.
2003-01-14 David Huang <davehzhr@hotmail.com>
* fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
SNDCTL_DSP_GETFMTS.
2003-01-12 Christopher Faylor <cgf@redhat.com>
* ntdll.h: Fix typo.
2003-01-12 Corinna Vinschen <corinna@vinschen.de>
* uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
2003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
* sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
(setacl): Start the search for a matching default at the next entry.
Invalidate the type of merged entries instead of clearing it.
Use well_known_creator for default owner and owning group and do
not try to merge non-default and default entries in these cases.
(getacl): Recognize well_known_creator for default owner and group.
(acl_worker): Improve errno settings and streamline the nontsec case.
* security.cc (write_sd): Remove the call to set_process_privilege.
(alloc_sd): If the owner changes, call set_process_privilege and return
immediately on failure. Change inheritance rules: on new directories add
inherit only allow ACEs for creator_owner, creator_group and everyone.
Preserve all inheritances through chmod and chown calls. Introduce
isownergroup to implement the uid == gid case, to keep the inheritance
code simple. Do not initialize owner_sid and group_sid and stop using
the variable psd.
2003-01-10 Christopher Faylor <cgf@redhat.com>
* net.cc: Use gethostname define from winsock2.h.
2003-01-10 Christopher Faylor <cgf@redhat.com>
* path.cc: Unrevert below reversion except for
mount_info::conv_to_posix_path part.
2003-01-10 Corinna Vinschen <corinna@vinschen.de>
* path.cc: Revert patch from 2003-01-09 to normalize a windows path
rather than converting to posix.
2003-01-10 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (gethostname): Make call optional, return 1 if function
can't get loaded.
* net.cc (cygwin_gethostname): Call GetComputerName if return value
of gethostname is non-zero.
2003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
* cygwin.din: Add asprintf and vasprintf, as well as the reentrant
versions and underscore variants.
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
2003-01-10 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
2003-01-09 Christopher Faylor <cgf@redhat.com>
* cygthread.cc (cygthread::cygthread): Be more noisy about odd
condition.
* miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
that's what we're currently running at.
2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
* include/semaphore.h: Modify typedef for sem_t.
* include/cygwin/types.h: Modify typedefs for pthread_t,
pthread_mutex_t, pthread_key_t, pthread_attr_t,
pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
pthread_rwlock_t and pthread_rwlockattr_t.
2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
* thread.h (WAIT_CANCELED): New define.
(pthread::cancelable_wait): New static method.
* thread.cc (pthread::cancelable_wait): Implement.
(semaphore::Wait): Wait on semaphore and thread cancellation.
(pthread::join): Wait on joined thread and thread cancellation.
(semaphore::wait): Add testcancel to check for thread
cancellation even if the semaphore is available.
2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
* include/pthread.h: Add define for errorchecking mutexes.
Change default mutex type.
* thread.cc (pthread_cond::TimedWait): Update mutex unlock
calls.
(pthread_mutex::pthread_mutex): New implement.
(pthread_mutex::~pthread_mutex): Ditto.
(pthread_mutex::Lock): Ditto.
(pthread_mutex::TryLock): Ditto.
(pthread_mutex::UnLock): Ditto.
(pthread_mutex::Destroy): Implement new method.
(pthread_mutex::SetOwner): Ditto.
(pthread_mutex::LockRecursive): Ditto.
(pthread_mutex::fixup_after_fork): Restore locking state after
fork.
(__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
(__pthread_mutex_trylock): Return pthread_mutex::TryLock
errorcode.
(__pthread_mutex_unlock): Return pthread_mutex::UnLock
errorcode.
(__pthread_mutex_destroy): Call pthread_mutex::Destroy to
destroy mutex.
(__pthread_mutexattr_settype): Allow errorchecking and recursive
types.
* thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
(pthread_mutex::criticalsection): Remove.
(pthread_mutex::lock_counter): New member.
(pthread_mutex::recursion_counter): Ditto.
(pthread_mutex::owner): Ditto.
(pthread_mutex::type): Ditto.
(pthread_mutex::Destroy): New method.
(pthread_mutex::SetOwner): Ditto.
(pthread_mutex::LockRecursive): Ditto.
2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
* pthread.cc (pthread_cond_init): Use new pthread_cond::init.
* thread.cc: Some white spaces cleanups.
Change __pthread_cond_init to pthread_cond::init throughout.
(nativeMutex): Move class methods outside pthread_mutex.
(MTinterface::Init): Initialize pthread_cond init lock.
(pthread_cond::condInitializationLock): Instantiate.
(pthread_cond::initMutex): New Method.
(pthread_cond::isGoodInitializerOrBadObject): Ditto.
* thread.h: Some white spaces cleanups.
(nativeMutex): Move class declaration outside pthread_mutex.
(pthread_cond::condInitializationLock): New static member.
(pthread_cond::initMutex): New Method.
(pthread_cond::isGoodInitializerOrBadObject): Ditto.
(__pthread_cond_init): Remove prototype.
2003-01-09 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (num_entries): Return 2 as link count if
directory unreadable.
2003-01-09 Corinna Vinschen <corinna@vinschen.de>
* security.cc (get_nt_attribute): Always return -1 when read_sd()
fails.
(get_file_attribute): Set permissions to 0 and owner/group to -1
if security descriptor is unreadable.
2003-01-09 Christopher Faylor <cgf@redhat.com>
Use isdirsep rather than SLASH_P throughout.
* path.cc (iscygdrive): Disallow /cygdrive\x.
(normalize_posix_path): "Normalize" a windows path, if detected, rather
than converting to posix.
2003-01-06 Troy Curtiss <troyc@usa.net>
* fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
capability checking for B230400 bitrate.
(fhandler_serial::tcgetattr): Add support for B230400 bitrate.
* include/sys/termios.h: Add B230400 definition for Posix support of
230.4Kbps.
2003-01-05 Christopher Faylor <cgf@redhat.com>
* pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
lock when leaving.
2003-01-03 Christopher Faylor <cgf@redhat.com>
* dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
cleanup needed.
* dtable.cc (dtable::vfork_parent_restore): Remove assertion.
* pipe.cc (fhandler_pipe::close): Don't close read_state during
fork_fixup since it wasn't inherited.
2003-01-01 Christopher Faylor <cgf@redhat.com>
* passwd.cc (getpwuid_r32): Revert previous change.
2003-01-01 Christopher Faylor <cgf@redhat.com>
* sysconf.cc (sysconf): Return arbitrary values for
_SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
* passwd.cc (getpwuid_r32): Add uid/gid fields to size check
calculation.
|