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

	* net.cc (cygwin_setsockopt): Only skip calling setsockopt(SO_REUSEADDR)
	on stream sockets under systems supporting enhanced socket security.

2009-12-15  Thomas Wolff  <towo@towo.net>

	* fhandler_console.cc (char_command): Fix code to select dim mode 
	to 2 rather than 9.  Add entries for mode 22 (normal, not bold) 
	28 (visible, not invisible), 25 (not blinking).

2009-12-14  Corinna Vinschen  <corinna@vinschen.de>

	* libc/getopt.c (getopt_internal): Set optreset according to optind
	setting earlier.  Reevaluate POSIXLY_CORRECT if optreset is set to !0.
	Handle a leading '-' in options independently of posixly_correct.

2009-12-09  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler_fifo.cc (fhandler_fifo::open): Avoid resetting errno after
	it has been explicitly set.

	* include/cygwin/version.h: Bump DLL minor version number to 2.

2009-12-06  Corinna Vinschen  <corinna@vinschen.de>

	* include/cygwin/version.h: Bump DLL minor version number to 1.

2009-12-02  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (send_internal): Don't split datagram messages
	into pieces.

	* syslog.cc (vsyslog): Set default facility to LOG_USER if it hasn't
	been set yet.

2009-12-01  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_registry.cc (fhandler_registry::open): Mark /proc/registry
	directory and siblings as nohandle fhandler.

2009-11-30  Christopher Faylor  <me+cygwin@cgf.cx>

	* speclib: Use last dll found since that's the real name of the cygwin
	DLL.

2009-11-27  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix typos in
	comments.  Always open file synchronized when reading header bytes,
	otherwise suffer stack corruption.

2009-11-26  Corinna Vinschen  <corinna@vinschen.de>

	* dtable.cc (dtable::stdio_init): Use GetCurrentProcess() rather than
	hMainProc as process handle when duplicating the stdout handle.
	Explain why.  Add Win32 error code to debug output.

2009-11-23  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Add
	socket handle value to debug output.
	(fhandler_socket::fixup_after_fork): Ditto.  Make new socket handle
	OVERLAPPED, just as if it has been created with socket().
	* net.cc (fdsock): Close duplicated socket and explain why.  Disable
	the entire WSADuplicateSocket test for now and explain why.

2009-11-23  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::set_close_on_exec): Only call
	fhandler_base::set_close_on_exec for inheritable sockets.

2009-11-21  Corinna Vinschen  <corinna@vinschen.de>

	* globals.cc (ro_u_dll): New R/O unicode string.
	* syscalls.cc (nt_path_has_executable_suffix): Add ro_u_dll to
	blessed_executable_suffixes array.  Explain why.

2009-11-18  Corinna Vinschen  <corinna@vinschen.de>

	* flock.cc (fhandler_disk_file::lock): Disable a shortcut from the
	original BSD code, but keep it in and documented why we can't use it.

2009-11-18  Corinna Vinschen  <corinna@vinschen.de>

	* ntea.cc (read_ea): Always add length of "user." prefix, not only
	on Samba.  Change comment.

2009-11-18  Corinna Vinschen  <corinna@vinschen.de>

	* ntea.cc (read_ea): Try to open file first to have more sensible
	error codes.  Always refuse non "user." EAs for Linux compatibility
	and return EOPNOTSUPP.  Fix handling of empty (== non-existant) EAs.
	Always prepend "user." prefix to EA names.
	(write_ea): Try to open file first to have more sensible error codes.
	Always refuse non "user." EAs for Linux compatibility and return
	EOPNOTSUPP.  Delay skipping "user." prefix until after potential call
	to read_ea.

2009-11-17  Corinna Vinschen  <corinna@vinschen.de>

	Reintegrate socket duplication via WSADuplicateSocket/WSASocket.
	* autoload.cc (WSADuplicateSocketW): Define.
	(WSASocketW): Define.
	* dtable.cc (dtable::release): Call dec_need_fixup_before if necessary.
	(dtable::fixup_before_fork): New function.
	(dtable::fixup_before_exec): New function.
	* dtable.h (class dtable): Add member cnt_need_fixup_before.  Add
	declarations for above new functions.
	(dtable::dec_need_fixup_before): New inline method.
	(dtable::inc_need_fixup_before): New inline method.
	(dtable::need_fixup_before): New inline method.
	* fhandler.h (fhandler_base::fixup_before_fork_exec): New virtual
	method.
	(fhandler_base::need_fixup_before): New virtual method.
	(class fhandler_socket): Add member prot_info_ptr.
	(fhandler_socket::init_fixup_before): Declare.
	(fhandler_socket::need_fixup_before): New inline method.
	(fhandler_socket::fixup_before_fork_exec): Declare.
	(fhandler_socket::fixup_after_exec): Declare.
	* fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
	prot_info_ptr to NULL.
	(fhandler_socket::~fhandler_socket): Free prot_info_ptr conditionally.
	(fhandler_socket::init_fixup_before): New method.
	(fhandler_socket::fixup_before_fork_exec): Ditto.
	(fhandler_socket::fixup_after_fork): Use WSASocketW to duplicate
	socket if necessary.
	(fhandler_socket::fixup_after_exec): New method.
	(fhandler_socket::dup): Use fixup_before_fork_exec/fixup_after_fork
	to duplicate socket if necessary.
	* fork.cc (frok::parent): Start child suspended if some fhandler
	needs fixup before fork.  If so, call dtable::fixup_before_fork after
	CreateProcess and resume child.
	* net.cc (fdsock): Try to find out if socket needs fixup before and
	initialize socket accordingly.  Add HUGE comment to explain what happens
	and why.
	* spawn.cc (spawn_guts): Start child suspended if some fhandler needs
	fixup before exec.  If so, call dtable::fixup_before_exec after
	CreateProcess.

2009-11-16  Eric Blake  <ebb9@byu.net>

	* environ.cc (setenv): Detect invalid argument.
	(unsetenv): Distinguish EFAULT from EINVAL.

2009-11-13  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (fdsock): Fill _rmem and _wmem with valid values returned
	from getsockopt if setsockopt with desired values failed.

2009-11-12  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
	    Corinna Vinschen  <corinna@vinschen.de>

	* sysconf.cc (get_nprocs): New function.
	(get_nprocs_conf): Ditto.
	(get_avphys_pages): Ditto.
	(get_phys_pages): Ditto.
	* cygwin.din: Export them.
	* include/sys/sysinfo.h: New header, decalre above new functions.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* posix.sgml: Mention them as GNU extensions.

2009-11-11  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_mailslot): Declare new private method
	get_object_attr.
	* fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Implement.
	(fhandler_mailslot::open): Replace calls to path_conv::get_object_attr
	with calls to fhandler_mailslot::get_object_attr.

2009-11-10  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_console.cc (fhandler_console::read): Revert change from
	2009-11-09.

2009-11-10  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (is_volume_mountpoint): Align check with
	symlink_info::check_reparse_point().
	* path.cc (symlink_info::check_reparse_point): Rearrange slightly.
	Add code path for unrecognized repare point types.  Add comment.

2009-11-09  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (symlink_info::check_reparse_point): Always check
	SubstituteName for volume string to recognize volume mount points.
	Reuse subst when calling sys_wcstombs.
	* syscalls.cc (rename): Set errno to EBUSY when trying to rename
	volume mount points.  Explain why.

2009-11-09  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_console.cc (fhandler_console::read): Restrict generating
	META key sequences to singlebyte input chars.

2009-11-08  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Drop all "other"
	permissions from st_mode, if the reading the file's security descriptor
	failed.  Explain why.

2009-11-06  Corinna Vinschen  <corinna@vinschen.de>

	* globals.cc (ro_u_scr): New R/O unicode string.
	(ro_u_sys): Ditto.
	* syscalls.cc (nt_path_has_suffix): Replace with ...
	(nt_path_has_executable_suffix): New function checking for explicit
	executable suffixes.
	(rename): Call nt_path_has_executable_suffix instead of
	nt_path_has_suffix.  Check oldpath for nt_path_has_executable_suffix
	as well to set old_explicit_suffix.

2009-11-06  Corinna Vinschen  <corinna@vinschen.de>

	* shared.cc (inst_root_inited): New static bool variable.
	(init_installation_root): Set inst_root_inited to true.
	(memory_init): Print installation root debug output only if
	inst_root_inited is true.

2009-11-05  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (nt_path_has_suffix): New function.
	(rename): Don't append .exe suffix if binary target name has any suffix
	at all.

2009-11-05  Corinna Vinschen  <corinna@vinschen.de>

	* spawn.cc (dll_suffixes): Disable.  Explain why.
	(perhaps_suffix): Use stat_suffixes instead of dll_suffixes.

2009-11-03  Corinna Vinschen  <corinna@vinschen.de>

	* security.cc (alloc_sd): Re-introduce setting the SE_DACL_PROTECTED
	flag.  Remove INHERITED_ACE flag from all inherited ACEs.  Add comment.
	Fix ace_off counter in unrelated ACE loop.
	* wincap.cc: Re-add has_dacl_protect throughout.
	* wincap.h: Ditto.

2009-11-02  Corinna Vinschen  <corinna@vinschen.de>

	* security.cc (alloc_sd): Re-enable generating default permission
	entries for directories.

2009-11-02  Corinna Vinschen  <corinna@vinschen.de>

	* dlfcn.cc (get_full_path_of_dll): Drop enforcing a .dll suffix.
	(dlopen): If last path component has no dot, append one to override
	automatic .dll suffix in LoadLibrary.

2009-11-02  Corinna Vinschen  <corinna@vinschen.de>

	* miscfuncs.h (transform_chars): Declare.  Define inline variation here.
	* mount.cc (mount_info::from_fstab): Remove extern declaration of
	transform_chars.
	* path.cc (tfx_chars): Move to strfuncs.cc.
	(transform_chars): Ditto.
	* strfunc.cc (tfx_chars): Moved here from path.cc.
	(transform_chars): Ditto.
	(sys_cp_wcstombs): Make UNICODE private use area conversion roundtrip
	save for all characters.
	(sys_cp_mbstowcs): Ditto, by removing special case for UTF-8 sequences
	representing U+F0xx UNICODE chars.  Fix typo in comment.

2009-11-02  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (tfx_chars): Constify.

2009-10-31  Corinna Vinschen  <corinna@vinschen.de>

	* cygprops.h: New file.
	* dtable.cc (handle_to_fn): Add check for correct installation_key
	string in object name for pipes and ttys.
	* external.cc (cygwin_internal): Add CW_GET_INSTKEY to allow fetching
	the installation_key from cygserver.
	* fhandler_fifo.cc (fhandler_fifo::fifo_name): Add installation_key
	to fifo name.
	* globals.cc: Include cygprops.h.
	(_RDATA): Move slightly and add comment.
	(cygwin_props): Define.
	* mount.cc (mount_info::init): Accommodate the fact that
	installation_root is now a global variable in DLL common shared memory,
	rather than a member of cygwin_shared.
	* pipe.cc (fhandler_pipe::create_selectable): Add installation_key to
	pipe name.
	* shared.cc (installation_root): Define here for storage in DLL
	common shared memory.
	(installation_key): Ditto.
	(installation_key_buf): Ditto.
	(init_installation_root): Convert from shared_info method to ordinary
	function.  Add initializing installation_key.  Invalidate
	installation_key depending of value of disable_key property.  Add
	comment to explain.
	(get_shared_parent_dir): Add installation_key to directory name.
	(get_session_parent_dir): Ditto.
	(shared_info::initialize): Move call to init_installation_root from
	here...
	(memory_init): ...to here.  Add debug output to print installation root
	and installation key.  Add comment to explain why.
	* shared_info.h (SHARED_INFO_CB): Recalculate.
	(CURR_SHARED_MAGIC): Ditto.
	(class shared_info): Remove definition of installation_root and
	declaration of init_installation_root.
	(init_installation_root): Declare.
	(installation_root): Declare.
	(installation_key): Declare.
	* uinfo.cc (pwdgrp::load): Accommodate the fact that installation_root
	is now a global variable in DLL common shared memory.
	* include/cygwin/version.h: Bump API minor number.
	(CYGWIN_INFO_INSTALLATIONS_NAME): Add.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_INSTKEY.

2009-10-31  Corinna Vinschen  <corinna@vinschen.de>

	* sec_helper.cc (security_descriptor::realloc): Call free first if
	current security desriptor has been allocated by GetSecurityInfo.

2009-10-30  Corinna Vinschen  <corinna@vinschen.de>

	* sec_helper.cc (security_descriptor::free): If sd_size is 0, call
	LocalFree instead of ::free.

	* sec_acl.cc: Throughout replace old ACE flag definitions with current
	definitions as used in MSDN man pages.
	* security.cc: Ditto.

	* fhandler.cc (fhandler_base::open): Make sure file has really been
	just created before fixing file permissions.  Add S_JUSTCREATED
	attribute to set_file_attribute call.
	* fhandler_disk_file.cc (fhandler_disk_file::mkdir): Always create dir
	with default security descriptor and fix descriptor afterwards.
	Add S_JUSTCREATED flag to set_file_attribute call.
	* fhandler_socket.cc (fhandler_socket::bind): Ditto for AF_LOCAL
	socket files.
	* path.cc (symlink_worker): Ditto for symlinks.
	* security.cc (get_file_sd): Call GetSecurityInfo rather than
	NtQuerySecurityObject.  Explain why.  Change error handling accordingly.
	(alloc_sd): Skip non-inherited, non-standard entries in ACL if
	S_JUSTCREATED attribute is set.  Explain why.  Minor format fixes.
	* security.h (S_JUSTCREATED): New define.
	(security_descriptor::operator=): New operator.

2009-10-30  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_random.cc (fhandler_dev_random::lseek): Revert change from
	2009-10-23.

2009-10-30  Corinna Vinschen  <corinna@vinschen.de>

	* smallprint.cc (hex_str): New const string.
	(__rn): Drop str and use hex_str instead.
	(__small_vsprintf): If 'l' modifier has been found, print subsequent
	multibyte or wide char string using the s, S, or W options in extended
	hex value layout.

	* fhandler_disk_file.cc (fhandler_disk_file::readdir): Print WCHAR
	and resulting multibyte filename in extended hex value layout in
	debug output.

2009-10-26  Charles Wilson  <cygwin@cwilson.fastmail.fm>

	* lib/pseudo-reloc.c (__report_error) [CYGWIN]: Correct size bug
	regarding error messages.

2009-10-25  Charles Wilson  <cygwin@cwilson.fastmail.fm>

	Sync pseudo-reloc.c with mingw64
	* lib/psuedo-reloc.c: Remove unnecessary includes.
	Forward declare _pei386_runtime_relocator.
	Decorate _image_base__ symbol with macro for
	mingw64 compatibility. Whitespace changes.
	(__print_reloc_error): Renamed to...
	(__report_error): This. "Returns" void, and
	always aborts. Now used on all platforms.
	(__write_memory): Remove special case error handling
	for different platforms - always call __report_error.
	(do_pseudo_reloc): Remove special case error handling
	for different platforms - always call __report_error.
	(_pei386_runtime_relocator): Decorate _image_base__
	symbol with mingw64 compatibility macro.

2009-10-24  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (fhandler_base::open): Remove unused variables sa and sd.

2009-10-23  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (fhandler_base::open): Always create file with default
	security descriptor and fix descriptor afterwards.  Change comment to
	explain why.
	* security.cc (alloc_sd): Drop setting the SE_DACL_PROTECTED flag.
	* wincap.cc: Remove has_dacl_protect throughout.
	* wincap.h: Ditto.

2009-10-23  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_random.cc (fhandler_dev_random::lseek): Allow negative
	dummy file positions as on Linux.

2009-10-20  Corinna Vinschen  <corinna@vinschen.de>

	* registry.cc (reg_key::get_int): Add alternative implementation
	taking WCHAR strings.
	(reg_key::set_int): Ditto.
	(reg_key::get_string): Ditto.
	(reg_key::set_string): Ditto.
	* registry.h (struct reg_key): Add prototypes for added methods.

2009-10-20  Corinna Vinschen  <corinna@vinschen.de>

	* smallprint.cc (__small_vsprintf): Simplify UNICODE string handling
	and allow empty strings.

2009-10-20  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhander_disk_file::readdir): Handle a status
	code STATUS_NOT_SUPPORTED.  Add matching comment.

2009-10-19  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (internal_setlocale): Only convert $PATH if there is a
	$PATH.

2009-10-19  Corinna Vinschen  <corinna@vinschen.de>

	* spawn.cc (av::fixup): Treat non-readable, but executable files as
	Cygwin executables.

2009-10-18  Corinna Vinschen  <corinna@vinschen.de>

	* uinfo.cc (uinfo_init): Deimpersonate, don't reimpersonate, if
	not in a setuid condition.

2009-10-13  Eric Blake  <ebb9@byu.net>

	* external.cc (cygwin_internal): Use va_end.
	* fork.cc (child_copy): Likewise.
	* libc/bsdlib.cc (warn, warnx, err, errx): Likewise.
	* pinfo.cc (commune_request): Likewise.
	* strace.cc (strace::prntf, strace_printf): Likewise.

2009-10-13  Corinna Vinschen  <corinna@vinschen.de>

	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

2009-10-13  Christian Franke  <franke@computer.org>
	    Corinna Vinschen  <corinna@vinschen.de>

	* include/sys/cygwin.h: Add new cygwin_getinfo_type
	CW_SET_EXTERNAL_TOKEN.
	Add new enum CW_TOKEN_IMPERSONATION, CW_TOKEN_RESTRICTED.
	* cygheap.h (cyguser): New flags ext_token_is_restricted,
	curr_token_is_restricted and setuid_to_restricted.
	* external.cc (cygwin_internal): Add CW_SET_EXTERNAL_TOKEN.
	* sec_auth.cc (set_imp_token): New function.
	(cygwin_set_impersonation_token): Call set_imp_token ().
	* security.h (set_imp_token): New prototype.
	* spawn.cc (spawn_guts): Use CreateProcessAsUserW if restricted token
	was enabled by setuid().  Do not create new window station in this case.
	* syscalls.cc (seteuid32): Add handling of restricted external tokens.
	Set HANDLE_FLAG_INHERIT for primary token.
	(setuid32): Set setuid_to_restricted flag.
	* uinfo.cc (uinfo_init): Do not reimpersonate if restricted token was
	enabled by setuid ().  Initialize user.*_restricted flags.

2009-10-13  Eric Blake  <ebb9@byu.net>

	* hires.h (hires_ms): Change initime_us to initime_ns, with 10x
	more resolution.
	(hires_ms::nsecs): New prototype.
	(hires_ms::usecs, hires_ms::msecs, hires_ms::uptime): Adjust.
	* times.cc (systime_ns): New helper function.
	(hires_ms::prime): Use it for more resolution.
	(hires_ms::usecs): Change to...
	(hires_ms::nsecs): ...with more resolution.
	(clock_gettime): Use more resolution.
	(systime): Rewrite in terms of systime_ns.
	(timespec_to_filetime): Rewrite math to reflect true operation.
	* fhandler_disk_file.cc (utimens_fs): Use higher resolution.

2009-10-12  Corinna Vinschen  <corinna@vinschen.de>

	* external.cc (cygwin_internal): Return 0 in CW_SET_DOS_FILE_WARNING
	and CW_SETERRNO cases.

2009-10-12  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::link): Only append .lnk
	if the original device had one, too.  Add comment.

	* fhandler_socket.cc (fhandler_socket::fstat): Always return a size of
	0 on sockets.

2009-10-09  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (tfx_chars): Convert all ASCII control characters except
	ASCII NUL as well.  Change layout to make the conversions more clear.
	Add comment.

2009-10-09  Corinna Vinschen  <corinna@vinschen.de>

	* include/cygwin/config.h (DEFAULT_LOCALE): Define as "C.UTF-8".

2009-10-08  Christopher Faylor  <me+cygwin@cgf.cx>

	* exceptions.cc (_cygtls::signal_exit): There's no need to set
	signal_arrived if we're exiting.

2009-10-08  Eric Blake  <ebb9@byu.net>

	* fhandler_disk_file.cc (utimens_fs): Plug fd leak on EINVAL.

2009-10-07  Charles Wilson  <cygwin@cwilson.fastmail.fm>

	Additional pseudo-reloc-v2 support
	* ntdll.h: Add custom NTSTATUS value for pseudo-reloc
	errors STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION.
	* pinfo.cc (status_exit): Map custom pseudo-reloc
	error value STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION to 127.
	* sigproc.cc (child_info::proc_retry): Return exit code when
	STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION.

	Cygwin modifications to pseudo-reloc.c
	* lib/pseudo-reloc.c: Added comments throughout and various
	whitespace fixes. Exploit cygwin_internal(CW_EXIT_PROCESS,...)
	for fatal error handling that is consistent with cygwin process
	life-cycle. Ensure state variable (in _pei386_runtime_relocator)
	is unique to each address space, across fork().
	(__print_reloc_error): New function for reporting errors in a
	manner supported by cygwin at this early stage of the process
	life-cycle.
	(_pei386_runtime_relocator): Ensure relocations performed
	only once for each address space, but are repeated after fork()
	in the new address space.
	only once for each address space (e.g. across fork()).
	(__write_memory) [MINGW]: Ensure that b is always initialized
	by call to VirtualQuery, even if -DNDEBUG.

	* lib/pseudo-reloc.c: Import new implementation to support
	v2 pseudo-relocs implemented by Kai Tietz from mingw.

2009-10-07  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (seteuid32): Call set_cygwin_privileges on primary token
	as well.

2009-10-07  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (fhandler_pty_master::tcgetpgrp): Declare.
	* fhandler_termios.cc (fhandler_termios::tcgetpgrp): Only return
	valid pgid if tty is controlling tty.  Set errno to ENOTTY and
	return -1 otherwise.
	(fhandler_pty_master::tcgetpgrp): New function.  Return 0 for
	master side of pty if it's not the controlling tty of the process.

2009-10-05  Charles Wilson  <cygwin@cwilson.fastmail.fm>

	Add cygwin wrapper for ExitProcess and TerminateProcess.
	* include/sys/cygwin.h: Declare new cygwin_getinfo_type
	CW_EXIT_PROCESS.
	* external.cc (exit_process): New function.
	(cygwin_internal): Handle CW_EXIT_PROCESS.
	* pinfo.h (pinfo::set_exit_code): New method.
	* pinfo.cc (pinfo::set_exit_code): New, refactored from...
	(pinfo::maybe_set_exit_code_from_windows): here. Call it.
	* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR
	to 215 to reflect the above change. 

2009-10-05  Charles Wilson  <cygwin@cwilson.fastmail.fm>

	* exceptions.cc: Move global variable sigExeced...
	* globals.cc: here.
	* pinfo.cc (pinfo::maybe_set_exit_code_from_windows): Remove now
	unneeded declaration.

2009-10-04  Dave Korn  <dave.korn.cygwin@gmail.com>

	* Makefile.in (CFLAGS): Add -mno-use-libstdc-wrappers.

2009-10-04  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (internal_setlocale): Add comment.

2009-10-02  Corinna Vinschen  <corinna@vinschen.de>

	* dcrt0.cc (dll_crt0_1): Drop calls to setlocale/_setlocale_r.  Just
	call initial_setlocale from here.
	* syscalls.cc (initial_setlocale): Set internal charset and revert
	application locale to "C".
	(setlocale): Don't set Cygwin's internal charset here.

2009-10-02  Christopher Faylor  <me+cygwin@cgf.cx>

	* dcrt0.cc (dll_crt0_1): Move cxx_malloc reset kluge from here.
	(check_sanity_and_sync):  to here.

2009-09-30  Christopher Faylor  <me+cygwin@cgf.cx>

	* path.cc (has_dot_last_component): Rewrite to detect some corner cases
	that were previously uncaught.

2009-09-30  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_console.cc (beep): Move up to avoid forward declaration.
	(fhandler_console::read): Just beep on characters invalid in current
	charset.  Add comment.

2009-09-29  Eric Blake  <ebb9@byu.net>

	* syscalls.cc (rename): Fix regression in rename("dir","d/").

2009-09-29  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::recv_internal): Always call
	WSARecv on SOCK_STREAM sockets.

2009-09-28  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class dev_console): Constify charset parameter of
	str_to_con.
	* fhandler_console.cc (dev_console::con_to_str): Simplify.  Always
	default to the current internal locale.
	(dev_console::get_console_cp): Always use codepage 437 for alternate
	charset.
	(dev_console::str_to_con): Constify charset parameter.
	(fhandler_console::write_normal): Always use codepage 437 for alternate
	charset.  Otherwise always default to the current internal locale.
	Replace ASCII SO with ASCII CAN.
	* strfuncs.cc: Tweak comments according to below changes.
	(sys_cp_wcstombs): Constify charset parameter.  Convert all wchar_t
	values in the Unicode private use area U+F0xx to the singlebyte
	counterpart.  Drop special handling creating ASCII SO sequence from
	U+DCxx value.  Rearrange for performance.  Replace ASCII SO with
	ASCII CAN.
	(sys_cp_mbstowcs): Constify charset parameter.  Replace ASCII SO with
	ASCII CAN.  Drop special case for U+DCxx ASCII SO sequences.  Always
	create a replacement from the Unicode private use area U+F0xx for
	invalid byte values in a multibyte sequence.  Do the same for wchar_t
	values from the U+F0xx range to make them roundtrip safe.
	* wchar.h (sys_cp_wcstombs): Constify charset parameter.
	(sys_cp_mbstowcs): Ditto.

2009-09-28  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.cc (cygheap_init): Default locale.charset to "UTF-8".
	* dcrt0.cc (dll_crt0_1): Call setlocale (LC_CTYPE, "") here, just
	before resetting application locale to "C".
	* environ.cc (environ_init): Drop code setting locale here.
	* syscalls.cc (check_codepage): Break out check for required codepage
	from internal_setlocale.
	(internal_setlocale): Just convert CWD and $PATH from old charset to
	new charset and set internal charset.
	(setlocale): Change accordingly.  Don't require LC_ALL or LC_CTYPE to
	store old locale value.  Always call internal_setlocale if charset
	changed due to locale environment changes.

2009-09-26  Eric Blake  <ebb9@byu.net>

	* exec.cc (fexecve): New function.
	* cygwin.din (execvpe, fexecve): Export new fexecve and existing
	execvpe.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* posix.sgml: Mention them.

2009-09-26  Eric Blake  <ebb9@byu.net>

	* syscalls.cc (link): Delete obsolete comment.  Reject directories
	and missing source up front.
	(rename): Use correct errno for trailing '.'.  Detect empty
	strings.  Allow trailing slash to newpath iff oldpath is
	directory.
	* dir.cc (mkdir): Reject dangling symlink with trailing slash.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Reject
	trailing slash.
	* fhandler.cc (fhandler_base::link): Match Linux errno.

2009-09-25  Eric Blake  <ebb9@byu.net>

	* syscalls.cc (fchmodat): lchmod is not yet implemented.
	(euidaccess): New function.
	* path.cc (realpath): Update comment.
	(canonicalize_file_name): New function.
	* include/cygwin/stdlib.h (canonicalize_file_name): Declare it.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* cygwin.din: Export canonicalize_file_name, eaccess, euidaccess.
	* posix.sgml: Mention them.

2009-09-25  Eric Blake  <ebb9@byu.net>

	* fhandler.h (fhandler_base::fhaccess): Add parameter.
	* security.h (check_file_access, check_registry_access): Likewise.
	* security.cc (check_file_access, check_registry_access)
	(check_access): Implement new parameter.
	* fhandler.cc (fhandler_base::fhaccess): Likewise.
	(device_access_denied): Update caller.
	* syscalls.cc (access, faccessat): Update callers.
	* spawn.cc (find_exec, fixup): Likewise.

2009-09-24  Corinna Vinschen  <corinna@vinschen.de>

	* posix_ipc.cc (mq_open): Avoid closing the same descriptor twice in
	case of errors.
	(sem_open): Ditto.

2009-09-24  Corinna Vinschen  <corinna@vinschen.de>

	* kernel32.cc (CreateMutexW): Use correct access mask.
	(CreateSemaphoreW): Ditto.

2009-09-23  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (__set_charset_from_codepage): Fetch current ANSI
	codepage if cp is 0.

2009-09-23  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (sys_cp_wcstombs): Convert lone surrogate pair
	second halves to unambiguous ASCII SO sequence.  When converting
	chars invalid in current codepage to ASCII SO sequence, make
	sure to check for surrogate pair second half only if at least
	one wide characters is left.  Decrement nwc if valid second half has
	been converted.
	(sys_cp_mbstowcs): Improve ASCII SO handling.  Never break from loop
	if invalid character has been found.  Recognize ASCII SO sequence
	representing originally invalid mulitbyte char converted into a
	lone surrogate pair second half.  Convert accordingly.

2009-09-22  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (WSARecv): Define.
	* fhandler_socket.cc (fhandler_socket::recv_internal): Call WSARecv
	instead of WSARecvFrom if no name parameter is given.  Explain why.

2009-09-22  Eric Blake  <ebb9@byu.net>

	* syscalls.cc (faccessat): Fix typo, reject bad flags.
	(fchmodat, fchownat, fstatat, utimensat, linkat, unlinkat): Reject
	bad flags.

2009-09-22  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (sys_cp_mbstowcs): Reset shift state after handling
	invalid multibyte sequence.

2009-09-22  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (symlink_worker): Rework error handling to generate Linux
	compatible errno in case of trailing slash in newpath.

2009-09-22  Eric Blake  <ebb9@byu.net>

	* dtable.h (OPEN_MAX_MAX): New macro.
	* resource.cc (getrlimit) [RLIMIT_NOFILE]: Use it.
	* dtable.cc (dtable::extend): Likewise.
	* fcntl.cc (fcntl64): Obey POSIX rule with too-large F_DUPFD.
	* syscalls.cc (dup2): Likewise.

2009-09-21  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.h (cwdstuff::get_posix): Convert to const inline method just
	returning pointer to posix path.
	(cwdstuff::reset_posix): Convert to non-inline method taking a wchar_t
	pointer.
	* path.cc (cwdstuff::set): Revert change from 2009-05-13.  Set posix
	to valid incoming path again.
	(cwdstuff::reset_posix): New implementation setting posix path from
	incoming wchar_t path.  Explain usage.
	(cwdstuff::get_posix): Drop implementation.
	(cwdstuff::get): Drop special case to handle empty posix path.
	* syscalls.cc (internal_setlocale): Store old posix cwd as wide char
	path.  Restore posix cwd using new charset.  Explain why.

2009-09-21  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::link): Drop faking hardlink
	creation on filesystems not supporting hardlinks.

2009-09-20  Christopher Faylor  <me+cygwin@cgf.cx>

	* dcrt0.cc (dll_crt0_1): Add another hack to REALLY make sure that
	cxx_malloc is always set to the cygwin version.

2009-09-20  Christopher Faylor  <me+cygwin@cgf.cx>

	* external.cc (cygwin_internal): Add hack to always reset cxx_malloc to
	proper value.

	* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Relocate wayward
	comment.

2009-09-19  Christopher Faylor  <me+cygwin@cgf.cx>

	* exceptions.cc (sigpacket::process): Explicitly set thread-specific
	handler function to zero to avoid transferring to incorrect location.
	(_cygtls::call_signal_handler): Don't transfer to handler if there is
	no handler to transfer to.

2009-09-18  Christopher Faylor  <me+cygwin@cgf.cx>

	* exceptions.cc (sigpacket::process): Give sigwait() processing
	precedence even when a handler is present.

	* syscalls.cc (getpagesize): Change return to 'int'.

2009-09-16  Christopher Faylor  <me+cygwin@cgf.cx>

	* ntea.c (write_ea): Don't abort if not-samba.

2009-09-01  Christopher Faylor  <me+cygwin@cgf.cx>

	* select.cc (peek_console): Always check window size when there is ANY
	keyboard activity.

2009-08-26  Corinna Vinschen  <corinna@vinschen.de>

	* path.h (INTERIX_SYMLINK_COOKIE): Define.
	* path.cc (symlink_info::check_sysfile): Read Interix symlinks as well.

2009-08-26  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (fhandler_base::open): Only set R/O attribute if ACLs
	are not used.

2009-08-24  Corinna Vinschen  <corinna@vinschen.de>

	* mount.cc (fs_info::update): Add comment.
	* path.cc (symlink_info::check_reparse_point): Return -1 for volume
	mount points.  Explain why.
	(symlink_info::check): Call fs.update again for volume mount points.
	Explain why.

2009-08-24  Corinna Vinschen  <corinna@vinschen.de>

	* globals.cc (ro_u_volume): New R/O unicode string.
	* path.cc (symlink_info::check_reparse_point): Fix check for volume
	mount points to work on Vista and later as well.

2009-08-22  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (__set_charset_from_codepage): Add codepages 20866
	(KOI8-R) and 21866 (KOI8-U).

2009-08-21  Christopher Faylor  <me+cygwin@cgf.cx>

	* dll_init.h (has_dtors): New flag.
	(run_dtors): New wrapper function which avoids calling dtors more than
	once.
	* dll_init.cc (dll_global_dtors): Use dll.run_dtors wrapper.
	(dll_list::detach): Ditto.
	(dll_list::alloc): Set has_dtors flag.

2009-08-21  Christopher Faylor  <me+cygwin@cgf.cx>

	* fcntl.cc (fcntl64): Detect negative fd as error.

2009-08-21  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (mmap64): Allocate fh_disk_file on cygheap.  Delete
	explicitely before returning.

2009-08-20  Corinna Vinschen  <corinna@vinschen.de>

	* dtable.cc (build_fh_dev): Take additional bool parameter indicating
	whether set_name should be called or not.
	(dtable::dup_worker): Call build_fh_pc with new second parameter set
	to false.  Explain why.  If fhandler's dup failed, delete rather than
	cfree newfh and set newfh to NULL to indicate failure correctly.
	* dtable.h (build_fh_pc): Change declaration according to above change.
	Default set_name parameter to true.
	* mmap.cc (mmap_record::free_fh): Delete rather than cfree fh.

2009-08-18  Christopher Faylor  <me+cygwin@cgf.cx>

	* dtable.cc (dtable::fixup_after_exec): Close any popen'ed file handles here.
	* fhandler.h (fhandler_*::ispipe): New function.
	(fhandler_base::get_popen_pid): Define virtual function.
	(fhandler_*::isdevice): Make const.
	(fhandler_*::isfifo): Ditto.

2009-08-17  Christopher Faylor  <me+cygwin@cgf.cx>

	* syscalls.cc (popen): Reorganize slightly for clarity.  Fix a comment.

2009-08-17  Christopher Faylor  <me+cygwin@cgf.cx>

	* syscalls.cc (popen): Rewrite to accommodate situations where stdin,
	stdout, or stderr are closed.

2009-08-17  Christopher Faylor  <me+cygwin@cgf.cx>

	* pipe.cc (fhandler_pipe::create_selectable): Add -pipe to default pipe names.

	* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Use bool/true/false
	for what is actually a boolean variable.

2009-08-14  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix length
	check for ".." dir.

2009-08-14  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::readdir): Change comment
	to be fair.

2009-08-14  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Remove
	ill-advised attempt to optimize "." and ".." handling by checking for
	specific position in directory listing.  Explain why.
	(fhandler_disk_file.cc (fhandler_disk_file::readdir): Ditto.
	Special-case opening file on NFS to fetch inode number and add longish
	comment to explain why.

2009-08-14  Corinna Vinschen  <corinna@vinschen.de>

	* (fhandler_socket::getsockname): Fix length returned for unbound
	AF_LOCAL sockets.
	(fhandler_socket::getpeername): Ditto.
	* net.cc (socketpair): Don't set sun_path and peer_sun_path to
	make sure getsockname and getpeername return the correct values
	for AF_LOCAL sockets.

2009-08-13  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::accept): Use sizeof rather
	then constant size.  Truncate returned data, but return full address
	length as per POSIX.
	(fhandler_socket::getsockname): Truncate returned data, but return full
	address length as per POSIX.
	(fhandler_socket::getpeername): Ditto.

2009-08-13  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_socket): Add peer_sun_path member.
	(fhandler_socket::set_peer_sun_path): New method.
	(fhandler_socket::get_peer_sun_path): New method.
	* fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
	peer_sun_path to NULL.
	(fhandler_socket::~fhandler_socket): Free peer_sun_path if necessary.
	(fhandler_socket::dup): Duplicate peer_sun_path.
	(fhandler_socket::accept): Ditto.  Return fake unbound peer content
	and len in case of AF_LOCAL sockets.
	(fhandler_socket::getsockname): Always use local sockaddr_storage to
	store socket address and copy over to incoming address.  Handle every
	namelen correctly per POSIX.
	(fhandler_socket::getpeername): Ditto.  Add code path to return
	correct value for AF_LOCAL sockets.
	(fhandler_socket::set_peer_sun_path): New method.
	* net.cc (socketpair): Set peer_sun_path to empty string, just like
	sun_path.

2009-08-13  Corinna Vinschen  <corinna@vinschen.de>
	    Dave Korn <dave.korn.cygwin@googlemail.com>

	* cxx.cc (default_cygwin_cxx_malloc): Enhance commenting.
	* dll_init.cc (dll_dllcrt0_1): Likewise.
	* dlfcn.cc (dlopen): Prevent dlopen()'d DLL from installing any
	cxx malloc overrides.
	* include/cygwin/cygwin_dll.h (__dynamically_loaded): New variable.
	* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Check it and only
	install cxx malloc overrides when statically loaded.  Extend comments.

2009-08-12  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::accept): Always use local
	sockaddr_storage to store peer address and copy over to incoming
	peer address if available.  Truncate data as necessary according
	to POSIX.

2009-08-11  Corinna Vinschen  <corinna@vinschen.de>

	* include/limits.h (NGROUPS_MAX): Set to a more sane value.
	* include/sys/param.h (NGROUPS): Ditto.

2009-08-10  Corinna Vinschen  <corinna@vinschen.de>

	* spawn.cc (av::fixup): Check shell scripts for executability only on
	filesystems/mounts supporting real permissions.

2009-08-10  Corinna Vinschen  <corinna@vinschen.de>

	* dtable.cc (DEV_SOCKET): New static WCHAR string.  Name of
	the native NT socket device.
	(dtable::init_std_file_from_handle): Remove unused tmp_pathbuf
	variable.  Move check for sockets into FILE_TYPE_PIPE clause.
	Rely on handle_to_fn having recognized socket, or check if
	getsockopt works to accommodate NT4 shortcoming.
	(handle_to_fn): Use tmp_pathbuf for OBJECT_NAME_INFORMATION
	buffer and simplify code due to that.  Check name returned by
	NtQueryObject for socket device.

2009-08-10  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler_console.cc (create_invisible_console_workaround): Fix size
	of cmd in the way originally intended.

2009-08-10  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_console.cc (create_invisible_console_workaround):  Fix
	size of cmd to take spaces into account.

2009-08-08  Corinna Vinschen  <corinna@vinschen.de>

	* dtable.cc (dtable::init_std_file_from_handle): Fix comment to
	document change in the Windows 7 workaround.
	* wincap.cc (wincapc::init): Don't set has_console_handle_problem
	to false on 32 bit systems.

2009-08-06  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (cygwin_getnameinfo): Force setting NI_NUMERICSERV only
	on Windows 2003 and earlier, only if the port number doesn't
	resolve to a well-known service.  Change comment accordingly.

2009-08-05  Christopher Faylor  <me+cygwin@cgf.cx>

	* cygheap.h (cygheap_debug::endh): Delete.
	* debug.cc (lock_debug::acquired): Delete.
	(lock_debug::lock_debug): Simplify.
	(lock_debug::unlock): Ditto.
	(find_handle): Don't set endh here.
	(add_handle): Add new handle to beginning of the list rather than
	trying to maintain an end list pointer.
	(delete_handle): Minor optimization.
	(mark_closed): Make logic clearer.
	(verify_handle): Lock handle list before scanning.
	(setclexec): Ditto.
	(modify_handle): Ditto.
	(newh): Don't lock handle list here.  Assume caller did this.
	(mark_closed): Ditto.
	(close_handle): Remove unneeded #if.
	* dtable.cc (dtable::dup2): Tweak debug output.

2009-08-04  Christopher Faylor  <me+cygwin@cgf.cx>

	* path.cc (patch_conv::check): Zero path before setting it.

2009-08-04  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler_socket.cc (fhandler_socket::send_internal): Just use wmem
	size if the length exceeds it.
	* net.cc (fdsock): Use 65535 as window size, just like the comment
	says or we run into problems with DuplicateHandle.

	* path.cc (patch_conv::check): Use set_path to set invalid filename.
	* path.h (path_conv::path_conv): Ditto.

2009-08-04  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.h (pdrive_buf): Defensively allocate one extra byte.

2009-08-04  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.h (fhandler_cygdrive:DRVSZ): New enum.
	(pdrive_buf): New place to hold information about cygdrive.
	* fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Store drive
	info in pdrive_buf since get_win32_name() could now be too small to
	hold everything.
	(fhandler_cygdrive::rewinddir): Reset pdrive to pdrive_buf.
	(fhandler_cygdrive::closedir): Ditto.
	* pipe.cc (fhandler_pipe::init): Be more defensive when referencing
	get_win32_name().  Rework logic which made a copy of the POSIX path and
	then never used it.

2009-08-02  Christopher Faylor  <me+cygwin@cgf.cx>

	* sigproc.cc (stopped_or_terminated): Don't return a match when stopsig
	== SIGCONT and not WCONTINUED.
	* termios.cc (tcsetpgrp): Improve debugging output.

2009-08-01  Christopher Faylor  <me+cygwin@cgf.cx>

	* cygheap_malloc.h: New file.
	* cygheap.h: Remove stuff now included in cygheap_malloc.h and include
	that file.  Make cygheap_init a standard c++ function.  Remove unneeded
	child_info declaration.
	* path.h: Include cygheap_malloc.h. Remove extra cstrdup declaration.
	(path_conv): Reorganize to group variables together.
	(path_conv::path): Make const char *.
	(path_conv::known_suffix): Ditto.
	(path_conv::normalized_path): Ditto.
	(path_conv::path_conv): Reorganize initializers to reflect new element
	ordering.
	(path_conv::get_win32): Change return value to const char *.
	(path_conv::set_path): Move back here from spawn.cc.
	(parh_conv::modifiable_path): New function.
	* path.cc (path_conv::add_ext_from_sym): Accommodate const'ness of
	known_suffixes.
	(path_conv::set_normalized_path): Ditto for normalized_path.
	(path_conv::check): Use modifiable_path whereever we need to modify the
	path element.  Use set_path to set the path.
	(path_conv::~path_conv): Accommodate new const'ness.
	* spawn.cc (perhaps_suffix): Declare ext as const since that's what is
	being returned.
	(path_conv::set_path): Move back to path.h.
	* winf.f (linebuf): Perform minor cleanup.
	(linebuf::fromargv): Change second parameter to const.
	* winf.cc (linebuf::fromargv): Ditto.

2009-08-01  Christopher Faylor  <me+cygwin@cgf.cx>

	* path.h (path_conv::set_path): Change return value.
	* spawn.cc (path_conv::set_path): Return newly set value.
	(find_exec): Set retval to newly set value when calling set_path.

2009-07-31  Christopher Faylor  <me+cygwin@cgf.cx>

	* spawn.cc (find_exec): Fix one more path where retval was not set.

2009-07-31  Christopher Faylor  <me+cygwin@cgf.cx>

	* spawn.cc (find_exec): Stop relying on the ability to set retval to a
	fixed path_conv buffer and set it on the fly instead.

2009-07-30  Corinna Vinschen  <corinna@vinschen.de>

	* path.h (cstrdup): Fix declaration.

2009-07-29  Dave Korn  <dave.korn.cygwin@googlemail.com>

	* globals.cc (enum exit_states::ES_GLOBAL_DTORS): Delete.
	* dcrt0.cc (__main): Schedule dll_global_dtors to run
	atexit before global dtors.
	(do_exit): Delete test for ES_GLOBAL_DTORS and call to
	dll_global_dtors.

2009-07-29  Corinna Vinschen  <corinna@vinschen.de>

	* path.h (class path_conv): Convert path from char array to char *.
	Initialize to NULL in constructors.  Drop normalized_path_size member.
	(path_conv::size): Remove.
	(path_conv::operator =): Always copy with sizeof path_conv.  Always
	duplicate path on cygheap.
	(path_conv::set_path): Move implementation to spawn.cc.
	* path.cc (path_conv::set_normalized_path): Always allocate
	normalized_path on cygheap.
	(path_conv::check): Don't work on path, rather allocate THIS_path in
	TLS and use it throughout.  When finished, allocate path on cygheap
	and copy over.  Defer tacking on extension after having copied path.
	* spawn.cc (path_conv::set_path): Implement here.

2009-07-27  Corinna Vinschen  <corinna@vinschen.de>

	* mount.h (enum fs_info_type): New type.
	(IMPLEMENT_FS_FLAG): New define.
	(class fs_info): Convert filesystem type status flags into an enum
	fs_info_type.  Add cifs FS.  Revert change to has_buggy_open and
	has_buggy_fileid_dirinfo.  Make them normal; status flags again.
	Implement is_FS functions using IMPLEMENT_FS_FLAG.
	* mount.cc (fs_info::update): Define MINIMAL_WIN_NTFS_FLAGS and
	FS_IS_WINDOWS_NTFS.  Add comment.  Only test remote filesystems
	for "NTFS" once.  Add is_cifs check using FS_IS_WINDOWS_NTFS.
	Set has_buggy_open flag for SUNWNFS.  Set has_buggy_fileid_dirinfo
	flag for UNIXFS and all cifs type filesystems.  Only check for
	caseinsensitivity once.
	(fillout_mntent): Create locale fs_names array.  Use for setting
	_my_tls.locals.mnt_type.

2009-07-27  Yaakov Selkowitz <yselkowitz@users.sourceforge.net>

	* posix.sgml (std-notes): Remove obsolete reference to CYGWIN=server.

2009-07-25  Corinna Vinschen  <corinna@vinschen.de>

	* posix.sgml (std-notes): Add flock restriction.

2009-07-25  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_console.cc (set_console_title): Set buffer size to
	TITLESIZE + 1.  Call sys_mbstowcs with correct destination length.

2009-07-24  Christopher Faylor  <me+cygwin@cgf.cx>

	* sigproc.h (wait_for_sigthread): Eliminate parameter.
	* sigproc.cc (wait_for_sigthread): Ditto.  Don't synchronize with
	wait_sig after receiving an event that it is ready to go.
	(init_sig_pipe): New function.
	(wait_sig): Call init_sig_pipe to create pipes for communicating
	signals to this process.  Don't send sigCONT signal when initializing.
	* fork.cc (frok::child): Accommodate wait_for_sigpipe parameter change.

2009-07-24  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.h (fhandler_*::write): Make ssize_t/__stdcall.
	(fhandler_*::write_overlapped): Ditto.
	(fhandler_*::raw_write): Ditto.
	(fhandler_*::readv): Ditto.
	(fhandler_*::writev): Ditto.
	(fhandler_*::raw_read): Make __stdcall.
	* fhandler: Accommodate changes to read/write functions throughout.
	* fhandler_clipboard.cc: Ditto.
	* fhandler_console.cc: Ditto.
	* fhandler_dsp.cc: Ditto.
	* fhandler_fifo.cc: Ditto.
	* fhandler_mailslot.cc: Ditto.
	* fhandler_mem.cc: Ditto.
	* fhandler_mem.cc: Ditto.
	* fhandler_random.cc: Ditto.
	* fhandler_tape.cc: Ditto.
	* fhandler_tty.cc: Ditto.
	* fhandler_virtual.cc: Ditto.
	* fhandler_windows.cc: Ditto.
	* fhandler_zero.cc: Ditto.
	* syscalls.cc (readv): Use ssize_t as temp variable.

	* fhandler.cc (fhandler_base::read): Coerce returned len to signed or
	it will never be treated as < 0.
	(fhandler_base::wait_overlapped): Minimize calls to GetLastError.
	Remove duplicate debugging test.  Fix error return.

	* fhandler.h (fhandler_fifo::fifo_name): Declare new function.
	(fhandler_fifo::close): Ditto.
	(fhandler_fifo::dup): Ditto.
	(fhandler_fifo::close_on_exec): Ditto.
	* fhandler.cc (fhandler_fifo::fifo_name): Define new function.
	(FIFO_BUF_SIZE): New define.
	(cnp): Ditto.
	(fhandler_fifo::open): Rework.  Use cnp to open named pipe.  Always
	open write side as a client.  Open dummy client when writing and can't
	connect.
	(wait): Rework.  Implement fifo_wait_for_next_client.  Handle signals
	during connect better.  Add new fifo_wait_for_server code which polls
	(sigh) waiting for server.
	(fhandler_fifo::raw_read): Handle transition states when one client
	closes and another is available.
	(fhandler_fifo::close): Define.
	(fhandler_fifo::dup): Ditto.
	(fhandler_fifo::close_on_exec): Ditto.

2009-07-24  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (internal_setlocale): Fix typo in GBK codepage.

2009-07-24  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (unlink_nt): Ignore sharing violation on NFS.  Align
	comments.

2009-07-23  Corinna Vinschen  <corinna@vinschen.de>

	* mount.h (fs_info::fsn): New member.
	(fs_info::clear): Clear fsn.
	(fs_info::fsname): New read accessor for fsn.
	* mount.cc (fs_info::update): Fill in fsn member with lowercased
	filesystem name if filesystem is not well-known.  Fall back to
	"unknown" if filesystem name is missing.
	(fillout_mntent): Print filesystem name retrieved in fs_info::update
	rather than static string "unknown".

2009-07-23  Corinna Vinschen  <corinna@vinschen.de>

	* mount.cc (fs_info::update): Revert to open filesystem with access set
	to READ_CONTROL.  If that fails, try additionally with FILE_READ_DATA.

2009-07-22  Eric Blake  <ebb9@byu.net>

	* exceptions.cc (handle_exceptions): Set si_addr according to
	POSIX for SIGSEGV.

2009-07-22  Corinna Vinschen  <corinna@vinschen.de>

	* mount.cc (fs_info::update): Open filesystem with access set to 0.
	Explain why.

2009-07-22  Corinna Vinschen  <corinna@vinschen.de>

	* mount.cc: Revert accidental checkin.

2009-07-22  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (symlink_info::check): Handle STATUS_NOT_SUPPORTED from
	NtCreateFile just like STATUS_EAS_NOT_SUPPORTED.

2009-07-22  Corinna Vinschen  <corinna@vinschen.de>

	* mount.cc (fillout_mntent): Fix typo (noexec -> notexec).

2009-07-22  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (symlink_info::check): Fix typo in comment.

2009-07-22  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (enum del_lock_called_from): New enumeration.
	(fhandler_base::del_my_locks): Declare taking a del_lock_called_from
	as argument.
	* fhandler.cc (fhandler_base::close): Call del_my_locks with "on_close".
	(fhandler_base::fixup_after_fork): Call del_my_locks with "after_fork".
	(fhandler_base::fixup_after_exec): Call del_my_locks with "after_exec".
	* flock.cc (fhandler_base::del_my_locks): Take del_lock_called_from
	as argument.  Call node->del_my_locks with NULL handle in after_exec
	case.  Explain why.

2009-07-21  Eric Blake  <ebb9@byu.net>

	* dtable.cc (dup2): Correct return value for no-op.

2009-07-21  Corinna Vinschen  <corinna@vinschen.de>
	    Eric Blake  <ebb9@byu.net>

	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Add special case
	for MVFS.  Explain why.
	(fhandler_disk_file::utimens): Drop local variables lastaccess and
	lastwrite.  Copy timestamps right into FILE_BASIC_INFORMATION structure
	to avoid copying them twice.

2009-07-20  Corinna Vinschen  <corinna@vinschen.de>

	* wincap.h (wincaps::has_always_all_codepages): New element.
	* wincap.cc: Implement above element throughout.
	* wchar.h (__sjis_mbtowc): Declare.
	(__eucjp_mbtowc): Ditto.
	(__gbk_mbtowc): Ditto.
	(__kr_mbtowc): Ditto.
	(__big5_mbtowc): Ditto.
	* syscalls.cc (internal_setlocale): Convert to char * function.
	Return parameter by default.  Return NULL if request to use a
	charset can't be satisfied due to missing codepage support in the
	underlying OS.  Fix comment.
	(setlocale): Store original locale.  Restore to original locale if
	internal_setlocale returns NULL.

2009-07-20  Corinna Vinschen  <corinna@vinschen.de>

	* fork.cc (fork): Create local tmp_pathbuf.  Explain why.

2009-07-18  Christopher Faylor  <me+cygwin@cgf.cx>

	* exceptions.cc (sig_handle_tty_stop): Set stopsig to SIGCONT when
	continuing.
	(stopped_or_terminated): Honor WCONTINUED.
	* wait.cc (wait4): Ditto.
	* include/cygwin/wait.h (WCONTINUED): Define.
	(__W_CONTINUED): Ditto.
	(WIFCONTINUED): Ditto.

2009-07-18  Dave Korn  <dave.korn.cygwin@gmail.com>

	* libstdcxx_wrapper.cc (operator delete): Remove stray space in
	asm name.

2009-07-17  Christopher Faylor  <me+cygwin@cgf.cx>

	* cygtls.cc (_cygtls::init_exception_handler): Test for e, not e->prev
	or we could still end up adding our handler twice.  Add comment
	explaining what we're doing.
	* dll_init.cc (dll_dllcrt0_1): Clarify comment.

2009-07-17  Christopher Faylor  <me+cygwin@cgf.cx>

	* cygtls.cc (_cygtls::init_exception_handler): Avoid adding our
	exception handler twice.

2009-07-17  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (unlink_nt): Just return when a sharing violation
	occurs on remote filesystems.

2009-07-17  Corinna Vinschen  <corinna@vinschen.de>

	* globals.cc: Improve comment on R/O UNICODE_STRINGs.
	* mount.h (class fs_info): Add is_mvfs bit.
	* mount.cc (fs_info::update): Recognize MVFS remote filesystem.
	(fillout_mntent): Reorder filesystem checks for speed.  Add
	mvfs, unixfs, and sunwnfs filesystem types.
	* path.h (class path_conv): Add fs_is_mvfs method.
	* path.cc (symlink_worker): On MVFS, always create symlinks as
	Windows shortcuts.  Explain why.

2009-07-16  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (unlink_nt): First remove the R/O DOS attribute with
	FILE_WRITE_ATTRIBUTES access only, then re-open the file for DELETE.
	Explain why.

2009-07-16  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Remove file
	attribute check already done in NtSetAttributesFile.

2009-07-15  Corinna Vinschen  <corinna@vinschen.de>

	* globals.cc: Reorder constant UNICODE_STRINGs for clarity.
	* mount.h (fs_info::sttaus): Move filesystem type flags into
	substructure.  Add union to allow simple test for having set any
	one filesystem type flag.  Replace has_buggy_open flag with is_sunwnfs
	flag.  Replace has_buggy_fileid_dirinfo with is_unixfs flag.
	(fs_info::got_fs): New private method.
	(fs_info::has_buggy_open): New explicit implementation.
	(fs_info::has_buggy_fileid_dirinfo): Ditto.
	* mount.cc (fs_info::update): Optimize filesystem checks for speed.
	* winsup.h (IMPLEMENT_STATUS_FLAG): Change write accessor to return
	value just set.

2009-07-15  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_netdrive.cc (GET_RESOURCE_INFO): Remove.
	(thread_netdrive): Drop GET_RESOURCE_INFO case.
	(fhandler_netdrive::exists): Use GET_RESOURCE_OPENENUM info class
	to check for existance.

2009-07-15  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_netdrive.cc (fhandler_netdrive::readdir): Remove useless
	alloca.

2009-07-15  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (cwdstuff::set): Only fix up UNC path in win32 so as not
	to overwrite incoming path.

2009-07-14  Corinna Vinschen  <corinna@vinschen.de>

	Throughout avoid having to initialize constant UNICODE_STRINGs.
	* globals.cc: Define constant UNICODE_STRINGs and store in .rdata
	section.
	* fhandler_disk_file.cc: Throughout, use readonly UNICODE_STRINGs
	rather then initializing local UNICODE_STRING variable where
	applicable.
	* fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
	* flock.cc (inode_t::inode_t): Ditto.
	* mmap.cc: Ditto.
	* syscalls.cc: Ditto.
	* mount.cc (fs_info::update): Ditto.
	* path.cc: Ditto.

	* ntdll.h (RtlEqualUnicodePathPrefix): Redefine to take prefix as
	UNICODE_STRING.
	(RtlEqualUnicodePathSuffix): Redefine to take suffix as UNICODE_STRING.
	* fhandler_disk_file.cc: Accommodate throughout.
	* mount.cc (fs_info::update): Ditto.
	* path.cc (cwdstuff::set): Ditto.
	* syscalls.cc: Ditto.

2009-07-14  Corinna Vinschen  <corinna@vinschen.de>

	* globals.cc (active_codepage): Remove.

2009-07-12  Christopher Faylor  <me+cygwin@cgf.cx>

	* how-spawn-works.txt: Add "out of date" note.
	* how-vfork-works.txt: Ditto.

2009-07-12  Christopher Faylor  <me+cygwin@cgf.cx>

	* Makefile.in: Don't do anything special with any RCS directories.

	* ntdll.h (PROCESSINFOCLASS): Remove unneeded trailing comma.

	* pinfo.cc (_pinfo::dup_proc_pipe): Remove unneeded assignment.

	* sigproc.cc (sig_send): Don't send signal to myself if this is an exec
	stub.

2009-07-12  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Don't use
	FileAllInformation info class since it needs a big buffer.  Add a
	comment.

2009-07-07  Dave Korn  <dave.korn.cygwin@gmail.com>

	* winbase.h (ilockexch): Avoid making 'ret' volatile.
	(ilockcmpexch): Likewise.

2009-07-07  Dave Korn  <dave.korn.cygwin@gmail.com>

	* Makefile.in (DLL_OFILES): Add libstdcxx_wrapper.o
	(libstdcxx_wrapper_CFLAGS): Add flags for new module.
	(_cygwin_crt0_common_STDINCFLAGS): Define per-file override.
	(libstdcxx_wrapper_STDINCFLAGS, cxx_STDINCFLAGS): Likewise.
	* cxx.cc: Include "cygwin-cxx.h".
	(operator new): Tweak prototype for full standards compliance.
	(operator new[]): Likewise.
	(operator new (nothrow)): New fallback function.
	(operator new[] (nothrow), operator delete (nothrow),
	operator delete[] (nothrow)): Likewise.
	(default_cygwin_cxx_malloc): New struct of pointers to the above,
	for final last-resort fallback default.
	* cygwin-cxx.h: New file.
	(struct per_process_cxx_malloc): Define.
	(default_cygwin_cxx_malloc): Declare extern.
	* cygwin.din (__wrap__ZdaPv): Export new wrapper.
	(__wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
	__wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
	__wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
	__wrap__ZnwjRKSt9nothrow_t): Likewise.
	* globals.cc (__cygwin_user_data): Init newly-repurposed 'forkee'
	field (now 'cxx_malloc') to point to default_cygwin_cxx_malloc.
	* libstdcxx_wrapper.cc: New file.
	(__wrap__ZdaPv, __wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
	__wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
	__wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
	__wrap__ZnwjRKSt9nothrow_t): Define wrapper functions for libstdc++
	malloc operators and their overrides.
	* winsup.h (default_cygwin_cxx_malloc): Declare extern.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* include/sys/cygwin.h (struct per_process_cxx_malloc): Forward
	declare here.
	(struct per_process::forkee): Rename and repurpose from this ...
	(struct per_process::cxx_malloc): ... to this.
	* lib/_cygwin_crt0_common.cc: Include cygwin-cxx.h.
	(WEAK): Define shorthand helper macro.
	(__cygwin_cxx_malloc): Define and populate with weak references
	to whatever libstdc++ malloc operators will be visible at final
	link time for Cygwin apps and dlls.
	(_cygwin_crt0_common): Always look up cygwin DLL's internal
	per_process data, and don't test for (impossible) failure.  Inherit
	any members of __cygwin_cxx_malloc that we don't have overrides
	for from the DLL's default and store the resulting overall set of
	overrides back into the DLL's global per_process data.

2009-07-07  Corinna Vinschen  <corinna@vinschen.de>

	* cygtls.cc (_cygtls::remove): Fix typo.

2009-07-06  Christopher Faylor  <me+cygwin@cgf.cx>

	* Makefile.in (clean): Clean generated files in srcdir.
	* tlsoffsets.h: Regenerate.

2009-07-06  Christopher Faylor  <me+cygwin@cgf.cx>

	* cygtls.cc (_cygtls::remove): Avoid closing a NULL handle.

2009-07-06  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::recv_internal): Convert wsabuf
	and wsacnt to references.  Fix handling of WSAEMSGSIZE.

2009-07-06  Corinna Vinschen  <corinna@vinschen.de>

	* cygtls.h (struct _local_storage): Add thread storage pointers for
	memory used by socket select functions.  Combine them into a single
	struct select.
	* cygtls.cc: Accommodate above change throughout.
	(_cygtls::init_thread): Drop initalizing of sockevt to
	INVALID_HANDLE_VALUE.
	(_cygtls::fixup_after_fork): Reset sockevt to NULL.
	(_cygtls::remove): Don't use sockevt value to bail out prematurely.
	Set sockevt to NULL.  Free malloced select members.
	* select.h (struct select_socket_info): Drop max_w4 member.
	* select.cc (thread_socket): Use INFINITE timeout value if number of
	objects to wait for is <= MAXIMUM_WAIT_OBJECTS.  Use num_w4 member
	of select_socket_info struct rather than dropped max_w4.
	(init_tls_select_info): New inline function to initialize TLS select
	members.
	(start_thread_socket): Just call init_tls_select_info to initialize TLS
	select members and use them later on.
	(socket_cleanup): Don't free select_socket_info pointer members since
	they are thread local now.

2009-07-06  Christopher Faylor  <me+cygwin@cgf.cx>

	* dtable.cc (handle_to_fn): Detect failing NtQueryObject.

2009-07-06  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc: Delete stray CR.

2009-07-05  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler_console.cc: Change workstation -> windows station
	throughout.

2009-07-04  Christopher Faylor  <me+cygwin@cgf.cx>

	* autoload.cc (SetParent): Add new import.
	* fhandler.h (fhandler_console::create_invisible_console): Declare new
	function.
	(create_invisible_console_workaround): Ditto.
	* fhandler_console.cc (fhandler_console::create_invisible_console):
	Define new function.
	(create_invisible_console_workaround): Ditto.  Add too much code to
	deal with broken Windows 7.  Use a helper app to start an invisible
	console window.
	(fhandler_console::need_invisible): Reorganize to use helper functions
	to create invisible console.

	* spawn.cc (spawn_guts): Avoid zeroing already zeroed fields in si.

2009-07-04  Dave Korn  <dave.korn.cygwin@gmail.com>

	* autoload.cc (AttachConsole): Correct size of args.

2009-07-03  Christopher Faylor  <me+cygwin@cgf.cx>

	* dcrt0.cc (jit_debug): New global.
	(initial_env): Set jit_debug when we are automatically starting a gdb
	process.
	* dtable.cc (dtable::get_debugger_info): Don't tty tricks when we are
	being debugged by our own captive gdb, as determined by jit_debug ==
	true.
	(dtable::init_std_file_from_handle): Detect errors when initializing a
	tty early rather than at random points later.
	* fhandler.h (fhandler_*::init): Return int to indicate
	success/failure.
	* fhandler.cc (fhandler_base::init): Reflect change in return value.
	* pipe.cc (fhandler_pipe::init): Ditto.
	(fhandler_pipe::create_selectable): Don't say we're retrying when we
	aren't.
	* fhandler_console.cc (fhandler_console::init): Ditto.  Return
	success/failure.
	* fhandler_serial.cc (fhandler_serial::init): Ditto.
	* fhandler_tty.cc (fhandler_tty_slave::init): Ditto.
	(fhandler_tty_slave::open): Make debugging output more detailed.
	* tty.cc (tty_list::terminate): Don't close I/O handles before all
	slaves have checked in.
	(tty::slave_alive): Make a non-inlined function.  Check if tty pipe
	handles can be created as an additional exists check.
	* tty.h (tty::slave_alive): Just define here.

2009-07-03  Corinna Vinschen  <corinna@vinschen.de>

	* posix.sgml: Add fpurge and mkstemps to BSD list.

2009-07-03  Eric Blake  <ebb9@byu.net>

	* cygwin.din (fpurge, mkstemps): New exports.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* mktemp.cc (_gettemp): Add parameter.
	(mkstemps): New function.
	(mkstemp, mkdtemp, mktemp): Adjust clients.

2009-07-03  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc: Fix typo in comment.
	(ShowWindowAsync): Define.
	(AttachConsole): Define.
	* fhandler_console.cc (fhandler_console::need_invisible): Add band-aid
	for Windows 7 AllocConsole bug.

2009-07-01  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (get_xp_ifs): Fix typo in comment.

2009-07-01  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_socket): Add class members and methods
	to store and retrieve the SO_RCVBUF and SO_SNDBUF sizes.
	* fhandler_socket.cc (fhandler_socket::dup): Duplicate new members.
	(fhandler_socket::send_internal): Check for SO_SNDBUF size and
	restrict send to 1 byte less per KB 823764.  Leave loop immediately
	if WSASendMsg has been used.
	* net.cc (fdsock): Change comment again.  Set buffer sizes to 65536.
	Store values in fhandler_socket.
	(cygwin_setsockopt): Store SO_RCVBUF and SO_SNDBUF sizes in
	fhandler_socket.
	(cygwin_sendto): Drop call to sig_dispatch_pending.
	(cygwin_recvfrom): Ditto.
	(cygwin_recvmsg): Ditto.
	(cygwin_sendmsg): Ditto.

2009-06-30  Christopher Faylor  <me+cygwin@cgf.cx>

	* select.h: New file split from fhandler.h.
	(select_record::select_record): Define do-nothing constructor for "new"
	to avoid gratuitous zeroing.
	(select_info): New base class.
	(select_pipe_info): New class with methods for dealing with pipes.
	(select_socket_info): New class with methods for dealing with sockets.
	(select_serial_info): Dummy class for serial.
	(select_mailslot_info): Dummy class for mailslots.
	(select_stuff): Define device_specific_* as actual classes rather than
	void *.
	* dtable.h (dtable::select_read): Accommodate return value change to
	'bool' and argument change to "select_stuff".
	(dtable::select_write): Ditto.
	(dtable::select_except): Ditto.
	* dtable.cc (dtable::select_read): Accommodate return value change to
	'bool' and argument change to "select_stuff".
	(dtable::select_write): Ditto.
	(dtable::select_except): Ditto.
	* fhandler.h: Excise select-related classes.
	(fhandler_*::select_read): Change argument to select_stuff.
	(fhandler_*::select_write): Ditto.
	(fhandler_*::select_except): Ditto.
	* select.cc (UNIX_FD_ZERO): Use memset rather than bzero.
	(select_stuff::test_and_set): Change return type to bool.  Allocate
	select_record on entry and let fhandler_*::select_* operate on the
	start.next field of select_stuff.
	(pipeinf): Delete.
	(select_pipe_info::select_pipe_info): New constructor.  Allocates event
	for controlling pipe waits.
	(select_pipe_info::~select_pipe_info): New destructor.  Destroy event.
	Stop thread.
	(select_pipe_info::add_watch_handle): New function.
	(thread_pipe): Wait for the hEvent part of any overlapped pipes before
	peeking.
	(start_thread_pipe): Don't allocate device_specific_pipe stuff here.
	Assume that it has been allocated earlier.
	(pipe_cleanup): Rely on select_pipe_info destructor to clean up pipe
	paraphenalia.
	(fhandler_*::select_*): Derive select_record from new select_stuff
	argument.
	(fhandler_pipe::select_*): Ditto.  Allocate pipe-specific field if not
	already allocated.
	(serialinf): Delete.
	(thread_serial): serialinf -> select_serial_info.
	(fhandler_base::ready_for_read): Rewrite to accommodate change in
	argument to fhandler_*::select_*.
	(socketinf): Delete.
	(thread_socket): socketinf -> select_socket_info.
	(mailslotinf): Delete.
	(thread_mailslot): mailslotinf -> select_mailslot_info.

2009-06-30  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.cc (fhandler_base::has_ongoing_io): Accept an argument
	indicating whether the overlapped event should be tested.
	(fhandler_base::read_overlapped): Pass is_overlapped state to
	has_ongoing_io.
	(fhandler_base::write_overlapped): Ditto.
	* fhandler.h (fhandler_base::has_ongoing_io): Accommodate argument
	change.
	* select.cc (peek_pipe): Ditto.

2009-06-30  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (fdsock): Set default socket buffer sizes to 65520.  Change
	comment accordingly.
	* fhandler_socket.cc (fhandler_socket::send_internal): Set maximum
	send size to 65520 as well.

2009-06-29  Christopher Faylor  <me+cygwin@cgf.cx>

	* select.cc (peek_pipe): Turn on (temporarily?) the experimental code
	which tries to determine when a pipe is writable.

2009-06-28  Christopher Faylor  <me+cygwin@cgf.cx>

	* select.cc (peek_pipe): Use has_ongoing_io() to determine if the pipe
	is ready for writing rather than performing brute-force checks.

2009-06-28  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.h (fhandler_base::has_ongoing_io): Declare new function.
	* fhandler.cc (fhandler_base::has_ongoing_io): Define new function.
	(fhandler_base::read_overlapped): Use has_ongoing_io to avoid writing
	when handle has not completed last I/O.
	(fhandler_base::write_overlapped): Ditto.
	* select.cc (peek_pipe): Be more careful about accessing hEvent field
	from get_overlapped().

2009-06-28  Christopher Faylor  <me+cygwin@cgf.cx>

	* gendef (cleanup): Rename from 'nocr'.  Remove comments and trailing
	spaces.
	* cygwin.din: Add long-needed comment describing what
	dll_crt0__FP11per_process demangles to.

	* select.cc (peek_pipe): Flag handle as not ready for write if event is
	not signalled.
	* fhandler.cc (fhandler_base::setup_overlapped): Establish event as
	already signalled.
	(fhandler_base::wait_overlapped): Don't reset event after we've
	successfully waited.  MSDN documentation says that this happens
	automatically after a WriteFileEx/ReadFileEx.

2009-06-26  Corinna Vinschen  <corinna@vinschen.de>

	* wincap.h (wincaps::has_broken_alloc_console): New element.
	* wincap.cc: Implement above element throughout.

2009-06-25  Corinna Vinschen  <corinna@vinschen.de>

	* sec_auth.cc (lsaauth): Close unused handle.
	(lsaprivkeyauth): Ditto.

2009-06-23  Corinna Vinschen  <corinna@vinschen.de>

	* sec_auth.cc (get_server_groups): Ignore errors from
	get_user_local_groups.

2009-06-22  Corinna Vinschen  <corinna@vinschen.de>

	* spawn.cc (spawn_guts): Don't run additional check for Win32
	incompatible CWD if newargv.fixup bailed out already.
	(av::fixup): Check shell scripts for executability.

2009-06-18  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (chdir): Check error conditions first.

2009-06-17  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::recv_internal): Mark WSARecvMsg
	as NO_COPY.

2009-06-16  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.cc (fhandler_base::read_overlapped): Use a better variable
	name.

2009-06-16  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.cc (fhandler_base::read_overlapped): Preserve len when
	looping due to received signal.

2009-06-15  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (get_flags): New static function to generate interface flags
	value.
	(get_ipv4fromreg_ipcnt): New static function to fetch number of
	configured IPv4 addresses for a given NIC from registry.
	(get_ipv4fromreg): New static function to fetch configured IPv4
	addresses for a given NIC from registry.
	(get_friendlyname): New static function to generate friendly name.
	(get_hwaddr): New static function to copy hardware address.
	(get_xp_ifs): Restructure slightly.  Add code to generate IPv4 entries
	entries for interfaces which are disconnected.

2009-06-14  Christopher Faylor  <me+cygwin@cgf.cx>

	* errno.cc (errmap): Add mapping for ERROR_IO_INCOMPLETE.
	* fhandler.cc (fhandler_base::fcntl): Fix comment.
	(fhandler_base::wait_overlapped): Accept an optional len parameter.
	Use the len parameter when WriteFile fails with ERROR_IO_PENDING.  Make
	debug output less alarming.
	(fhandler_base::write_overlapped): Pass len to wait_overlapped.
	* fhandler.h (fhandler_base::wait_overlapped): Add an optional argument
	denoting the number of characters intended to be written.

	* fhandler_tty.cc (fhandler_pty_master::close): Don't close archetype
	handles when cygwin is still initializing since the handles aren't
	actually opened at that point.

2009-06-14  Corinna Vinschen  <corinna@vinschen.de>

	* localtime.cc (time2): Take another stab at fixing a compiler warning.

2009-06-14  Christopher Faylor  <me+cygwin@cgf.cx>

	* localtime.cc (time2): Take a stab at fixing a compiler warning.

2009-06-14  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.cc (fhandler_base::wait_overlapped): Honor nonblocking flag
	for writes.  Don't reset event handle when we see a ERROR_IO_PENDING.

	* sigproc.cc (stopped_or_terminated): Use bool constants for
	consistency.

	* wait.cc (wait4): Remove nonsensical comment.

2009-06-13  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::recv_internal): Set namelen
	pointer to NULL if name pointer is NULL.  Explain why.

2009-06-12  Corinna Vinschen  <corinna@vinschen.de>

	* localtime.cc (time2): Change "spring gap" to "spring forward gap"
	in comment.

2009-06-12  Corinna Vinschen  <corinna@vinschen.de>

	* localtime.cc (time2): Add workaround for spring forward gap problem.
	Add explaining comment.

2009-06-12  Corinna Vinschen  <corinna@vinschen.de>

	* Makefile.in (SUBLIBS): Add librt.a.
	(librt.a): New rule to build librt.a.

2009-06-12  Corinna Vinschen  <corinna@vinschen.de>

	* posix_ipc.cc (check_path): Fix typo in comment.  Align naming
	convention rules to Linux.  Handle backslash same as slash.  Add
	comment.

2009-06-09  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (GetSystemTimes): Remove.
	* fhandler_proc.cc (format_proc_uptime): Use global system_info rather
	than retrieving a local copy of the SYSTEM_INFO.  Drop call to
	GetSystemTimes and retrieve SystemPerformanceInformation on all systems
	again with buffer size big enough for 64 bit systems.
	(format_proc_stat): Use global system_info rather than retrieving a
	local copy of the SYSTEM_INFO.  Retrieve SystemPerformanceInformation
	with buffer size big enough for 64 bit systems.

2009-06-08  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (GetSystemTimes): Define.
	* fhandler_proc.cc (format_proc_uptime): Use GetSystemInfo to retrieve
	processor count.  Use GetSystemTimes when available to retrieve system
	idle time.  Improve debug output.
	(format_proc_stat): Use GetSystemInfo to retrieve processor
	count.  Improve debug output.  Ignore if SystemPerformanceInformation
	returns error.  Explain why.

2009-06-08  Corinna Vinschen  <corinna@vinschen.de>

	* fork.cc (frok::parent): Remove ancient code erroneously flushing
	stdout.

2009-06-08  Corinna Vinschen  <corinna@vinschen.de>

	* cygerrno.h (save_errno::~save_errno): Set errno directly to avoid
	flooding debug output.

2009-06-08  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (symlink_info::check): Return with error set to ENOENT if
	STATUS_NO_MEDIA_IN_DEVICE is returned.

2009-06-07  Christopher Faylor  <me+cygwin@cgf.cx>

	* cygheap.h (mini_cygheap): New struct.
	(init_cygheap): Inherit locale field via mini_cygheap.
	* cygheap.cc (cygheap_at_start): Define new variable.
	(cygheap): Initialize as cygheap_at_start so that locale information is
	always available.
	(cygheap_init): Initialize cygheap iff it is set to cygheap_at_start.
	* shared_info.h (memory_init): Accommodate argument change.
	* memory.cc (memory_init): Accept an argument indicating whether
	cygheap should be initialized or not.
	* dcrt0.cc (child_info_fork::handle_fork): Pass false to memory_init().
	(child_info_spawn::handle_spawn): Ditto.
	(dll_crt0_0): Pass true to memory_init when not forking or execing.

	* cygheap.h (cygheap_types::HEAP_2_DLL): New enum.
	* dll_init.h (dll): Remove unused namelen field.
	(dll_list::load_after_fork): Accommodate change in arguments.
	* dll_init.cc (dll_list::alloc): Allocate dll information in the cygwin
	heap.
	(dll_list::detach): Free dll information from the cygwin heap.
	(dll_list::load_after_fork): Use dll information in the cygwin heap
	directly rather than querying parent.
	* fork.cc (frok::first_dll): Delete.
	(frok::child): Don't report on first_dll.  Don't pass it to
	load_on_fork.
	(frok::parent): Don't set first_dll.
	(fork): Ditto.

2009-06-06  Corinna Vinschen  <corinna@vinschen.de>

	* dll_init.cc (dll_list::alloc): Allocate memory using a section
	object.  Explain why.  Drop call to GetSystemInfo, rather call
	getpagesize to get allocation granularity.  Only align to allocation
	granularity under WOW64.  Use roundup2 to align.
	(dll_list::detach): Call NtUnmapViewOfSection instead of VirtualFree.

2009-06-06  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
	throughout for symmetry.
	(fhandler_dev_mem::munmap): Use correct process handle in call to
	NtUnmapViewOfSection.

2009-06-06  Corinna Vinschen  <corinna@vinschen.de>

	* dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.
	* dll_init.cc: Fix formatting.
	(dll_list::alloc): Only allocate as much memory for struct dll as
	necessary for given DLL name.
	(dll_list::load_after_fork): Only read a single page of parent memory.
	Only read more if namelen indicates that it's necessary.

2009-06-05  Dave Korn  <dave.korn.cygwin@gmail.com>

	* winbase.h (ilockexch): Fix asm constraints.
	(ilockcmpexch): Likewise.

2009-06-05  Corinna Vinschen  <corinna@vinschen.de>

	* heap.cc (heap_init): Fix typo in comment.

2009-06-04  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_clipboard.cc: Avoid calling system_printf.
	(set_clipboard): Add basic error checking.  Set errno here.  Per MSDN,
	don't call GlobalFree on data block transferred to clipboard.
	(fhandler_dev_clipboard::write): Drop setting errno after call to
	set_clipboard.
	(fhandler_dev_clipboard::read): Add basic error checking. Simplify code.

2009-06-04  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_console.cc (set_console_title): Convert title string to
	wchar_t and call SetConsoleTitleW.

2009-06-04  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space to
	emit a NUL byte.

2009-06-04  Dave Korn  <dave.korn.cygwin@gmail.com>

	* thread.cc (__cygwin_lock_lock): Delete racy optimisation.
	(__cygwin_lock_unlock): Likewise.

2009-06-03  IWAMURO Motnori  <deenheart@gmail.com>

	* strfuncs.cc (sys_cp_mbstowcs): Fix condition.

2009-06-03  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (sys_cp_wcstombs): Implement reverse functionality
	of the change to sys_cp_mbstowcs from 2009-05-30.
	(sys_cp_mbstowcs): Slightly reformat.  Fix comment to accommodate
	change to sys_cp_wcstombs.  Don't write to *ptr if dst is NULL.

2009-06-03  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_console.cc (fhandler_console::read): Convert Alt-Backspace
	to \033\177 or to \377 dependent on the setting of dev_state->metabit.

2009-06-02  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (path_conv::check): Don't call set_exec for files on "noacl"
	mount points.

2009-05-30  Christopher Faylor  <me+cygwin@cgf.cx>

	* strfuncs.cc (sys_cp_mbstowcs): Treat src as unsigned char *.  Convert
	failure of f_mbtowc into a single malformed utf-16 value.

2009-05-30  Christopher Faylor  <me+cygwin@cgf.cx>

	* cygwin/include/sys/termios.h: Make default erase character "^?".

2009-05-30  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler_console.cc (fhandler_console::read): Convert backspace key
	to DEL.

2009-05-29  Christopher Faylor  <me+cygwin@cgf.cx>

	* path.cc (cwdstuff::set): Rewrite previous change to properly test the
	end of the buffer.

2009-05-28  Christopher Faylor  <me+cygwin@cgf.cx>

	* path.cc (cwdstuff::set): Avoid removing a nonexistent trailing slash.

2009-05-20  Eric Blake  <ebb9@byu.net>

	* net.cc (gethostby_helper): Use correct signedness.

2009-05-18  Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (mount_info::add_item): Avoid using any-old '/' as
	indicating root.

2009-05-18  Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (mount_info::got_usr_bin): Mark as NO_COPY.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.

2009-05-14  Corinna Vinschen  <corinna@vinschen.de>

	* wchar.h (sys_mbstowcs): Add missing __stdcall attribute.

2009-05-14  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.cc (cygheap_init): Set Cygwin default locale values.
	* cygheap.h (struct cygheap_locale): New structure.
	(struct user_heap_info): Add cygheap_locale member locale.
	* dcrt0.cc (dll_crt0_1): Revert to calling _setlocale_r so that only
	the applications locale is reverted to "C".
	* environ.cc (environ_init): Remove unused got_lc variable.
	* fhandler.h (class dev_console): Remove now unsed locale variables.
	* fhandler_console.cc (fhandler_console::get_tty_stuff): Remove
	setting dev_console's locale members.
	(dev_console::con_to_str): Use internal locale settings.  Default to
	__ascii_wctomb if charset is "ASCII".
	(fhandler_console::write_normal): Ditto.
	* strfuncs.cc (__ascii_wctomb): Drop declaration.
	(__db_wctomb): Use fixed value 2 instead of not
	necessarily matching MB_CUR_MAX.
	(__eucjp_wctomb): Use 3 instead of MB_CUR_MAX.
	(sys_cp_wcstombs): Remove special case for "C" locale.
	(sys_wcstombs): Implement here.  Use internal locale data stored on
	cygheap.
	(sys_cp_mbstowcs): Remove special case for "C" locale.
	(sys_mbstowcs): Implement here.  Use internal locale data stored on
	cygheap.
	* syscalls.cc (internal_setlocale): New function to set cygheap locale
	data and to reset CWD posix path.
	(setlocale): Just call internal_setlocale from here if necessary.
	* wchar.h (__ascii_wctomb): Declare.
	(sys_wcstombs): Don't define inline, just declare.
	(sys_mbstowcs): Ditto.

2009-05-14  Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (mount_info::init): Remove MOUNT_CYGWIN_EXEC setting when
	auto-mounting /usr/bin.

2009-05-14  Corinna Vinschen  <corinna@vinschen.de>

	* mount.cc (oopts): Add a no-op "auto" option.
	(mount_info::create_root_entry): Set root dir to MOUNT_IMMUTABLE rather
	than to MOUNT_OVERRIDE.

2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (mount_info::got_usr_bin): Define.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.
	(mount_info::create_root_entry): Create root entry as immutable and
	flag as automatic.
	(mount_info::init): Remove "Huh?  No /etc/fstab..." warning.
	Unconditionally call from_fstab for user and system tables.  Fill in
	/usr/bin and /usr/lib if they have not been specified in /etc/fstab.
	(oopts): Alphabetize.  Add "override" option to allow overriding
	immutable mount points.
	(mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended
	for root mount.
	(mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set
	appropriate global state.
	(fillout_mntent): Add ,auto to mount points added by Cygwin DLL.
	(mount): Remove masking of MOUNT_SYSTEM.  Allow user to shoot
	themselves.  Add comment.
	* mount.h (mount_info::got_usr_bin): Declare.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.
	* include/sys/mount.h: Reformat enum.
	Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}.

2009-05-13  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.h (cwdstuff): Convert to class.  Make posix and dir private.
	(cwdstuff::get_posix): New method.
	(cwdstuff::reset_posix): New method.
	* dcrt0.cc (dll_crt0_1): Call setlocale rather than _setlocale_r.
	* environ.cc (environ_init): Ditto.  Prefer "C" locale over current
	codepage default locale.
	* path.cc (chdir): Use cwdstuff::get_posix method instead of accessing
	cwdstuff::posix directly.
	(cwdstuff::set): Defer creating posix path to first usage.
	(cwdstuff::get_posix): Create posix path if it's empty, and return it.
	(cwdstuff::get): Create posix path if it's empty.
	* strfuncs.cc (sys_cp_wcstombs): Use UTF-8 conversion in the "C"
	locale.
	(sys_cp_mbstowcs): Ditto.
	* syscalls.cc (gen_full_path_at): Fetch CWD posix path locked.
	(setlocale): Implement here.  Reset CWD posix path.

2009-05-09  Christopher Faylor  <me+cygwin@cgf.cx>

	* cygwin/version.h (CYGWIN_VERSION_CYGWIN_CONV): New define.

2009-05-09  Corinna Vinschen  <corinna@vinschen.de>

	* dtable.cc (dtable::init_std_file_from_handle): Add workaround for
	Windows 7 64 bit issue.  Add lengthy comment to explain what happens.
	* wincap.h (wincaps::has_console_handle_problem): New element.
	* wincap.cc: Implement above element throughout.
	(wincap_7): New wincaps structure for NT 6.1 kernels.
	(wincapc::init): Set has_console_handle_problem to false for 32 bit
	systems.

2009-05-09  Corinna Vinschen  <corinna@vinschen.de>

	* sec_auth.cc (str2uni_cat): Move from here...
	* path.cc (str2uni_cat): ...to here.  Simplify.  Make static inline.
	(get_nt_native_path): Use RtlAppendUnicodeToString rather than
	str2uni_cat for constant strings for speed.
	* security.h (str2uni_cat): Drop declaration.

2009-05-08  Corinna Vinschen  <corinna@vinschen.de>
	    IWAMURO Motonori <deenheart@gmail.com>

	* strfuncs.cc (sys_cp_wcstombs): save and restore previous errno value.
	(sys_cp_mbstowcs): Ditto.

2009-05-08  IWAMURO Motonori <deenheart@gmail.com>

	* strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting
	wide char to SO/UTF-8 sequence.

2009-05-08  Corinna Vinschen  <corinna@vinschen.de>

	* include/sys/select.h: Guard definitions with __USE_W32_SOCKETS as
	the accompanying fd_set definitions in newlib's sys/types.h.

2009-05-06  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler_console.cc (fhandler_console::ioctl): Properly treat
	TIOCLINUX argument as a char.
	* fhandler_tty.cc (fhandler_tty_slave::ioctl): Use coercion to properly
	set char value.

2009-05-06  Corinna Vinschen  <corinna@vinschen.de>

	* libc/minires.c (scanline): Fix type in calls to ctype functions
	to stay in unsigned char range for char values >= 0x80.
	* regex/regcomp.c: Ditto, throughout.
	* regex/regex2.h (ISWORD): Ditto.

2009-05-06  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.cc (cygheap_init): Set umask to a sane default.
	* uinfo.cc (cygheap_user::ontherange): Don't use HOMEDRIVE/HOMEPATH
	to set HOME.  Default to /home/USERNAME.

2009-05-03  Corinna Vinschen  <corinna@vinschen.de>

	* security.cc (set_file_sd): Drop using FILE_OPEN_FOR_RECOVERY flag in
	call to NtOpenFile.
	* exceptions.cc (open_stackdumpfile): Ditto in call to NtCreateFile.
	* fhandler.cc (fhandler_base::open): Ditto.  Simplify setting
	create_options.

	* mount.cc (fs_info::update): Recognize offline storage.
	(fillout_mntent): Report UDF and offline storage.
	* mount.h (class fs_info): Add is_csc_cache status flag.

2009-05-04  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler_console.cc (fhandler_console::write_console): Eliminate
	unneeded debugging output.
	(fhandler_console::write_normal): Eliminate unneeded __seterrno.

2009-05-04  Christopher Faylor  <me+cygwin@cgf.cx>

	* libc/minires.c (scanline): Accommodate ctype changes which disallow
	use of an unadorned char argument to is* macros.
	* regex/regcomp.c: Ditto, throughout.
	* regex/regex2.h (ISWORD): Ditto.

2009-05-03  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.
	(fhandler_console::write_replacement_char): Declare as inline.
	(fhandler_console::write_console): Declare new function.
	* fhandler_console.cc (fhandler_console::MAX_WRITE_CHARS): Define.
	(handler_console::write_console): Define.
	(fhandler_console::write_replacement_char): Define as inline.
	(fhandler_console::write_normal): Use write_console when writing
	buffers of unknown length.

2009-04-26  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* include/cygwin/socket.h: Define SOL_IPV6.

2009-04-21  Corinna Vinschen  <corinna@vinschen.de>

	* ctype.cc (__set_ctype): Copy exact part of the current active
	character class array.

2009-04-20  Corinna Vinschen  <corinna@vinschen.de>

	* flock.cc (lf_setlock): Handle border case which results in WFMO loop
	exiting with ret == WAIT_TIMEOUT gracefully.  Add a system_printf to
	uncover other potential problems with WFMO loop.

2009-04-18  Christopher Faylor  <me+cygwin@cgf.cx>

	* mkimport: Specify .text for stub explicitly.
	* speclib: Add a dummy '.idata$7' section referring to the dll
	associated with the real import library.

2009-04-18  Corinna Vinschen  <corinna@vinschen.de>

	* dcrt0.cc (globify): Only call mbtowc for non-ascii chars.

2009-04-17  Corinna Vinschen  <corinna@vinschen.de>

	* dcrt0.cc (globify): Make multibyte-aware.

2009-04-17  Corinna Vinschen  <corinna@vinschen.de>

	* flock.cc (class inode_t): Add i_wait member and matching methods
	wait(), unwait(), and waiting().
	(inode_t::inode_t): Initialize i_wait to 0.
	(fhandler_disk_file::lock): Only remove node if no other thread is
	waiting for a blocking lock.
	(lf_setlock): Manipulate node->i_wait to signal that a thread is
	waiting for a blocking lock in this node.
	(lf_findoverlap): Reinstantiate SELF test as in original code.

2009-04-16  Corinna Vinschen  <corinna@vinschen.de>

	* dlfcn.cc (get_full_path_of_dll): Just return a bool value.  Drop
	local path_conv in favor of getting it as parameter.  Add local string
	buffer instead of getting it as parameter.
	(dlopen): Accommodate get_full_path_of_dll change.  Fetch WCHAR Windows
	path from path_conv variable and call LoadLibraryW.

2009-04-16  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
	* syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as
	STATUS_SHARING_VIOLATION.  Add lengthy comment to explain why.

2009-04-15  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (path_conv::get_wide_win32_path): Allow relative paths.
	(cygwin_conv_path): In case of CCP_POSIX_TO_WIN_W, convert relative
	paths to absolute paths if the relative pathname length exceeds
	MAX_PATH.

2009-04-15  Corinna Vinschen  <corinna@vinschen.de>

	* libc/bsdlib.cc: Align copyright with upstream.
	* libc/fnmatch.c: Ditto.
	* libc/fts.c: Ditto.
	* libc/inet_addr.c: Ditto.
	* libc/inet_network.c: Ditto.
	* libc/rcmd.cc: Ditto.
	* libc/rexec.cc: Ditto.

2009-04-14  Christopher Faylor  <me+cygwin@cgf.cx>

	* speclib: Really revert to using tempdir.

2009-04-14  Christopher Faylor  <me+cygwin@cgf.cx>

	* speclib: Revert to using tempdir.

2009-04-14  Corinna Vinschen  <corinna@vinschen.de>

	* localtime.cc (tzload): Implement setting __tzrule's offset member
	using newlib's __gettzinfo () interface also when tzload returns
	successfully.

2009-04-13  Dave Korn  <dave.korn.cygwin@gmail.com>

	* include/stdint.h (intptr_t): Remove long from type.
	(uintptr_t): Likewise.
	(INTPTR_MIN): Remove 'L' suffix.
	(INTPTR_MAX, UINTPTR_MAX): Likewise.

2009-04-12  Christopher Faylor  <me+cygwin@cgf.cx>

	* speclib: Initial stab at cleaning up temp files.  More work needed.
	* mkimport: Ditto.

2009-04-12  Christopher Faylor  <me+cygwin@cgf.cx>

	* Makefile.in (clean): Clean globals.h.
	(LIBCOS): Depend on globals.h.

2009-04-11  Christopher Faylor  <me+cygwin@cgf.cx>

	* mkimport: New script to perform all operations necessary to create
	libcygwin.a.
	* rmsym: Delete.
	* newsym: Delete.
	* Makefile.in (toolopts): New variable which holds options relating to
	binutils/gcc tools.
	(speclib): Use toolopts.  Add symbols to avoid copying to special
	libraries.
	(OBSOLETE_FUNCTIONS): Delete.
	(NEW_FUNCTIONS): Change to represent an argument to new mkimport
	script.
	(libcygwin.a): Use only new mkimport script to create libcygwin.a.
	Only rely on ${LIBCOS}.
	(*/lib*.a): Simplify speclib dependencies.
	(speclib): Accept toolchain options.  Convert every argument to
	absolute path.  Simplify parsing of nm output.  Accommodate new
	exclude option.

2009-04-11  Dave Korn <dave.korn.cygwin@googlemail.com>

	* include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix.
	(WINT_MAX): Add 'U' suffix.

2009-04-10  Christopher Faylor  <me+cygwin@cgf.cx>

	* speclib: Use a more robust method to derive full file path.

2009-04-09  Christopher Faylor  <me+cygwin@cgf.cx>

	* speclib: Semi-revert to previous version but don't try to generate
	well-formed import library.  Instead, just extract appropriate symbols
	and let later libcygwin.a on link line fill in the rest of the import
	stuff.
	* gendef: Hopefully no-op modification to allow easier post-processing
	on symbol values.

2009-04-09  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (try_to_bin): Use tmp_pathbuf buffer to allocate infobuf
	rather than using the stack.

2009-04-09  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (try_to_bin): Fix alignment of infobuf.

2009-04-09  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::fchown): Catch an
	error when changing the user account on a standalone Samba server.
	Explain why.
	* sec_acl.cc (setacl): Accommodate additional parameter to set_file_sd.
	* sec_helper.cc (SECURITY_SAMBA_UNIX_AUTHORITY): Define.
	(well_known_samba_unix_user_fake_sid): Define.
	* security.cc (set_file_sd): Take additional parameter if ownership
	should be changed.  Restrict requested permissions accordingly.
	(set_file_attribute): Accommodate additional parameter to set_file_sd.
	* security.h (well_known_samba_unix_user_fake_sid): Declare.
	(set_file_sd): Align declaration to above change.

2009-04-07  Corinna Vinschen  <corinna@vinschen.de>

	* include/stdint.h (int_least32_t): Define as int.
	(uint_least32_t): Ditto, unsigned.
	(int_fast16_t): Define as int.
	(int_fast32_t): Ditto.
	(uint_fast16_t): Ditto, unsigned.
	(uint_fast32_t): Ditto.
	(UINT32_MAX): Remove `L' long marker.
	(UINT_LEAST32_MAX): Ditto.
	(UINT_FAST16_MAX): Ditto.
	(UINT_FAST32_MAX): Ditto.
	(INT32_C): Ditto.
	(UINT32_C): Ditto.

2009-04-07  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc: Change WCHAR to wchar_t in multibyte<->widechar
	conversion functions throughout.
	* wchar.h: Ditto in declarations.  Guard them __INSIDE_CYGWIN__.

2009-04-07  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class dev_console): Add members con_mbtowc, con_wctomb,
	and con_charset.
	(dev_console::str_to_con): Take mbtowc function pointer and charset
	as additional parameters.
	* fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize
	aforementioned new members.  Explain why.
	(dev_console::con_to_str): Remove useless comment.  Call new
	sys_cp_wcstombs function rather than sys_wcstombs.
	(dev_console::str_to_con): Take mbtowc function pointer and charset
	as additional parameters.  Call sys_cp_mbstowcs accordingly.
	(fhandler_console::write_normal): Only initialize f_mbtowc and charset
	once.  Accommodate changed str_to_con.
	* strfuncs.cc (sys_cp_wcstombs): Renamed from sys_wcstombs.  Take
	wctomb function pointer and charset as parameters.  Use throughout.
	(sys_cp_mbstowcs): Take wctomb function pointer and charset as
	parameters instead of codepage.  Remove matching local variables and
	their initialization.
	* wchar.h (ENCODING_LEN): Define as in newlib.
	(__mbtowc): Use mbtowc_p typedef for declaration.
	(wctomb_f): New type.
	(wctomb_p): New type.
	(__wctomb): Declare.
	(__utf8_wctomb): Use wctomb_f typedef for declaration.
	(sys_cp_wcstombs): Move declaration from winsup.h here.
	(sys_wcstombs): Ditto.
	(sys_wcstombs_alloc): Ditto.
	(sys_cp_mbstowcs): Ditto.
	(sys_mbstowcs): Ditto.
	(sys_mbstowcs_alloc): Ditto.
	* winsup.h: Move declaration of sys_FOO functions to wchar.h.  Include
	wchar.h instead.

2009-04-06  Earl Chew <earl_chew@agilent.com>

	* libc/rexec.cc (ruserpass): Use fstat64 instead of fstat.

2009-04-06  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc: Add comment to explain why we can't support JIS
	for now.
	(__db_wctomb): Alwaus use WC_NO_BEST_FIT_CHARS.
	(__jis_wctomb): Just call __ascii_wctomb from here.
	(__eucjp_wctomb): Convert to standalone implementation to fix up the
	difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
	Explain.
	(__kr_wctomb): Use codepage 949.
	(__db_mbtowc): Reorder code slightly.  Always use MB_ERR_INVALID_CHARS
	in call to MultiByteToWideChar.  Fix a problem with singlebyte
	sequences.  Fix a bug in '\0' handling.  Reset state->__count on
	successful return from non-zero state.
	(__jis_mbtowc): Just call __ascii_mbtowc from here.
	(__eucjp_mbtowc): Convert to standalone implementation to fix up the
	difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
	(__kr_mbtowc): Use codepage 949.
	(__set_charset_from_codepage): Handle codepage 20932 as eucJP.

2009-04-05  Christopher Faylor  <me+cygwin@cgf.cx>

	* Makefile.in: Use all compile options when calculating magic values.
	* shared_info.h (CURR_SHARED_MAGIC): Revert erroneous value.
	* child_info.h (CURR_CHILD_INFO_MAGIC): Update.

	* fhandler.h (acquire_output_mutex): Remove unneeded ';'.
	(release_output_mutex): Ditto.

2009-04-05  Christopher Faylor  <me+cygwin@cgf.cx>

	* net.cc: Undefine NOERROR and DELETE to avoid compiler warnings.
	* shared_info.h (CURR_SHARED_MAGIC): Update.
	* spawn.cc (spawn_guts): Avoid copying one line command line argument
	if it hasn't been filled out.

2009-04-04  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
	    Corinna Vinschen  <corinna@vinschen.de>

	* include/asm/byteorder.h (__ntohl): Prototype before define to avoid
	a warning with -Wmissing-prototypes.  Use _ELIDABLE_INLINE macro from
	_ansi.h.
	(__ntohs): Ditto.

2009-04-02  Corinna Vinschen  <corinna@vinschen.de>

	* environ.cc (build_env): Fix length calculation of resulting
	wide char environment string.

2009-04-02  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* include/netdb.h: #include <inttypes.h>, <netinet/in.h>,
	and <sys/socket.h> per SUSv3.

2009-04-01  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (sys_cp_mbstowcs): Check if ASCII SO is followed by at
	least two chars and the next byte is a valid UTF-8 start byte before
	trying to convert the followup bytes as UTF-8 sequence.

2009-03-31  Corinna Vinschen  <corinna@vinschen.de>

	* shm.cc (struct shm_attached_list): Convert access type to ULONG.
	(fixup_shms_after_fork): Fix comment.  Use NtMapViewOfSection rather
	than MapViewOfFileEx to recreate shared memory regions.  Add function
	name to api_fatal output.
	(shmat): Use NtMapViewOfSection to create shared memory region
	top-down.

2009-03-31  Corinna Vinschen  <corinna@vinschen.de>

	* ctype.cc: Remove implementation of ctype functions in favor of
	pointer-based newlib implementation.
	(_ctype_b): Declare.
	(__ctype_cp): Move to newlib. Declare.
	(__ctype_iso): Ditto.
	(__set_ctype): Implement changing __ctype_ptr__.  Only copy character
	class data in applications built under older Cygwin.
	* cygwin.din (__ctype_ptr__): Export.
	* include/ctype.h: Remove in favor of newlib implementation.
	* include/cygwin/config.h (__EXPORT): Define alongside __IMPORT.
	* include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE):
	Define check for old vs. new ctype implementation.
	Bump API minor number.

2009-03-28  Christopher Faylor  <me+cygwin@cgf.cx>

	* Makefile.in: Perform some minor cleanup.  Revamp speclib handling.
	* speclib: Rewrite to create libraries with dlltool rather than
	attempting surgery on libcygwin.a.

2009-03-27  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (inet_ntop6): Convert to lowercase hex digits on the fly.

2009-03-27  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (cygwin_getaddrinfo): Check hints for non-NULL before
	checking its content.

2009-03-27  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_fifo): Rename read/write methods to
	raw_read/raw_write.
	* fhandler_fifo.cc: Ditto.

2009-03-27  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (pathconf): Fix memory leak.

2009-03-26  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (symlink_worker): Write target filename as UTF-16 string
	with leading BOM marker.
	(symlink_info::check_shortcut): If check for leading BOM marker
	succeeds, read filename as UTF-16 string.
	(symlink_info::check_sysfile): Ditto.

2009-03-26  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* include/asm/byteorder.h (__ntohl): Align definition to ISO C99.
	(__ntohs): Ditto.

2009-03-26  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (__set_charset_from_codepage): Revert to translating
	codepage 936 to "GBK".

2009-03-25  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (sys_wcstombs): Don't convert ASCII SO into two
	ASCII SO's.

2009-03-25  Corinna Vinschen  <corinna@vinschen.de>

	* environ.cc (environ_init): Break from locale loop after first hit.
	* fhandler_console.cc (fhandler_console::write_normal): Print a SO
	sequence using always valid Unicode chars.

2009-03-25  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (__kr_wctomb): Use codepage 51949 rather than 50949.
	(__kr_mbtowc): Ditto.
	(__set_charset_from_codepage): Ditto.  Translate codepage 936 to
	"GB2312" and drop the charset name "GBK".

2009-03-24  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (__kr_wctomb): Use codepage 50949 rather than 949.
	(__kr_mbtowc): Ditto.
	(__set_charset_from_codepage): Translate codepages 949 and 50949 to
	"EUCKR" and drop the charset name "CP949".

2009-03-24  Corinna Vinschen  <corinna@vinschen.de>

	* strfuncs.cc (sys_cp_mbstowcs): Don't read beyond src + nms.

2009-03-24  Corinna Vinschen  <corinna@vinschen.de>

	* shared_info.h (CURR_SHARED_MAGIC): Update.

2009-03-24  Corinna Vinschen  <corinna@vinschen.de>

	* wchar.h: Replace UINT with unsigned int.

2009-03-24  Corinna Vinschen  <corinna@vinschen.de>

	* wchar.h: Remove erroneous "C" specifier from extern declaration.

2009-03-24  Corinna Vinschen  <corinna@vinschen.de>

	* ctype.cc (_CTYPE_DATA_0_127): Add _B class to TAB character.
	(__ctype_default): New character class array for default ASCII
	character set.
	(__ctype_iso): New array of character class array for ISO charsets.
	(__ctype_cp): Ditto for singlebyte Windows codepages.
	(tolower): Implement as distinct function to support any singlebyte
	charset.
	(toupper): Ditto.
	(__set_ctype): New function to copy singlebyte character classes
	corresponding to current charset to ctype_b array.
	Align copyright text to upstream.
	* dcrt0.cc (dll_crt0_1): Reset current locale to "C" per POSIX.
	* environ.cc (set_file_api_mode): Remove.
	(codepage_init): Remove.
	(parse_thing): Remove "codepage" setting.
	(environ_init): Set locale according to environment settings, or
	to current codepage, before converting environment to multibyte.
	* fhandler.h (fhandler_console::write_replacement_char): Drop argument.
	* fhandler_console.cc (dev_console::str_to_con): Call sys_cp_mbstowcs
	rather than MultiByteToWideChar.
	(fhandler_console::write_replacement_char): Always print a funny
	half filled square if a character isn't in the current charset.
	(fhandler_console::write_normal): Convert to using __mbtowc
	rather than next_char.
	* fork.cc (frok::child): Drop call to set_file_api_mode.
	* globals.cc (enum codepage_type) Remove.
	(current_codepage): Remove.
	* miscfuncs.cc (cygwin_wcslwr): Unused, dangerous.  Remove.
	(cygwin_wcsupr): Ditto.
	(is_cp_multibyte): Remove.
	(next_char): Remove.
	* miscfuncs.h (is_cp_multibyte): Drop declaration.
	(next_char): Ditto.
	* strfuncs.cc (get_cp): Remove.
	(__db_wctomb): New function to implement _wctomb_r functionality for
	doublebyte charsets using WideCharToMultiByte.
	(__sjis_wctomb): New function to replace unusable newlib function.
	(__jis_wctomb): Ditto.
	(__eucjp_wctomb): Ditto.
	(__gbk_wctomb): New function.
	(__kr_wctomb): Ditto.
	(__big5_wctomb): Ditto.
	(__db_mbtowc): New function to implement _mbtowc_r functionality for
	doublebyte charsets using MultiByteToWideChar.
	(__sjis_mbtowc): New function to replace unusable newlib function.
	(__jis_mbtowc): Ditto.
	(__eucjp_mbtowc): Ditto.
	(__gbk_mbtowc): New function.
	(__kr_mbtowc): New function
	(__big5_mbtowc): New function
	(__set_charset_from_codepage): New function.
	(sys_wcstombs): Reimplement, basically using same wide char to multibyte
	conversion as newlib's application level functions.  Plus extras.
	Add lengthy comment to explain.  Change return type to size_t.
	(sys_wcstombs_alloc): Just use sys_wcstombs.  Change return type to
	size_t.
	(sys_cp_mbstowcs): Replace sys_mbstowcs, take additional codepage
	argument.  Explain why.  Change return type to size_t.
	(sys_mbstowcs_alloc): Just use sys_mbstowcs.  Change return type to
	size_t.
	* wchar.h: Declare internal functions implemented in strfuncs.cc.
	(wcscasecmp): Remove.
	(wcsncasecmp): Remove.
	(wcslwr): Remove.
	(wcsupr): Remove.
	* winsup.h (codepage_init): Remove declaration.
	(get_cp): Ditto.
	(sys_wcstombs): Align declaration to new implementation.
	(sys_wcstombs_alloc): Ditto.
	(sys_cp_mbstowcs): Add declaration.
	(sys_mbstowcs): Define as inline function.
	(sys_mbstowcs_alloc): Align declaration to new implementation.
	(set_file_api_mode): Remove declaration.
	* include/ctype.h (isblank): Redefine to use _B character class.
	(toupper): Remove ASCII-only definition.
	(tolower): Ditto.

2009-03-24  Corinna Vinschen  <corinna@vinschen.de>

	* sec_auth.cc (str2buf2uni): Remove.
	* security.h (str2buf2uni): Remove declaration.

2009-03-24  Yaakov Selkowitz  <yselkowitz@cygwin.com>

	* include/mntent.h: Remove declarations of nonexistant addmntent
	and hasmntopt.  Update and clarify the /etc/mtab comment.

2009-03-23  Corinna Vinschen  <corinna@vinschen.de>

	* smallprint.cc (__small_vsprintf): Handle NULL PWCHAR and
	PUNICODE_STRING arguments.
	(__small_vswprintf): Ditto.

2009-03-23  Corinna Vinschen  <corinna@vinschen.de>

	* include/asm/byteorder.h (__constant_ntohs): Remove declaration.
	(__constant_ntohl): Ditto.

2009-03-23  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wordexp, wordfree.
	* posix.sgml: Move them to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.

2009-03-22  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* include/sys/un.h: #include <string.h> for strlen.

2009-03-19  Corinna Vinschen  <corinna@vinschen.de>

	* dlfcn.cc (get_full_path_of_dll): Revert patch from 2008-07-16.

2009-03-19  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* cygwin.din: Export log2, log2f as functions.
	* posix.sgml: Add them to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.

2009-03-18  Corinna Vinschen  <corinna@vinschen.de>

	* sec_auth.cc (lsaauth): Remove local definitions of struct
	_TOKEN_LINKED_TOKEN and TokenLinkedToken in favor of definitions
	from winnt.h.
	(lsaprivkeyauth): As in lsaauth, fetch linked token if available and
	return that in favor of default token.

2009-03-15  Yaakov Selkowitz <yselkowitz@users.sourceforge.net>

	* errno.cc (_sys_errlist): Add ESTRPIPE.

2009-03-15  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wcsdup.
	* posix.sgml: Add wcsdup to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.

2009-03-15  Corinna Vinschen  <corinna@vinschen.de>

	* include/inttypes.h: Remove "l" size specifier from all 16 and 32 bit
	definitions.

2009-03-14  Christopher Faylor  <me+cygwin@cgf.cx>

	* path.cc (warn_msdos): Don't warn about MS-DOS filenames encountered
	during initialization.

2009-03-14  Corinna Vinschen  <corinna@vinschen.de>

	* gendef: Remove STABS directives.

2009-03-13  Corinna Vinschen  <corinna@vinschen.de>

	* mktemp.cc: Remove STABS specific link-time warning.  Align copyright
	text to upstream.

2009-03-13  Corinna Vinschen  <corinna@vinschen.de>

	* flock.cc: Fix lockf copyright to latest version.

2009-03-12  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (path_conv::isgood_inode): Move to be defined
	earlier.
	(get_ino_by_handle): Take additional path_conv argument, accommodate
	throughout.  Only use FileId if isgood_inode check is true.
	(fhandler_base::open_fs): Simplify setting ino due to above change.
	(readdir_get_ino): Make sure to return always a non-zero inode number.
	(fhandler_disk_file::readdir): Always open file in dir with
	FILE_OPEN_REPARSE_POINT so as not to open wrong file.
	Drop call to isgood_inode here.
	* path.cc (symlink_info::check): Call fs.update in case we're fetching
	file information from call to NtQueryDirectoryFile.

2009-03-12  Corinna Vinschen  <corinna@vinschen.de>

	* flock.cc (fhandler_disk_file::lock): Don't test file open mode in
	case of flock-type locks.  Explain why.

2009-03-12  Brian Ford <Brian.Ford@FlightSafety.com>

	* gethostby_helper: Fix typos in DEBUGGING case.

2009-03-11  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wcscasecmp, wcsncasecmp.
	* posix.sgml: Move wcscasecmp, wcsncasecmp to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.

2009-03-11  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf,
	vswscanf.
	* posix.sgml: Move fwscanf, swscanf, vwscanf, vfwscanf, vswscanf
	to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.

2009-03-09  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (fhandler_socket::wait_for_events): Take additional
	parameter "dontwait".
	* fhandler_socket.cc (fhandler_socket::wait_for_events): Act as if the
	socket is non-blocking if dontwait is true.
	(fhandler_socket::recv_internal): Use incoming MSG_DONTWAIT flag to
	set the wait_for_events dontwait parameter.
	(fhandler_socket::send_internal): Ditto.  Optimize code slightly.
	* include/cygwin/socket.h (MSG_DONTWAIT): Define.
	* include/cygwin/version.h: Bump API minor number.

2009-03-09  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wcsftime.
	* posix.sgml: Move wcsftime to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.

2009-03-06  Pierre A. Humblet <pierre@phumblet.no-ip.org>

	* cygwin.din: Export gethostbyname2.
	* net.cc: define _CYGWIN_IN_H and include resolv.h.
	(realloc_ent): New function.
	(dup_ent): Call realloc_ent.
	(memcpy4to6): New function.
	(dn_length1): New function.
	(gethostby_helper): New function.
	(gethostbyname2): New function.
	* posix.sgml: Add gethostbyname2.
	* include/cygwin/version.h: Bump API minor number.
	* libc/minires.c (get_options): Look for "inet6" and apply bounds
	to "retry" and "retrans".
	(res_ninit): Set the default options at the beginning.
	(dn_expand): Fix "off by one".

2009-03-06  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf,
	vswprintf.  Sort.
	* posix.sgml: Move fwprintf, swprintf, vwprintf, vfwprintf, vswprintf
	to SUSv4 list.  Sort SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.

2009-03-04  Corinna Vinschen  <corinna@vinschen.de>

	* dcrt0.cc (disable_dep): Disable.  Explain why.
	(dll_crt0_0): Disable calling disable_dep.  Explain why.

2009-03-03  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc: Include asm/byteorder.h.
	(htonl): Move to end of file.  Add comment to explain why.  Align
	definition to POSIX.  Use related macro from asm/byteorder.h.
	(ntohl): Ditto.
	(htons): Ditto.
	(ntohs): Ditto.
	* include/asm/byteorder.h: Revert previous patch.

2009-03-03  Corinna Vinschen  <corinna@vinschen.de>

	* include/asm/byteorder.h: Disable optimization when building
	Cygwin network code.

2009-02-26  Christopher Faylor  <me+cygwin@cgf.cx>

	* dtable.cc (dtable::select_read): Add ability to override fh.
	* fhandler.h (fhandler_fifo::select_read): Declare new function.
	(fhandler_fifo::select_write): Ditto.
	(fhandler_fifo::select_except): Ditto.
	* select.cc (peek_pipe): Treat certain classes of pipe errors as "no
	data".
	(fhandler_fifo::select_read): Define new function.
	(fhandler_fifo::select_write): Ditto.
	(fhandler_fifo::select_except): Ditto.

	* shared_info.h (CURR_SHARED_MAGIC): Update.

2009-02-23  Sjors Gielen <mailinglist@dazjorz.com>

	* Makefile.in: Add DESTDIR functionality.

2009-02-23  Corinna Vinschen  <corinna@vinschen.de>

	* sec_auth.cc (get_user_local_groups): Simplify LookupAccountName code.

2009-02-20  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (NetLocalGroupEnum): Remove.
	(NetLocalGroupGetMembers): Remove.
	(NetUserGetLocalGroups): Add.
	* sec_auth.cc (is_group_member): Remove function.
	(get_user_local_groups): Get user as string instead of as SID.
	Call NetUserGetLocalGroups instead of NetLocalGroupEnum.  Drop call
	to is_group_member.
	(get_server_groups): Call get_user_local_groups with user name instead
	of user SID.

2009-02-19  Corinna Vinschen  <corinna@vinschen.de>

	* winver.rc: Fix Copyright date.

2009-02-19  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export mbsnrtowcs and wcsnrtombs.
	* posix.sgml: Move mbsnrtowcs and wcsnrtombs to SUSv4 section.
	* include/cygwin/version.h: Bump API minor number.

2009-02-18  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export open_wmemstream.
	* posix.sgml: Move open_wmemstream to SUSv4 section.
	* include/cygwin/version.h: Bump API minor number.

2009-02-16  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export reallocf.
	* malloc_wrapper.cc( reallocf): New function.
	* posix.sgml: Add reallocf to BSD section.
	* include/cygwin/version.h: Bump API minor number.
	* libc/fts.c: Remove erroneous reallocf definition.

2009-02-16  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wcstoimax, wcstoumax.
	* posix.sgml: Move wcstoimax and wcstoumax to SUSv4 section.
	* include/inttypes.h: Declare wcstoimax and wcstoumax.
	* include/cygwin/version.h: Bump API minor number.

2009-02-13  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wcsnlen.
	* posix.sgml: Move wcsnlen to SUSv4 section.
	* include/cygwin/version.h: Bump API minor number.

2009-02-13  Corinna Vinschen  <corinna@vinschen.de>

	* environ.cc (_getenv_r): New function.

2009-02-13  Corinna Vinschen  <corinna@vinschen.de>

	* posix.sgml: Move dirfd to SUSv4 section.

2009-02-13  Corinna Vinschen  <corinna@vinschen.de>

	* posix.sgml: Move interfaces deprecated in SUSv4 to deprecated
	interfaces section.  Move interfaces added in SUSv4 to SUSv4
	section or, if unimplemented, add them to the unimplemented interfaces
	section.

2009-02-13  Corinna Vinschen  <corinna@vinschen.de>

	* posix.sgml: Merge SUSv3 and SUSv4 section into a single SUSv4 section.
	Move Solaris calls now in SUSv4 to SUSv4 section.  Rename unimplemented
	section to refer to SUSv4.  Add note about missing interfaces.
	Move wcstod and wcstof from unimplemented to SUSv4 section.

2009-02-13  Corinna Vinschen  <corinna@vinschen.de>

	* mount.cc (mount_info::from_fstab_line): Make cygdrive posix=0 by
	default as documented.

2009-02-13  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wcstod and wcstof.
	* include/cygwin/version.h: Bump API minor number.

2009-02-11  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (open): Handle O_DIRECTORY flag.
	* include/fcntl.h: Add SUSv4 flags O_DIRECTORY, O_EXEC and O_SEARCH.
	* include/cygwin/version.h: Bump API minor number.

2009-02-09  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_floppy.cc (fhandler_dev_floppy::open): Fix format.  Add
	code to allow to read disk and CD/DVD devices in full length.  Explain
	why.
	(fhandler_dev_floppy::raw_read): Add current position to debug output.

	* include/sys/sched.h: New stub file to override newlib file with
	clashing definitions.

2009-02-05  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wcstok.
	* posix.sgml: Move wcstok from unimplemented to susv3.
	* include/cygwin/version.h: Bump API minor number.

2009-02-04  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_proc.cc (proc_tab): Add entry for mounts symlink.
	(format_proc_mounts): New function to implement mounts symlink.
	* fhandler_process.cc (process_tab): Add entry for mounts file.
	(format_process_mounts): New function to implement mounts file.

2009-02-04  Corinna Vinschen  <corinna@vinschen.de>

	* security.cc (alloc_sd): Disable generating default permission entries
	for directories.

2009-01-29  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix inode number
	evaluation for faked "." entry.

	* mount.cc (fs_info::update): Move setting of is_cdrom after checking
	for caseinsensitivity.  Recognize UDF in is_cdrom case and set
	caseinsensitive flag according to UDF brokenness determined by OS.
	Add comment to explain why.
	* mount.h (class fs_info): Add is_udf status flag.
	* path.cc (symlink_info::check): Add workaround for UDF bug in
	terms of casesensitivity on certain OSes.
	* wincap.h (wincaps::has_broken_udf): New element.
	* wincap.cc: Implement above element throughout.

2009-01-27  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.cc (fhandler_base::wait_overlapped): Set bytes to -1 on
	EINTR or real error.
	(fhandler_base::write_overlapped): Assume that bytes_written will
	contain proper error value.
	* pipe.cc (fhandler_pipe::fhandler_pipe): Set uninterruptible_io since
	signals are handled by pipe functions now.

2009-01-26  Corinna Vinschen  <corinna@vinschen.de>

	* shared.cc (shared_name): New function for WCHAR names.
	(open_shared): Take name parameter as WCHAR.  Accommodate throughout.
	* shared_info.h ((CURR_SHARED_MAGIC): Redefine.
	(shared_name): Add declaration for function taking a WCHAR name.
	(open_shared): Change declaration according to above change.
	* pinfo.cc (pinfo::init) : Accommodate above change.

2009-01-26  Corinna Vinschen  <corinna@vinschen.de>

	* grp.cc (getgrgid_r): Simplify code by using stpcpy.
	(getgrnam_r): Ditto.
	* passwd.cc (getpwuid_r32): Simplify code by using stpcpy.
	(getpwnam_r): Ditto.

2009-01-26  Corinna Vinschen  <corinna@vinschen.de>

	* uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENT
	flag.

2009-01-24  Corinna Vinschen  <corinna@vinschen.de>

	* mount.cc (mount_info::from_fstab): Open fstab file with
	FILE_OPEN_FOR_BACKUP_INTENT flag.

2009-01-23  Corinna Vinschen  <corinna@vinschen.de>

	* smallprint.cc (__small_vsprintf): Use already available buffer tmp
	in wfillin case.

2009-01-22  Christopher Faylor  <me+cygwin@cgf.cx>

	* select.cc (peek_serial): Add hack to allow proper operation with
	com0com driver.

2009-01-21  Corinna Vinschen  <corinna@vinschen.de>

	Remove USE_SERVER define.  Accommodate throughout.
	* configure.in: Remove --enable-server option.
	* configure: Regenerate.
	* environ.cc: Remove CYGWIN=server setting.

2009-01-20  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_procnet.cc: Reorganize global procnet content data into a
	new struct virt_tab_t.  Accommodate throughout.

	* fhandler.h: Fix copyright dates.
	* fhandler_process.cc: Ditto.
	* fhandler_registry.cc: Ditto.

2009-01-20  Corinna Vinschen  <corinna@vinschen.de>

	* devices.h (FH_PROCESSFD): New device type.
	* dtable.cc (build_fh_pc): Add case for FH_PROCESSFD.
	* fhandler.h (class fhandler_virtual): Drop bufalloc member.
	* fhandler_virtual.h: New header.
	* fhandler_proc.cc: Remove types proc_type_t and proc_tab_t in favor
	of types virt_type_t and virt_tab_t from fhandler_virtual.h.
	Change prototypes of format_XXX functions accordingly.
	(proc_tab): Drop size member info.
	(fhandler_proc::fill_filebuf): Don't allocate filebuf here.  Allocate
	it in the format_XXX functions.
	* fhandler_process.cc: Reorganize global process content data into a
	new struct virt_tab_t.  Accommodate throughout.
	(format_process_winexename): New function.
	(format_process_winpid): New function.
	(format_process_exename): New function.
	(format_process_root): New function.
	(format_process_cwd): New function.
	(format_process_cmdline): New function.
	(format_process_ppid): New function.
	(format_process_uid): New function.
	(format_process_pgid): New function.
	(format_process_sid): New function.
	(format_process_gid): New function.
	(format_process_ctty): New function.
	(format_process_fd): New function.
	* fhandler_procnet.cc (fhandler_procnet::fill_filebuf): Don't use
	bufalloc.
	* fhandler_registry.cc (fhandler_registry::fill_filebuf): Define
	bufalloc locally.
	* fhandler_virtual.cc (fhandler_virtual::fhandler_virtual): Drop
	initialization of bufalloc.
	(fhandler_virtual::dup): Drop copying bufalloc.

2009-01-20  Corinna Vinschen  <corinna@vinschen.de>

	* thread.h (struct pthread_rwlock::RWLOCK_READER): Add counter n.
	* thread.cc (pthread_rwlock::rdlock): If a thread already owns a
	read lock, just count the number of locks for it, per SUSv4.
	(pthread_rwlock::tryrdlock): Ditto.
	(pthread_rwlock::unlock): If a thread has more than one concurrent
	read locks, just count down.

2009-01-20  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (WSAIoctl): Reintroduce.
	(WSASendMsg): Define.
	* fhandler.h (class fhandler_socket): Change definition of recv_internal
	and send_internal to take WSAMSG pointer as parameter.
	* fhandler_socket.cc (WSAID_WSARECVMSG): Define.
	(LPFN_WSARECVMSG): Define.
	(WSASendMsg): Declare.
	(get_ext_funcptr): New function to fetch address of WSARecvMsg.
	(fhandler_socket::recv_internal): Take just a LPWSAMSG parameter.
	Change code accordingly.  If control information is requested,
	fetch address of WSARecvMsg and use that instead of WSARecvFrom.
	(fhandler_socket::recvfrom): Change return type to ssize_t as
	declared in fhandler.h.  Accommodate changes to recv_internal.
	(fhandler_socket::recvmsg): Ditto.  Make sure that control information
	is only requested if system, address family, and socket type support it.
	(fhandler_socket::send_internal): Take just a LPWSAMSG parameter
	and the flags.  Change code accordingly.  If control information is
	provided, use WSASendMsg instead of WSASendTo.
	(fhandler_socket::sendto): Drop useless comment.  Accommodate changes
	to send_internal.
	(fhandler_socket::sendmsg): Ditto.  Make sure that control information
	is only provided if system, address family, and socket type support it.
	* wincap.h (wincaps::has_recvmsg): New element.
	(wincaps::has_sendmsg): New element
	* wincap.cc: Implement above elements throughout.
	* include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment
	of type struct cmsghdr.

2009-01-17  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (mmap64): Fix condition checking if anonymous mapping beyond
	EOF is required.

2009-01-17  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_proc.cc: Reorganize global proc content data into a new
	struct proc_tab_t.  Accommodate throughout.
	(format_proc_version): New function.
	(format_proc_loadavg): New function.
	(format_proc_self): New function.

	* resource.cc (getrlimit): Return correct rlim_max value for
	RLIMIT_NOFILE.

2009-01-16  Corinna Vinschen  <corinna@vinschen.de>

	* Fix copyright dates.

2009-01-13  Corinna Vinschen  <corinna@vinschen.de>

	* libc/getopt.c (parse_long_options): Use fix from NetBSD's getopt
	to avoid false ambiguities.

2009-01-12  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (enum bin_status): New type.
	(try_to_bin): Return bin_status.  Rename win32_path to pc.  Rename h
	to fh.  Rename fh to tmp_fh.  Add code to set delete dispostion and
	more code to replace file moved to bin by another, temporary file.
	Add comments to explain why.
	(unlink_nt): Replace move_to_bin with bin_stat.  Only set bin_stat
	to move_to_bin for non-remote files.  As a last resort, call try_to_bin
	if setting delete-on-close failed.  Only re-set R/O DOS attribute
	and only close handle if it's still valid.

2009-01-11  Corinna Vinschen  <corinna@vinschen.de>

	* errno.cc (errmap): Set errno to ENOENT instead of ENOSHARE throughout.
	* path.cc (path_conv::check): Set to and check for ENOENT instead of
	ENOSHARE.

	* path.cc (symlink_info::check): Fix Samba 3.2.x comment.

2009-01-09  Corinna Vinschen  <corinna@vinschen.de>

	* mount.cc (mount_info::from_fstab_line): Always convert drive
	letter in native path to uppercase.
	* path.cc (normalize_win32_path): Ditto.
	(path_prefix_p): Revert previous patch.

	* path.cc (symlink_info::check): Check for STATUS_INVALID_PARAMETER
	return code to circumvent weird behaviour of Samba 3.2.x shares.

2009-01-09  Christopher Faylor  <me+cygwin@cgf.cx>

	* include/sys/cygwin.h (CW_SETERRNO): Define.
	* external.cc (CW_SETERRNO): Implement.
	* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to
	reflect the above change.

	* path.cc (path_prefix_p): Treat X: as equivalent to x:.

	* mkglobals_h: Remove unneeded #define.

	* spawn.cc (spawn_guts): Avoid overly wordy initialization to zero.

2009-01-08  Corinna Vinschen  <corinna@vinschen.de>

	* libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
	(fts_ufslinks): Fix using wrong structure member in Cygwin-specific
	code.

2009-01-07  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h: Reorder NT status flags.  Fix a case difference. Add
	STATUS_CANNOT_DELETE flag.
	* syscalls.cc (unlink_nt): Change initial NtOpenFile to request
	FILE_SHARE_DELETE sharing mode.  Change comment accordingly.
	If setting delete disposition failed with STATUS_CANNOT_DELETE, try
	to delete using delete-on-close.  Explain why.
	Rearrange setting R/O DOS attribute after trying to delete.  Simplify
	comment.

2009-01-07  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::link): Only add .exe if
	original file has .exe as well.
	* path.cc (path_conv::is_binary): Only recognize Windows 32 and 64 bit
	apps as binaries.

2009-01-02  Christopher Faylor  <me+cygwin@cgf.cx>

	Remove unneeded header files from source files throughout.
	Update copyrights where appropriate.

	* globals.cc: New file for generic global variables.
	* mkglobals_h: New script to generate globals.h.
	* mkstatic: New script used to build a (currently non-working) static
	libcygwin_s.a.
	* Makefile.in: Add unused rule to build a non-working libcygwin_s.a.
	(DLL_OFILES): Add globals.o.  Make all objects rely on globals.h.
	(globals.h): New target.  Generate globals.h.
	* cygtls.h: Honor new CYGTLS_HANDLE define to control when the HANDLE
	operator is allowed in _cygtls.
	* dcrt0.cc: Move most globals to globals.cc.
	* init.cc: Ditto.
	* environ.cc (strip_title_path): Remove now-unneeded extern.
	* fhandler_serial.cc (fhandler_serial::open): Ditto.
	* pinfo.cc: Ditto.
	(commune_process): Ditto.
	* shared.cc: Ditto.
	* glob.cc: Ditto.
	* strace.cc: Ditto.
	* exceptions.cc: Define CYGTLS_HANDLE before including winsup.h.
	* path.cc (stat_suffixes): Move here.
	* security.h: Add forward class path_conv declaration.
	* smallprint.cc (__small_vsprintf): Make a true c++ function.
	(__small_sprintf): Ditto.
	(small_printf): Ditto.
	(console_printf): Ditto.
	(__small_vswprintf): Ditto.
	(__small_swprintf): Ditto.
	* spawn.cc (spawn_guts): Remove _stdcall decoration in favor of
	regparm.
	(hExeced): Move to globals.cc
	* strfuncs.cc (current_codepage): Ditto.
	(active_codepage): Ditto.
	* sync.cc (lock_process::locker): Move here from dcrt0.cc.
	* syscalls.cc (stat_suffixes): Move to path.cc.
	* tty.cc (tty::create_master): Uncapitalize fatal warning for
	consistency.
	* winsup.h: Include globals.h to declare most of the grab bag list of
	globals which were previously defined here.

	* mount.h: Move USER_* defines back to shared_info.h.

	* speclib: Force temporary directory cleanup.

2009-01-02  Christopher Faylor  <me+cygwin@cgf.cx>

	* speclib: Rewrite completely in perl.  Avoid multiple nm calls.