Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ChangeLog-2007 « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 66cb331302c6bd42a433cc415f67566ff75ead25 (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
2007-12-30  Dave Korn  <dave.korn@artimi.com>

	* cygwin.din (_f_llrint, _f_llrintf, _f_llrintl, _f_lrint, _f_lrintf,
	_f_lrintl, _f_rint, _f_rintf, _f_rintl):  Export fast *rint* functions.
	(lrint, lrintf, rint, rintf):  Redirect exports to alias _f_ versions.
	(llrint, llrintf, llrintl, lrintl, rintl):  Add exports aliasing _f_*
	versions likewise.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR):  Bump.

2007-12-22  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_dev_random): Add dummy_offset member.
	* fhandler_random.cc (fhandler_dev_random::lseek): Fake seeking
	capability as on Linux.

2007-12-20  Eric Blake  <ebb9@byu.net>

	* libc/memmem.cc (memmem): Fix bug when searching for empty string.

2007-12-19  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export wcpcpy, wcpncpy.
	* include/cygwin/version.h: Bump API minor number.

2007-12-16  Christopher Faylor  <me+cygwin@cgf.cx>

	* dtable.cc (POSIX_NAMED_PIPE): New define.
	(POSIX_NAMED_PIPE_LEN): Ditto.
	(dtable::add_archetype): Use crealloc_abort.
	(dtable::init_std_file_from_handle): Specifically detect pipe
	stdin/stdout.  Pass name to build_fh_dev so that proper name is
	recorded.  Use binmode of fh if it is set before using
	get_default_mode.  Set proper read/write access when calling init().
	(handle_to_fn): Handle pipes.
	* fhandler.cc (fhandler_base::wait_overlapped): Add some debugging.
	* fhandler.h (fhandler_base::set_name): Default to just setting the
	path_conv name.
	(fhandler_pipe::init): Declare.
	* pipe.cc (struct pipesync): New struct.
	(getov_result): New function.  Blocks and retrieves the result of an
	overlay I/O operation.
	(pipe_handler): New function.
	(pipesync::pipesync): New function.  Initializer for pipesync struct.
	(handler_pipe::init): Define.  Detects attempts to set up a "native"
	pipe fhandler and creates a thread which accepts input from or output
	to the non-cygwin pipe, creating a cygwin pipe wrapper around the
	non-cygwin pipe.
	(fhandler_pipe::create): Add pipe-specific flags to call to init().

	* exceptions.cc (ctrl_c_handler): Lock process while we determine what
	to do.

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

	* include/cygwin/socket.h: Include sys/uio.h instead of cygwin/uio.h.
	* include/cygwin/uio.h: Remove.

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

	* dtable.cc (dtable::set_file_pointers_for_exec): Reenable.  Fix
	comment.
	* spawn.cc (spawn_guts): Call cygheap->fdtab.set_file_pointers_for_exec
	only for non-Cygwin processes.

2007-12-13  Craig MacGregor  <cmacgreg@gmail.com>
	    Corinna Vinschen  <corinna@vinschen.de>

	* poll.cc (poll): Return count of fds with events instead of total
	event count.

2007-12-13  Corinna Vinschen  <corinna@vinschen.de>

	* string.h: Guard cygwin internal string function definitions with
	__INSIDE_CYGWIN__.

2007-12-12  Corinna Vinschen  <corinna@vinschen.de>

	* dcrt0.cc: Include string.h.
	(initial_env): Use small_printf's %P specifier.
	* dll_init.cc (dll_list::alloc): Use PATH_MAX instead of CYG_MAX_PATH
	for path name buffer size.
	* dll_init.h (struct dll): Ditto.
	* environ.cc: Include string.h.
	(win_env::add_cache): Use temporary local buffer for path conversion.
	(posify): Ditto.
	* exceptions.cc (try_to_debug): Use CreateProcessW to allow long path
	names.
	* miscfuncs.cc: Drop unused implementations of strcasematch and
	strncasematch.
	(ch_case_eq): Drop.
	(strcasestr): Drop.
	(cygwin_wcscasecmp): New function.
	(cygwin_wcsncasecmp): New function.
	(cygwin_strcasecmp): New function.
	(cygwin_strncasecmp): New function.
	(cygwin_wcslwr): New function.
	(cygwin_wcsupr): New function.
	(cygwin_strlwr): New function.
	(cygwin_strupr): New function.
	* ntdll.h (RtlDowncaseUnicodeString): Declare.
	(RtlUpcaseUnicodeString): Declare.
	(RtlInt64ToHexUnicodeString): Fix typo in comment.
	* string.h: Disable not NLS aware implementations of strcasematch
	and strncasematch.
	(cygwin_strcasecmp): Declare.
	(strcasecmp): Define as cygwin_strcasecmp.
	(cygwin_strncasecmp): Declare.
	(strncasecmp): Define as cygwin_strncasecmp.
	(strcasematch):Define using cygwin_strcasecmp.
	(strncasematch):Define using cygwin_strncasecmp.
	(cygwin_strlwr): Declare.
	(strlwr): Define as cygwin_strlwr.
	(cygwin_strupr): Declare.
	(strupr): Define as cygwin_strupr.
	* wchar.h: New file.
	* wincap.cc (wincapc::init): Use "NT" as fix OS string.
	* winsup.h (strcasematch): Drop declaration.
	(strncasematch): Ditto.
	(strcasestr): Ditto.

2007-12-11  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix R/O bit
	handling on filesystems without ACL support.

2007-12-11  Corinna Vinschen  <corinna@vinschen.de>

	* localtime.cc (tzset): Guard by a muto for thread safety.

2007-12-11  Dave Korn  <dave.korn@artimi.com>

	* cygheap.cc (_csbrk):  Don't request zero bytes from VirtualAlloc,
	as windows treats that as an invalid parameter and returns an error.

2007-12-11  Corinna Vinschen  <corinna@vinschen.de>

	* localtime.cc (tzset): Call tzsetwall only if it hasn't been
	called before.

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

	* include/sys/cygwin.h: Include limits.h.

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

	* dcrt0.cc (initial_env): Use PATH_MAX instead of CYG_MAX_PATH for path
	name buffer size.
	(dll_crt0_1): Allocate new_argv0 with PATH_MAX size.
	* exceptions.cc (debugger_command): Set size to 2 * PATH_MAX + 20;
	(error_start_init): Use PATH_MAX instead of CYG_MAX_PATH for path
	name buffer size.
	* external.cc (fillout_pinfo): Always fill out ep.progname 0-terminated.
	Fill out ep.progname_long.
	* fhandler_process.cc (fhandler_process::fill_filebuf): Allocate
	buffer for executable filename with PATH_MAX size.
	* pinfo.cc: Throughout use PATH_MAX instead of CYG_MAX_PATH.
	* pinfo.h (class _pinfo): Set progname size to PATH_MAX.
	* smallprint.cc: Include limits.h.  Use PATH_MAX instead of CYG_MAX_PATH
	for path name buffer size.
	* strace.cc (strace::vsprntf): Ditto.
	* include/sys/cygwin.h (EXTERNAL_PINFO_VERSION_32_LP): Define.
	(EXTERNAL_PINFO_VERSION): Set to EXTERNAL_PINFO_VERSION_32_LP.
	(struct external_pinfo): Add progname_long member.
	* include/sys/dirent.h: Correctly include limits.h instead of
	sys/limits.h.

2007-12-05  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_tty.cc (fhandler_tty_slave::open): Use MAX_PATH instead of
	CYG_MAX_PATH for event name buffer size.
	(fhandler_pty_master::setup): Use MAX_PATH instead of CYG_MAX_PATH for
	mutex name buffer size.
	* netdb.cc: Drop old comment.
	(open_system_file): Set path buffer size to MAX_PATH instead of
	CYG_MAX_PATH.  Drop conversion to posix path.  Open file using win32
	path.

2007-12-05  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_registry.cc: Use NAME_MAX + 1 instead of CYG_MAX_PATH
	throughout for subkey name buffer size.
	* fhandler_socket.cc (search_wsa_event_slot): Use MAX_PATH instead of
	CYG_MAX_PATH for mutex name buffer size.
	(fhandler_socket::init_events): Ditto.
	* fhandler_virtual.cc (fhandler_virtual::opendir): Check path length
	against PATH_MAX instead of against CYG_MAX_PATH.
	* registry.cc (get_registry_hive_path): Use PATH_MAX instead of
	CYG_MAX_PATH for registry value path buffer size.
	* shared.cc (open_shared): Use MAX_PATH instead of CYG_MAX_PATH
	for shared memory name buffer size.
	* thread.cc (semaphore::semaphore): Use MAX_PATH instead of CYG_MAX_PATH
	for semaphore name buffer size.
	* uinfo.cc (cygheap_user::env_userprofile): Use PATH_MAX instead of
	CYG_MAX_PATH for temporary path name buffer size.
	* winf.h (LINE_BUF_CHUNK): Define as MAX_PATH * 2.
	* include/sys/dirent.h: Include sys/limits.h.  Define name buffer sizes
	using NAME_MAX.

2007-12-04  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_fifo.cc (fhandler_fifo::open): Use MAX_NAME for pipe name
	buffer size.
	(fhandler_fifo::fstatvfs): Use same technique as in fhandler_socket.
	* fhandler_proc.cc (format_proc_partitions): Use NAME_MAX+1 for
	device name buffer size.  Use MAX_PATH for device path buffer size.

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

	* autoload.cc (GetModuleFileNameExW): Replace definition of
	GetModuleFileNameExA.
	* fhandler_process.cc (format_process_maps): Change modname type to
	WCHAR.  Set buffer sizes to PATH_MAX.  Call GetModuleFileNameExW
	instead of GetModuleFileNameExA.  Call mount_info::conv_to_posix_path
	instead of cygwin_conv_to_full_posix_path.  Set posix_modname to
	modname if that call fails.
	(format_process_stat): Set cmd buffer size to NAME_MAX + 1.  Simplify
	setting cmd to process name.
	(format_process_status): Ditto.
	* path.cc (mount_info::conv_to_posix_path): Call sys_wcstombs
	correctly.

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

	* include/cygwin/time.h: Remove redundant #endif.

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

	* include/cygwin/time.h (daylight): Declare as extern symbol referring
	_daylight variable.
	(timezone): Only define if __timezonefunc__ is undefined.

2007-12-01  Corinna Vinschen  <corinna@vinschen.de>
	    Brian Dessent <brian@dessent.net>

	* Makefile.in (OBSOLETE_FUNCTIONS): Add timezone.
	* include/cygwin/time.h: Drop conditional timezone definitions.
	(timezone): Declare as extern symbol referring _timezone variable.

2007-11-28  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_tape.cc (mtinfo::initialize): Use MAX_PATH instead of
	CYG_MAX_PATH.
	* fhandler_tty.cc (fhandler_pty_master::ptsname): Set buffer size to
	TTY_NAME_MAX.
	* syscalls.cc (ttyname): Eliminate the `+ 1' from the name buffer size
	since TTY_NAME_MAX already counts the trailing NUL.
	* libc/bsdlib.cc (openpty): Set pts buffer size to TTY_NAME_MAX.

2007-11-28  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::recv_internal): Add MSG_WAITALL
	handling.  Use explicit flag values instead of MSG_WINMASK.
	(fhandler_socket::send_internal): Use explicit flag values instead of
	MSG_WINMASK.
	* include/cygwin/socket.h (MSG_WINMASK): Remove definition.
	(MSG_WAITALL): Define.

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

	* posix_ipc.cc (ipc_names): Rename max_len to prefix_len.  Store
	the prefix len in it.
	(check_path): Take length parameter.  Use this length insetad of
	calling strlen.  Allow PATH_MAX length paths.
	(ipc_mutex_init): Use MAX_PATH instead of CYG_MAX_PATH.
	(ipc_cond_init): Ditto.
	(shm_open): Allocate local name buffer not bigger than necessary.  Call
	check_path with additional length argument.
	(shm_unlink): Ditto.
	(mq_open): Ditto.
	(mq_unlink): Ditto.
	(sem_open): Ditto.
	(sem_unlink): Ditto.

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

	Drop old SetResourceLock stuff in favor of mutos.
	* dcrt0.cc (_reslock): Remove.
	(__cygwin_user_data): Accommodate removal of resourcelocks member.
	(dll_crt0_0): Don't initialize resourcelocks.
	* exceptions.cc (_cygtls::signal_exit): Drop resourcelocks handling.
	* mmap.cc (mmap_guard): New muto.
	(LIST_LOCK): Define.
	(LIST_UNLOCK): Define.
	(mmap_list::search_record): Remove.
	(mmap_list::try_map): Include code for anonymous case from
	mmap_list::search_record.
	(mmap_is_attached_or_noreserve): Access bookkeeping lists in a thread
	safe way.
	(mmap64): Replace SetResourceLock/ReleaseResourceLock by
	LIST_LOCK/LIST_UNLOCK.  Lock at the latest possible point.
	(munmap): Replace SetResourceLock/ReleaseResourceLock by
	LIST_LOCK/LIST_UNLOCK.
	(msync): Ditto.
	(mprotect): Ditto.
	* thread.cc (ResourceLocks::Lock): Remove.
	(SetResourceLock): Remove.
	(ReleaseResourceLock): Remove.
	(ResourceLocks::Init): Remove.
	(ResourceLocks::Delete): Remove.
	* thread.h (SetResourceLock): Drop declaration.
	(ReleaseResourceLock): Ditto.
	(class ResourceLocks): Drop definition.
	* include/sys/cygwin.h (class ResourceLocks): Drop forward declaration.
	(struct per_process): Replace resourcelocks with additional unused2
	element.
	(per_process_overwrite): Accommodate above change.

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

	* mmap.cc: Convert usage of dynamically growing cmalloced arrays to
	cmalloced linked lists throughout.
	(class mmap_record): Add LIST_ENTRY element.
	(mmap_record::match): New method, taking over match algorithm from
	list::search_record.
	(class mmap_list): Rename from class list.  Add LIST_ENTRY.  Convert
	recs to a LIST_HEAD.  Drop nrecs and maxrecs members.
	(mmap_list::get_record): Drop entirely.
	(mmap_list::free_recs): Drop entirely.
	(mmap_list::del_record): Take mmap_record to delete as parameter.
	(mmap_list::search_record): Convert to mmap_record::match.
	(class mmap_areas): Rename from class map.  Convert lists to LIST_HEAD.
	(mmap_areas::get_list): Drop entirely.
	(mmap_areas::del_list): Take mmap_list to delete as parameter.
	(mprotect): Fix indentation.

2007-11-26  Christopher Faylor  <me+cygwin@cgf.cx>

	Change many cygheap allocation routines to their *_abort analogs.
	* cygheap.cc (cmalloc_abort): New function.
	(crealloc_abort): Ditto.
	(ccalloc_abort): Ditto.

2007-11-23  Christopher Faylor  <me+cygwin@cgf.cx>

	* cygheap.cc (_crealloc): Avoid memcpy when _cmalloc returns NULL.

2007-11-08  Christopher Faylor  <me+cygwin@cgf.cx>

	* dllfixdbg: Eliminate extra objcopy step.

2007-11-07  Pedro Alves  <pedro_alves@portugalmail.pt>

	* dllfixdbg: Pass --only-keep-debug to objcopy, instead of
	selecting the sections manually.

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

	* thread.cc (pthread_key_create): Drop check for incoming valid object.

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

	* shm.cc: Include sync.h
	(struct shm_shmid_list): Add ref_count member.
	(struct shm_attached_list): Remove hdl and size members.  Add a parent
	member pointing to referenced shm_shmid_list entry.
	(shm_guard): New muto.
	(SLIST_LOCK): Define.
	(SLIST_UNLOCK): Define.
	(fixup_shms_after_fork): Use hdl and size members of parent
	shm_shmid_list entry.
	(shmat): Access sequential bookkeeping lists in a thread safe way.
	Accommodate change in list element layout.  Align comments.
	(shmctl): Ditto.
	(shmdt): Ditto.
	(shmget): Ditto.

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

	* shm.cc (shmctl): On IPC_RMID don't unmap views and don't close handle
	if the map is still referenced to emulate Linux and BSD behaviour.

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

	* shm.cc (shmctl): On IPC_RMID also unmap all views on shared mem
	as well as connected shm_attached_list entry.

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

	* net.cc (load_ipv6_funcs): Use MAX_PATH instead of CYG_MAX_PATH.
	(cygwin_getaddrinfo): Simplify formatting.
	(cygwin_getnameinfo): Ditto.

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

	* external.cc (get_cygdrive_info): Make inline.
	(get_cygdrive_prefixes): Remove.
	(cygwin_internal): Call get_cygdrive_info with NULL flag parameters
	instead of get_cygdrive_prefixes.
	* path.cc (mount_info::get_cygdrive_info): Allow NULL flag parameters.

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

	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Don't remove
	write bits for directories with R/O attribute.
	(fhandler_base::fhaccess): Don't shortcircuit R/O attribute with W_OK
	scenarios for directories.

2007-10-22  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.h (struct cwdstuff): Drop hash member.  Drop get_hash,
	get_initial, and fixup_after_exec declarations.
	Convert win32 to UNICODE_STRING.
	(cwdstuff::get_drive): Convert win32 path in current codepage.
	(cwdstuff::set): Take native NT path.
	* ntdll.h (struct _TEB): Typedef.
	* path.cc (mount_info::conv_to_posix_path): Add variant taking
	wide char DOS paths.
	(symlink_info::posixify): Simplify concatenating cwd and relative path.
	(hash_path_name): Drop special relative path handling.
	(chdir): Drop special "drive only" handling.  Call cwdstuff::set with
	native path.
	(cwdstuff::get_hash): Remove.
	(windows_system_directory): Remove.
	(_upp): Remove.
	(get_user_proc_parms): Make inline.  Get PEB pointer by calling
	NtCurrentTeb.
	(cwdstuff::init): Simplify.
	(cwdstuff::set): Rework to handle incoming native NT path.  Workaround
	a Vista problem with CWD handle in the user process parameter block.
	(cwdstuff::get): Simplify locking.  Accommodate type change of win32.
	* shared_info.h (mount_info): Add declaration for new conv_to_posix_path
	method.
	* strfuncs.cc (sys_wcstombs): Return correct length of created
	multi-byte string.

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

	* fhandler_disk_file.cc (__DIR_mounts::eval_ino): Make fname big enough
	to allow multibyte chars.

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

	* fhandler.cc (fhandler_base::open): Open native symlinks with
	FILE_OPEN_REPARSE_POINT flag.  Fix typo in comment.

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

	* include/sys/param.h (MAXPATHLEN): Define as PATH_MAX.

2007-10-14  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (is_at_eof): Rewrite using NT functions.
	(off_current): New static variable.
	(off_append): Ditto.
	(fhandler_base::raw_write): Use NtWriteFile.  Accommodate O_APPEND here.
	(fhandler_base::write): Drop O_APPEND hack.  Use NT functions.
	(fhandler_base::lseek): Rewrite using NT functions.
	* fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Add space in
	debug output.
	(fhandler_disk_file::ftruncate): Ditto.
	* ntdll.h (STATUS_DISK_FULL): Define.
	(FILE_USE_FILE_POINTER_POSITION): Define.
	(FILE_WRITE_TO_END_OF_FILE): Define.

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

	* ntdll.h (STATUS_END_OF_FILE): Define.
	* path.cc (symlink_info::check_shortcut): Use NT function to get file
	size.  Reintroduce checking file size before reading it.  Eliminiate
	close_it label.
	(symlink_info::check_sysfile): Check for EOF condition.

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

	* path.cc (basename): Return pointer into the path argument itself.
	Shrink buf to 4 bytes.  Use buf only for border cases.
	(dirname): Ditto.

2007-10-10  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (struct symlink_info): Change size of contents member to
	be able to keep SYMLINK_MAX sized strings.
	(symlink_worker): Rework for long path names.  When writing windows
	shortcuts, store pathname additionally "hidden" after the actual
	shortcut data to workaround size limitations of the description field.
	(symlink_info::check_shortcut): Drop file name parameter.  Drop max
	file size check.  Use NT functions.  Use appended full path if
	available, description otherwise.  Check symlink string length for
	not exceeding SYMLINK_MAX.  Don't close file here.
	(symlink_info::check_sysfile): Drop file name parameter.  Use NT
	functions.  Check symlink string length for not exceeding SYMLINK_MAX.
	Don't close file here.
	(symlink_info::check_reparse_point): Drop file name parameter.  Drop
	useless length checks.  Allow SYMLINK_MAX length symlink strings.
	Don't close file here.
	(symlink_info::posixify): Allow SYMLINK_MAX length symlink strings.
	(symlink_info::check): Turn around checking for symlink file attributes.
	Use NT functions.  Close symlink file here.
	* include/limits.h (PATH_MAX): Define as 32760.  Change comment.
	(SYMLINK_MAX): Define as PATH_MAX - 1.

2007-10-10  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::bind): Open file for deletion,
	too.  Don't write to file and especially don't close handle if file
	couldn't be created.  Set delete disposition if writing failed,
	instead of calling unlink_nt.

2007-09-27  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (struct _FILE_COMPRESSION_INFORMATION): Align with definition
	in w32api / MSDN.
	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Accommodate
	change to struct _FILE_COMPRESSION_INFORMATION.

2007-09-26  Corinna Vinschen  <corinna@vinschen.de>

	* termios.cc (setspeed): Support new baud rates introduced 2007-02-05.

2007-09-20  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (STATUS_OBJECT_NAME_INVALID): Define.

2007-09-18  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (fh_disk_file): Delete as global static variable and...
	(mmap64): ...define as local pointer to make mmap thread-safe.
	Accommodate throughout.  Only initialize fh_disk_file after file could
	be opened with GENERIC_EXECUTE access.  Call fstat_by_handle instead of
	fstat to avoid overhead.

2007-09-18  Corinna Vinschen  <corinna@vinschen.de>

	* security.cc (set_file_sd): Open file with FILE_OPEN_FOR_BACKUP_INTENT
	too.

2007-09-17  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (symlink_info::check): Check for STATUS_OBJECT_NAME_INVALID.
	Add comment.

2007-09-17  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (fhandler_base::open): Partly revert change from
	2007-08-24:  Call has_acls to avoid permission problems getting
	a handle to a file on a remote share.  Add comment.

2007-09-08  Brian Dessent  <brian@dessent.net>

	* include/cygwin/config.h: Conditionalize inline __getreent()
	definition on _COMPILING_NEWLIB.

2007-09-06  Brian Dessent  <brian@dessent.net>

	* include/cygwin/config.h (__getreent): Define inline version.

2007-09-06  Brian Dessent  <brian@dessent.net>

	* include/sys/stdio.h (_flockfile): Don't try to lock a FILE
	that has the __SSTR flag set.
	(_ftrylockfile): Likewise.
	(_funlockfile): Likewise.

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

	* syscalls.cc (open): Don't follow symlinks if O_EXCL is given.

2007-08-23  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (STATUS_NO_SUCH_FILE): Define.
	* path.cc (get_nt_native_path): Reset upath.Length to 0 on each
	invocation.
	(symlink_info::check): Use NT native functions.

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

	* uinfo.cc (pwdgrp::load): Use NT native functions.

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

	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Rewrite checking
	for executable file magic using a thread safe method and re-enable this
	code.

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

	* syscalls.cc (unlink_nt): Drop one local FILE_BASIC_INFORMATION struct.

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

	* ntdll.h (NtNotifyChangeDirectoryFile): Declare.
	(NtQueryAttributesFile): Move to maintain alphabetical order of
	declarations.  Add comment to note that timestamp information returned
	by NtQueryAttributesFile is unreliable.
	* path.h (etc::changed_h): Move here.
	(etc::fn): Change type to OBJECT_ATTRIBUTES.
	(etc::last_modified): Change type to LARGE_INTEGER.
	(etc::init): Take PUNICODE_STRING as second argument.
	* path.cc: Accomodate above changes.
	(etc::test_file_change): Use NT native functions.
	(etc::dir_changed): Ditto.
	* uinfo.cc (pwdgrp::load): Call etc::init with NT native path.

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

	* fhandler_disk_file.cc: Change debugging output througout to print
	the NT status consistently.  Use UNICODE path information if available.

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

	* hookapi.cc (ld_preload): Call LoadLibraryW.
	* path.h (path_conv::get_wide_win32_path_len): Define.

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

	* fhandler.cc (rootdir): Delete.
	* winsup.h (rootdir): Drop declaration.

2007-08-19  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (fillout_mntent): Append backslash to drive-only paths before
	calling fs_info::update.
	* path.h (fs_info::clear): Simplify.
	(fs_info::fs_info): Add constructor.

2007-08-17  Corinna Vinschen  <corinna@vinschen.de>

	* spawn.cc (spawn_guts): Fix typo in comment.

2007-08-17  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (CloseDesktop): Define.
	(CreateDesktopA): Define.
	(SetThreadDesktop): Define.
	* spawn.cc (spawn_guts): When starting a process under another user
	account, don't open up permissions on current window station and
	desktop.  Instead, if not in interactive session, create a new per-user
	window station plus default desktop and use that for the child process.

2007-08-16  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Handle S_IFSOCK
	mode bit by setting the SYSTEM attribute.
	* fhandler_socket.cc (fhandler_socket::fchmod): Add S_IFSOCK mode bit
	when calling fhandler_disk_file::fchmod.  Don't set attributes here.

2007-08-16  Corinna Vinschen  <corinna@vinschen.de>

	* path.h (path_conv::operator char *): Delete.
	(path_conv::operator const char *): Delete.
	* dlfcn.cc: Throughout, replace path_conv::operator char * and
	path_conv::operator const char * by call to path_conv::get_win32
	for easier transition to UNICODE_PATHs.
	* fhandler_socket.cc: Ditto.
	* hookapi.cc: Ditto.
	* path.cc: Ditto.
	* spawn.cc: Ditto.
	* syscalls.cc: Ditto.
	* uinfo.cc: Ditto.

2007-08-16  Corinna Vinschen  <corinna@vinschen.de>

	* dir.cc (readdir_worker): Convert w32name to PUNICODE_STRING.
	* sec_acl.cc (getacl): Convert debug output to print native NT path.
	* security.cc (set_file_attribute): Ditto.
	* syscalls.cc (try_to_bin): Ditto and fix buggy debug statement.

2007-08-16  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (RtlAcquirePebLock): Declare.
	(RtlReleasePebLock): Declare.
	* path.cc (cwdstuff::set): Change PEB only while it's locked.

2007-08-16  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (fhandler_base::get_namehash): Use NT native path.
	* fhandler_disk_file.cc (readdir_get_ino): Ditto in call to
	hash_path_name.

2007-08-16  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (RtlCreateUnicodeStringFromAsciiz): Fix declaration.
	(RtlUpcaseUnicodeChar): Declare.
	* path.cc (hash_path_name): Split into three functions, taking
	the path as char *, PWCSTR, or PUNICODE_STRING.  Move implementation
	into PUNICODE_STRING-based function.  Drop old drive-relative path
	consideration.
	* winsup.h (iswdirsep): Like isdirsep but for WCHARs.
	(isabspath_u): Like isabspath, for PUNICODE_STRINGs.
	(iswabspath): Like isabspath, for PWCHARs.
	(hash_path_name): Add new declarations.

2007-08-15  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (get_nt_native_path): Allow to convert special paths which
	have no native NT path representation for simplified debug output.
	* syscalls.cc: Convert debug output to print native NT path.
	(unlink): Drop redundant debug output.

2007-08-15  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::link): Drop superfluous
	test for trailing dot.
	* path.h (path_conv::operator []): Remove.

2007-08-15  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (get_inet_addr): Use NT native functions for
	accessing the file representing the local socket.
	(fhandler_socket::bind): Ditto.
	* ntdll.h: Declare NtReadFile.

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

	* path.cc (symlink_info::check): In case of ERROR_SHARING_VIOLATION and
	ERROR_ACCESS_DENIED, try to get file attributes by using directory
	functions.

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

	* path.cc (fs_info::update): Correctly handle the volume root directory.

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

	* fhandler.h (fhandler_base::pc): Make public.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Drop extern
	declaration of stat_suffixes.  Use NT native path in debug output.
	(fhandler_base::utimes_fs): Simplify closeit case.  Use close_fs
	to close newly opened file handle.
	(fhandler_base::open_fs): Use NT native path in debug output.
	* path.cc: Throughout drop extern declaration of stat_suffixes.
	* path.h (stat_suffixes): Declare.
	* sec_acl.cc (acl_worker): Drop extern declaration of stat_suffixes.
	* times.cc (utimes_worker): Take path_conv as parameter instead of
	single-byte pathnam, drop nofollow argument, accommodate throughout.
	Compare UNICODE paths when enumerating file descriptors.  Fix
	formatting.  Use NT native path in debug output.

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

	* mmap.cc: Call NtClose instead of CloseHandle throughout.
	(CreateMapping): Drop unused last argument.  Accommodate throughout.
	(mmap64): Re-open file with execute permissions using NtOpenFile.

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

	* fhandler.h (fhandler_base::close_fs): Reintroduce (as inline function)
	for clearness.
	* fhandler_disk_file.cc (fhandler_base::fstat_fs): Revert previous
	change.
	(fhandler_base::open_fs): Ditto.
	* fhandler_socket.cc (fhandler_socket::close): Ditto.

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

	* Makefile.in (DLL_OFILES): Remove delqueue.o.
	* delqueue.cc: Delete.
	* fhandler.h (fhandler_base::close_fs): Drop declaration.
	(fhandler_disk_file::close): Drop declaration.
	* fhandler_disk_file.cc (fhandler_base::fstat_fs): Call close instead of
	close_fs.
	(fhandler_base::fstat_helper): Use open FH_UNIX handle in call to
	get_file_attribute.
	(fhandler_base::open_fs): Call close instead of get_file_attribute.
	(fhandler_disk_file::close): Remove.
	(fhandler_base::close_fs): Remove.
	* fhandler_socket.cc (fhandler_socket::close): Just call
	fhandler_base::close for FH_UNIX sockets.
	* shared.cc (user_shared_initialize): Drop call to
	user_shared->delqueue.init.
	* shared_info.h (CURR_USER_MAGIC): Change according to below change.
	(MAX_DELQUEUES_PENDING): Remove.
	(class delqueue_list): Remove.
	(class user_info): Remove delqueue.
	* syscalls.cc (close_all_files): Drop call to
	user_shared->delqueue.process_queue.
	(unlink): Drop delqueue handling.

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

	* devices.in (dev_storage): Use native NT device name for kmsg mailslot.
	* devices.cc: Regenerate.
	* fhandler.cc (fhandler_base::operator =): Use path_conv assignment
	operator.
	(fhandler_base::set_name): Ditto.
	(fhandler_base::open): Use NT native path in debug output.
	* fhandler_mailslot.cc: Convert to NT native function calls.
	* ntdll.h (struct _FILE_MAILSLOT_SET_INFORMATION): Define.
	(NtCreateMailslotFile): Declare.
	* path.cc (path_conv::set_normalized_path): Don't set wide_path to NULL.
	(path_conv::set_name): Remove unused function.
	* path.h (path_conv::set_name): Drop declaration.
	(path_conv::operator =): Define.

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

	* fhandler.cc (fhandler_base::open): Remove HIDDEN_DOT_FILES code.
	* fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto.
	* path.cc (symlink_worker): Ditto.

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

	* syscalls.cc (getw): Remove redundant implementation.
	(putw): Ditto.
	(wcscmp): Ditto.
	(wcslen): Ditto.
	(memccpy): Ditto.

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

	* ntdll.h: Add descriptive comments to special Rtl functions.
	(STATUS_OBJECT_PATH_NOT_FOUND): Define.
	(STATUS_BUFFER_OVERFLOW): Define.
	(FILE_SUPERSEDED): Define.
	(FILE_OPENED): Define.
	(FILE_CREATED): Define.
	(FILE_OVERWRITTEN): Define.
	(FILE_EXISTS): Define.
	(FILE_DOES_NOT_EXIST): Define.
	(PIO_APC_ROUTINE): Typedef.
	(NtFsControlFile): Fix parameter types to use PIO_APC_ROUTINE.
	(NtWriteFile): Declare.
	(RtlInt64ToHexUnicodeString): Declare.
	* strfuncs.cc: Include ntdll.h.
	(RtlInt64ToHexUnicodeString): New function.
	* syscalls.cc (try_to_bin): Rewrite using native NT functions.
	Only try to create recycle bin after unsuccessfully trying to move
	file.  Also try to create special files in recycle bin so that Windows
	Explorer isn't unnecessarily stampeded.

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

	* path.cc (fillout_mntent): Fix calculation of unicode buffer size.

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

	* syscalls.cc (rename): Check oldpath and newpath for trailing dir
	separators, require them to be existing directories if so.  Check
	for a request to change only the case of the filename.  Check paths
	for case insensitve equality only once.  Handle renaming a directory
	to another, existing directory by unlinking the destination directory
	first.  If newpath points to an existing file with R/O attribute set,
	try to unset R/O attribute first.  Augment hardlink test by not
	checking directories.  If renaming fails with STATUS_ACCESS_DENIED,
	try to unlink existing destination filename and try renaming again.
	Drop useless test for non-empty directory.  Always close fh at the
	end of the function.

2007-08-09  Ernie Coskrey  <Ernie.Coskrey@steeleye.com>

	* gendef (sigbe): Reset "incyg" while the stack lock is active to avoid
	a potential race.

2007-08-09  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (rename): Close oldpath file handle immediately after
	trying to rename it.  Use nfh handle when checking for non-empty
	newpath directory.  Only change status if check_dir_not_empty really
	returns STATUS_DIRECTORY_NOT_EMPTY.

2007-08-02  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (readdir_get_ino): Accommodate native symlinks.
	* syscalls.cc (rename): Ditto.

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

	* lib/Makefile: Add missed file to accommodate below changes.

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

	* lib/cygwin_attach_dll.c: Fix compiler warning.
	* lib/cygwin_crt0.c: Ditto.

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

	* dcrt0.cc (codepage_type): Remove definition.
	* strfuncs.cc: Move it here.  New file with bits of miscfuncs.cc.
	* miscfuncs.cc: Remove wide character stuff.

2007-08-02  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (rename): Move and add text to comment about testing
	oldpath and newpath referring to the same file.  Test if oldpath
	has more than one hardlink before opening oldpath (idea by Eric Blake).
	Reorder test so that file id is tested before volume serial number.  

2007-08-02  Corinna Vinschen  <corinna@vinschen.de>

	* path.h (struct fs_info): Drop root_len and name_hash members.
	(fsinfo::length): Remove.
	(path_conv::rootdir): Remove.
	* syscalls.cc (try_to_bin): Use rootdir function instead of
	path_conv::rootdir method.

2007-08-02  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (path_conv::ndisk_links): Fix typo in call to
	NtClose.

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

	* syscalls.cc (rename): Check if oldpath and newpath refer to the
	same file.  If so, return successfully and perform no other action,
	as per SUSv3.

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

	* ntdll.h (STATUS_ACCESS_DENIED): Define.
	* syscalls.cc (check_dir_not_empty): New static function.
	(unlink_nt): Move code checking for non-empty dir to check_dir_not_empty
	and call check_dir_not_empty instead.
	(rename): Add fault handler.  Check oldpath and newpath for trailing
	. and .. path components and return EINVAL if so.  Check oldpath
	for being on a vrtual file system.  If renaming a dir fails with
	STATUS_ACCESS_DENIED, check if the target dir is non-empty and return
	ENOTEMPTY if so.

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

	* localtime.cc (tzsetwall): Don't set TZ.

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

	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop
	usage of path_conv::volser().
	(fhandler_base::fstat_by_name): Ditto.
	* ntdll.h (STATUS_NO_MEDIA_IN_DEVICE): Define.
	(STATUS_OBJECT_NAME_NOT_FOUND): Define.
	(FILE_REMOVABLE_MEDIA, FILE_READ_ONLY_DEVICE, FILE_FLOPPY_DISKETTE)
	(FILE_WRITE_ONCE_MEDIA, FILE_REMOTE_DEVICE, FILE_DEVICE_IS_MOUNTED)
	(FILE_VIRTUAL_VOLUME, FILE_AUTOGENERATED_DEVICE_NAME)
	FILE_DEVICE_SECURE_OPEN): Define Device Characteristics.
	(struct _FILE_FS_DEVICE_INFORMATION): Define.
	* path.cc (MAX_FS_INFO_CNT): Remove.
	(fsinfo): Remove.
	(fsinfo_cnt): Remove.
	(fs_info::update): Rewrite using native NT functions.  Drop fs_info
	cashing since it's incorrect.
	(path_conv::fillin): Use NtQueryInformationFile.  Drop setting serial
	number.
	(path_conv::check): Accommodate new fs_info::update parameters.
	(fillout_mntent): Ditto.
	* path.h (fs_info): Drop serial, has_ea and drive_type status
	flags.
	(fs_info::update): Declare with new parameters.
	(path_conf::drive_type): Remove.
	(path_conf::fs_has_ea): Remove.
	(path_conf::volser): Remove.

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

	* fhandler.cc (check_posix_perms): Remove.
	(fhandler_base::fpathconf): Return value of pc.has_acls () instead
	of calling check_posix_perms.

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

	* syscalls.cc (rename): Use unchanged path_conv in condition.

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

	* smallprint.cc (__small_vsprintf): Add format specifier 'W' for
	PWCHAR arguments.  Move wide char handling after char handling.

2007-07-31  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (RtlFreeAnsiString): Declare.
	* ntdll.h (RtlFreeOemString): Declare.
	* ntdll.h (RtlUnicodeStringToAnsiString): Declare.
	* ntdll.h (RtlUnicodeStringToOemString): Declare.
	* smallprint.cc: Renamed from smallprint.c.  Drop unnecessary
	forward declarations.
	(__small_vsprintf): Add format specifiers 'C' for WCHAR arguments
	and 'S' for PUNICODE_STRING arguments.

2007-07-31  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::link): Revert to checking
	for binary in case of .exe files.
	* ntdll.h (RtlPrefixUnicodeString): Declare.
	* path.cc (path_conv::is_binary): New method.
	* path.h (path_conv::is_binary): Declare.
	* syscalls.cc (rename_append_suffix): New static helper function for
	rename.
	(rename): Rewrite.  New suffix tests.  Use native NT functions.

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

	* fhandler_disk_file.cc (fhandler_disk_file::facl): If file can't be
	opened for reading the ACLs, fall back to faking them.
	* sec_acl.cc (acl_worker): Handle non-existing files.
	* security.cc (get_file_attribute): Return ILLEGAL_UID/ILLEGAL_GID
	as owner/group for non-readable ACLs on file systems supporting them.

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

	* syscalls.cc (stat_worker): Don't call build_fh_pc with invalid pc.

2007-07-29  Christopher Faylor  <me+cygwin@cgf.cx>

	* fhandler.cc (fhandler_base::wait_overlapped): Handle read EOF better
	and issue a SIGPIPE when we get ERROR_NO_DATA.

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

	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't allow
	FileAttributes set to 0 when calling NtSetInformationFile since it has
	a special meaning.
	(fhandler_disk_file::facl): Ditto.
	(fhandler_disk_file::link): Only set attributes after copying files.
	Use SetFileAttributesW.
	* syscalls.cc (unlink_nt): Only care for actual FILE_ATTRIBUTE_READONLY.
	Don't allow FileAttributes set to 0 when calling NtSetInformationFile.
	After marking for deletion, restore R/O attribute on files to
	accommodate hardlinks.

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

	* fhandler_disk_file.cc (fhandler_disk_file::link): Use FILE_ANY_ACCESS.
	(fhandler_base::utimes_fs): Fix white space.
	(fhandler_disk_file::lock): Remove 9x blurb from comment.
	(fhandler_disk_file::mkdir): Use NtCreateFile/NtClose instead of
	CreateDirectoryA.
	(fhandler_disk_file::rmdir): Accommodate changes to unlink_nt.
	Simplify post-delete SMB-related tests.  Use NtQueryAttributesFile
	instead of GetFileAttributes.
	* ntdll.h (STATUS_DIRECTORY_NOT_EMPTY): Define.
	(NtQueryAttributesFile): Declare.
	* syscalls.cc (unlink_nt): Return NTSTATUS.  Drop setattrs parameter.
	Never use FILE_DELETE_ON_CLOSE, always use
	NtSetInformationFile(FileDispositionInformation) instead.
	Check for R/O attributes and open file with FILE_WRITE_ATTRIBUTES
	access if any of them are set.  Remove R/O attributes before
	marking for delete if necessary.  Revert them afterwards if necessary.
	(unlink): Accommodate changes to unlink_nt.

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

	* fhandler_disk_file.cc: Use get_handle throughout.
	(fhandler_disk_file::fchmod): Always try to open file with required
	access rights.  Use NtSetInformationFile instead of SetFileAttributes.
	(fhandler_disk_file::facl): Use NtSetInformationFile instead of
	SetFileAttributes.
	(fhandler_base::utimes_fs): Change lastaccess and lastwrite to
	LARGE_INTEGER.  Drop 9x directory case.  Use NtSetInformationFile
	instead of SetFileAttributes.  Drop temporarily changing R/O attribute
	since NtSetInformationFile(FileBasicInformation) also works on R/O
	files.
	* ntdll.h (STATUS_NOT_SUPPORTED): Define.

2007-07-29  Christopher Faylor  <me+cygwin@cgf.cx>

	* cygtls.h (_cygtls::inside_kernel): Move function declaration into
	_cygtls class.
	* exceptions.cc (_cygtls::inside_kernel): Move function definition into
	_cygtls class.

	* fhandler.cc (fhandler_base::wait_overlapped): Make return tri-state
	to detect when there is a EINTR situation.  Add a pointer to a length
	parameter.  Move GetOverlappedResult into this function.
	(fhandler_base::read_overlapped): Accommodate above changes and loop if
	we receive a restartable signal.
	(fhandler_base::write_overlapped): Ditto.
	* fhandler.h (fhandler_base::wait_overlapped): Reflect above changes.
	* fhandler_fifo.cc (fhandler_fifo::wait): Ditto.

2007-07-28  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (RtlEqualUnicodePathPrefix): Rename from RtlEqualPathPrefix.
	(RtlEqualUnicodePathSuffix): Rename from RtlEqualPathSuffix.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Accommodate above
	change.

2007-07-28  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (RtlInitCountedUnicodeString): Swap order of string and length
	parameters to be the same as for RtlInitEmptyUnicodeString.
	(RtlEqualPathPrefix): New inline function.
	(RtlEqualPathSuffix): New inline function.
	* fhandler_disk_file.cc: Accommodate parameter order change of
	RtlInitEmptyUnicodeString throughout.
	(fhandler_disk_file::link): Do path checking in unicode.  Call
	CopyFileW instead of CopyFileA.

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

	* autoload.cc (CreateHardLinkA): Remove.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Drop GetBinaryType
	test.  Just check exe suffix instead.  Tune creating new file name.
	Implement creating hard link using native NT functions which works
	on all platforms.
	* ntdll.h (STATUS_INVALID_DEVICE_REQUEST): Define.
	(struct _FILE_LINK_INFORMATION): Define.

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

	* fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Use
	NtQueryInformationFile instead of GetFileSize, NtFsControlFile instead
	of DeviceIoControl.

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

	* fhandler_disk_file.cc (fhandler_base::fstat_by_name): Use
	RtlSplitUnicodePath.
	(fhandler_disk_file::fstat): Rename oret to opened.  Open file using NT
	functions right here.  Try to open parent dir instead of root directory
	to avoid call to rootdir.  Use NtFsControlFile.
	* ntdll.h (RtlSplitUnicodePath): Define.

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

	* fhandler_disk_file.cc (is_volume_mountpoint): New static inline
	function.
	(path_conv::ndisk_links): Call is_volume_mountpoint.
	(fhandler_disk_file::readdir_helper): Ditto.

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

	* fhandler.h (enum query_state): Drop redundant query_stat_control.
	* fhandler.cc (fhandler_base::open): Ditto.  Add READ_CONTROL to
	access and FILE_OPEN_FOR_BACKUP_INTENT to create_options when opening
	for writing.  Always set security attributes to avoid calling
	has_acls.
	* fhandler_disk_file.cc (fhandler_base::fstat_fs): Don't try to
	open file twice.

2007-07-26  Corinna Vinschen  <corinna@vinschen.de>

	* dir.cc (readdir_worker): Drop dir parameter from call to
	readdir_get_ino.
	* fhandler.h (fhandler_disk_file::readdir_helper): Switch file name
	parameter to PUNICODE_STRING.
	* fhandler_disk_file.cc: Drop including ntdef.h.
	(class __DIR_mounts): Store mount points in UNICODE.  Additionally
	store cygdrive prefix in unicode here.  Change methods accordingly.
	(__DIR_mounts::eval_ino): Call new stat_worker instead of lstat64.
	(__DIR_mounts::~__DIR_mounts): New destructor to free UNICODE buffers.
	(path_conv::ndisk_links): Rewrite using native NT functions.
	(fhandler_base::fstat_by_handle): Use NAME_MAX instead of CYG_MAX_PATH.
	Always set pfvi->VolumeSerialNumber to non-0.  Remove last resort
	code.
	(fhandler_base::fstat_by_name): Rewrite using native NT functions.
	(fhandler_base::fstat_fs): Always call fstat_by_name if fstat_by_handle
	fails.
	(fhandler_base::fstat_helper): Rely on dwVolumeSerialNumber.
	(fhandler_disk_file::facl): Call fstat_by_name if fstat_by_handle fails.
	(DIR_BUF_SIZE): Define using NAME_MAX instead of CYG_MAX_PATH.
	(__DIR_cache): Remove __name.
	(d_dirname): Remove.
	(fhandler_disk_file::opendir): Drop pathname length check.
	Remove outdated comment.  Use get_name method instead of accessing
	pc.normalized_path directly.
	(readdir_get_ino): Drop unused dir parameter.  Accomodate throughout.
	Allocate fname dynamically.  Call new stat_worker instead of lstat64.
	Call NtOpenFile instead of CreateFile.  Call NtClose instead of
	CloseHandle.
	(fhandler_disk_file::readdir_helper): Use native NT functions.
	Check for volume mount points and use correct inode number.
	(fhandler_disk_file::readdir): Simplify slightly.
	Use get_name instead of pc.normalized_path.
	(fhandler_disk_file::rewinddir): Use RtlInitUnicodeString.
	(fhandler_cygdrive::fstat): Ignore floppy drives.  Set st_nlink
	correctly.
	(fhandler_cygdrive::readdir): Ignore floppy drives.
	* fhandler_netdrive.cc (fhandler_netdrive::readdir): Accommodate
	change to readdir_get_ino.
	* fhandler_proc.cc (PROC_DIR_COUNT): Define.
	(fhandler_proc::fstat): Evaluate correct link count for /proc.
	* ntdll.h (struct _FILE_DIRECTORY_INFORMATION): Define.
	(NtFsControlFile): Declare.
	(RtlAppendUnicodeToString): Declare.
	(RtlAppendUnicodeStringToString): Declare.
	(RtlCompareUnicodeString): Declare.
	(RtlCopyUnicodeString): Declare.
	(RtlCreateUnicodeStringFromAsciiz): Declare.
	(RtlEqualUnicodeString): Declare.
	(RtlFreeUnicodeString): Declare.
	(RtlInitEmptyUnicodeString): Declare.
	(RtlSecondsSince1970ToTime): Declare.
	(RtlInitEmptyUnicodeString): Define as inline function.
	(RtlInitCountedUnicodeString): Define as inline function.
	* path.cc (path_conv::check): New method with PUNICODE_STRING as path,
	preliminary implementation.
	(mount_info::get_mounts_here): Change to create UNICODE_STRINGs.
	Also copy cygpath prefix into UNICODE_STRING.
	(is_floppy): Drop 9x consideration.
	* path.h: Drop including ntdef.h.
	(path_conv::check): Add declaration.
	(path_conv::path_conv): Add constructor for UNICODE_STRING paths.
	* shared_info.h (mount_info::get_mounts_here): Change declaration.
	* syscalls.cc: Drop forward declaration of stat_worker.
	(stat_worke): Take path_conv as parameter.  Drop nofollow flag.
	(stat64): Create matching path_conv and call stat_worker with it.
	(lstat64): Ditto.
	* winsup.h: Include ntdef.h.
	(stat_worker): Declare.
	(readdir_get_ino): Change declaration.

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

	* autoload.cc (CreateToolhelp32Snapshot): Remove.

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

	* autoload.cc (Process32First): Remove.
	(Process32Next): Remove.

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

	* autoload.cc (NetWkstaUserGetInfo): Remove.
	(CharToOemBuffA): Remove.
	(KillTimer): Remove.
	(OemToCharBuffA): Remove.
	(SetTimer): Remove.

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

	* Makefile.in (DLL_OFILES): Add sec_auth.o.
	* fhandler.cc (fhandler_base::fhaccess): Accommodate interface changes
	of access control functions throughout.
	* fhandler_disk_file.cc: Ditto.
	* fhandler_registry.cc: Ditto.
	* sec_acl.cc: Drop unnecessary includes.
	(setacl): Take path_conv instead of file name as parameter.
	Accommodate interface changes of access control functions.
	(getacl): Ditto.
	* sec_auth.cc: New file, taking over all authentication related
	functions from security.cc.
	* sec_helper.cc: Drop unnecessary includes.
	* security.cc: Ditto.  Move all authentication related functions to
	sec_auth.cc.
	(ALL_SECURITY_INFORMATION): New define.  Use throughout.
	(set_file_sd): New function, replacing read_sd and the file related
	part of get_nt_object_security.
	(get_reg_sd): Rename from get_reg_security.  Drop type parameter.
	(get_reg_attribute): New function, replacing the registry related part
	of get_nt_object_security.
	(get_file_attribute): Take path_conv instead of file name as parameter.
	Use new get_file_sd call.
	(set_file_attribute): Ditto plus new set_file_sd.  Drop unnecessary
	implementation without uid/gid parameters.
	(check_file_access): Take path_conv instead of file name as parameter.
	Use new get_file_sd call.
	(check_registry_access): Use new get_reg_sd call.
	* security.h: Accommodate above interface changes.

2007-07-19  Corinna Vinschen  <corinna@vinschen.de>

	* security.cc (set_nt_attribute): Remove.
	(set_file_attribute): Do it yourself instead of calling
	set_nt_attribute.

2007-07-19  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_base::fstat_by_name): Use
	NtQueryFullAttributesFile instead of FindFirstFile.
	(fhandler_base::fstat_fs): Drop check for exec_state.  Drop check for
	invalid characters.
	* ntdll.h (struct _FILE_NETWORK_OPEN_INFORMATION): Define.
	(NtQueryFullAttributesFile): Declare.

2007-07-19  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (fhandler_base::open): Drop local wpath and upath
	variables.  Call pc.get_object_attr to create object attributes.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
	* syscalls.cc (unlink_nt): Ditto.
	* path.cc (path_conv::set_normalized_path): Set wide_path to NULL.
	(path_conv::get_nt_native_path): Drop parameter.  Create path in
	wide_path/uni_path members.
	(path_conv::get_object_attr): New method to create object attributes.
	(path_conv::get_wide_win32_path): New method to create Win32 wide path.
	(path_conv::check): Initialize wide_path to NULL.
	(path_conv::~path_conv): cfree wide_path.
	* path.h (class path_conv): New members wide_path and uni_path.
	Add declarations of get_object_attr and get_wide_win32_path.
	(path_conv::path_conv): Initialize wide_path to NULL.
	(path_conv::get_nt_native_path): Drop parameter.

2007-07-19  Corinna Vinschen  <corinna@vinschen.de>

	* sec_helper.cc: Remove unused code.

2007-07-19  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (SetSecurityDescriptorControl): Drop.
	* security.cc (alloc_sd): Set security descriptor control flag without
	calling SetSecurityDescriptorControl function.
	* wincap.h (wincapc::has_dacl_protect): Rename from
	has_security_descriptor_control.
	* wincap.cc: Ditto throughout.

2007-07-19  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (SetUserObjectSecurity): Drop.
	* pinfo.cc (pinfo::set_acl): Use NtSetSecurityObject instead of
	SetKernelObjectSecurity.
	* spawn.cc (spawn_guts): Use NtSetSecurityObject instead of
	SetUserObjectSecurity.
	* uinfo.cc (cygheap_user::init): Ditto.

2007-07-19  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.h (init_cygheap::luid): Remove.
	* mmap.cc (mlock): Accommodate parameter change in call to
	push_thread_privilege.
	(munlock): Ditto.
	* ntdll.h (STATUS_NOT_ALL_ASSIGNED): Define.
	(NtAdjustPrivilegesToken): Declare.
	* sec_helper.cc (cygpriv): Reorder to match numerical privilege order.
	(privilege_luid): Take job of privilege_luid_by_name, using new
	cygpriv.
	(privilege_luid_by_name): Remove.
	(privilege_name): Accommodate new cygpriv array.
	(set_privilege): Call NtAdjustPrivilegesToken to avoid using advapi32.
	Accommodate changes to privilege_name.
	(set_cygwin_privileges): Simplify.  Don't try to set
	SE_CREATE_GLOBAL_PRIVILEGE on systems not supporting it.
	* security.cc (sys_privs): Reorder to match numerical privilege order.
	Use real privilege values as defined in security.h.
	(get_system_priv_list): Drop unused grp_list argument.  Create
	list of privileges according to new wincapc::max_sys_priv value.
	(get_priv_list): Call privilege_luid instead of privilege_luid_by_name.
	Make priv a local value instead of a pointer.
	(create_token): Accommodate parameter change in call to
	push_self_privilege.
	(lsaauth): Ditto.
	(check_access): Use privilege values directly instead of calling
	privilege_luid.
	* security.h: Define real privilege values.
	(cygpriv_idx): Remove.
	(privilege_luid): Change declaration.
	(privilege_luid_by_name): Drop declaration.
	(set_privilege): Change declaration.
	(set_process_privilege): Drop definition.
	(_push_thread_privilege): Accomodate new set_privilege parameters.
	* wincap.h (wincapc::max_sys_priv): New element.
	* wincap.cc: Implement above element throughout.
	(wincap_2000sp4): New wincaps structure.
	(wincap_xpsp1): Ditto.
	(wincap_xpsp2): Ditto.
	(wincapc::init): Use new wincaps.
	(wincapc::max_sys_priv): New element.

2007-07-19  Corinna Vinschen  <corinna@vinschen.de>

	* dcrt0.cc (dll_crt0_0): Call set_cygwin_privileges here, after
	initializing hProcToken.
	* sec_helper.cc (init_global_security): Don't call set_cygwin_privileges        here.

2007-07-18  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.h (shared_prefix): De-const.
	(shared_prefix_buf): Add static buffer for shared prefix to avoid
	additional allocation.
	* cygheap.cc (cygheap_init): Set cygheap->shared_prefix to
	cygheap->shared_prefix_buf and strcpy.

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

	* fhandler.cc (fhandler_base::fhaccess): Add check for R/O file system.
	* security.cc (check_registry_access): Set errno to EROFS when checking
	for W_OK.

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

	* fhandler_disk_file.cc (fhandler_disk_file::opendir): Move setting
	cfd->nohandle where it won't crash.

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

	* cygheap.h (cygheap_user::curr_imp_token): Rename from current_token.
	Accommodate change throughout Cygwin.
	(cygheap_user::imp_token): Rename from token.  Accommodate change
	throughout Cygwin.
	(rcygheap_user::eimpersonate): Use primary token for impersonation.
	* grp.cc (internal_getgroups): Use primary impersonation token when
	impersonated.
	* security.h (_push_thread_privilege): Use primary impersonation token
	when impersonated.

2007-07-14  Christopher Faylor  <me+cygwin@cgf.cx>

	* init.cc (in_dllentry): Delete.
	(dll_entry): Remove assignment to deleted variable.
	* winsup.h (in_dllentry): Delete declaration.
	* exceptions.cc (inside_kernel): Use another method to see if we are in
	dll_entry phase.

2007-07-13  Christopher Faylor  <me+cygwin@cgf.cx>

	* init.cc (in_dllentry): Make NO_COPY to avoid spurious false
	positives.

2007-07-09  Christopher Faylor  <me+cygwin@cgf.cx>

	* debug.cc (close_handle): Change debug output format slightly.

	* dlfcn.cc (dlclose): Don't close handle returned from
	GetModuleHandle(NULL).

	* fhandler.h (fhandler_pipe::create): Remove obsolete argument.
	(fhandler_pipe::create): Ditto.
	* fhandler.cc (fhandler_pipe::create): Ditto.
	(fhandler_pipe::create): Ditto.

2007-07-09  Christopher Faylor  <me+cygwin@cgf.cx>

	* strsig.cc (__signals): New macro.
	(sys_sigabbrev): New array of signal strings, patterned after linux.
	(siglist): Use __signals.
	* include/cygwin/signal.h (sys_sigabbrev): Define.
	* include/cygwin/version.h: Bump API minor version to 177.

2007-07-09  Corinna Vinschen  <corinna@vinschen.de>

	* dir.cc (closedir): Revert change from 2007-06-29.
	* fhandler.h (dirent_valid_fd): Drop.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): If opening a
	real dir, use the underlying fhandler to keep track of the directory
	handle.  In fdopendir case use original io_handle from fhandler.  Use
	fhandler's io_handle in subsequent directory functions throughout.
	Create handle non-inheritable and set close-on-exec flag.
	(readdir_get_ino): Drop dirent_isroot case.
	(fhandler_disk_file::readdir): Handle dirent_isroot case here.
	(fhandler_disk_file::rewinddir): Revert change from 2007-07-05.  Use
	NtClose instead of CloseHandle.
	* fhandler_virtual.cc (fhandler_virtual::opendir): Drop adding
	dirent_valid_fd flag.  Set close-on-exec flag.

2007-07-08  Christopher Faylor  <me+cygwin@cgf.cx>

	* Makefile.in (DLL_OFILES): Add newly-imported random.o.  Eliminate
	reliance on libiberty.
	* random.cc: Import from FreeBSD.  Modify for Cygwin environment.
	* include/cygwin/stdlib.h (random): Reflect change in return value to
	be more linux/freebsd-like.
	(srandom): Ditto.

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

	* fhandler.h (fhandler_base::write): Remove __stdcall decoration.
	(fhandler_pipe::write): Ditto.
	(fhandler_fifo::write): Ditto.

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

	Preliminary change to make pipes interruptible and fifos reliable.
	* dtable.cc (dtable::find_fifo): Eliminate definition.
	* dtable.h (dtable::find_fifo): Ditto for declaration.
	* fhandler.cc (fhandler_base::raw_read): Remove pipe-specific stuff.
	(fhandler_base::fhandler_base): Ditto.
	(fhandler_base::close): Handle overlapped I/O structure if appropriate.
	(fhandler_base::dup): Ditto.
	(fhandler_base::fork_fixup): Ditto.
	(fhandler_base::setup_overlapped): Define new function.
	(fhandler_base::destroy_overlapped): Ditto.
	(fhandler_base::wait_overlapped): Ditto.
	(fhandler_base::read_overlapped): Ditto.
	(fhandler_base::write_overlapped): Ditto.
	* fhandler.h (fhandler_base::get_overlapped): Declare new function.
	(fhandler_base::setup_overlapped): Ditto.
	(fhandler_base::destroy_overlapped): Ditto.
	(fhandler_base::wait_overlapped): Ditto.
	(fhandler_base::read_overlapped): Ditto.
	(fhandler_base::write_overlapped): Ditto.
	(fhandler_base::get_guard): Eliminate.
	(fhandler_pipe::*): Rework to eliminate most Win9x related cruft,
	removing many variables and defining a new overlapped capability.
	(fhandler_fifo::*): Ditto.
	(fifo_state): Declare new enum.
	* fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Remove old Win9x
	stuff.  Initialize overlapped handle to NULL.
	(fhandler_fifo::set_use): Eliminate.
	(fhandler_fifo::open_nonserver): Define.
	(fhandler_fifo::open): Rework to use named pipes and overlapped I/O.
	(fhandler_fifo::wait): Define new function to wait for named pipe
	connection.
	(fhandler_fifo::read): Rework to use wait() and new overlapped I/O
	functionality.
	(fhandler_fifo::write): Ditto.
	(fhandler_fifo::dup): Eliminate.
	* pinfo.cc (commune_process): Remove fifo handling.
	(_pinfo::commune_request): Ditto.
	* pinfo.h (picom): Ditto.
	* pipe.cc (fhandler_pipe::fhandler_pipe): Remove Win9x stuff.
	Initialize overlapped handle to NULL.
	(fhandler_pipe::open): Eliminate Win9x stuff.
	(fhandler_pipe::set_close_on_exec): Eliminate.
	(read_pipe): Eliminate.
	(fhandler_pipe::close): Ditto.
	(fhandler_pipe::fixup_after_exec): Ditto.
	(fhandler_pipe::fixup_in_child): Ditto.
	(fhandler_pipe::read): Rework to use overlapped I/O.
	(fhandler_pipe::write): New function using overlapped I/O.
	(fhandler_pipe::dup): Rework to eliminate Win9x stuff.
	(fhandler_pipe::create_selectable): Rework to eliminate Win9x and use
	overlapped I/O.
	* select.cc (peek_pipe): Rework to eliminate Win9x stuff and use
	overlapped I/O.
	(fhandler_base::ready_for_read): Ditto.

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

	* path.cc (symlink_info::check_shortcut): Handle device "symlinks"
	specially - don't posixify them.

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

	* fhandler_disk_file.cc: White space.
	* fhandler_proc.cc: Ditto.
	* fhandler_virtual.cc: Ditto.

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

	* fork.cc: White space.
	* net.cc: Ditto.
	* posix_ipc.cc: Ditto.

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

	* times.cc (gettimeofday): Align definition to POSIX.

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

	* cygwin.din: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm.
	* include/cygwin/version.h: Bump API minor number.

2007-07-05  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::opendir): Add missing
	OBJ_INHERIT flag when creating OBJECT_ATTRIBUTES.
	(fhandler_disk_file::rewinddir): Ditto.

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

	* times.cc: Define __timezonefunc__ before including time.h to protect
	definition of timezone function.

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

	* include/cygwin/time.h: Switch to timezone variable by default.  Add
	comment.

2007-06-29  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export fdopendir.
	* dir.cc (opendir): Call fhandler's opendir with fd set to -1.
	(fdopendir): New function.
	(seekdir64): Use dirent_info_mask.
	(rewinddir): Ditto.
	(closedir): Only release underlying file descriptor if it has been
	reserved by opendir itself.
	* fhandler.cc (fhandler_base::opendir): Accommodate new parameter.
	* fhandler.h (dirent_states): Add dirent_valid_fd and dirent_info_mask.
	(fhander_XXX::opendir): Add file descriptor parameter.  Use regparms.
	(fhandler_procnet::opendir): Drop declaration.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
	If called from fdopendir, use existing handle to re-open directory
	with valid flags.  Rename fd to cfd.  Use only if no valid incoming fd.
	(fhandler_cygdrive::opendir): Accommodate new parameter.
	* fhandler_process.cc (fhandler_process::opendir): Ditto.
	* fhandler_procnet.cc (fhandler_procnet::opendir): Drop definition.
	* fhandler_virtual.cc (fhandler_virtual::opendir): Accommodate new
	parameter.  Only create new file descriptor entry if called from
	opendir.  Remove duplicated setting of dir->__flags.
	* posix.sgml: Add fdopendir to list of implemented Solaris functions.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/dirent.h: Declare fdopendir.

2007-06-28  Brian Dessent  <brian@dessent.net>

	* include/cygwin/version.h: Fix comment typo.

2007-06-28  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export stpcpy, stpncpy.
	* posix.sgml: Add stpcpy and stpncpy to list of implemented
	GNU extensions.
	* include/cygwin/version.h: Bump API minor number.

2007-06-27  Corinna Vinschen  <corinna@vinschen.de>

	* shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
	(CURR_SHARED_MAGIC): Ditto.
	(class shared_info): Add heap_slop_inited member.
	* shared.cc (shared_info::heap_slop_size): Use heap_slop_inited to
	track initializing heap_slop since 0 is a valid value for heap_slop.
	Drop useless < 0 consideration.

2007-06-27  Eric Blake  <ebb9@byu.net>

	* assert.cc (__assert_func): New function, to match newlib header
	change.
	* cygwin.din: Export __assert_func.
	* include/cygwin/version.h: Bump API minor number.

2007-06-21  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (WSAIoctl): Remove.
	* cygwin.din: Export freeifaddrs, getifaddrs.
	* fhandler_socket.cc (fhandler_socket::ioctl): Drop SOCKET parameter
	from get_ifconf.
	* net.cc: Include ifaddrs.h.
	(in_are_prefix_equal): Match addresses in network byte order.
	(ip_addr_prefix): Convert address into host byte order before
	testing with IN_LOOPBACK.
	(struct ifall): Define.
	(get_xp_ifs): Replace get_xp_ifconf.  Return struct ifall array.
	(get_2k_ifs): Ditto, replace get_2k_ifconf.
	(get_nt_ifs): Ditto, replace get_nt_ifconf.
	(getifaddrs): New function.
	(freeifaddrs): New function.
	(get_ifconf): Call matching get_XX_ifs function and create
	ifc content from here.  Drop lo fake since it's now in get_nt_ifs.
	* posix.sgml: Add freeifaddrs and getifaddrs to list of implemented
	BSD functions.
	* wincap.h (wincapc::has_broken_if_oper_status): New element.
	* wincap.cc: Implement above element throughout.
	* include/ifaddrs.h: New file.
	* include/cygwin/version.h: Bump API minor number.

2007-06-20  Eric Blake  <ebb9@byu.net>

	* cygwin.din: Export exp10, exp10f, pow10, pow10f, strcasestr,
	funopen, fopencookie.
	* include/cygwin/version.h: Bump API minor number.
	* posix.sgml: Minor improvements.

2007-06-20  Corinna Vinschen  <corinna@vinschen.de>

	* include/cygwin/if.h (IFF_POINTOPOINT): Fix typo.

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

	* include/search.h: Reinstate node_t definition.

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

	* include/sys/cdefs.h: Remove in favor of newlib version.

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

	* autoload.cc (GetIpForwardTable): Define.
	* fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFDSTADDR.
	* net.cc (get_routedst): New static function to get destination
	address of point-to-point interfaces.
	(get_xp_ifconf): Handle SIOCGIFDSTADDR.
	(get_2k_ifconf): Ditto.
	(get_nt_ifconf): Ditto.
	(get_ifconf): Ditto.
	* include/asm/socket.h (SIOCGIFDSTADDR): Define.
	* include/cygwin/if.h (struct ifreq): Add ifru_dstaddr member.
	(ifr_dstaddr): Define.
	* include/cygwin/in.h: Cast ipv4 addresses correctly to in_addr_t in
	definitions.

2007-06-12  Christopher Faylor  <me+cygwin@cgf.cx>

	* signal.cc (usleep): Use useconds_t for the type as per POSIX.

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

	* Makefile.in (DLL_OFILES): Add xsique.o.
	* cygwin.din (confstr): Make NOSIGFE.
	(insque): Export.
	(remque): Export.
	* lsearch.cc: Remove superfluous _SEARCH_PRIVATE define.
	* posix.sgml: Move insque to defined SUSv3 interfaces.  Remove
	comment for remque.
	* include/search.h: Remove _SEARCH_PRIVATE guarded definitions.
	Add struct qelem definition.  Add insque and remque declarations.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/queue.h: Remove insque/remque definitions so as not
	to collide with SUSv3 compatible declaration in search.h.
	* libc/xsique.cc: New file implementing insque and remque.

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

	* fhandler.cc (fhandler_base::fstat): Set pipe permission bits more
	correctly.

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

	* cygwin.din (confstr): Export.
	* posix.sgml (confstr): Move to list of implemented SUSv3 functions.
	* sysconf.cc (confstr): Implement.
	* include/cygwin/version.h: Bump API minor number.

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

	* ansi.sgml: Delete.
	* misc-std.sgml: Delete.
	* posix.sgml: Rework entirely.

2007-05-29  Corinna Vinschen  <corinna@vinschen.de>

	* dtable.cc (dtable::set_file_pointers_for_exec): Call SetFilePointer
	correctly for 64 bit file access.  Comment out functionality.
	* fhandler.cc (fhandler_base::open): Don't set append_mode.
	(fhandler_base::write): Check for O_APPEND instead of append_mode.
	Call SetFilePointer correctly for 64 bit file access.  Handle
	errors from SetFilePointer.
	* fhandler.h (class fhandler_base): Drop append_mode status flag.
	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Handle
	seeking correctly for 64 bit file access.

2007-05-22  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (cwdstuff::set): Revert useless acquire check.

2007-05-22  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (cwdstuff::set): Avoid double aquiring of cwd_lock.
	Open directory with inheriting enabled.

2007-05-21  Christian Franke <franke@computer.org>

	* fhandler_floppy.cc (fhandler_dev_floppy::lseek): Don't invalidate
	devbuf if new position is within buffered range.

2007-05-21  Eric Blake  <ebb9@byu.net>

	* include/search.h (hsearch_r): Provide declaration.

2007-05-21  Christian Franke <franke@computer.org>
	    Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_floppy.cc (fhandler_dev_floppy::lseek): Set buf size to
	sector size.  Simplify non-sector aligned case.  Handle errors from
	raw_read.

2007-05-15  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (adjust_socket_file_mode): New inline function.
	(fhandler_socket::fchmod): Squeeze mode through adjust_socket_file_mode
	before using it.
	(fhandler_socket::bind): Ditto.

2007-03-19  Ryan C. Gordon  <icculus@icculus.org>

	* path.cc (fs_info::update): Set and use is_cdrom.
	* path.cc (fillout_mntent): Set ret.mnt_type to something more
	Linux-like, based on data from fs_info.  Move "system" and "user"
	strings from mnt_type to mnt_opts.
	* path.h (struct fs_info): Add is_cdrom field.
	* path.h (fs_info::clear): Initialize is_cdrom.
	* path.h (struct fs_info): Add IMPLEMENT_STATUS_FLAG(bool,is_cdrom).
	* path.h (class path_conv): Add fs_is_cdrom method.  Add missing
	fs_is_netapp method.

2007-05-14  Eric Blake  <ebb9@byu.net>

	* cygwin.din (asnprintf, dprint, _Exit, vasnprintf, vdprintf): Export.
	* include/cygwin/version.h: Bump API minor number.

2007-04-18  Brian Dessent  <brian@dessent.net>

	* cygwin.sc: Remove duplicated .debug_macinfo section.
	* dllfixdbg: Also copy DWARF-2 sections into .dbg file.

2007-04-06  Eric Blake  <ebb9@byu.net>

	* include/stdint.h (WINT_MIN): Fix sign.

2007-04-04  Eric Blake  <ebb9@byu.net>

	* include/stdint.h (WINT_MIN, WINT_MAX): Fix definition.

2007-03-30  Christopher Faylor  <me@cgf.cx>

	* external.cc (cygwin_internal): Implement CW_SET_DOS_FILE_WARNING.
	* include/sys/cygwin.h: Define CW_SET_DOS_FILE_WARNING.

2007-03-29  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.cc (cygheap_init): Fix formatting.  Remove comment.  Set
	shared_prefix depending only on terminal service capability.
	* dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges here.
	* fhandler_fifo.cc (fhandler_fifo::open): Create the mutex as global
	object.
	* posix_ipc.cc (ipc_mutex_init): Use cygheap->shared_prefix.
	(ipc_cond_init): Ditto.
	* sec_helper.cc (privilege_name): Make static.  Use LookupPrivilegeName
	directly to be independent of the state of cygheap.
	(set_privilege): Take a LUID as parameter instead of an index value.
	Only print debug output in case of failure.
	(set_cygwin_privileges): Add comment.  Use LookupPrivilegeValue to
	get privilege LUIDs.
	(init_global_security): Call set_cygwin_privileges here.
	* security.h (privilege_name): Drop declaration.
	(set_privilege): Declare according to above change.
	(set_process_privilege): Call privilege_luid to get LUID.
	(_push_thread_privilege): Ditto.
	* shared.cc (open_shared): Add comment.  On systems supporting the
	SeCreateGlobalPrivilege, try to create/open global shared memory first.
	Fall back to local shared memory if that fails.
	* thread.cc (semaphore::semaphore): Use cygheap->shared_prefix.
	* wincap.h (wincapc::has_create_global_privilege): New element.
	* wincap.cc: Implement above element throughout.

2007-03-28  Christopher Faylor  <me@cgf.cx>

	* spawn.cc (spawn_guts): Start pure-windows processes in a suspended
	state to avoid potential DuplicateHandle problems.

2007-03-13  Eric Blake  <ebb9@byu.net>

	* include/cygwin/stat.h (S_TYPEISMQ, S_TYPEISSEM, S_TYPEISSHM):
	Avoid compiler warnings.

2007-03-07  Christopher Faylor  <me@cgf.cx>

	* signal.cc (handle_sigprocmask): Remove extraneous
	sig_dispatch_pending.

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

	* fhandler_proc.cc: Fix formatting.  Drop setting errno when creating
	proc file content.
	(format_proc_uptime): Simplify.
	(format_proc_cpuinfo): Align more closely to output of Linux 2.6 kernel.
	Evaluate more data, especially for AMD CPUs.

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

	* fhandler.h (fhandler_base::fstat_helper): Add creation time parameter.
	* glob.cc (stat32_to_stat64): Set st_birthtim to st_mtim.

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

	* include/cygwin/stat.h (S_TYPEISMQ): Define.
	(S_TYPEISSEM): Dttio.
	(S_TYPEISSHM): Ditto.

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

	* fhandler_mailslot.cc (fhandler_mailslot::fstat): Set new stat member
	st_birthtim to useful value.
	* fhandler_process.cc (fhandler_process::fstat): Ditto.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Take
	additional parameter for creation time.  Fill st_birthtim with it.
	Accomodate additional creation time parameter throughout.
	* fhandler_raw.cc (fhandler_dev_raw::fstat): Set new stat member
	st_birthtim to useful value.
	* fhandler.cc (fhandler_base::fstat): Ditto.
	* fhandler_registry.cc (fhandler_registry::fstat): Ditto.
	* include/cygwin/version.h: Bump API minor number.
	* include/cygwin/stat.h (struct __stat64): Replace st_spare4 with
	timestruc_t st_birthtim.
	(struct stat): Ditto if __CYGWIN_USE_BIG_TYPES__ is defined.
	(st_birthtime): Define if __CYGWIN_USE_BIG_TYPES__ is defined.

2007-03-02  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (struct _FILE_NAMES_INFORMATION): Define.
	* syscalls.cc (unlink_nt): Check shared directory for being empty
	before trying to move and mark for deletion.

2007-03-02  Corinna Vinschen  <corinna@vinschen.de>

	* security.cc (get_file_attribute): Avoid compiler warning.

2007-03-01  Christopher Faylor  <me@cgf.cx>

	* fork.cc (fork): Reset child to true after fork since it may have been
	reset by fork memory copies.

2007-03-01  Christopher Faylor  <me@cgf.cx>

	* Makefile (DLL_OFILES): Remove ntea.o
	* environ.cc (set_ntea): Delete.
	(parse_thing): Delete "ntea" setting.
	* fhandler.cc (fhandler_base::open): Remove allow_ntea considerations.
	(check_posix_perm): Ditto.
	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Ditto.
	(fhandler_base::open_fs): Ditto.
	(fhandler_disk_file::mkdir): Ditto.
	* path.cc (symlink_worker): Ditto.
	* security.cc (get_file_attribute): Ditto.
	(set_file_attribute): Ditto.
	* security.h: Remove allow_ntea declaration.

2007-02-27  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (close_user_proc_parms_cwd_handle): Remove.
	(cwdstuff::init): Don't call close_user_proc_parms_cwd_handle.
	Call set to set cwd with all-sharing handle.
	(cwdstuff::set): Fix comment.  Don't close cwd handle.  Set in
	user parameter block instead and close old cwd handle.
	* syscalls.cc (rename): Call unlink_nt instead of RemoveDirectory or
	DeleteFile to allow deleting shared files/directories.

2007-02-27  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc(fhandler_base::open): Open with READ_CONTROL only in
	case of query_open flag set to query_read_control.  Add case for
	new query_read_attributes flag.
	(fhandler_base::fstatvfs): New method.
	* fhandler.h (enum query_state): Add query_read_attributes flag.
	(class fhandler_base): Declare new virtual fstatvfs method.
	(class fhandler_socket): Ditto.
	(class fhandler_pipe): Ditto.
	(class fhandler_fifo): Ditto.
	(class fhandler_disk_file): Ditto.
	(class fhandler_virtual): Ditto.
	* fhandler_disk_file.cc (fhandler_base::fstat_fs): Open with
	query_read_attributes instead of query_read_control.
	(fhandler_disk_file::fstatvfs): New method.
	(fhandler_disk_file::facl): Open with query_read_attributes instead of
	query_read_control.
	* fhandler_fifo.cc (fhandler_fifo::fstatvfs): New method.
	* fhandler_socket.cc (fhandler_socket::fstatvfs): New method.
	(fhandler_socket::fchmod): Return with EBADF in the default case.
	(fhandler_socket::fchown): Ditto.
	(fhandler_socket::facl): Ditto.
	* fhandler_virtual.cc (fhandler_virtual::fstatvfs): Ditto.
	* ntdll.h (struct _FILE_FS_ATTRIBUTE_INFORMATION): Define.
	(struct _FILE_FS_FULL_SIZE_INFORMATION): Define.
	* pipe.cc (fhandler_pipe::fstatvfs): New method.
	* syscalls.cc (fstatvfs): Just call the fhandler's fstatvfs.
	(statvfs): Ditto.
	(fstatfs): Call fstatvfs.
	(statfs): Drop EFAULT handling.

2007-02-26  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (fhandler_base::fstat): Set all file times to arbitrary
	fixed value.

2007-02-26  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_registry.cc (registry_listing): Drop name of HKEY_DYN_DATA.
	(registry_keys): Drop HKEY_DYN_DATA.
	* net.cc: Fix comment.
	* syslog.cc: Ditto.

2007-02-26  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Drop comment.
	* mmap.cc (gen_access): Remove.
	(mmap_record::gen_access): Remove.
	(mmap64): Don't mention 9x any longer.
	* syscalls.cc (statvfs): Drop status code consideration for 9x.
	* libc/minires-os-if.c (get_registry_dns_items): Don't mention 9x any
	longer.
	(get_registry_dns): Drop getting registry key on 9x.  Drop is9x
	variable.

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

	Throughout remove all usage of wincap.has_security.
	* environ.cc (environ_init): Drop setting allow_ntsec here.
	* grp.cc (initgroups32): Drop usage of label "out".
	* security.cc (allow_ntsec): Set to true by default.
	* syscalls.cc (seteuid32): Remove label success_9x.
	* wincap.cc: Remove has_security throughout.
	* wincap.h: Ditto.

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

	* fhandler.h (class fhandler_pipe): Remove members writepipe_exists,
	orig_pid and id.  Make hit_eof inline.
	* fhandler_fifo.cc (fhandler_fifo::open): Drop handling of
	writepipe_exists, orig_pid and id.
	* pipe.cc: Ditto throughout.
	(pipecount): Remove.
	(pipeid_fmt): Remove.
	(fhandler_pipe::hit_eof): Simplify.  Move to fhandler.h.
	(fhandler_pipe::dup): Drop leave label.
	(fhandler_pipe::create): Drop has_unreliable_pipes case.
	* wincap.cc: Remove has_unreliable_pipes throughout.
	* wincap.h: Ditto.

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

	* devices.in: Change native device name to native NT device name for
	/dev/null, /dev/comX and /dev/ttySx.
	* devices.cc: Regenerate.
	* fhandler.cc (fhandler_base::open_9x): Remove.
	(fhandler_base::open): Don't test for DOS device name, don't call
	open_9x.
	(fhandler_dev_null::open): Remove.
	* fhandler.h (class fhandler_base): Drop open_9x declaration.
	(class fhandler_dev_null): Drop open declaration.

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

	* fhandler_console.cc (fhandler_console::need_invisible): Drop
	pty_needs_alloc_console check.
	* spawn.cc (spawn_guts): Ditto.
	(av::fixup): Remove setting iscui.
	* syscalls.cc (rename): Drop has_move_file_ex checks.  Remove 9x
	specific code.
	* wincap.cc: Remove has_move_file_ex and pty_needs_alloc_console
	throughout.
	* wincap.h: Ditto.

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

	* exceptions.cc (dummy_ctrl_c_handler): Remove.
	(init_console_handler): Drop has_null_console_handler_routine checks.
	* fhandler_raw.cc (fhandler_dev_raw::open): Drop has_raw_devices check.
	* fhandler_serial.cc (fhandler_serial::open): Drop
	.supports_reading_modem_output_lines check.
	* miscfuncs.cc (low_priority_sleep): Drop has_switch_to_thread check.
	* shared.cc (open_shared): Drop needs_memory_protection checks.
	* spawn.cc (spawn_guts): Drop start_proc_suspended check.
	* uname.cc (uname): Drop has_valid_processorlevel check.
	* wincap.cc: Remove has_raw_devices, has_valid_processorlevel,
	supports_reading_modem_output_lines, needs_memory_protection,
	has_switch_to_thread, start_proc_suspended and
	has_null_console_handler_routine throughout.
	* wincap.h: Ditto.

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

	* fhandler.cc (fhandler_base::lseek): Drop 9x considerations.
	* fhandler_disk_file.cc (fhandler_disk_file::lock): Ditto.
	* wincap.cc: Remove lock_file_highword and has_64bit_file_access
	throughout.
	* wincap.h: Ditto.

2007-02-22  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.h (struct cwdstuff): Remove sync member and keep_in_sync
	accessors.
	* external.cc (cygwin_internal): Drop call to cygheap->cwd.keep_in_sync.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Always presume
	ability to create hard links.
	* path.cc (cwdstuff::init): Drop 9x considerations.
	(cwdstuff::keep_in_sync): Remove.
	(cwdstuff::set): Take NT for granted.
	* pinfo.h (cygwin_pid): Just return pid.
	* wincap.cc: Remove has_hard_links, can_open_directories,
	has_negative_pids, has_named_pipes, has_try_enter_critical_section,
	cant_debug_dll_entry and detect_win16_exe throughout.
	* wincap.h: Ditto.

2007-02-22  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_console.cc (fhandler_console::read): Drop 9x specific
	handling of AltGr key.
	* mmap.cc: Take NT for granted throughout.
	* wincap.cc: Remove map_view_of_file_ex_sucks, altgr_is_ctrl_alt,
	has_working_copy_on_write, share_mmaps_only_by_name,
	virtual_protect_works_on_shared_pages, has_mmap_alignment_bug and
	has_working_virtual_lock throughout.
	* wincap.h: Ditto.

2007-02-22  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (fhandler_base::set_no_inheritance): Always use
	SetHandleInformation.
	* fhandler_disk_file.cc (fhandler_disk_file::lock): Always use
	UnlockFileEx/LockFileEx functions.
	* net.cc (fdsock): Don't bother to duplicate socket for inheritance.
	* sysconf.cc (get_nproc_values): Take NT for granted.
	(get_avphys): Ditto.
	* syslog.cc (WIN95_EVENT_LOG_PATH): Remove define.
	(get_win95_event_log_path): Remove.
	(vsyslog): Fix formatting.  Take NT for granted.
	* wincap.cc: Remove has_lock_file_ex, has_signal_object_and_wait,
	has_eventlog, has_set_handle_information,
	has_set_handle_information_on_console_handles and supports_smp
	throughout.
	* wincap.h: Ditto.

2007-02-22  Corinna Vinschen  <corinna@vinschen.de>

	* dir.cc (rmdir): Move existance check in front of
	has_dot_last_component check.  Simplify setting errno in latter case.

2007-02-22  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (fhandler_base::write): Remove wincap.has_lseek_bug case.
	Simplify seek beyond EOF case.
	* times.cc (times): Remove wincap.has_get_process_times case.
	* wincap.cc: Remove has_delete_on_close, has_page_guard,
	has_get_process_times and has_lseek_bug throughout.
	* wincap.h: Ditto.

2007-02-22  Corinna Vinschen  <corinna@vinschen.de>

	Throughout remove all usage of wincap.access_denied_on_delete.
	* dir.cc (rmdir): Add existance check to be errno-compatible with Linux.
	* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Drop test for
	non-existent dir on 9x share.
	* syscalls.cc (unlink): Add comment.
	* wincap.cc: Remove access_denied_on_delete flag throughout.
	* wincap.h: Ditto.

2007-02-22  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::closedir): Fix bug
	introduced by switching to NtClose.

2007-02-22  Christopher Faylor  <me@cgf.cx>

	* dcrt0.cc (child_info_fork::alloc_stack_hard_way): Change sense of
	guard test.  Increase size of stack reserved and increase size before
	the current stack pointer.  Use pointers when doing arithmetic.
	(dll_crt0_1): Initialize exception handler when we notice we're the
	child of a fork from non-main thread.
	* fork.cc (frok::parent): Make argument volatile.
	(frok::child): Ditto.
	(lock_signals): New class.
	(lock_pthread): Ditto.
	(hold_everhthing): Ditto.
	(frok::parent): Move atforkprepare and atforkparent to lock_pthread
	class.
	(fork): Make ischild boolean.  Use hold_everything variable within
	limited scope to set various mutexes in such a way as to avoid
	deadlocks.
	* thread.h (pthread_mutex::tid): New variable, active when debugging
	for tracking thread id of owner.
	(pthread_mutex::set_owner): Set tid when debugging.
	* thread.cc (pthread_mutex::pthread_mutex): Clear tid.
	(pthread_mutex::_unlock): Ditto when unlocking.
	(pthread_mutex::fixup_after_fork): Set tid to special value after
	forking since owner is unknown.

2007-02-22  Corinna Vinschen  <corinna@vinschen.de>

	Throughout replace all usage of wincap.shared with the constant
	FILE_SHARE_VALID_FLAGS.
	* fhandler.cc (fhandler_base::open_9x): Drop local variable shared.
	* wincap.cc: Remove shared member throughout.
	* wincap.h: Ditto.

2007-02-22  Corinna Vinschen  <corinna@vinschen.de>

	* Makefile.in (DLL_IMPORTS): Add libntdll.a.
	* autoload.cc: Remove all symbols from advapi32.dll, kernel32.dll and
	ntdll.dll available on all platforms since NT4.

	Throughout remove all usage of wincap.is_winnt.
	* dcrt0.cc (dll_crt0_0): Remove call to mmap_init.
	* fhandler.h (class fhandler_base): Remove has_changed flag.
	(fhandler_disk_file::touch_ctime): Remove declaration.
	(fhandler_disk_file::readdir_9x): Ditto.
	(fhandler_disk_file::touch_ctime): Remove.
	(fhandler_disk_file::readdir_9x): Remove.
	(fhandler_disk_file::closedir): Call NtClose instead of CloseHandle.
	* mmap.cc: Throughout call CreateMapping and MapView directly.
	(VirtualProt9x): Remove.
	(VirtualProtNT): Remove.
	(VirtualProtEx9x): Remove.
	(VirtualProtExNT): Remove.
	(VirtualProtect): Remove define.
	(VirtualProtectEx): Remove define.
	(CreateMapping9x): Remove.
	(CreateMappingNT): Rename to CreateMapping.
	(MapView9x): Remove.
	(MapViewNT): Rename to MapView.
	(struct mmap_func_t): Remove definition.
	(mmap_funcs_9x): Remove.
	(mmap_funcs_nt): Remove.
	(mmap_func): Remove.
	(mmap_init): Remove.
	* net.cc (getdomainname): Drop comment. Use NT4 registry key only.
	(get_95_ifconf): Remove.
	* pinfo.cc (winpids::enumNT): Rename to winpids::enum_processes.
	(winpids::enum9x): Remove.
	(winpids::set): Just call enum_processes directly.
	(winpids::enum_init): Ditto.
	* pinfo.h (class winpids): Drop enum_processes pointer.  Rename
	enumNT to enum_processes.  Drop enum9x declaration.  Drop initialization
	of enum_processes throughout.
	* registry.cc (get_registry_hive_path): Just create NT key.
	(load_registry_hive): Only load NT specific file.
	* syscalls.cc (unlink_9x): Remove.
	(unlink): Just call unlink_nt.
	* wincap.cc: Remove is_winnt flag throughout.
	* wincap.h: Ditto.
	* winsup.h: Remove mmap_init declaration.

2007-02-21  Corinna Vinschen  <corinna@vinschen.de>

	* wincap.cc (wincap_unknown): Change settings for unknown to reflect
	the capabilities of NT4.
	(wincap_95): Remove.
	(wincap_95osr2): Remove.
	(wincap_98): Remove.
	(wincap_98se): Remove.
	(wincap_me): Remove.
	(wincap_nt3): Remove.
	(wincapc::init): Temporarily bail out on any 9x system.

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

	* cygwin.din (sem_unlink): Export.
	* posix_ipc.cc: Include thread.h and semaphore.h.  Remove TODO
	comment.
	(ipc_names): Add max_len member.  Set to maximum length of the path
	before tacking on the prefix path.  Set prefix path for named semaphors
	to /dev/shm, as on Linux.
	(enum ipc_type_t): Change sem to semaphore to avoid name conflicts.
	(check_path): Detect empty paths.  Use ipc_names's max_len member.
	Use __small_sprintf to create full object path name.  Special case
	semaphores.
	(ipc_cond_init): Drop superfluous strcpy.
	(class ipc_flock): New class to simplify file locking in subsequent
	code.
	(struct mq_hdr): Raise size of mqh_uname to allow adding a unique
	LUID to the name.
	(mq_open): Fix formatting.  Create unique synchronization object names
	using AllocateLocallyUniqueId.
	(struct sem_finfo): New structure defining named semaphore file content.
	(sem_open): Move here.  Rework implementation to allow kernel
	persistent implementation of POSIX named semaphores.
	(_sem_close): Implement sem_close.
	(sem_close): Move here.  Just call _sem_close with do_close parameter
	set to true.
	(sem_unlink): New function.
	* pthread.cc (mangle_sem_name): Remove.
	(sem_open): Move to posix_ipc.cc.
	(sem_close): Ditto.
	* syscalls.cc (close_all_files): Call semaphore::terminate here.
	* thread.cc: Fix formatting.  Rearrange semaphore functions so that
	they are close together.
	(semaphore::semaphore): Rework to play nicely with new named semaphore
	implementation.
	(semaphore::_terminate): Call _sem_close if semaphore is a named
	semaphore.
	(semaphore::destroy): Don't destroy named semaphores.  Return EINVAL
	instead.
	(semaphore::close): Only destroy named semaphores.  Return EINVAL
	otherwise.
	(semaphore::open): Rework to play nicely with new named semaphore
	implementation.  Loop through existing semaphores to be able to
	return same sem_t pointer as a former call on the same named semaphore.
	(semaphore::getinternal): New function called from _sem_close.
	* thread.h (class List): Make mx and head public.
	(class semaphore): Fix formatting.  Align method declarations with
	implementation in thread.cc.  Add members used for named semaphores.
	(semaphore::terminate): New static method.
	* include/semaphore.h: Redefine SEM_FAILED.  Fix formatting.
	(sem_unlink): Add declaration.
	* include/cygwin/version.h: Bump API minor number.

2007-02-20  Christopher Faylor  <me@cgf.cx>

	* exceptions.cc (_cygtls::signal_exit): Only call myself.exit when when
	exit_state indicates that we've visited do_exit.
	* sync.h (lock_process::lock_process): Use renamed exit_state -
	ES_PROCESS_LOCKED.
	* winsup.h: Rename ES_MUTO_SET to ES_PROCESS_LOCKED.

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

	* fhandler_socket.cc (fhandler_socket::bind): Remove printing wrong
	errno in debug output.

2007-02-19  Christopher Faylor  <me@cgf.cx>

	Remove extraneous whitespace.
	* pinfo.cc (commune_process): Use default argument to lock_process.
	* sigproc.cc: Update copyright.
	* select.cc: Ditto.

2007-02-15  Corinna Vinschen  <corinna@vinschen.de>

	* posix_ipc.cc (mq_open): Avoid compiler warning.  Initialize mqhdr
	before using it in file exists case.
	* include/mqueue.h (mqd_t): Make non-pointer type.

2007-02-15  Corinna Vinschen  <corinna@vinschen.de>

	* posix_ipc.cc (ipc_mutex_init): Create global object name.
	(ipc_cond_init): Ditto.
	(struct mq_hdr): Add mqh_uname member to store synchronization object
	name.
	(mq_open): Create unique synchronization object name and store in
	mq_hdr->mqh_uname.  Use this name in calls to ipc_mutex_init and
	ipc_cond_init.

2007-02-14  Corinna Vinschen  <corinna@vinschen.de>

	* Makefile.in (DLL_OFILES): Add posix_ipc.o.
	* cygwin.din (mq_close): Export.
	(mq_getattr): Export.
	(mq_notify): Export.
	(mq_open): Export.
	(mq_receive): Export.
	(mq_send): Export.
	(mq_setattr): Export.
	(mq_timedreceive): Export.
	(mq_timedsend): Export.
	(mq_unlink): Export.
	* posix_ipc.cc: New file implementing the above functions.  Move
	shm_open and shm_unlink from syscalls.cc here.
	* sysconf.cc (sca): Set value of _SC_MQ_OPEN_MAX to MQ_OPEN_MAX,
	_SC_MQ_PRIO_MAX to MQ_PRIO_MAX, _SC_MESSAGE_PASSING to
	_POSIX_MESSAGE_PASSING.
	* include/limits.h (MQ_OPEN_MAX): Define.
	(MQ_PRIO_MAX): Define.
	* include/mqueue.h: New file.
	* include/cygwin/version.h: Bump API minor number.

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

	* include/cygwin/stdlib.h (valloc): Declare.
	(memalign): Declare.

2007-02-09  Pierre A. Humblet  <Pierre.Humblet@ieee.org>

	* libc/minires-os-if.c (write_record): Handle DNS_TYPE_SRV and
	some obsolete types.

2007-02-08  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (check_shm): New static function to do path checking
	common to shm_open and shm_unlink.  Check for /dev/shm existance.
	(shm_open): Call check_shm.
	(shm_unlink): Ditto.

2007-02-08  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din (shm_open): Export.
	(shm_unlink): Export.
	* syscalls.cc (shm_open): New function.
	(shm_unlink): New function.
	* sysconf.cc (sca): Set value of _SC_SHARED_MEMORY_OBJECTS to
	_POSIX_SHARED_MEMORY_OBJECTS.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/mman.h (shm_open): Add prototype.
	(shm_unlink): Ditto.

2007-02-08  Christopher Faylor <me@cgf.cx>
	    Corinna Vinschen  <corinna@vinschen.de>

	* cygmalloc.h (__set_ENOMEM): Declare.
	(MALLOC_FAILURE_ACTION): Call __set_ENOMEM.
	* malloc_wrapper.cc (malloc) Remove setting errno here.
	(realloc): Ditto.
	(calloc): Ditto.
	(memalign): Ditto.
	(valloc): Ditto.
	(posix_memalign): Save and restore errno.

2007-02-07  Corinna Vinschen  <corinna@vinschen.de>

	* cygmalloc.h (MALLOC_FAILURE_ACTION): Move to correct #if branch.

2007-02-07  Corinna Vinschen  <corinna@vinschen.de>

	* cygmalloc.h (MALLOC_FAILURE_ACTION): Define empty.
	* cygwin.din (posix_madvise): Export.
	(posix_memalign): Export.
	* fhandler.cc (fhandler_base::fpathconf): Return useful values in
	_PC_VDISABLE, _PC_SYNC_IO and _PC_SYMLINK_MAX cases.
	* malloc_wrapper.cc (malloc): Set errno here since it's not set in
	dlmalloc.c anymore.
	(realloc): Ditto.
	(calloc): Ditto.
	(memalign): Ditto.
	(valloc): Ditto.
	(posix_memalign): New function.
	* mmap.cc (posix_madvise): New function.
	* sysconf.cc (get_open_max): New function.
	(get_page_size): Ditto.
	(get_nproc_values): Ditto.
	(get_avphys): Ditto.
	(sc_type): New type.
	(sca): New array to map _SC_xxx options to sysconf return values.
	(sysconf): Reimplement using sca array.
	* include/limits.h: Add all missing values as defined by SUSv3.
	* include/pthread.h (PTHREAD_DESTRUCTOR_ITERATIONS): Move definition
	to sys/limits.h.
	(PTHREAD_KEYS_MAX): Ditto.
	* include/semaphore.h (SEM_VALUE_MAX): Ditto.
	* include/cygwin/stdlib.h (posix_memalign): Declare.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/mman.h: Add posix_madvise flags.
	(posix_madvise): Declare.
	* include/sys/termios.h (_POSIX_VDISABLE): Move definition to
	sys/limits.h.

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

	* fhandler_serial.cc (fhandler_serial::tcsetattr): Add support for
	baud rates up to 3000000 baud.  Add missing 128K and 256K cases.
	(fhandler_serial::tcgetattr): Ditto.
	* include/sys/termios.h: Add baud rate definitions from B460800 up to
	B3000000.

2007-02-02  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (unlink_nt): Add missing assignment in case NtClose fails.

2007-02-01  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (ga_dup): New function, taken from ga_clone with v4-in-v6
	mapping addition.
	(ga_clone): Just call ga_dup from here.
	(ga_duplist): New function to duplicate list of struct addrinfo.
	(ga_echeck): Don't check ai_flags, it already happened in
	cygwin_getaddrinfo.
	(cygwin_freeaddrinfo): Always call ipv4_freeaddrinfo.
	(cygwin_getaddrinfo): Use new wincap.supports_all_posix_ai_flags
	flag rather than wincap.has_gaa_on_link_prefix.  Always duplicate
	WinSock's addrinfo list to a self-allocated list.  Handle AI_V4MAPPED
	for pre-Vista platforms supporting getaddrinfo.
	* wincap.h (wincapc::supports_all_posix_ai_flags): New element.
	* wincap.cc: Implement above element throughout.
	* include/netdb.h: Note how AI_ADDRCONFIG is not supported pre-Vista.
	Remove superfluous comment.

2007-02-01  Corinna Vinschen  <corinna@vinschen.de>

	* include/cygwin/socket.h: Add IPv6 socket options.

2007-01-31  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (cygwin_getaddrinfo): Fix thinko in AI_ADDRCONFIG handling.

2007-01-31  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (cygwin_getaddrinfo): Check ai_flags for valid values.
	Handle AI_NUMERICSERV.  Handle AI_ADDRCONFIG behaviour on Vista.
	* include/netdb.h (AI_NUMERICSERV): Add missing flag.

2007-01-30  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::closedir): Add dir name
	to debug output.
	* syscalls.cc (try_to_bin): Enable code to move file to user specific
	recycler dir to eliminate Vista problem.
	(unlink_nt): Add comment that rename after opening for delete on close
	only fails on XP.

2007-01-30  Corinna Vinschen  <corinna@vinschen.de>

	* sigproc.cc (child_info::child_info): Set msv_count to non-zero
	value only on systems requiring it.

2007-01-28  Corinna Vinschen  <corinna@vinschen.de>

	* include/ftw.h: Include sys/cdefs.h.

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

	* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Implement rmdir
	on NT by calling unlink_nt.  Check for directory here.
	* syscalls.cc (try_to_bin): Fix buggy debug_printf statement.
	(unlink_nt): Make non-static.  Don't use delete-on-close semantics on
	directories.  Explain why.

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

	* net.cc (if_nametoindex): This time, really free IP_ADAPTER_ADDRESSES
	memory.
	(if_indextoname): Ditto.

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

	* security.h (pop_thread_privilege): Revert to previous state, not
	to token used for impersonation.

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

	* cygheap.h (cygheap_user::deimpersonate): Always RevertToSelf.

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

	* net.cc (gai_errmap): Add EAI_OVERFLOW entry.  Fix formatting.
	(cygwin_gai_strerror): Drop using EAI_MAX.
	(w32_to_gai_err): Ditto.
	* include/netdb.h: Define EAI_OVERFLOW. Remove EAI_MAX.

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

	* include/netdb.h: Add AI_xxx flags available since Vista.

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

	* net.cc (if_nametoindex): Free IP_ADAPTER_ADDRESSES memory.
	(if_indextoname): Ditto.
	(if_nameindex): Ditto.  Remove duplicate indexed entries in result.

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

	* autoload.cc (WSAIoctl): Define.
	(SendARP): Define.
	* cygwin.din: Export if_freenameindex, if_indextoname, if_nameindex and
	if_nametoindex.
	* fhandler_procnet.cc: Drop including wchar.h.  Drop definitions of
	GAA_FLAG_INCLUDE_ALL_INTERFACES, IP_ADAPTER_UNICAST_ADDRESS_VISTA.
	(fhandler_procnet::exists): Check for has_gaa_prefixes.  Call
	get_adapters_addresses here.
	(fhandler_procnet::readdir): Ditto.
	(prefix): Move to net.cc.
	(fhandler_procnet::fill_filebuf): Call get_adapters_addresses here.
	Simplify allocation.  Use AdapterName rather than FriendlyName as
	interface name.  Use IfIndex if available, Ipv6IfIndex otherwise.
	(in6_are_prefix_equal): Move to net.cc.
	* fhandler_socket.cc: Define old SIOCGxxx values.
	(CONV_OLD_TO_NEW_SIO): Convert old SIOCGxxx value to new one.
	(struct __old_ifreq): Define old struct ifreq.
	(fhandler_socket::ioctl): Handle old SIOCGxxx values.  Handle new
	SIOCGIFFRNDLYNAM command.  Simplify copying ifreq data to user space.
	Call get_ifconf with additional SOCKET parameter.
	* net.cc (IP_ADAPTER_UNICAST_ADDRESS_LH): Define.
	(IP_ADAPTER_ADDRESSES_LH): Define.
	(SIO_GET_INTERFACE_LIST): Define.
	(sockaddr_in6_old): Define.
	(sockaddr_gen): Define.
	(INTERFACE_INFO): Define.
	(IN_LOOPBACK): Define.
	(in_are_prefix_equal): New static function.
	(ip_addr_prefix): New function, replaces prefix function, add AF_INET
	handling.
	(GAA_FLAG_INCLUDE_ALL_INTERFACES): Define.
	(get_adapters_addresses): New function.
	(WS_IFF_xxx): Define Winsock interface flag values.
	(convert_ifr_flags): New function to convert Winsock interface flag
	values to Cygwin interface flag values.
	(get_xp_ifconf): New get_ifconf implementation for XP SP1 and above.
	(get_2k_ifconf): Fix interface index.  Fix formatting.
	(get_nt_ifconf): Fix formatting.
	(get_95_ifconf): Ditto.
	(get_ifconf): Take additional SOCKET parameter.  Call get_xp_ifconf
	on XP SP1 and above.
	(if_nametoindex): New function.
	(if_indextoname): New function.
	(if_nameindex): New function.
	(if_freenameindex): New function.
	(in6_are_prefix_equal): Moved here from fhandler_procnet.cc.
	* wincap.cc (wincap_xp): Define has_gaa_prefixes as true by default.
	(wincapc::init): Assume has_osversioninfoex by default.  Call
	GetVersionEx with OSVERSIONINFOEX first.  Call with OSVERSIONINFO only
	if that fails.  Simplify NT4 case and try to avoid strcmp.  Check XP
	Service Pack using version.wServicePackMajor to avoid strcmp.
	* include/asm/socket.h (SIOCGIFFRNDLYNAM): Define.
	* include/cygwin/if.h: Fix formatting.
	(IFF_POINTTOPOINT): Define.
	(IFF_NOARP): Define.
	(IFF_LOWER_UP): Define.
	(IFF_DORMANT): Define.
	(struct if_nameindex): Define.
	(IFRF_FRIENDLYNAMESIZ): Define.
	(struct ifreq_frndlyname): Define.
	(IFNAMSIZ): Redefine as 44.
	(IF_NAMESIZE): Define.
	(struct ifreq): Redefine ifru_flags as int.  Define ifru_data.  Pad size
	to sizeof sockaddr_in6 for further extensions.
	(ifr_data): Define.
	(ifr_frndlyname): Define.
	(if_nametoindex): Declare.
	(if_indextoname): Declare.
	(if_nameindex): Declare.
	(if_freenameindex): Declare.
	* include/cygwin/version.h: Bump API minor number.
	(CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ): Define check for old vs. new
	ifreq structure.

2007-01-18  Corinna Vinschen  <corinna@vinschen.de>

	* spawn.cc (spawn_guts): Don't set cwd for non-Cygwin child processes
	on NT to allow starting them in virtual directories.

2007-01-18  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (list::hash): Fix type to __ino64_t.
	(list::get_hash): Ditto.
	(list::set): Add struct stat parameter.  Use that instead of calling
	fstat.
	(map::get_list_by_fd): Ditto.
	(map::add_list): Ditto.
	(mmap_is_attached_or_noreserve): Call get_list_by_fd appropriately.
	(mmap_worker): Add pameters for map list and file stat information.
	Propagate to called functions.
	(mmap64): Use fstat on files early.  Replace call to GetFileSize.
	Call get_list_by_fd and mmap_worker appropriately.

2007-01-18  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_procnet.cc: Drop declaration of htonl and ntohs.  Include
	asm/byteorder.h instead.

2007-01-18  Corinna Vinschen  <corinna@vinschen.de>

	* include/cygwin/in6.h: Drop inclusion of asm/byteorder.h.
	* fhandler_procnet.cc: Declare htonl and ntohs here.

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

	* Makefile.in (DLL_OFILES): Add fhandler_procnet.o.
	* autoload.cc (GetAdaptersAddresses): Define.
	* devices.h (FH_PROCNET): Define new device.
	* devices.in (dev_procnet_storage): Add "/proc/net" entry.
	* devices.cc: Regenerate.
	* dir.cc (readdir_worker): Use isproc_dev macro.
	* dtable.cc (build_fh_pc): Add FH_PROCNET.
	* fhandler.h (class fhandler_procnet): New class.
	* fhandler_proc.cc: Add "net" subdirectory handling.
	* fhandler_procnet.cc: New file handling "/proc/net" directory.
	* path.cc (isvirtual_dev): Move to path.h.
	* path.h (isproc_dev): New macro to identify /proc files by device.
	(isvirtual_dev): Moved here.  Define using isproc_dev.
	* syscalls.cc (unlink): Use isproc_dev macro.
	* wincap.h (wincapc::has_gaa_prefixes): New element.
	(wincapc::has_gaa_on_link_prefix): New element.
	* wincap.cc: Implement above elements throughout.
	(wincapc::init): Check XP for service pack and set has_gaa_prefixes
	appropriately.
	* include/cygwin/in6.h: Include asm/byteorder.h.

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

	* include/asm/socket.h (SIOGIFINDEX): Define.

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

	* mmap.cc (MapView9x): Note possible uselessness of retrying.
	(MapViewNT): Ditto.
	(mmap64): Fix pre-reservation to work for non NULL, non MAP_FIXED.

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

	* autoload.cc (RtlAnsiStringToUnicodeString): Define.
	(RtlOemStringToUnicodeString): Define.
	* ntdll.h (struct _RTL_USER_PROCESS_PARAMETERS): Define.
	(struct _PEB): Redefine with a bit of content.
	(RtlAnsiStringToUnicodeString): Declare.
	(RtlOemStringToUnicodeString): Declare.
	* path.cc: Include ntdll.h.
	(_upp): New global variable pointing to user process parameter block.
	(get_user_proc_parms): New static function to retrieve user process
	parameter block.
	(close_user_proc_parms_cwd_handle): New function to close handle to
	current working directory in user process parameter block.
	(cwdstuff::init): Drop redundant declaration of dynamically_loaded.
	Set current dir only on 9x.  Call close_user_proc_parms_cwd_handle
	on NT instead.
	(cwdstuff::keep_in_sync): Only on 9x.
	(cwdstuff::set): Keep behaviour on 9x.  On NT write cwd path into user
	process parameter block and set cwd handle to NULL.  Fix comments to
	reflect new behaviour.

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

	* fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFINDEX.
	* net.cc (get_2k_ifconf): Ditto.
	(get_nt_ifconf): Fake SIOCGIFINDEX.
	(get_95_ifconf): Ditto.
	(get_ifconf): Handle SIOCGIFINDEX.  Fake it for loopback on systems
	not supporting IP Helper Lib.
	* include/asm/socket.h (SIOCGIFINDEX): Define.
	* include/cygwin/if.h (struct ifreq): Add member for interface index.
	(ifr_ifindex): Define.

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

	* include/cygwin/in6.h (struct ipv6_mreq): Change type of interface
	member to uint32_t.
	(struct in6_pktinfo): Ditto.

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

	* include/cygwin/in.h (struct ip_mreq_source): Define.
	(struct ip_msfilter): Define.
	(IP_MSFILTER_SIZE): Define.
	(struct in_pktinfo): Define.
	(struct group_req): Define.
	(struct group_source_req): Define.
	(struct group_filter): Define.
	(GROUP_FILTER_SIZE): Define.
	(INADDR_ALLRTRS_GROUP): Define.
	* include/cygwin/socket.h: Define protocol agnostic multicast options.

2007-01-15  Corinna Vinschen  <corinna@vinschen.de>

	* CYGWIN_LICENSE: Fix web pages and contact information.

2007-01-15  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h: Adjust status definitions.

2007-01-15  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.cc (cygheap_init): Add TODO comment.

2007-01-15  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h (STATUS_SHARING_VIOLATION): Define.

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

	* syscalls.cc (unlink_nt): Don't move files to recycle bin which are
	not in use.

2007-01-13  Christopher Faylor  <me@cgf.cx>

	* glob.cc: Update copyright notice with latest from FreeBSD.
	(glob0): Use correct type for c variable to propagate previously
	detected protection.

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

	* cygheap.cc (_csbrk): Fix off-by-one error.
	* cygwin.sc: Give .cygheap a minimum size of 512K.

2007-01-12  Christopher Faylor  <me@cgf.cx>

	* external.cc (sync_winenv): Use cur_environ () rather than
	__cygwin_environ.

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

	* fork.cc (child_copy): Add missing Windows PID in debug output.

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

	* syscalls.cc: Update copyright.

2007-01-10  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (mmap64): Pre-Reserve space for the whole mapping to get a
	useful, valid address before the actual mappings take place.
	Fix typo in comment.

2007-01-10  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (sync): Use b_drive for B: drive (Thanks to Howard Chu).

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

	* syscalls.cc (getpagesize): Change condition for clarity.
	(getsystempagesize): Ditto.

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

	* mmap.cc: Do bookkeeping in 4K pages, rather than in 64K chunks.

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

	* security.h (setacl): Add parameter for writability flag.
	* sec_acl.cc (setacl): Ditto.  Set to true if any ACE with write
	permissions is created.
	* fhandler_disk_file.cc (fhandler_disk_file::facl): Reset
	FILE_ATTRIBUTE_READONLY if ACL contains an ACE with write permissions.

2007-01-05  Corinna Vinschen  <corinna@vinschen.de>

	* include/strings.h: Don't include string.h.  Only declare functions
	according to SUSv3.

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

	(get_ifconf): Set MTU for loopback to more correct value.

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

	* fhandler_socket.cc (fhandler_socket::ioctl): Don't fake results
	for SIOCGIFFLAGS here.  Call get_ifconf instead.
	* net.cc (get_2k_ifconf): Clean up code to generate interface name.
	Handle SIOCGIFFLAGS here.
	(get_nt_ifconf): Fake SIOCGIFFLAGS here.
	(get_95_ifconf): Ditto.
	(get_ifconf): Don't fake loopback on systems with IP Helper Lib.
	Set MTU for loopback to a more "modern" value.

2007-01-04  Brian Ford  <Brian.Ford@FlightSafety.com>
	    Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (PREFERRED_IO_BLKSIZE): Define as 64K.
	* fhandler.cc (fhandler_base::fstat): Set st_blksize to
	PREFERRED_IO_BLKSIZE.
	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Ditto.
	* fhandler_mailslot.cc (fhandler_mailslot::fstat): Ditto.
	* fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.

2007-01-01  Christopher Faylor  <me@cgf.cx>

	* spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin
	_P_NOWAIT process.