aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/ChangeLog
blob: 7225d1520d396275861d3e6fbd9d3a03b0804b2b (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
2005-05-29  Eric Blake  <ebb9@byu.net>

	* include/limits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Always define.

2005-05-28  Christopher Faylor  <cgf@timesys.com>

	* thread.h (pthread_key::set): Inline.
	(pthread_key::get): Ditto.
	* thread.cc (pthread::set): Delete.
	(pthread::get): Ditto.

2005-05-28  Christopher Faylor  <cgf@timesys.com>

	* cygwin.din: Remove signal front end from pthread_[gs]etspecific.

2005-05-28  Christopher Faylor  <cgf@timesys.com>

	* fhandler_tty.cc (fhandler_tty_slave:tcflush): Use signed comparison.

2005-05-28  Christopher Faylor  <cgf@timesys.com>

	* times.cc (time_ms::usecs): Coerce comparison to signed or whole test
	is a no-op.

2005-05-27  Christopher Faylor  <cgf@timesys.com>

	* cygheap.h: Reference _cygheap_start via .cygheap section.

	* environ.cc: Fix force_into_environment typo throughout.
	(spenvs): Export CYGWIN_DEBUG if DEBUGGING.

2005-05-26  Christopher Faylor  <cgf@timesys.com>

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

2005-05-25  Pierre Humblet  <pierre.humblet@ieee.org>

	* fhandler.h (fhandler_base::mkdir): New virtual method.
	(fhandler_base::rmdir): Ditto.
	(fhandler_disk_file:mkdir): New method.
	(fhandler_disk_file:rmdir): Ditto.
	* dir.cc (mkdir): Implement with fhandlers.
	(rmdir): Ditto.
	* fhandler.cc (fhandler_base::mkdir): New virtual method.
	(fhandler_base::rmdir): Ditto.
	(fhandler_disk_file::mkdir): New method.
	(fhandler_disk_file::rmdir): Ditto.

2005-05-24  Christopher Faylor  <cgf@timesys.com>

	* include/cygwin/version.h: Bump API minor number to 129.

2005-05-24  Christopher Faylor  <cgf@timesys.com>

	* cygwin.din: Export mkdtemp.
	* mktemp.cc: New file.
	* Makefile.in (DLL_OFILES): Add mktemp.o

2005-05-23  Eric Blake  <ebb9@byu.net>

	* include/stdint.h (INTMAX_C, UINTMAX_C): Fix definition.

2005-05-21  Christopher Faylor  <cgf@timesys.com>

	* spawn.cc (find_exec): Accept a PATH-like string in place of an
	environment variable.
	* dlfcn.cc (get_full_path_of_dll): Search /usr/bin (for windows
	compatibility) and /usr/lib (for UNIX compatibility) when looking for
	shared libraries.
	* environ.cc (conv_envvars): Put back LD_LIBRARY_PATH since it is used
	by get_full_path_of_dll().
	* errno.cc (errmap): Map MOD_NOT_FOUND to ENOENT.

	* cygmagic: Remove debugging cruft.

2005-05-19  Corinna Vinschen  <corinna@vinschen.de>

	* include/cygwin/in.h: Add comment.

2005-05-19  Corinna Vinschen  <corinna@vinschen.de>

	* include/cygwin/in.h: Define IPPROTO_xxx values as macros to
	accomodate SUSv3.

2005-05-19  Christopher Faylor  <cgf@timesys.com>

	* include/limits.h: Include features.h, as on linux.

2005-05-19  Christopher Faylor  <cgf@timesys.com>

	* include/endian.h: New file.

2005-05-19  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.sc: Add Dwarf-2 debug sections.

2005-05-19  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (mmap64): Make granularity an automatic variable.

2005-05-19  Christopher Faylor  <cgf@timesys.com>

	* fhandler.h (fhandler_cygdrive::seekdir): Delete declaration.
	(fhandler_cygdrive::seekdir): Delete.

2005-05-19  Pierre Humblet  <pierre.humblet@ieee.org>

	* fhandler.h (fhandler_cygdrive::iscygdrive_root): Delete method.
	(fhandler_cygdrive::telldir): Delete declaration.
	* fhandler_disk_file.cc: Remove all uses of
	fhandler_cygdrive::iscygdrive_root.
	(fhandler_disk_file::mkdir): New method.
	(fhandler_disk_file::rmdir): Ditto.
	(fhandler_cygdrive::telldir): Delete.

2005-05-18  Christopher Faylor  <cgf@timesys.com>

	* external.cc: Move pids declaration to file scope and use less
	enthusiastic constructor.
	* pinfo.h (winpids::winpids): Remove default setting.
	* fhandler_fifo.cc (fhandler_fifo::open_not_mine): Accommodate removal
	of default setting.
	* fhandler_proc.cc (fhandler_proc::readdir): Ditto.

2005-05-18  Christopher Faylor  <cgf@timesys.com>

	* cygtls.h (_local_storage::unknown_thread_name): New buffer.
	* tlsoffsets.h: Regenerate.
	* cygthread.cc (cygthread::name): Use new thread-local buffer.
	* exceptions.cc (handle_exceptions): Avoid unnecessary initialization
	of static variables to zero.
	* fork.cc (slow_pid_reuse) Ditto.

2005-05-18  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (mmap64): Avoid compiler warning.
	* ntea.cc (NTReadEA): Ditto.
	* hires.h (hires_base): Remove useless usecs function.

2005-05-18  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_netdrive.cc (fhandler_netdrive::telldir): Remove since it's
	equivalent to fhandler_virtual::telldir now anyway.
	* fhandler.h (class fhandler_netdrive): Remove telldir.

2005-05-18  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_netdrive.cc (fhandler_netdrive::telldir): Implement.
	(fhandler_netdrive::seekdir): Implement.
	(fhandler_netdrive::closedir): Call rewinddir to have only one point
	of calling WNetCloseEnum.

2005-05-17  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_netdrive): Add method rewinddir.
	* fhandler_netdrive.cc (struct netdriveinf): New structure to
	store thread arguments.
	(thread_netdrive): Thread handling all potentially blocking
	WNet... calls.
	(create_thread_and_wait): Start and wait for above thread.
	(fhandler_netdrive::exists): Change to call create_thread_and_wait
	instead of calling WNet... function.
	(fhandler_netdrive::readdir): Ditto.  Fix error handling.
	(fhandler_netdrive::rewinddir): New method.

2005-05-17  Corinna Vinschen  <corinna@vinschen.de>

	* external.cc (cygwin_internal): Avoid compiler warning.

2005-05-16  Christopher Faylor  <cgf@timesys.com>

	* dcrt0.cc (dll_crt0_0): Don't do fixup_after_exec if dynamically
	loaded since the state of fds is unknown at this point.

2005-05-16  Christopher Faylor  <cgf@timesys.com>

	* include/sys/cygwin.h (enum cygwin_getinfo_types): Add CW_DEBUG_SELF.
	* external.cc (cygwin_internal): Implement CW_DEBUG_SELF.

	* init.cc (dll_entry): Minor rearrangement of code.

2005-05-16  Christopher Faylor  <cgf@timesys.com>

	* path.cc (path_conv::check): Remove embedded dots before slashes.

2005-05-16  Corinna Vinschen  <corinna@vinschen.de>

	* environ.cc (conv_envvars): Remove LD_LIBRARY_PATH entirely.
	It doesn't belong here.

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

	* environ.cc (conv_envvars): Treat LD_LIBRARY_PATH as path list.

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

	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Check
	return code from GetFileSize and set file size to 0 if necessary.
	* fhandler_netdrive.cc (fhandler_netdrive::fstat): Set permissions
	to read/execute for all.

2005-05-13  Christopher Faylor  <cgf@timesys.com>

	* path.cc (normalize_posix_path): Do normalization on .  and ..  after
	a '//'.

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

	* fhandler.h (fhandler_netdrive::readdir): Remove useless comment.

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

	* autoload.cc (WNetGetResourceParentA): Import.
	(WNetOpenEnumA): Import.
	(WNetEnumResourceA): Import.
	(WNetCloseEnum): Import.
	* fhandler.h (fhandler_netdrive::telldir): Add declaration.
	(fhandler_netdrive::seekdir): Ditto.
	(fhandler_netdrive::closedir): Ditto.
	* fhandler_netdrive.cc: Drop explicit including windows.h.  Include
	winnetwk.h instead of shlwapi.h.  Include dirent.h.
	(fhandler_netdrive::readdir): Implement.
	(fhandler_netdrive::telldir): New method.
	(fhandler_netdrive::seekdir): New method.
	(fhandler_netdrive::closedir): Ditto.

2005-05-13  Christopher Faylor  <cgf@timesys.com>

	Remove PC_FULL from path_conv usage throughout.
	* path.h (enum pathconv_arg): Change PC_FULL to PC_NOFULL.
	* path.cc (path_conv::check): Test for PC_NOFULL rather than !PC_FULL.
	(cygwin_conv_to_win32_path): Use PC_NOFULL to force non-absolute path.

2005-05-13  Christopher Faylor  <cgf@timesys.com>

	* fhandler_netdrive.cc (fhandler_netdrive::exists): Assert that "//"
	exists.

2005-05-12  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (_cygtls::remove): Eliminate compiler warning.

	* dir.cc (mkdir): Check path for writability.
	(rmdir): Ditto.  Remove check for special directories.
	* path.cc (path_conv::check): Set PATH_RO for virtual devices.  Set
	error if read-only and asked for writability.
	* path.h (pathconv_arg): Add PC_WRITABLE.
	(path_types): Add PATH_RO.
	(path_conv::isro): Add (currently unused) check for read-only
	filesystem.  Return "ENOSHARE" when we know a share doesn't exist.
	* include/sys/mount.h: Add MOUNT_RO flag.
	* autoload.cc (WNetGetResourceInformationA): Import.
	* fhandler_netdrive.cc (fhandler_netdrive::exists): Detect actual
	existence of remote system rather than always assuming that it exists.

2005-05-11  Christopher Faylor  <cgf@timesys.com>

	* dcrt0.cc (do_global_dtors): Don't call dll_global_dtors here.
	(__main): Reinstate atexit of do_global_dtors.
	(cygwin_exit): Call dll_global_dtors here.
	(do_exit): And here.


2005-05-10  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (_cygtls::remove): Clear exitsock after close.
	* fhandler_console.cc (fhandler_console::write_normal): Store character
	in a local variable for potential future inspection.

2005-05-10  Corinna Vinschen  <corinna@vinschen.de>

	* Makefile.in (DLL_OFILES): Add fhandler_mailslot.o.
	* devices.h (FH_KMSG): Define new device.
	* devices.in: Add "/dev/kmsg" entry.
	* devices.cc: Regenerate.
	* dtable.cc (build_fh_pc): Handle case FH_KMSG.
	* fhandler.h (class fhandler_mailslot): New class.
	(class select_stuff): Add device_specific_mailslot pointer.
	* fhandler_mailslot.cc: New file.
	* select.cc (peek_mailslot): New function.
	(verify_mailslot): Ditto.
	(struct mailslotinf): New stuct to handle select on mailslots.
	(thread_mailslot): New function.
	(start_thread_mailslot): Ditto.
	(mailslot_cleanup): Ditto.
	(fhandler_mailslot::select_read): New method.
	* syslog.cc (klog_guard): New muto.
	(dev_kmsg): Local mailslot for kernel message device.
	(vklog): New function.
	(klog): Ditto.
	* winsup.h (vklog): Declare.
	(klog): Ditto.
	* include/sys/syslog.h: Define _PATH_KLOG.

2005-05-10  Christopher Faylor  <cgf@timesys.com>

	* dcrt0.cc (dll_crt0_1): Call cygwin_exit to ensure that destructors
	are handled correctly.

2005-05-10  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (path_conv::check): Set correct file attributes for socket
	files.

2005-05-09  Pierre Humblet <pierre.humblet@ieee.org>

	* fhandler.h (class fhandler_netdrive): New class.
	* fhandler_netdrive.cc (fhandler_netdrive::fhandler_netdrive): New constructor.
	(fhandler_netdrive::exists): New method.
	(fhandler_netdrive::fstat): Ditto.
	(fhandler_netdrive::readdir): Ditto.
	(fhandler_netdrive::open): Ditto.
	* dtable.cc (build_fh_pc): Handle case FH_NETDRIVE.
	* path.cc (isvirtual_dev): Add FH_NETDRIVE.
	(mount_info::conv_to_win32_path): Detect netdrive device and bypass mount
	search for network paths.

2005-05-08  Christopher Faylor  <cgf@timesys.com>

	* dcrt0.cc (get_cygwin_startup_info): New function pulled from
	dll_crt0_0.
	(dll_crt0_0): Use get_cygwin_startup_info to retrieve cygwin-specific
	startup pointer.
	* external.cc (cygwin_internal): Implement CW_ARGV and CW_ENVP.
	* include/sys/cygwin.h: Implement CW_ARGV and CW_ENVP.

2005-05-07  Christopher Faylor  <cgf@timesys.com>

	* path.cc (normalize_posix_path): Don't treat '//' specially since
	newer versions of bash now get this right.

2005-05-07  Christopher Faylor  <cgf@timesys.com>

	* devices.cc: Regenerate with correct name for dev_netdrive_storage.

2005-05-06  Christopher Faylor  <cgf@timesys.com>

	* Makefile.in (DLL_O_FILES): Add fhandler_netdrive.o.
	* fhandler_netdrive.cc: Placeholder file for future development.
	* devices.h (FH_NETDRIVE): Define new virtual device type.
	(netdrive_dev): Define.
	* devices.in (dev_netdrive_storage): Define.
	* devices.cc: Regenerate.

2005-05-04  Corinna Vinschen  <corinna@vinschen.de>

	* cygerrno.h (__set_errno): Remove useless parentheses.

2005-05-04  Corinna Vinschen  <corinna@vinschen.de>

	* cygerrno.h (__set_errno): Define as inline function here.
	(set_errno): Always define as call to __set_errno.
	* debug.cc (__set_errno): Move to cygerrno.h.

2005-05-03  Christopher Faylor  <cgf@timesys.com>

	* shared.cc (user_shared_initialize): Rework locking so that nothing is
	checked until cb is non-zero.

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

	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't treat
	inability to open file as failure if only SetFileAttributes is
	going to be called.  Only call set_file_attribute if really necessary.

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

	* fhandler_socket.cc (get_inet_addr): Add missing __seterrno call.

2005-05-01  Christopher Faylor  <cgf@timesys.com>

	* fhandler_tty.cc (fhandler_tty_slave::read): Actually read input when
	vmin == vtime == 0.

2005-04-30  Christopher Faylor  <cgf@timesys.com>

	* environ.cc (spenv::force_into_environment): Rename from add_always.
	(spenv::add_if_exists): Rename from force.
	(build_env): Accommodate name changes.  Make sure that stuff that is
	always supposed to be in the environment is actually added to the
	environment.

	* shared.cc (open_shared): Restore VirtualFree eliminated by 2005-04-28
	change.

2005-04-30  Christopher Faylor  <cgf@timesys.com>

	* errno.cc (errmap): Sort table.

2005-04-29  Christopher Faylor  <cgf@timesys.com>

	* errno.cc (errmap): Map ERROR_NETNAME_DELETED to ENOSHARE.

2005-04-28  Corinna Vinschen  <corinna@vinschen.de>

	* shared_info.h (cygwin_shared_address): Bump to a higher value to avoid
	collision with large data areas.

2005-04-28  Christopher Faylor  <cgf@timesys.com>

	* fhandler_console.cc (fhandler_console::get_tty_stuff): Accommodate
	changes to open_shared arguments.
	* fhandler_tape.cc (mtinfo_init): Ditto.
	* pinfo.cc (pinfo::init): Use open_shared rather than win32 mmap calls.
	* shared.cc (user_shared_initialize): Ditto.
	(memory_init): Ditto.
	(open_shared): Change to allow use a smore general mmap handler.
	* shared_info.h (shared_locations): Add SH_JUSTCREATE, SH_JUSTOPEN.
	(open_shared): Change declaration to match new usage.

	* autoload.cc (LoadDLLfuncEx2): Define in terms of LoadDLLfuncEx3.
	(LoadDLLfuncEx3): New macro.

2005-04-27  Christopher Faylor  <cgf@timesys.com>

	* fhandler.cc (fhandler_base::open_9x): Remove (broken) check for
	O_CREAT|O_EXCL.
	* syscalls.cc (open): Do O_CREAT|O_EXCL check here first.

2005-04-26  Christopher Faylor  <cgf@timesys.com>

	* environ.cc (build_env): Ensure that win32 array is properly filled in
	when a missing value has to be generated.

2005-04-26  Christopher Faylor  <cgf@timesys.com>

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

2005-04-24  Pavel Tsekov <ptsekov@gmx.net>

	* how-to-debug-cygwin.txt: Fix typo.

2005-04-22  Christopher Faylor  <cgf@timesys.com>

	* shared.cc (user_shared_initialize): Implement locking similar to
	shared_info when initializing shared region.

2005-04-22  Christopher Faylor  <cgf@timesys.com>

	* fhandler.h (dev_console::set_color): Define new function.
	(dev_console::set_default_attr): Ditto, moved from fhandler_console.
	(dev_console::fillin_info): Ditto.  Accommodate this change throughout
	this file.
	(fhandler_console::get_win32_attr): Eliminate.
	* fhandler_console.cc (fhandler_console::get_tty_stuff): Properly set
	default attributes on initialization.
	(fhandler_console::open): Set current attributes rather than default
	color on open.
	(fhandler_console::get_win32_attr): Eliminate.
	(dev_console::set_color): New function.  Move get_win32_attr stuff
	here.
	(dev_console::set_default_attr): New function, moved from
	fhandler_console.
	(dev_console::fillin_info): Ditto.
	(fhandler_console::char_command): Call set_color to set screen
	characteristics.

2005-04-22  Christopher Faylor  <cgf@timesys.com>

	* fhandler.cc (fhandler_base::read): Remove unused signal state tweaks.
	* fhandler.h (fhandler_pipe::create_selectable): Declare.
	(fhandler_fifo::close_one_end): Declare.
	* fhandler_fifo.cc (fhandler_fifo::close_one_end): Define.
	(fhandler_fifo::open_not_mine): Use close_one_end to close appropriate
	end of pipe.
	* pinfo.cc (_pinfo::commune_recv): Ditto.
	* pipe.cc (fhandler_pipe::create_selectable): Rename from
	create_selectable_pipe.  Reorganize.
	(fhandler_pipe::create): Use create_selectable.

2005-04-21  Christopher Faylor  <cgf@timesys.com>

	* shared.cc (shared_info::initialize): Test previous version of shared
	memory magic rather than current version when determining if there has
	been a shared memory mismatch.

2005-04-20  Christopher Faylor  <cgf@timesys.com>

	* sigproc.cc (proc_subproc): Fix handling of waiting for pids with zero
	value.

	* strace.cc (strace::hello): Report parent pid of executing process.

2005-04-20  Christopher Faylor  <cgf@timesys.com>

	* path.cc (path_conv::check): Fix problem reading symlinks introduced
	in below change by reverting the change and adding an additional test
	for nonexistent files in /proc.

2005-04-20  Christopher Faylor  <cgf@timesys.com>

	* path.cc (path_conv::check): Punt when attempting to access a
	nonexistent directory or file in /proc.

2005-04-19  Corinna Vinschen  <corinna@vinschen.de>

	* security.cc (alloc_sd): Remove DELETE bit from user's ACE if
	allow_traverse is set.

2005-04-19  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din (pselect): Export.
	* select.cc (pselect): New function.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/select.h: Include signal.h.  Declare pselect.

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

	* fhandler.h (enum conn_state): Add connect_failed state.
	* fhandler_socket.cc (fhandler_socket::connect): Set connect_state to
	connect_failed when connect failed.
	* poll.cc (poll): Change errno to EINVAL if allocating memory fails,
	according to SUSv3. Add socket descriptors always to except_fds. Test
	for failed connect and set revents flags appropriately.
	* select.cc (set_bits): Set connect_state to connect_failed when
	select indicates failed nonblocking connect.
	(fhandler_dev_null::select_except): Set except_ready to false so that
	/dev/null is not always in except state.
	(peek_socket): Fix bogus conditional.
	(fhandler_socket::select_write): Treat all connect_states except
	unconnected equivalent to return consistent results.
	(fhandler_windows::select_except): Set except_ready to false so that
	/dev/windows is not always in except state.

2005-04-18  Christopher Faylor  <cgf@timesys.com>

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

2005-04-18  Pierre Humblet <pierre.humblet@ieee.org>

	* grp.cc (initgroups32): Return the correct value.

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

	* fhandler_disk_file.cc (fhandler_base::utimes_fs): Ignore
	ERROR_NOT_SUPPORTED to workaround Win9x weirdness.
	* path.cc (symlink_info::check): Remap ERROR_INVALID_FUNTION to
	ERROR_FILE_NOT_FOUND for the same reason.

2005-04-16  Corinna Vinschen  <corinna@vinschen.de>
	    Pierre Humblet <pierre.humblet@ieee.org>

	* security.h (cygsidlist::addfromgr): Allow duplicate entries.
	(get_server_groups): Declare new function.
	* security.cc (is_group_member): Simplify.
	(get_server_groups): New function.
	(get_initgroups_sidlist): Call get_server_groups.
	(verify_token): Allow token when supplementary sids are not in
	/etc/group but are in the token.
	Streamline the code.
	* grp.cc (initgroups32): New implementation.
	(getgroups32): Handle case where the supplementary groups are set.

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

	* environ.cc (environ_init): Don't set traverse checking as default.

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

	* fhandler_disk_file.cc (fhandler_base::utimes_fs): Drop touching
	ChangeTime.

2005-04-16  Christopher Faylor  <cgf@timesys.com>

	* fhandler.cc (fhandler::dup): Duplicate flags, too.
	* fhandler.h (fhandler_fifo::owner): Eliminate.
	* fhandler_disk_file.cc (fhandler_base::fstat_fs): Handle on-disk
	devices better.
	(fhandler_base::fstat_helper): Ditto.
	* fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Don't initialize
	obsolete "owner".
	(fhandler_fifo::open_not_mine): Add some debugging.  Duplicate correct
	handle when we own it.
	(fhandler_fifo::open): Set flags from input, not from first pipe.  Flag
	that fork fixup is needed.
	(fhandler_fifo::dup): Set errno correctly when DuplicateHandle fails.
	* pinfo.cc (commune_send): Add debugging for fifo.

	* cygwin/version.h: Bump API minor version to 127 to reflect exporting
	of sigrelese.

2005-04-14  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>

	* syscalls.cc (setuid32): Correct debugging output.

2005-04-14  Christopher Faylor  <cgf@timesys.com>

	* dcrt0.cc (do_global_dtors): Run DLL dtors.
	(__main): Don't rely on atexit to run dtors.
	(do_exit): Specifically call do_global_dtors here.
	(cygwin_exit): Ditto.
	* dll_init.cc (dll_global_dtors): Make global.  Only run dtors once.
	(dll_list::init): Just set flag that dtors should be run.  Don't rely on atexit.
	* dll_init.h (dll_global_dtors): Declare.

	* exceptions.cc (sigrelse): Define.

	* path.h (is_fs_device): New method.
	(is_lnk_special): Ditto.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Use
	"is_lnk_special" rather than "is_lnk_symlink".
	* syscalls.cc (rename): Ditto.

	* hookapi.cc (ld_preload): Use colon as a separator rather than space.

2005-04-13  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_socket): Remove utimes.
	* fhandler_socket.cc (fhandler_socket::utimes): Remove.

2005-04-13  Corinna Vinschen  <corinna@vinschen.de>

	* cygerrno.h (__seterrno_from_nt_status): Define. Always set Win32
	error code as well as errno. Use throughout where errno is set from
	NT status.
	(set_errno): Evaluate val only once.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Fix typo in
	debug output.
	* fhandler_mem.cc (fhandler_dev_mem::open): Rely on
	__seterrno_from_nt_status setting Win32 error code in debug output.
	* fhandler_proc.cc (format_proc_uptime): Ditto.
	(format_proc_stat): Ditto.
	* fhandler_process.cc (format_process_stat): Ditto.
	* sysconf.cc (sysconf): Ditto.

2005-04-13  Christopher Faylor  <cgf@timesys.com>

	* fhandler.h (fhandler_base::utimes_fs): New method.
	* fhandler.cc (fhandler_base::utimes): Call utimes_fs if on-disk
	special file.
	* fhandler_disk_file.cc (fhandler_disk_file::utimes): Use utimes_fs.
	(fhandler_base::utimes_fs): Handle on-disk device files.

2005-04-13  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::utimes): Don't set errno
	if open fails, it has already been set by open.

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

	* autoload.cc (NtQueryVolumeInformationFile): Add.
	* fhandler.cc (fhandler_base::raw_write): Don't touch has_changed flag.
	* fhandler.h (enum change_state): Remove.
	(fhandler_base::status): Revert has_changed to a simple bit.
	(fhandler_base::fstat_helper): Add nAllocSize parameter.  Rename
	ftCreationTime to ftChangeTime.
	* fhandler_disk_file.cc: Call fstat_helper with additional
	allocation size throughout.
	(fhandler_base::fstat_by_handle): Use NT native functions to get
	full file information on NT.  Call fstat_helper with LastWriteTime
	as ctime, if ChangeTime is not available.
	(fhandler_base::fstat_by_name): Call fstat_helper with LastWriteTime
	as ctime.
	(fhandler_base::fstat_helper): Add comment. Drop special FAT
	handling since it's useless. Use nAllocSize for st_blocks if available.
	(fhandler_disk_file::touch_ctime): Only touch LastWriteTime.
	(fhandler_disk_file::fchmod): Set has_changed on 9x only.
	(fhandler_disk_file::fchown): Don't set has_changed.
	(fhandler_disk_file::facl): Ditto.
	(fhandler_disk_file::ftruncate): Ditto.
	(fhandler_disk_file::link): Set has_changed on 9x only and on original
	file only.
	(fhandler_base::open_fs): Don't set has_changed in O_TRUNC case.
	* ntdll.h (FILE_BASIC_INFORMATION): Define.
	(FILE_STANDARD_INFORMATION): Define.
	(FILE_INTERNAL_INFORMATION): Define.
	(FILE_EA_INFORMATION): Define.
	(FILE_ACCESS_INFORMATION): Define.
	(FILE_POSITION_INFORMATION): Define.
	(FILE_MODE_INFORMATION): Define.
	(FILE_ALIGNMENT_INFORMATION): Define.
	(FILE_NAME_INFORMATION): Don't define with arbitrary FileName size.
	(FILE_ALL_INFORMATION): Define.
	(FILE_INFORMATION_CLASS): Add FileAllInformation.
	(FILE_FS_VOLUME_INFORMATION): Define.
	(FS_INFORMATION_CLASS): Define.
	(NtQueryVolumeInformationFile): Define.

2005-04-11  Corinna Vinschen  <corinna@vinschen.de>

	Revert previous patch.
	* autoload.cc (GetVolumePathNamesForVolumeNameA): Remove.
	(GetVolumeNameForVolumeMountPointA): Add.
	* syscalls.cc (sync): Rewrite guid case to skip floppies also on
	Windows 2000.

2005-04-11  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (sync): Use renamed has_get_volume_pathnames wincap.
	* wincap.h (wincaps::has_get_volume_pathnames): Rename from
	has_guid_volumes
	* wincap.cc: Accomodate above rename throughout.  Set to false on
	Windows 2000.

2005-04-08  Christopher Faylor  <cgf@timesys.com>

	* pipe.cc (fhandler_pipe::open): Remove O_CREAT limitation.

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

	* syslog.cc (try_connect_guard): Remove useless conditionalized code.

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

	* syslog.cc: Include sys/socket.h.
	(try_connect_guard): New static variable.
	(syslogd_inited): Ditto.
	(syslogd_sock): Ditto.
	(try_connect_syslogd): New function to connect and write syslog to
	local syslogd.
	(vsyslog): Log to stderr if LOG_PERROR flag has been given to openlog.
	Try logging to syslogd.  Use Event Log resp. log file as fallback.
	(closelog): Close socket to syslogd.
	* include/sys/syslog.h (_PATH_LOG): Define.
	(INTERNAL_NOPRI): Define if SYSLOG_NAMES is defined.
	(INTERNAL_MARK): Ditto.
	(struct _code): Ditto.
	(prioritynames): Ditto.
	(facilitynames): Ditto.

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

	* fhandler_socket.cc (get_inet_addr): Add type parameter to return
	unix socket type.  Read socket type from unix socket file.
	(fhandler_socket::bind): Write socket type to unix socket file.
	(fhandler_socket::connect): Return with errno EPROTOTYPE if
	socket type of socket doesn't match socket type of unix socket
	trying to connect to.

2005-04-06  Pierre Humblet <pierre.humblet@ieee.org>

	* security.h (cygsidlist::addfromgr): Avoid duplicate entries.
	* grp.cc (initgrousp): Add syscall_printf.
	(setgroups): Add syscall_printf and make sure sids are added only once.

2005-04-06  Christopher Faylor  <cgf@timesys.com>

	* net.cc (cygwin_getservbyname): Return (possibly NULL) return value of
	dup_ent rather than assuming that tls buffer is valid.
	(cygwin_getservbyport): Ditto.
	(cygwin_gethostbyname): Ditto.
	(cygwin_gethostbyaddr): Ditto.

2005-04-05  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (_cygtls::remove): Don't free or close stuff if we're being
	called in a "non-standard" way.

2005-04-05  Christopher Faylor  <cgf@timesys.com>

	* sync.h (muto::initforce): Delete flawed implementation.
	* pwdgrp.h (pwdgrp::pglock): Make static.
	* grp.cc (pwdgrp::pwdgrp): Eliminate use of initforce.

2005-04-05  Christopher Faylor  <cgf@timesys.com>

	* sync.h (muto::initforce): Force initialization even when name !=
	NULL.
	* grp.cc (pwdgrp::pwdgrp): Use initforce since the enclosing structure
	is !NO_COPY.

2005-04-05  Christopher Faylor  <cgf@timesys.com>

	* sync.h (muto::operator int): New operator.
	(locker): Remove unused class.
	(new_muto): Delete.
	(new_muto1): Ditto.
	(new_muto_name): Ditto.
	* cygheap.cc (cygheap_setup_for_child): Reflect use of static storage
	for muto rather than pointer.
	(_csbrk): Ditto.
	(_cmalloc): Ditto.
	(_cmalloc): Ditto.
	(_cfree): Ditto.
	* cygheap.h (cwdstuff::cwd_lock): Ditto.
	(cwdstuff::get_drive): Ditto.
	* cygmalloc.h (__malloc_lock): Ditto.
	(__malloc_unlock): Ditto.
	* cygtls.cc (sentry::lock): Ditto.
	(sentry::sentry): Ditto.
	(~sentry): Ditto.
	(_cygtls::init): Ditto.
	* dcrt0.cc: Ditto.
	(cygwin_atexit): Ditto.
	(cygwin_exit): Ditto.
	* debug.cc (lock_debug::locker): Ditto.
	(lock_debug::lock_debug): Ditto.
	(lock_debug::unlock): Ditto.
	(debug_init): Ditto.
	* dtable.cc (dtable::init_lock): Ditto.
	* dtable.h (dtable::lock_cs): Ditto.
	(dtable::lock): Ditto.
	(dtable::unlock): Ditto.
	* exceptions.cc (mask_sync): Ditto.
	(sighold): Ditto.
	(set_process_mask_delta): Ditto.
	(set_signal_mask): Ditto.
	(events_init): Ditto.
	* grp.cc (pwdgrp::pwdgrp): Ditto.
	* malloc_wrapper.cc (mallock): Ditto.
	(malloc_init): Ditto.
	* path.cc (cwdstuff::cwd_lock): Ditto.
	(cwdstuff::get_hash): Ditto.
	(cwdstuff::get_hash): Ditto.
	(cwdstuff::init): Ditto.
	(cwdstuff::set): Ditto.
	(cwdstuff::get): Ditto.
	* pwdgrp.h (pwdgrp::pglock): Ditto.
	(pwdgrp::refresh): Ditto.
	* sigproc.cc (sync_proc_subproc): Ditto.
	(get_proc_lock): Ditto.
	(proc_subproc): Ditto.
	(_cygtls::remove_wq): Ditto.
	(proc_terminate): Ditto.
	(sigproc_init): Ditto.
	* timer.cc (lock_timer_tracker::protect): Ditto.
	(lock_timer_tracker::lock_timer_tracker): Ditto.
	(lock_timer_tracker::~lock_timer_tracker): Ditto.
	* wininfo.cc (wininfo::_lock;): Ditto.
	(wininfo::winthread): Ditto.
	(operator HWND): Ditto.
	(wininfo::lock): Ditto.
	(wininfo::release): Ditto.
	* wininfo.h (wininfo::_lock;): Ditto.

2005-04-04  Christopher Faylor  <cgf@timesys.com>

	* path.cc (path_conv::check): Only check for PC_NO_ACCESS_CHECK in end
	component.

2005-04-04  Corinna Vinschen  <corinna@vinschen.de>

	* dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges on 9x.

	* fhandler.h (enum change_state): Add.
	(fhandler_base::status): Add a bit to has_changed flag.
	(fhandler_base::has_changed): Implement with type change_state.
	* fhandler.cc (fhandler_base::raw_write): Accommodate type change
	of has_changed.
	* fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): Also
	touch modification time if has_changed == data_changed.
	(fhandler_disk_file::fchmod): Also open on 9x, otherwise we can't
	touch ctime.  Accommodate type change of has_changed.
	(fhandler_disk_file::fchown): Accommodate type change of has_changed.
	(fhandler_disk_file::facl): Ditto.
	(fhandler_disk_file::ftruncate): Ditto.
	(fhandler_disk_file::link): Ditto.
	(fhandler_base::open_fs): Ditto.

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

	* cygheap.cc (cygheap_init): Accommodate set_process_privilege change.
	* cygheap.h (cygheap_user::curr_primary_token): New member.
	(cygheap_user::primary_token): New method.
	(cygheap_user::deimpersonate): Always revert to processes'
	impersonation token.
	(cygheap_user::reimpersonate): Set processes' or setuid token as
	necessary.
	(cygheap_user::has_impersonation_tokens): Look for curr_primary_token
	value.
	(cygheap_user::close_impersonation_tokens): Close curr_primary_token
	here if necessary.  Don't reset token values to NO_IMPERSONATION since
	that's done in uinfo_init anyway.
	(init_cygheap::luid): New LUID array keeping privilege LUIDs.
	* cygtls.cc (_cygtls::init_thread): Call cygheap->user.reimpersonate.
	* dcrt0.cc (hProcToken): New global variable to keep process token.
	(hProcImpToken): Ditto for process impersonation token.
	(dll_crt0_0): Open process token here once.  Duplicate to create
	hProcImpToken.
	(dll_crt0_1): Call set_cygwin_privileges.
	* environ.cc (allow_ntea): Drop duplicate declaration.
	(allow_smbntsec): Ditto.
	(set_traverse): Only set allow_traverse here.
	(environ_init): Ditto.
	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Drop call to
	enable_restore_privilege.
	(fhandler_disk_file::fchown): Ditto.
	(fhandler_disk_file::facl): Ditto.
	* fork.cc (fork_child): Move call to cygheap->user.reimpersonate after
	syn with parent. Call set_cygwin_privileges.
	* grp.cc (internal_getgroups): Use hProcImpToken instead of opening
	process token.
	* path.cc (fs_info::update): Bypass traverse checking when retrieving
	volume information using push/pop_thread_privileges.
	* registry.cc (load_registry_hive): Drop setting restore privilege
	since it's already set if available.
	* sec_helper.cc: Include cygtls.h.
	(cygpriv): Privilege string array.
	(privilege_luid): New function, evaluate LUID from cygpriv_idx.
	(privilege_luid_by_name): New function, evaluate LUID from privilege
	string.
	(privilege_name): New function, evaluate privilege string from
	cygpriv_idx.
	(set_privilege): New static function called by set_process_privilege
	and set_thread_privilege.  Call privilege_luid to get privilege LUID.
	Fix bug in return value evaluation. Improve debug output.
	(set_cygwin_privileges): New function.
	(set_process_privilege): Remove.
	(enable_restore_privilege): Remove.
	* security.cc (allow_traverse): New global variable.
	(sys_privs): Change type to cygpriv_idx and store privilege indices
	instead of strings.
	(SYSTEM_PRIVILEGES_COUNT): Renamed from SYSTEM_PERMISSION_COUNT.
	(get_system_priv_list): Don't use numerical constant in malloc call.
	Use privilege_luid to get privilege LUIDs.
	(get_priv_list): Call privilege_luid_by_name to get LUIDs. Improve
	inner privilege LUID comparison loop.
	(create_token): Enable create token privilege using
	push/pop_self_privileges. Use hProcToken instead of opening process
	token. Use default DACL when duplicating token.
	(subauth): Enable tcb privilege using push/pop_self_privileges.
	Use sec_none instead of homw made security attributes when duplicating
	token.
	(check_file_access): Don't duplicate access token, use active
	impersonation token as is.
	* security.h (enum cygpriv_idx): New enumeration type enumerating
	possible privileges.
	(privilege_luid): Declare new function.
	(privilege_luid_by_name): Ditto.
	(privilege_name): Ditto.
	(allow_traverse): Declare.
	(set_privilege): Declare function.
	(set_process_privilege): Define as macro.
	(enable_restore_privilege): Remove declaration.
	(_push_thread_privilege): Define macro.
	(push_thread_privilege): Ditto.
	(pop_thread_privilege): Ditto.
	(pop_self_privilege): Ditto.
	* spawn.cc (spawn_guts): Use cygheap->user.primary_token instead of
	cygheap->user.token.
	* syscalls.cc (statvfs): Bypass traverse checking when retrieving
	volume information using push/pop_thread_privileges. Rearrange code
	to simplify push/pop bracketing.
	(seteuid32): Use hProcToken instead of opening process token. Call
	cygheap->user.deimpersonate instead of RevertToSelf.  Create
	impersonation token from primary internal or external token.  Set
	cygheap->user.curr_primary_token and cygheap->user.current_token
	privileges once here.  Drop "failed" and "failed_ptok" labels.
	Drop setting DefaultDacl of process token.
	(setegid32): Use hProcToken and hProcImpToken instead of opening
	process token. Always reimpersonate afterwards.
	* uinfo.cc (cygheap_user::init): Use hProcToken instead of opening
	process token.
	(internal_getlogin): Ditto. Set hProcImpToken, too.
	(uinfo_init): Initialize cygheap->user.curr_primary_token.
	* winsup.h (hProcToken): Declare.
	(hProcImpToken): Declare.

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

	Unify usage of CYG_MAX_PATH throughout.  Change buffers from
	size CYG_MAX_PATH + 1 to CYG_MAX_PATH.  Change length tests
	accordingly.

2005-04-02  Christopher Faylor  <cgf@timesys.com>

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

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

	* fork.cc (fork_child): Add missing __stdcall.

2005-04-01  Christopher Faylor  <cgf@timesys.com>

	* sigproc.cc (create_signal_arrive): New (temporary?) function to
	create signal_arrived event.
	(sigproc_init): Use create_signal_arrived.
	* fork.cc (fork_child): Create signal_arrived early.

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

	* fork.cc (fork_child): Fixup SYSV IPC shared memory before fixing
	up fdtab.

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

	* gentls_offsets: Add '-m32' flag to native compiler call to satisfy
	cross platform builds.

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

	* errno.cc (NO_SYSTEM_RESOURCES): Map to EAGAIN.
	(NONPAGED_SYSTEM_RESOURCES): Ditto.
	(PAGED_SYSTEM_RESOURCES): Ditto.
	(WORKING_SET_QUOTA): Ditto.
	(PAGEFILE_QUOTA): Ditto.
	(COMMITMENT_LIMIT): Ditto.

2005-03-30  Christopher Faylor  <cgf@timesys.com>

	* environ.cc (spenvs): Re-force SYSTEMROOT to always be included in
	environment.
	(build_env): Ditto.

2005-03-30  Christopher Faylor  <cgf@timesys.com>

	* environ.cc (spenv::retrieve): Revert most of previous change.
	(build_env): Ditto.  Rework to track environment variables which need
	to always be in the windows environment in a separate array.

2005-03-30  Igor Pechtchanski  <pechtcha@cs.nyu.edu>

	* path.cc (symlink_info::case_check): Ignore trailing characters
	in paths when comparing case.

2005-03-30  Christopher Faylor  <cgf@timesys.com>

	* environ.h (win_env::immediate): Declare new field.
	(win_env::operator = ): Declare new operator.
	(win_env::reset): Declare new function.
	(win_env::~win_env): Declare new destructor.
	(getwinenv): Add optional third argument to declaration.
	* environ.cc (conv_envvars): Accommodate immediate field.
	(win_env::operator =): Define new operator.
	(win_env::~win_env): Define new destructor.
	(win_env::add_cache): Add value to environment immediately if
	"immediate" is set.
	(getwinenv): Accept optional third argument which will be used to store
	"cached" values to avoid overwriting real cache.
	(spenv::force): Declare new field.
	(spenvs): Accommodate force field.  Add "PATH=" with force set to true.
	(spenv::retrieve): Avoid duping anything if we're not building an
	envblock.
	(build_env): Ditto.  Use size of potentially constructed new
	environment block to determine if we need to create an environment
	block.  Pass getwinenv temporary storage to avoid inappropriately
	overwriting the environment cache.

2005-03-29  Eric Blake  <ebb9@byu.net>

	* include/limits.h (NAME_MAX): New define.
	(PATH_MAX): POSIX allows PATH_MAX to include trailing NUL.

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

	* path.cc (is_floppy): Make externally available.
	* path.h (is_floppy): Declare.
	* syscalls.cc (sync): Check for floppies on A: and B: in guid case.
	Don't call setmntent in non-guid case but evaluate drive bit mask
	locally.

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

	* fhandler_process.cc: Re-add exename.

2005-03-28  Christopher Faylor  <cgf@timesys.com>

	* include/ctype.h: Accommodate building in newlib.

2005-03-28  Christopher Faylor  <cgf@timesys.com>

	* timer.cc (getitimer): Check that ovalue is a valid pointer, not just
	NULL.

2005-03-28  Christopher Faylor  <cgf@timesys.com>

	* timer.cc (timer_tracker::settime): Set times to zero when just
	cancelling a timer.

2005-03-28  Christopher Faylor  <cgf@timesys.com>

	* cygthread.cc (cygthread::detach): Revert to just waiting for thread
	event since waiting for anything else is racy.
	* timer.cc (timer_tracker::hcancel): Rename from cancel.
	(timer_tracker::cancel): New method.
	(timer_tracker::th): Remove.
	(timer_tracker::~timer_tracker): Call cancel method.
	(timer_tracker::timer_tracker): Ditto.
	(timer_tracker::timer_tracker): Always, clear cancel, even though it is
	probably not strictly necessary for ttstart.
	(timer_thread): Accommodate cancel -> hcancel rename.
	(timer_tracker::settime): Ditto.
	(timer_tracker::gettime): Ditto.
	(timer_delete): Ditto.

	* cygwin.din: Export _ctype_.
	* include/ctype.h: Mark that _ctype_ is imported.

2005-03-28  Christopher Faylor  <cgf@timesys.com>

	* timer.cc (timer_tracker::timer_tracker): Eliminate simple
	constructor.
	(ttstart): Fully initialize.

	* errno.cc: Fix typo introduced in previous change.

2005-03-28  Eric Blake  <ebb9@byu.net>

	* errno.cc (FILENAME_EXCED_RANGE): Map to ENAMETOOLONG.

2005-03-27  Christopher Faylor  <cgf@timesys.com>

	* signal.cc (nanosleep): Revert tv_sec < 0 check as it is fixed
	properly in the below change to hires.h.

2005-03-27  Pierre Humblet <pierre.humblet@ieee.org>

	* times.cc (hires_ms::usecs): Compare the difference.
	* hires.h: Add parentheses to HIRES_DELAY_MAX.

2005-03-26  Christopher Faylor  <cgf@timesys.com>

	* timer.cc (nanosleep): Treat tv_sec < 0 as invalid.

	* include/search.h: Make declarations consistent with newlib.

2005-03-26  Pierre Humblet <pierre.humblet@ieee.org>
	    Christopher Faylor <cgf@timesys.com>

	* wininfo.h (wininfo::timer_active): Delete.
	(wininfo::itv): Ditto.
	(wininfo::start_time): Ditto.
	(wininfo::window_started): Ditto.
	(wininfo::getitimer): Ditto.
	(wininfo::setitimer): Ditto.
	(wininfo::wininfo): Ditto.
	(wininfo::lock): New method.
	(wininfo::release): Ditto.
	* window.cc:  Use new lock/acquire wininfo methods throughout.
	 (wininfo::wininfo): Delete
	(wininfo::getitimer): Ditto.
	(wininfo::setitimer): Ditto.
	(getitimer): Ditto.
	(setitimer): Ditto.
	(ualarm): Ditto.
	(alarm): Ditto.
	(wininfo::lock): Define new function.
	(wininfo::release): Ditto.
	(wininfo::process): Delete WM_TIMER handling.
	* timer.cc (struct timetracker): Delete it, flags.  Add it_interval,
	interval_us, sleepto_us, running, init_muto(), syncthread, and
	gettime().
	(ttstart): Make NO_COPY.
	(lock_timer_tracker): New class.
	(timer_tracker::timer_tracker): Distinguish ttstart case.
	(timer_tracker::~timer_tracker): New destructor.  Clean out events, and
	reset magic.
	(timer_tracker::init_muto): New method.
	(to_us): Round up as per POSIX.
	(timer_thread): Reorganize to match timer_tracker::settime and
	timer_tracker::gettime.  Call sig_send without wait.  Call
	auto_release.
	(timer_tracker::settime): Reorganize logic to avoid race.  Call gettime
	to recover old value.
	(timer_tracker::gettime): New method.
	(timer_create): Properly set errno on invalid timerid.  Use new
	lock_timer_tracker method.
	(timer_delete): Ditto.  Simplify code slightly.
	(timer_gettime): New function.
	(fixup_timers_after_fork): Reinit ttstart.
	(getitimer): New implementation.
	(setitimer): Ditto.
	(ualarm): Ditto.
	(alarm): Ditto.
	* cygwin.din: Export timer_gettime.
	* winsup.h: Remove has has_visible_window_station declaration.

2005-03-26  Christopher Faylor  <cgf@timesys.com>

	* Makefile.in (DLL_OFILES): Add lsearch.o.
	* cygthread.h (cygthread::notify_detached): New element.
	(cygthread::cygthread): Take optional fourth argument signifying event
	to signal on thread completion.
	* cygthread.cc (cygthread::stub): Signal notify_detached event, if it
	exists.
	(cygthread::cygthread): Initialize notify_detached from fourth argument.
	(cygthread::detach): Wait for notify_detached field is present.

	* lsearch.cc: New file.
	* search.h: Ditto.
	* include/cygwin/version.h: Bump API minor number to 126.
	* cygwin.din: Export lsearch, lfind.

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

	* fhandler.h (fhandler_socket::secret_event): Remove.
	(fhandler_socket::af_local_set_secret): New function combining former
	set_connect_secret and get_connect_secret into one function.
	(fhandler_socket::af_local_setblocking): Rename from eid_setblocking.
	(fhandler_socket::af_local_unsetblocking): Rename from
	eid_unsetblocking.
	(fhandler_socket::af_local_set_cred): New method.
	(fhandler_socket::af_local_copy): New method.
	(fhandler_socket::af_local_recv_secret): New method.
	(fhandler_socket::af_local_send_secret): New method.
	(fhandler_socket::af_local_recv_cred): Rename from eid_recv.
	(fhandler_socket::af_local_send_cred): Rename from eid_send.
	(fhandler_socket::af_local_accept): New method.
	(fhandler_socket::af_local_set_sockpair_cred): Rename from
	set_socketpair_eids.
	(fhandler_socket::eid_accept): Remove.
	(fhandler_socket::eid_connect): Remove.
	(fhandler_socket::set_connect_secret): Remove.
	(fhandler_socket::get_connect_secret): Remove.
	(fhandler_socket::create_secret_event): Remove.
	(fhandler_socket::check_peer_secret_event): Remove.
	(fhandler_socket::signal_secret_event): Remove.
	(fhandler_socket::close_secret_event): Remove.
	(fhandler_socket::sec_event_accept): Remove.
	(fhandler_socket::sec_event_connect): Remove.
	* fhandler_socket.cc (secret_event_name): Remove.
	(fhandler_socket::af_local_set_sockpair_cred): Rename from
	set_socketpair_eids.
	(fhandler_socket::af_local_setblocking): Rename from eid_setblocking.
	(fhandler_socket::af_local_unsetblocking): Rename from
	eid_unsetblocking.
	(fhandler_socket::af_local_recv_secret): New function to receive
	AF_LOCAL connect secret over socket itself.
	(fhandler_socket::af_local_send_secret): New function to send AF_LOCAL
	connect secret over socket itself.
	(fhandler_socket::af_local_recv_cred): Rename from eid_recv.
	(fhandler_socket::af_local_send_cred): Rename from eid_send.
	(fhandler_socket::eid_connect): Remove.
	(fhandler_socket::af_local_connect): Take over connect side handling
	of AF_LOCAL secret and credential handshake.
	(fhandler_socket::eid_accept): Remove.
	(fhandler_socket::af_local_accept): New method, take over accept side
	handling of AF_LOCAL secret and credential handshake.
	(fhandler_socket::af_local_set_cred): New method, set eid credentials
	to start values.
	(fhandler_socket::af_local_copy): New method, copy secret and
	credentials to another socket.
	(fhandler_socket::af_local_set_secret): New function combining former
	set_connect_secret and get_connect_secret into one function.
	(fhandler_socket::create_secret_event): Remove.
	(fhandler_socket::signal_secret_event): Remove.
	(fhandler_socket::close_secret_event): Remove.
	(fhandler_socket::check_peer_secret_event): Remove.
	(fhandler_socket::sec_event_connect): Remove.
	(fhandler_socket::sec_event_accept): Remove.
	(fhandler_socket::fixup_after_fork): Drop secret_event handling.
	(fhandler_socket::bind): Call af_local_set_secret.
	(fhandler_socket::connect): Call af_local_set_cred and af_local_connect.
	(fhandler_socket::listen): Call af_local_set_cred.
	(fhandler_socket::accept): Call af_local_copy and af_local_accept on
	accepted socket.
	(fhandler_socket::close): Don't call close_secret_event.
	(fhandler_socket::set_close_on_exec): Don't set secret_event
	inheritance.
	* net.cc (cygwin_getsockopt): Add debug output.
	(socketpair): Call af_local_set_sockpair_cred instead of
	set_socketpair_eids.
	* select.cc (set_bits): Drop AF_LOCAL special handling in case
	of except bit set.

2005-03-23  Christopher Faylor  <cgf@timesys.com>

	* include/ctype.h: Always define macros when inside cygwin.
	(isblank): New macro.

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

	* fhandler.h (fhandler_socket::eid_connect): Make private.
	(fhandler_socket::set_connect_secret): Ditto.
	(fhandler_socket::get_connect_secret): Ditto.
	(fhandler_socket::create_secret_event): Ditto. Remove secret argument.
	(fhandler_socket::check_peer_secret_event): Ditto.
	(fhandler_socket::signal_secret_event): Make private.
	(fhandler_socket::close_secret_event): Ditto.
	(fhandler_socket::sec_event_accept): New private method.
	(fhandler_socket::sec_event_connect): Ditto.
	(fhandler_socket::af_local_connect): New public method.
	* fhandler_socket.cc: Use 'struct sockaddr' and 'struct sockaddr_in'
	rather than just 'sockaddr' and 'sockaddr_in' throughout.
	(fhandler_socket::eid_connect): Drop AF_LOCAL/SOCK_STREAM test.
	(fhandler_socket::create_secret_event): Remove secret argument.
	Always use connect_secret instead.
	(fhandler_socket::check_peer_secret_event): Ditto.
	(fhandler_socket::sec_event_connect): New method, combining entire
	secret event handshake on connect side.
	(fhandler_socket::af_local_connect): New method, combining secret
	event handshake and eid credential transaction on connect side, to
	be called from select.
	(fhandler_socket::sec_event_accept): New method, combining entire
	secret event handshake on accept side.
	(fhandler_socket::connect): Drop secret, use connect_secret instead.
	Move entire secret event handshake to sec_event_connect.
	(fhandler_socket::accept): Move entire secret event handshake to
	sec_event_accept.
	* select.cc (set_bits): Just call af_local_connect here.

2005-03-23  Christopher Faylor  <cgf@timesys.com>

	* include/cygwin/version.h: Change comment for most recent API version
	bump to reflect new additions to the DLL and to remove change obsoleted
	by the previous checkin.

2005-03-23  Christopher Faylor  <cgf@timesys.com>

	* include/ctype.h: New file.
	* ctype.cc: Ditto.
	* Makefile.in: Add ctype.o to DLL_OFILES.
	* cygwin.din: Remove _ctype_ptr (for now?).

2005-03-22  Christopher Faylor  <cgf@timesys.com>

	* Makefile.in (DLL_OFILES): Add hookapi.o.  Eliminate some cruft.
	* cygheap.h (cygheap_types): Add new enum: HEAP_1_HOOK.
	(hook_chain): New struct.
	(init_cygheap::hooks): Define new element.
	* cygheap.cc (cygheap_fixup_in_child): Zero hook chain on exec.
	* dcrt0.cc (dll_crt0_1): Call ld_preload just before calling main function.
	* external.cc (cygwin_internal): Implement CW_HOOK.
	* fork.cc (fork_child): Call fixup_hooks_after_fork.
	* init.cc (cygwin_hmodule): Reinstate after a long absence.
	* include/sys/cygwin.h: Define CW_HOOK.
	* hookapi.cc: New file.

	* select.cc (start_thread_socket): Add debugging output.

	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): gcc 4.x
	accommodation.

	* fhandler_socket.cc (fhandler_socket::connect): Make sure that err is
	initialized.

2005-03-22  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din (__ctype_ptr): Export.
	* include/cygwin/version.h: Bump API minor version.

2005-03-21  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class cygthread): Remove forward declaration.

2005-03-21  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class cygthread): Forward declare.
	(fhandler_socket::sec_pipe): Remove.
	(fhandler_socket::eid_pipe_name): Remove.
	(fhandler_socket::eid_setblocking): New private method.
	(fhandler_socket::eid_unsetblocking): Ditto
	(fhandler_socket::eid_recv): Ditto
	(fhandler_socket::eid_send): Ditto
	(fhandler_socket::eid_accept): Ditto
	(fhandler_socket::eid_connect): New public method.
	* fhandler_socket.cc (ASYNC_MASK): Move to beginning of file.
	(fhandler_socket::eid_pipe_name): Remove.
	(fhandler_socket::set_socketpair_eids): Move down to fhandler_socket
	methods.
	(fhandler_socket::fhandler_socket): Drop initializing sec_pipe.
	(fhandler_socket::~fhandler_socket): Drop closing sec_pipe.
	(fhandler_socket::eid_setblocking): New method.
	(fhandler_socket::eid_unsetblocking): New method.
	(fhandler_socket::eid_recv): New method.
	(fhandler_socket::eid_send): New method.
	(fhandler_socket::eid_connect): New method.
	(fhandler_socket::eid_accept): New method.
	(fhandler_socket::dup): Drop sec_pipe handling.
	(fhandler_socket::connect): Fix WinSock error handling. Prepare
	eid credential transaction. Call eid_connect on successful connect.
	(fhandler_socket::listen): Drop creating sec_pipe.
	(fhandler_socket::accept): Slightly simplify code. Call eid_accept
	on accepted socket.
	(fhandler_socket::getpeereid): Reshuffle code for readability. Fix
	test for invalid pid.
	* select.cc (set_bits): Call eid_connect on successfully connected
	socket.

2005-03-19  Christopher Faylor  <cgf@timesys.com>

	* child_info.h (fork_info): Use different method to alias variable.
	(spawn_info): Ditto.
	* cxx.cc (__cxa_guard_acquire): New function (needed for gcc 4.x).
	(__cxa_guard_release): Ditto.
	* devices.in: Make sure stuff is correctly bracketed (for gcc 4.x).
	* devices.cc: Regenerate.
	* fhandler.h (fhandler_disk_file::fchmod): Avoid left coercion (for gcc
	4.x).
	* smallprint.c (__rn): Declare as __fastcall since gcc 4.x complains
	about use of regparm, for some reason.
	* sync.h (sync::init_lock): Remove.
	* sync.cc (sync::init_lock): Ditto.

2005-03-18  Christopher Faylor  <cgf@timesys.com>

	* net.cc (cygwin_getprotobyname): Don't try to be fancy with return
	values.
	(cygwin_getprotobynumber): Ditto.

2005-03-17  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::utimes): Handle opening
	directories under 9x gracefully.

2005-03-17  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::connect): Always set sun_path
	in case of a successful or pending connect.
	(fhandler_socket::accept): Don't run secret event and eid credential
	transactions if OS accept returned WSAEWOULDBLOCK.

2005-03-16  Christopher Faylor  <cgf@timesys.com>

	* fhandler_tape.cc (get_ll): This is a generally useful function so
	move it
	* winsup.h (get_ll): to here.
	* security.cc (get_token_group_sidlist): Use get_ll to figure out the
	long long version of the luid since QuadPart is not part of the
	standard Windows API.

2005-03-16  Christopher Faylor  <cgf@timesys.com>

	* dir.cc: Rename opendir_* to dirent_* throughout.
	(opendir_states): Move and rename.
	* fhandler.h (dirent_states): to here.
	* fhandler_disk_file.cc (fhandler_disk_file::readdir): Use raw readdir
	when skipping through entries since it is keeping track of "." and
	"..".
	(fhandler_cygdrive::seekdir): Use fhandler_disk_file::readdir to do
	everything.
	* fhandler_virtual.cc (fhandler_virtual::opendir): Set flag indicating
	that we provide .  and ..
	(fhandler_virtual::seekdir): Ditto.
	(fhandler_virtual::rewinddir): Ditto.
	* fhandler_registry.cc (fhandler_registry::rewinddir): Ditto.

2005-03-16  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (free_local): New macro.
	(_cygtls::remove): Use free_local to free known-malloced local
	variables.
	* cygtls.h: Mark some variables as "malloced".
	* net.cc (enum struct_type): Rename from is_* to t_* for clarity.
	(dump_protoent): Delete.
	(dup_ent): New macro.
	(__dup_ent): Renamed from dup_ent.  Change arguments for convenience.
	Replace first argument with newly alloced value.  Allocate a rounded
	number of bytes in an attempt to try to reuse space.  Subsume
	"dump_protent".
	(cygwin_getprotobyname): Simplify using new dup_ent functionality.
	(cygwin_getprotobynumber): Ditto.
	(cygwin_getservbyname): Ditto.
	(cygwin_getservbyport): Ditto.
	(cygwin_gethostname): Ditto.
	(cygwin_gethostbyname): Ditto.
	* tlsoffsets.h: Regenerate.

	* syslog.cc (openlog): Use NULL rather than 0, for consistency with the
	rest of cygwin.
	(pass_handler::initialize): Use unbuffered I/O in pass one.

2005-03-15  Christopher Faylor  <cgf@timesys.com>

	* errno.cc (errmap): Correct typo in previous change.

2005-03-15  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (_cygtls::remove): Free process_ident, if it exists.

	* errno.cc (errmap): ERROR_DISK_CORRUPT -> EIO.

2005-03-11  Christopher Faylor  <cgf@timesys.com>

	* path.h (pathconv_arg): Define PC_NO_ACCESS_CHECK.
	(path_types): Define PATH_NO_ACCESS_CHECK == PC_NO_ACCESS_CHECK.
	* path.cc (symlink_info::check_sysfile): Move to symlink_info class and
	eliminate arguments that are part of class.  Use set_error.
	(symlink_info::check_shortcut): Ditto.
	(symlink_info::set_error): New function.
	(path_conv::check): Pass PC_NO_ACCESS_CHECK to symlink_info::check.
	(symlink_info::check): Preserve PC_NO_ACCESS_CHECK in pflags.  Use
	set_error.

2005-03-10  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (is_floppy): New function.
	(setmntent): Drop floppy drives on A: and B: from logical drive DWORD.
	* syscalls.cc (sync): Don't sync floppies on A: and B:.

2005-03-10  Christopher Faylor  <cgf@timesys.com>

	* autoload.cc (LoadDLLprime): Use nocopy segment or forked processes
	will not initialize properly.

2005-03-10  Christopher Faylor  <cgf@timesys.com>

	* autoload.cc (LoadDLLprime): Scrap use of .linkonce and just use an
	ifdef guard to load .foo_init into data segment.

	* dcrt0.cc (initial_env): Allow colon or space as CYGWIN_DEBUG
	separator for consistency.

2005-03-09  Christopher Faylor  <cgf@timesys.com>

	* pinfo.h (pinfo::pinfo): Clear more elements in the constructor.

2005-03-09  Christopher Faylor  <cgf@timesys.com>

	* net.cc (dup_ent): Revert older stupid test for null.  Don't copy name
	if it is NULL.

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

	* fhandler_socket.cc (fhandler_socket::eid_pipe_name): Fix format
	string.
	(fhandler_socket::connect): Set sun_path before running eid credential
	transaction.  Run transaction only if OS connect was successful.
	(fhandler_socket::accept): Run transaction only if OS accept was
	successful.

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

	* signal.cc (sigprocmask): Rename first parameter to "how".
	(handle_sigprocmask): Ditto.  Check "how" for being a valid "how" value.
	Fix call order in case of wrong "how" value.

2005-03-09  Christopher Faylor  <cgf@timesys.com>

	* net.cc (dup_ent): Revert previous stupid change.

2005-03-09  Christopher Faylor  <cgf@timesys.com>

	* net.cc (dup_ent): Avoid dereferencing a null pointer in a debug_printf.

2005-03-09  Christopher Faylor  <cgf@timesys.com>

	* path.cc (path_conv::check): Treat ENOSHARE similarly to ENOENT when
	determining if there was a problem with a symlink.

2005-03-08  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::listen): Don't limit the number
	of pipe instances.

2005-03-08  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::exit): Right shift exit value by eight when not
	started in a cygwin environment.

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

	* mmap.cc (mmap64): Handle MAP_AUTOGROW flag.
	(fhandler_disk_file::mmap): Ditto. Clean conditional for readability.
	* include/sys/mman.h: Add MAP_AUTOGROW flag.
	* include/cygwin/version.h: Bump API minor version.

2005-03-08  Christopher Faylor  <cgf@timesys.com>

	* dcrt0.cc (dll_crt0_0): Eliminate muto::init call.
	* sync.h (locker): New, currently unused class.
	(muto::init): Eliminate.
	* sync.cc (muto::init): Ditto.
	(muto::init): Eliminate critical section lock and instead use name as a
	guard to prevent against multiple attempts to initialize the same muto.

	* pinfo.cc (pinfo::init): Set myself procinfo when not execing and pid
	matches windows pid or cygwin pid.

2005-03-06  Pavel Tsekov  <ptsekov@gmx.net>

	* path.cc (mount_info::read_cygdrive_info_from_registry): Use the user
	prefix if it exists.

2005-03-06  Christopher Faylor  <cgf@timesys.com>

	* sync.h (sync::init_lock): Declare new static member.
	(sync::init()): Declare new static function.
	* sync.cc (sync::init): Define.
	(sync::init): Lock attempt to initialize a muto to stop multiple
	threads from colliding.
	* dcrt0.cc (dll_crt0_0): Initialize muto environment.

2005-03-06  Christopher Faylor  <cgf@timesys.com>

	* path.cc (special_name): Reorganize to always detect the use of
	special names first, before detecting special characters.

2005-03-04  Christopher Faylor  <cgf@timesys.com>

	* fhandler_clipboard.cc: Use int for cygnativeformat rather than UINT
	as that is what is returned by GetPriorityClipboardFormat.
	(fhandler_dev_clipboard::read): Ditto for the format variable.

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

	* fhandler.cc (fhandler_base::open_9x): Satisfy query_open values.

2005-03-04  Pierre Humblet <pierre.humblet@ieee.org>

	* fhandler_socket.cc (fhandler_socket::ioctl): Only cancel
	WSAAsyncSelect when async mode is on.

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

	* cygwin.din (utmpxname): Export.
	* syscalls.cc (utmpxname): Create export alias to utmpname.
	* include/utmpx.h: Define ut_name and ut_xtime if not already defined.
	(utmpxname): Add prototype.
	* include/sys/utmp.h: Only define ut_name if not already defined.
	* include/cygwin/version.h: Bump API minor version.

2005-03-03  Christopher Faylor  <cgf@timesys.com>

	* cygthread.cc (cygthread::detach): Use a slightly higher priority when
	waiting for thread signalling.

2005-03-02  Christopher Faylor  <cgf@timesys.com>

	* autoload.cc (std_dll_init): Save and restore fpu control register
	around LoadAddress to prevent loaded dlls (like msvcrt.dll) from
	setting unwanted stuff.

2005-03-02  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (_cygtls::remove): Don't attempt any removal activities if
	exitsock is zero.

2005-03-02  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (_cygtls::init_thread): Move exitsock setting later.  It
	should always be set.
	(_cygtls::remove): Detect zero exitsock.  Not quite sure why this is needed.

2005-03-02  Christopher Faylor  <cgf@timesys.com>

	* autoload.cc (LoadDLLprime): Mask error code to low-order 16 bits.
	(noload): Preserve sign when returning error code.

2005-03-02  Christopher Faylor  <cgf@timesys.com>

	* spawn.cc (do_cleanup): Properly restore SIGINT/SIGQUIT even if they
	had previously been SIG_DFL.

2005-03-01  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): Replace
	GetSystemTime/SystemTimeToFileTime with GetSystemTimeAsFileTime.
	* times.cc (time_as_timestruc_t): Ditto.
	(time): Ditto.

2005-03-01  Christopher Faylor  <cgf@timesys.com>

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

2005-03-01  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_clipboard.cc (fhandler_dev_clipboard::write): Never set
	errno to 0.
	(fhandler_dev_clipboard::read): Ditto.
	* fhandler_windows.cc (fhandler_windows::read): Ditto.
	* scandir.cc (scandir): Ditto.
	* syscalls.cc (_fstat64_r): Ditto.
	(_fstat_r): Ditto.
	(_stat64_r): Ditto.
	(_stat_r): Ditto.

	* mmap.cc (mmap64): Fix /dev/zero mapping.

2005-02-28  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_socket): Declare new method
	set_socketpair_eids.
	* fhandler_socket.cc (fhandler_socket::set_socketpair_eids): New method.
	(fhandler_socket::dup): Duplicate sec_pipe if necessary.
	(fhandler_socket::listen): Only create sec_pipe if named pipes are
	available. Initialized sec_peer_pid to 0 as on Linux.
	(fhandler_socket::connect): Only run eid credential transaction if
	named pipes are available.  Fake otherwise. Initialized sec_peer_pid
	to 0 as on Linux.
	(fhandler_socket::accept): Ditto.
	(fhandler_socket::close): Move closing sec_pipe handle from here...
	(fhandler_socket::~fhandler_socket): ... to here.
	* net.cc (socketpair): Set eid credentials by calling
	fhandler_socket::set_socketpair_eids() on both socket ends.
	* wincap.h (wincaps::has_named_pipes): New element.
	* wincap.cc: Implement above element throughout.

2005-02-26  Christopher Faylor  <cgf@timesys.com>

	* sigproc.cc (_pinfo::set_ctty): Move function
	* pinfo.cc (_pinfo::set_ctty): to here.

	* fhandler_mem.cc (fhandler_dev_mem::fstat): Don't fill out structure
	if this is an on-disk device rather than an "auto" device.
	* fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.

	* path.cc (normalize_posix_path): Don't treat a standalone '//' as
	introducing a UNC path.
	(normalize_win32_path): Ditto.

2005-02-26  Christopher Faylor  <cgf@timesys.com>

	* debug.cc (delete_handle): Report on handle value in debugging output.

	* pinfo.h (_pinfo::exists): Declare "new" function.
	(_pinfo::kill): Ditto.
	* fhandler_termios.cc (tty_min::kill_pgrp): Use _pinfo::exists rather
	than proc_exists.
	* pinfo.cc (pinfo::init): Ditto.  Don't do a low_priority_sleep(0) when
	looping to find exec'ed procinfo.
	(pinfo::release): Be more careful about unmapping and closing.
	* signal.cc (_pinfo::kill): Rename from kill_worker.  Accommodate entry
	into _pinfo class.
	(kill0): Use _pinfo::kill rather than kill_worker.
	(kill_pgrp): Ditto.  Use _pinfo::exists rather than proc_exists.
	* sigproc.cc (_pinfo::exists): Rename from proc_exists.
	(pid_exists): Use _pinfo::exists rather than proc_exists.
	(remove_proc): Ditto.
	* sigproc.h (proc_exists): Delete declaration.

2005-02-25  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_base): Declare fixup_mmap_after_fork
	with additional flags parameter.  Change offset parameter to _off64_t.
	(class fhandler_disk_file): Ditto.
	(class fhandler_dev_mem): Ditto.
	* fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork):
	Accommodate new parameters.
	* mmap.cc: Include ntdll.h.
	(class mmap_record): Add flags member.
	(mmap_record::mmap_record): Add flags parameter.
	(mmap_record::get_flags): New method.
	(class map): Add next_anon_addr member to store next anonymous mapping
	address suggestion.
	(map::get_next_anon_addr): New method.
	(map::set_next_anon_addr): New method.
	(mmap64): Don't align offset and length to granularity in case of
	MAP_ANONYMOUS on NT.  Check for already existing mapping only on 9x.
	Call mmap_record::mmap_record with additional flags argument.
	(fhandler_base::fixup_mmap_after_fork): Accommodate new parameters.
	(fhandler_disk_file::mmap): Use NtMapViewOfSection with
	AT_ROUND_TO_PAGE flag for anonymous mappings on NT.  If addr is NULL,
	try to map adjacent to previous mapping.
	(fhandler_disk_file::fixup_mmap_after_fork): Add flags argument.
	Change offset parameter to _off64_t.  Use NtMapViewOfSection to
	re-create anonymous mappings on NT.
	(fixup_mmaps_after_fork): Accommodate new parameters when calling
	fhandler's fixup_mmaps_after_fork function.
	* ntdll.h (AT_ROUND_TO_PAGE): New define.

2005-02-25  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (mmap64): Handle anonymous MAP_FIXED request on
	non-granulation boundary.

2005-02-25  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (class mmap_record): Declare new map_pages method with
	address parameter.
	(mmap_record::map_pages): New method with address parameter.
	(mmap64): Evaluate access mode before checking if already existing
	mapping can be used.
	Only use existing mapping if requested access mode matches the one
	in the existing mapping.
	Add check for existing mapping for anonymous MAP_FIXED case.

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

	* localtime.cc: Implement setting __tzrule's offset member using
	newlib's __gettzinfo () interface.
	(__tzrule): Remove.
	(timezone): Define as long according to POSIX.

2005-02-23  Eric Blake  <ebb9@byu.net>

	* devices.in (parsedisk): Fix typo.
	* devices.cc: Regenerate.

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

	* cygwin.din (getpeereid): Export.
	* fhandler.h (class fhandler_socket): Add pipe and id members to
	exchange eid credentials for AF_LOCAL sockets.
	(eid_pipe_name): Declare new method.
	(getpeereid): Ditto.
	* fhandler_socket.cc (fhandler_socket::eid_pipe_name): New method.
	(fhandler_socket::fhandler_socket): Initialize sec_pipe.
	(fhandler_socket::connect): Exchange eid credentials with accepting
	socket process.
	(fhandler_socket::listen): Prepare eid credential transaction.
	(fhandler_socket::accept): Exchange eid credentials with connecting
	socket process.
	(fhandler_socket::close): Close eid credentials pipe if open.
	(fhandler_socket::getpeereid): New method.
	* net.cc (cygwin_getsockopt): Add SO_PEERCRED handling.
	(getpeereid): New function.
	* include/asm/socket.h (SO_PEERCRED): Define.
	* include/cygwin/socket.h (struct ucred): Define new type.
	* include/cygwin/version.h: Bump API minor version.

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

	* include/sys/statvfs.h (ST_RDONLY): Define.
	(ST_NOSUID): Define.

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

	* cygwin.din (fstatvfs): Export.
	(statvfs): Export.
	* syscalls.cc: Include sys/statvfs.h.
	(statvfs): New function.  Move statfs functionality here.
	(fstatvfs): New function.
	(statfs): Just call statvfs and copy structure.  Check validity of
	incoming struct statfs pointer.
	* include/cygwin/types.h (fsblkcnt_t): Define.
	(fsfilcnt_t): Define.
	* include/cygwin/version.h: Bump API minor version.
	* include/sys/statvfs.h: New file.

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

	* devices.h: Switch FH_ZERO and FH_PORT as on Linux.  Add FH_FULL.
	* devices.in: Add /dev/full.
	* devices.cc: Regenerate.
	* dtable.cc (build_fh_pc): Add FH_FULL.
	* fhandler.cc (fhandler_base::fstat): Set FH_FULL permission bits
	correctly.
	* fhandler_zero.cc (fhandler_dev_zero::write): Set errno to ENOSPC
	and return -1 if device is FH_FULL.

2005-02-22  Christopher Faylor  <cgf@timesys.com>

	* fhandler_disk_file.cc (fhandler_cygdrive::closedir): Return 0 when
	closing cygdrive_root.

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

	* cygwin.din (basename): Export.
	(dirname): Export.
	* path.cc (basename): New function.
	(dirname): New function.
	* include/libgen.h: New file.
	* include/cygwin/version.h: Bump API minor version.

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

	* select.cc (peek_pipe): Disable new pipe code until there's
	a working substitute.

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

	* cygwin.din (fdatasync): Export.
	* fhandler.cc (fhandler_base::fsync): Return with EINVAL if no
	handle is available.
	* syscalls.cc (fdatasync): Create export alias to fsync.
	* include/cygwin/version.h: Bump API minor version.

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

	* fhandler.h (fhandler_base::fstat_helper): Declare with additional
	dwVolumeSerialNumber argument.  Drop default values for last three
	arguments.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Pass
	dwVolumeSerialNumber from GetFileInformationByHandle to fstat_helper.
	(fhandler_base::fstat_by_name): Pass pc.volser () to fstat_helper.
	Accommodate dropping default values for last three arguments of
	fstat_helper.
	(fhandler_base::fstat_helper): Add dwVolumeSerialNumber argument.
	Use for st_dev member unless 0 in which case pc.volser () is used.

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

	* autoload.cc (FindFirstVolumeA): Add.
	(FindNextVolumeA): Add.
	(FindVolumeClose): Add.
	(GetVolumePathNamesForVolumeNameA): Add.
	* fhandler.h (class fhandler_base): Declare new method fsync.
	* fhandler.cc (fhandler_base::fsync): New method.
	* syscalls.cc (fsync): Move functionality into fhandler method fsync.
	Just call this method from here.
	(sync_worker): New static function.
	(sync): Fill with life for NT systems.
	* wincap.h (wincaps::has_guid_volumes): New element.
	* wincap.cc: Implement above element throughout.

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

	* fhandler.h (enum query_state): Add query_write_attributes state.
	(fhandler_base::status.query_open): Add a bit to make room for more
	states.
	(class fhandler_base): Declare new method utimes.
	(class fhandler_socket): Ditto.
	(class fhandler_disk_file): Ditto.
	(fhandler_disk_file::fhandler_disk_file): Add constructor with
	path_conv parameter.
	* fhandler.cc (fhandler_base::open): Add query_write_attributes
	handling.
	(fhandler_base::utimes): New method.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Simplify.
	Open file with query_write_attributes instead of query_write_control.
	(fhandler_disk_file::utimes): New method.
	(fhandler_disk_file::fhandler_disk_file): Add constructor with
	path_conv parameter setting pc member immediately.
	* fhandler_socket.cc (fhandler_socket::fchmod): Use new
	fhandler_disk_file constructor.
	(fhandler_socket::fchown): Ditto.
	(fhandler_socket::facl): Ditto.
	(fhandler_socket::link): Ditto.
	(fhandler_socket::utimes): New method.
	* times.cc: Include dtable.h.
	(timeval_to_filetime): Make non-static.
	(utimes): Move functionality into fhandler method utimes. Just call
	this method from here.
	* winsup.h: Simplify declarations of time helper functions.
	(timeval_to_filetime): Add extern declaration.

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

	* fhandler.h (class fhandler_base): Declare new method link.
	(class fhandler_socket): Ditto.
	(class fhandler_disk_file): Ditto.
	* fhandler.cc (fhandler_base::open): Add FILE_WRITE_ATTRIBUTES
	to query_write_control access flags.
	(fhandler_base::link): New method.
	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't try to
	open with O_WRONLY since query_write_control includes
	FILE_WRITE_ATTRIBUTES.
	(fhandler_disk_file::fchown): Ditto.
	(fhandler_disk_file::facl): Ditto.
	(fhandler_disk_file::link): New method.  Touch st_ctime on successful
	link.
	* fhandler_socket.cc (fhandler_socket::link): New method.
	* syscalls.cc (link): Move functionality into fhandler method link.
	Just call this method from here.

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

	* fhandler.h (class fhandler_socket): Declare new methods fchown,
	fchmod and facl.
	* fhandler_socket.cc (fhandler_socket::fstat): Handle AF_LOCAL
	sockets.
	(fhandler_socket::fchmod): New method.
	(fhandler_socket::fchown): New method.
	(fhandler_socket::facl): New method.

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

	* localtime.cc: Temporary implementation of setting __tzrule's offset
	member to be used by strftime.
	(__tzrule): New global variable.
	(tzparse): Set __tzrule's offset member appropriately.

2005-02-17  Christopher Faylor  <cgf@timesys.com>

	* path.cc (path_conv::check): Set fs flag when a unix-domain socket
	is detected.

2005-02-17  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::fstat): Set st_ctime if
	has_changed flag is set.
	(fhandler_disk_file::touch_ctime): Reset has_changed flag on success.

2005-02-17  Corinna Vinschen  <corinna@vinschen.de>

	* times.cc (utimes): Open files with FILE_WRITE_ATTRIBUTES first,
	if that fails, try opeing with GENERIC_WRITE.  Fix comments.

2005-02-15  Christopher Faylor  <cgf@timesys.com>

	* path.h (path_conv::issocket): Return true if device == FH_UNIX rather
	than expecting path_conv to set a flag.

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

	* fhandler.cc (fhandler_base::raw_write): Mark as changed on
	successful write.
	* fhandler.h (fhandler_base::status_flags): Add 'has_changed' flag.
	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call
	fhandler_disk_file's own open and close instead of open_fs and
	close_fs.  Mark as changed on success.
	(fhandler_disk_file::fchown): Ditto.
	(fhandler_disk_file::facl): Ditto.
	(fhandler_disk_file::ftruncate): Ditto.
	(fhandler_base::open_fs): Mark as changed when O_TRUNC flag on existing
	file is set.
	(fhandler_disk_file::close): Set st_ctime if has_changed flag is set.

2005-02-11  Christopher Faylor  <cgf@timesys.com>

	* cygthread.cc (cygthread::release): Reset ev here if it exists.
	(cygthread::terminate_thread): Eliminate racy code which reset ev and
	thread_sync.  Remove a few nonsensical inuse checks.  Exit at the
	bottom.
	(cygthread::detach): Rewrite to again try to ensure that we don't say
	we're signalled when we are not signalled.
	* fhandler.cc (fhandler_base::raw_read): Revert to signalling read
	success quickly.
	* pipe.cc (fhandler_pipe::close): Use base method to close handle.
	* sigproc.h (WAIT_SIG_PRIORITY): Just trundle along at normal priority
	to allow the pipe thread to do its thing if possible.

	* pinfo.h (pinfo::zap_cwd): Declare new function.
	(pinfo::zap_cwd): Move 'cd out of the way code' here.
	(pinfo::exit): Use it here.
	* spawn.cc (spawn_guts): And here.

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

	* times.cc (utimes): Open files with GENERIC_WRITE on file systems
	not supporting ACLs.

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

	* fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Fix checking
	lseek return code.

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

	* times.cc (timeval_to_filetime): Define first parameter const.
	(utimes): Define second parameter to const according to SUSv3.
	(utime): Ditto.
	* include/sys/utime.h (utime) : Change declaration accordingly.

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

	* cygthread.cc (cygthread::detach): Just test thread handle after
	signal arrived, don't wait infinitely for it.

2005-02-08  Christopher Faylor  <cgf@timesys.com>

	* pipe.cc (fhandler_pipe::read): Remove hold over from old read_state
	implementation.

2005-02-06  Yitzchak Scott-Thoennes <sthoenna@efn.org>

	* net.cc (cygwin_gethostbyname): Be more picky about what's a numeric
	address string, and use tls in that case too.

2005-02-07  Christopher Faylor  <cgf@timesys.com>

	* exceptions.cc: Make windows_system_directory non-static.
	* pinfo.cc (pinfo::exit): Change innocuous cd'ed location to one that
	is more likely to exist.

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

	* path.cc (path_conv::check): Leave symlink expansion loop in case
	a not-ENOENT error happens.

	* cygheap.h (cygheap_fdmanip::fhandler_pipe *): New cast operator.
	* pinfo.cc (_pinfo::commune_recv): Add PICOM_PIPE_FHANDLER handling.
	(_pinfo::commune_send): Ditto.
	(_pinfo::pipe_fhandler): New method.
	* pinfo.h (enum picom): Add PICOM_PIPE_FHANDLER.
	(_pinfo::pipe_fhandler): Declare.
	* pipe.cc (fhandler_pipe::open): Rewrite.  Allow to open foreign
	pipe handles.

2005-02-03  Christopher Faylor  <cgf@timesys.com>

	* cygthread.h (cygthread::terminate_thread): Reflect return value.
	* cygthread.cc (cygthread::detach): Be more careful about ensuring that
	sigwait is properly waited for to avoid later missynchronization.
	(cygthread::terminate_thread): Return true if thread was actually
	terminated and all handles were closed.
	* fhandler_base.cc (fhandler_base::raw_read): Use signal_read_state
	rather than raw calls to win32 api.
	(fhandler_base::read): Ditto.
	* fhandler.h (fhandler_pipe::fixup_after_exec): Use method to create
	read_state signalling.
	(fhandler_pipe::create): Ditto.

	* Makefile.in: Make some more files -fomit-frame-pointer.

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

	* fhandler.h (fhandler_base::ftruncate): Define new virtual method.
	(fhandler_disk_file::ftruncate): Ditto.
	* fhandler.cc (fhandler_base::ftruncate): New method.
	* fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Ditto.
	* syscalls.cc (ftruncate64): Move functionality into fhandlers.
	Call fhandler method from here.

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

	* pipe.cc (fhandler_pipe::dup): Fix conditionals in case of error.

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

	* times.cc (utimes): Mark st_ctime for update according to SUSv3.

2005-02-01  Christopher Faylor  <cgf@timesys.com>

	* fhandler_proc.cc (format_proc_partitions): Remove PartitionType check
	since it could skip over partitions that are actually interesting.

2005-02-01  Christopher Faylor  <cgf@timesys.com>

	* cygthread.cc (cygthread::terminate_thread): Wait briefly for
	notification event in the event that the thread was actually in the
	process of exiting.

	* pipe.cc (fhandler_pipe::dup): read_state is not supposed to be
	inheritable.  Fix that.

	* path.cc (path_conv::check): Set symlen = 0 to avoid a compiler
	warning.

	* devices.h (devices::parsedisk): Declare new function.
	* devices.in (devices::parsedisk): Define new function.
	* dtable.cc (dtable::init_std_file_from_handle): Use device numbers
	rather than name.
	* fhandler_proc.cc (format_proc_partitions): Use parsedisk to generate
	disk names from numeric codes.  (This was broken on two of my
	systems previously and is still broken now)

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

	* pipe.cc (fhandler_pipe::open):  Allow re-opening of /proc/<pid>/fd
	pipes of the current process.

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

	* fhandler.cc (fhandler_base::get_proc_fd_name): Don't generate
	"device:" entry.
	* fhandler.h (fhandler_socket::open): New method.
	(fhandler_pipe::open): New method.
	* fhandler_proc.cc (fhandler_proc::exists): Return -2 in case of
	/proc/self.
	* fhandler_process.cc (fhandler_process::exists): Return -2 in
	case of symlinks, -3 for pipes and -4 for sockets.
	(fhandler_process::fstat): Handle pipes and sockets.
	(fhandler_process::open): Handle opening /proc/<pid>/fd.
	(fhandler_process::fill_filebuf): Generate empty names for
	non exisiting file descriptors.
	* fhandler_socket.cc (fhandler_socket::get_proc_fd_name): Always
	generate "socket:[number]" strings as on Linux.
	(fhandler_socket::open): New method.
	(fhandler_socket::fstat): Always return socket type.
	* path.cc (symlink_info::set): Remove unused second parameter.
	(path_conv::check): Handle pipes and sockets in /proc.
	Set correct device type for AF_LOCAL sockets.
	* pinfo.cc (_pinfo::commune_recv): Generate empty names for
	non exisiting file descriptors.
	(_pinfo::fd): Ditto.
	* pipe.cc (fhandler_pipe::open): New method.

2005-01-31  Christopher Faylor  <cgf@timesys.com>

	* path.h (path_conv::set_name): Declare new function.
	* path.cc (path_conv::set_name): Define new function.
	* fhandler.h (fhandler_dev_null::open): Declare new function.
	* fhandler.cc (fhandler_dev_null::open): Define new function.

2005-01-31  Christopher Faylor  <cgf@timesys.com>

	* smallprint.c (rnarg): Use long rather than unsigned long so that we
	get proper sign extension.

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

	* environ.cc (set_traverse): New function.
	(parse_thing): Add "traverse" option.  Sort options alphabetically.
	(environ_init): On NT, switch on traverse checking by default.

2005-01-31  Christopher Faylor  <cgf@timesys.com>

	* smallprint.c (__rn): Regparmize.

2005-01-31  Christopher Faylor  <cgf@timesys.com>

	* smallprint.c (rnarg): New macro.
	(rnargLL): Ditto.
	(__rn): Rename from 'rn', add a mask argument, and use the mask
	argument to control how many significant digits to care about.
	(__small_vsprintf): Use __rn, rnarg, rnargLL, as appropriate.

2005-01-31  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::exit): Only return low-order 16 bits when exiting.

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

	* fhandler_process.cc (format_process_maps): Get destbuf argument by
	reference.  Allow resizing of destbuf as necessary.  Fix string
	handling.

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

	* cygheap.h (class cygheap_fdenum): New class to enumerate used
	fhandlers.
	* dtable.h (class dtable): Add cygheap_fdenum as friend class.
	* fhandler.h (fhandler_base::get_proc_fd_name): New virtual method
	to return a name for /proc/<pid>/fd.
	(fhandler_socket::get_proc_fd_name): Ditto.
	(fhandler_pipe::get_proc_fd_name): Ditto.
	(fhandler_virtual::opendir): Make virtual method.
	(fhandler_process::opendir): New method.
	* fhandler.cc (fhandler_base::get_proc_fd_name): New method.
	* fhandler_process.cc: Include ctype.h.
	(PROCESS_FD): Define.
	(process_listing): Add "fd".
	(fhandler_process::exists): Fix comment.  Return 1 in case of "fd"
	directory. Handle files below "fd".
	(fhandler_process::fstat): Drop "self" handling.  Set correct link
	count for directories.
	(fhandler_process::opendir): New method to handle "fd" directory.
	(fhandler_process::readdir): Add "fd" handling.
	(fhandler_process::open): Drop "self" handling.
	(fhandler_process::fill_filebuf): Ditto.  Add "fd" handling.  Fix
	"maps" output string.
	* fhandler_registry.cc (fhandler_registry::fstat): Set correct link
	count for directories.
	* fhandler_socket.cc (fhandler_socket::get_proc_fd_name): New method.
	* path.cc (symlink_info::set): Fix thinko.
	* pinfo.cc (_pinfo::commune_recv): Rename pathbuf to path throughout.
	Drop local path variable in PICOM_FIFO case.  Fix debug output.
	Close handles as early as possible. Add PICOM_FDS and PICOM_FD
	handling.
	(_pinfo::commune_send): Add PICOM_FDS and PICOM_FD handling.
	(_pinfo::fd): New method.
	(_pinfo::fds): New method.
	* pinfo.h (enum picom): Add PICOM_FDS and PICOM_FD.
	(_pinfo::fd): Declare.
	(_pinfo::fds): Declare.
	* pipe.cc (fhandler_pipe::get_proc_fd_name): New method.

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

	* smallprint.c (rn): Change uval to unsigned long long to fix 64 bit
	handling.
	* fhandler_process.cc (format_process_maps): Print major, minor and
	inode numbers correctly.

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

	* autoload.cc (GetModuleFileNameExA): Add.
	(GetModuleInformation): Add.
	(QueryWorkingSet): Add.
	* fhandler.h (fhandler_virtual::get_filebuf): New method.
	* fhandler_proc.cc (PROC_SELF): Define.
	(proc_fhandlers): Change type of self to FH_PROC.
	(fhandler_proc::exists): Return -3 if self.
	(fhandler_proc::fstat): Handle self as symlink.
	(fhandler_proc::fill_filebuf): Handle self.
	* fhandler_process.cc: Include psapi.h.
	(PROCESS_EXENAME): Remove.
	(PROCESS_MAPS): Define.
	(PROCESS_ROOT): Define.
	(PROCESS_EXE): Define.
	(PROCESS_CWD): Define.
	(process_listing): Remove "exename", add "maps, "root", "exe" and
	"cwd" elements.
	(fhandler_process::exists): Return -2 for symlinks.
	(fhandler_process::fstat): Handle symlinks.
	(fill_filebuf): Evaluate pid if pid is 0.  Use exename handling for
	exe.  Handle maps, root and cwd.
	(format_process_maps): New function evaluating "maps".
	* path.cc (symlink_info::set): New method to fill symlink_info
	with data matching virtual symlinks.
	(path_conv::check): Handle virtual symlinks.
	* pinfo.cc (_pinfo::commune_recv): Add PICOM_CWD and PICOM_ROOT
	handling.
	(_pinfo::commune_send): Ditto.
	(_pinfo::root): New function.
	(_pinfo::cwd): New function.
	* pinfo.h (enum picom): Add PICOM_CWD and PICOM_ROOT.
	(_pinfo::root): Declare.
	(_pinfo::cwd): Declare.

2005-01-29  Christopher Faylor  <cgf@timesys.com>

	* cygthread.cc (new): Add a little more debugging.
	* thread.cc (pthread_null::exit): Add a _my_tls.remove() for safety.

2005-01-28  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (cygtls::call2): Move socket cleanup.
	(cygtls::remove): Move socket cleanup here.  Don't use _my_tls to
	reference it.

2005-01-26  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::init): Avoid a compiler warning.

2005-01-25  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (setpriority): Implement PRIO_PGRP, PRIO_USER and
	setting priority in other Cygwin processes.
	(getpriority): Implement PRIO_PGRP, PRIO_USER and getting nice value
	from other processes.

2005-01-26  Pierre Humblet <pierre.humblet@ieee.org>

	* path.cc (path_conv::check): Return ENOTDIR rather than ENOENT
	when a component is not a directory. Remove unreachable code.
	(digits): Delete.

2005-01-25  Christopher Faylor  <cgf@timesys.com>

	* pinfo.h (pinfo::init): Make third parameter non-optional and
	propagate change throughout.
	* pinfo.cc (set_myself): Pass INVALID_HANDLE_POINTER if h is NULL.
	(pinfo::init): Make third parameter non-optional.  Eliminate use of
	PID_EXECED as an argument.  Put setting of handle back inside loop but
	reorganize to try to open it only when necessary.

2005-01-25  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export getpriority and setpriority.
	* fork.cc (fork_parent): Copy parent's nice value into child.
	* spawn.cc (spawn_guts): Ditto.
	* miscfuncs.cc (winprio_to_nice): New function.
	(nice_to_winprio): Ditto.
	* pinfo.cc (pinfo_init): If parent is not a Cygwin process, set
	default nice value according to current Win32 priority class.
	* pinfo.h (class _pinfo): Add nice member.
	* syscalls.cc (setpriority): New function, only implementing
	PRIO_PROCESS for now.
	(getpriority): Ditto.
	(nice): Just call setpriority.
	* wincap.h (wincaps::has_extended_priority_class): New element.
	* wincap.cc: Implement above element throughout.
	* winsup.h: Add prototypes for winprio_to_nice and nice_to_winprio.
	* include/limits.h (NZERO): New define.
	* include/cygwin/types.h (id_t): New datatype.
	* include/cygwin/version.h: Bump API minor version.
	* include/sys/resource.h: Add PRIO_XXX defines and prototypes for
	getpriority and setpriority.

2005-01-25  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (realpath): Allow to expand with .exe suffix.

2005-01-22  Christopher Faylor  <cgf@timesys.com>

	* spawn.cc (spawn_guts): Perform same "cd" as in pinfo::exit below to
	make sure that a stub process does not keep the current working
	directory busy after the "execed" process has exited.

2005-01-22  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::init): Move everything but the MapViewOfFileEx out
	of the loop since trying multiple times to call CreateFileMapping
	doesn't make much sense.  Try to structure the loop a little better so
	that exiting with a break does the right thing.
	(pinfo::release): Release shared memory area if it exists and close
	handle if it exists.

2005-01-22  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::maybe_set_exit_code_from_windows): Make sure that
	process has exited before getting an error code.
	(pinfo::exit): "cd" to innocuous location before exiting to make sure
	that process does not keep the current working directory busy while it
	is in the process of really exiting.

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

	* autoload.cc (CoInitialize): Remove.
	(CoUninitialize): Remove.
	(CoCreateInstance): Remove.
	(CoTaskMemFree): Add.
	(SHGetDesktopFolder): Add.
	* path.cc (shortcut_header): Remove.
	(shortcut_initalized): Remove.
	(GUID_shortcut): New static GUID.
	(struct win_shortcut_hdr): New struct describing Windows shortcut
	header structure.
	(symlink_worker): Rewrite creating Windows shortcuts.  Create
	ITEMIDLIST if target exists.  Only write once.
	(cmp_shortcut_header): Use win_shortcut_hdr structure for comparison.
	(check_shortcut): Rewrite to read only once from file.  Allow skipping
	an ITIMIDLIST in the file.

2005-01-16  Christopher Faylor  <cgf@timesys.com>

	* pinfo.h (maybe_set_exit_code_from_windows): Renamed from
	set_exit_state.
	* pinfo.cc (pinfo::exit): Use renamed function.
	(proc_waiter): Ditto.  Make a copy of input argument to avoid problems
	when procs array is shuffled.  Flag when copy is made so that
	remove_proc knows when it is safe to reshuffle.
	* sigproc.cc (proc_terminate): Don't flag process_state as PID_EXITED.
	(remove_proc): Wait for waiter to finish copying pinfo element before
	moving it (an actual wait should be an extremely rare event).

2005-01-15  Christopher Faylor  <cgf@timesys.com>

	* init.cc (dll_entry): Remove unused extern.

	* include/sys/cygwin.h: Remove PID_ZOMBIE.
	* pinfo.h: Rename EXITCODE_* defines.
	(pinfo::set_exit_state): Remove parameter.
	* pinfo.cc (set_exit_state): Remove parameter.  Reverse sense of test
	so that exitcode is checked for having been set rather than not having
	been set.  Set flag when exitcode has been established.  Don't set
	PID_STATE here.
	(pinfo::init): Remove exitcode initialization.
	(pinfo::exit): Reflect change in EXITCODE_* naming.  Set flag when
	exitcode has been established.  Reflect change in arguments to
	set_process_state.
	(proc_waiter): Reflect change in arguments to set_process_state.  Set
	process_state here and only here.
	* fhandler_process.cc (fhandler_process::fill_filebuf): Reflect removal
	of PID_ZOMBIE define.
	(format_process_stat): Ditto.
	(format_process_status): Ditto.
	* sigproc.cc (pid_exists): Ditto.
	(stopped_or_terminated): Ditto.  Make sure that only low-order 16 bits of
	exitcode are used.
	* spawn.cc (spawn_guts): Reflect change in EXITCODE_* naming.

2005-01-15  Christopher Faylor  <cgf@timesys.com>

	* sigproc.cc (sig_send): Don't complain if attempt to send signal to
	myself fails after I've "execed".

2005-01-14  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::facl): Pretend successful
	SETACL if no acls are available.
	* fhandler.cc (fhandler_base::facl): Implement to return sensible
	values on GETACL and GETACLCNT.  Pretend successful SETACL.
	* fhandler_virtual.cc (fhandler_virtual::facl): Ditto.

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

	* fhandler.h (fhandler_disk_file::touch_ctime): Declare.
	* fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): New method
	to set file's ctime.
	(fhandler_disk_file::fchmod): Try opening file for writing first.
	Set file's ctime on success.
	(fhandler_disk_file::fchown): Ditto.
	(fhandler_disk_file::facl): Ditto.

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

	* pinfo.cc (pinfo::exit): Don't access self after releasing it.
	* path.h (path_conv::path_conv): Fill path with native device
	name in case of device argument.

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

	* fhandler_serial.cc (fhandler_serial::dup): Call overlapped_setup
	for child, not for parent.

2005-01-13  Christopher Faylor  <cgf@timesys.com>

	* init.cc (dll_entry): Nuke attempt to set exit code since parent will
	use windows exit code if needed.
	* pinfo.cc (pinfo::exit): Move release() here to minimize pid creation
	race (suggested by Pierre Humblet).

2005-01-12  Christopher Faylor  <cgf@timesys.com>

	Reorganize header file inclusion throughout so that cygerrno.h comes
	first.
	* fhandler.h (select_record::thread_errno): Save any encountered errno
	here.
	(select_record::set_select_errno): New function.
	(select_record::saw_error): New function.
	(select_record::select_record): Initialize thread_errno to zero.
	* select.cc (set_handle_or_return_if_not_open): Set thread_errno on
	failure.
	(select_stuff::wait): Record errno for later resurrection in calling
	thread.
	(peek_serial): Ditto.

2005-01-12  Christopher Faylor  <cgf@timesys.com>

	* syscalls.cc (system): Use "/bin/sh" as per linux and (sorta) SUSv3.

2005-01-12  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::exit): Don't assume that this == myself.

2005-01-11  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::init): Don't close input handle on temporary (?)
	failure.

2005-01-11  Christopher Faylor  <cgf@timesys.com>

	* pinfo.h (_pinfo::set_exit_state): Declare new function.
	(pinfo::exit): Move here from _pinfo::exit.
	* sigproc.cc (child_info::sync): Use new function to set exitcode and
	process_state.
	* pinfo.cc (_pinfo::exit): Ditto.
	(proc_waiter): Ditto.
	(_pinfo::set_exit_state): Define new function.
	(_pinfo::dup_proc_pipe): Close handle when there is no parent process
	around to care about the exit value.
	* dcrt0.cc (dll_crt0_0): Move subproc_ready synchronization later to
	make sure that myself is still mapped in parent.
	(do_exit): Reflect movement to pinfo::exit.
	(__api_fatal): Ditto.
	* exceptions.cc (signal_exit): Ditto.
	* errno.cc (errmap): Map PROC_NOT_FOUND.
	* init.cc (dll_entry): Release myself before exiting.
	* sigproc.cc (proc_can_be_signalled): Set errno appropriately.
	(sig_send): Ditto.  Also remove ill-advised test for !myself->sendsig
	since this is an indication of a process which is still initializating
	-- it is not an error.
	(child_info::sync): Don't set exitcode here.  Assume that will happen
	in proc_waiter, if necessary.
	* spawn.cc (spawn_guts): Delay "wait_for_myself" logic until later.
	Don't wait at all if the process has already exited.  Reflect movement
	to pinfo::exit.

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

	* environ.cc (build_env): Disallow empty strings and strings starting
	with '=' in Win32 environment.

2005-01-08  Pierre Humblet <pierre.humblet@ieee.org>

	* syscalls.cc (seteuid32): Only change the default dacl when
	seteuid succeeds. Do not close HKCU.

2005-01-06  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_process.cc: Use strcasematch instead of strcasecmp
	throughout.

2005-01-06  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (rename): Fix behaviour in case of renaming directories
	according to SUSv3.

2005-01-06  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_base::open_fs): Don't allow
	opening directories for writing.

2005-01-06  Christopher Faylor  <cgf@timesys.com>

	* timer.cc (timer_thread): Pass sigev pointer value as per SuSv3 rather
	than pointer to sigev.

2005-01-05  Christopher Faylor  <cgf@timesys.com>

	* dcrt0.cc (multiple_cygwin_problem): Reorganize error message to not
	always talk about a "version" when it's not a version.
	(dll_crt0_0): Change info passed to multiple_cygwin_problem to be a
	little more precise.
	* shared.cc (user_shared_initialize): Ditto.
	(shared_info::initialize): Ditto.

2005-01-03  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (_pinfo::dup_proc_pipe): Can't close proc pipe when execing
	or we will suffer an exit code race.

2005-01-03  Corinna Vinschen  <corinna@vinschen.de>

	* signal.cc (abort): Call _GLOBAL_REENT's __cleanup.

2005-01-03  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (setmode): Call _fwalk with _GLOBAL_REENT.

2005-01-01  Christopher Faylor  <cgf@timesys.com>

	* cygthread.cc (cygthread::stub): Set inuse to false when exiting.
	(cygthread::cygthread): Actually pass name as argument to debugging
	output to avoid SEGV when strace'ing.
	(cygthread::release): Don't set stack_ptr to NULL, since it is only set
	once on first entry to a stub not on each stub iteration.
	(cygthead::exit_thread): Remove obsolete function.
	* cygthread.h (cygthread::exit_thread): Ditto.

2005-01-01  Christopher Faylor  <cgf@timesys.com>

	* shared.cc (open_shared): Don't attempt VirtualAlloc magic if first
	attempt to map memory fails.