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

ChangeLog.64bit « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 089777be3c3785bab115e60b2f0cb5c846ecb577 (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
2013-03-27  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_console.cc
	(fhandler_console::create_invisible_console_workaround): Fix comment.
	* wincap.cc: Throughout, remove unused has_console_handle_problem
	wincapc members.
	* wincap.h (struct wincaps): Remove has_console_handle_problem.

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

	* net.cc (cygwin_gethostbyname): Revert accidental checkin of change
	added for debugging.

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

	* net.cc (struct win64_servent): Define for x86_64.  Explain why.
	(WIN_SERVENT): Define for all targets.
	(dup_ent): Use WIN_SERVENT to access critical servent members
	throughout.

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

	* sysconf.cc (sca): Change build environment values according to
	architecture.
	(csa): Ditto.

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

	* ntdll.h (STATUS_NETWORK_OPEN_RESTRICTION): Define.
	(STATUS_SYMLINK_CLASS_DISABLED): Define.
	* path.cc (symlink_info::check): Handle STATUS_NETWORK_OPEN_RESTRICTION
	and STATUS_SYMLINK_CLASS_DISABLED status codes.  Explain why.

2013-03-22  Kai Tietz  <ktietz@redhat.com>

	* gendef: Use pause instead of calling yield throughout in x86_64 code.

2013-03-20  Ken Brown  <kbrown@cornell.edu>

	* include/sys/resource.h (RLIM_INFINITY): Define wordsize agnostic.

2013-03-20  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* lib/_cygwin_crt0_common.cc: Fix mangled operator new names for x86_64.

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

	* exceptions.cc (stack_info::init): Don't attempt to dereference NULL
	framep.
	(exception::handle): On x86_64, if Rbp is NULL, use Rsp as frame
	pointer.

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

	* gendef (sigdelayed): Make sure to align the stack since sigdelayed
	can be called with or without aligned stack.  Save and restore all
	CPU registers.

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

	* cygwin.sc.in: Fix comment.
	* dcrt0.cc (child_info_fork::handle_fork): Revert patch from 2013-03-15.

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

	* cygwin64.din (strlwr): Export.

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

	* Revert previous patch.  For some reason perl doesn't like it.

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

	* cygtls.h (CYGTLS_PADSIZE): Reduce to 8000 on x86_64.
	* tlsoffsets64.h: Regenerate.

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

	* dcrt0.cc (child_info_fork::handle_fork): Call
	_pei386_runtime_relocator first thing, before copying parent data and
	bss segment.  Tweak comment to explain why.

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

	* gendef (_sigfe): 16-byte align xmm0 storage and use movdqa.
	(_sigbe): Fix alignment before calling yield.  Use movdqa to save and
	restore xmm0.
	(sigdelayed): Use movdqa to save and restore xmm0.
	(_ZN7_cygtls4lockEv): Change absolute values to hex.
	(stabilize_sig_stack): Ditto.
	(setjmp): Add comment to explain usage of movdqu.
	(__sjfault): Ditto.
	(__ljfault): Ditto.
	(longjmp): Ditto. Access return value using 32 bit opcodes only.
	* miscfuncs.cc (thread_wrapper): Don't attempt to copy exception
	handler list on x86_64.

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

	* autoload.cc (.#dllname_info): Call _std_dll_init on x86_64 bit, too.
	(INIT_WRAPPER): Change to accommodate the change of the init functions
	from sysv_abit to ms_abi.  Fix preceeding comment accordingly.  Add
	SEH information and comments.
	(std_dll_init): Drop leading underscore on x86_64.  Drop sysv_abi
	comment.
	(wsock_init): Ditto.
	(LoadDLLprime): Drop surrounding ifdef to accommodate above underscore
	juggling.

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

	* gendef (_sigfe): Save float arguments as well before calling yield.
	(_sigbe): Move saving %rax from prologue to just before the yield call.
	Save %xmm0 register, too.
	(sigdelayed): Add comment.  Save %xmm0 register, too, before calling
	yield.

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

	* fhandler_tty.cc (fhandler_pty_master::setup): Add
	PIPE_REJECT_REMOTE_CLIENTS to pipe mode on systems supporting it.  Add
	FILE_FLAG_FIRST_PIPE_INSTANCE to pipe open mode.
	* pipe.cc (fhandler_pipe::create): Ditto.  Fix subsequent comment
	accordingly.
	* wincap.h (wincaps::has_pipe_reject_remote_clients): New element.
	* wincap.cc: Implement above element throughout.
	* winlean.h (PIPE_REJECT_REMOTE_CLIENTS): Temporarily define until
	Mingw64 headers define it.

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

	Remove more old cruft.  Remove Windows NT4 and 2000 from comments
	throughout, unless it still makes sense.
	* dlfcn.cc (dlopen): Drop W2K-only code to make loaded DLL persistent.
	* fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Drop code
	trying to use information from NtQueryVolumeInformationFile.
	* fhandler_socket.cc (fhandler_socket::close): Drop code snippet
	disabled since 2008.
	* mount.cc (MINIMAL_WIN_NTFS_FLAGS): Add flag values set on all
	NTFS since Windows XP.
	(get_volume_path_names_for_volume_name): Remove.
	(dos_drive_mappings::dos_drive_mappings): Call Win32 function
	GetVolumePathNamesForVolumeNameW directly.
	* path.cc (file_get_fnoi): Drop test for NT4-only return code.
	* sched.cc: Add FIXME to global comment.  Reformat comments throughout.
	* spawn.cc (child_info_spawn::worker): Just call official IsProcessInJob
	function rather than to test undocumented TEB member.
	* winlean.h: Drop Mingw32-related defines.
	* include/limits.h (PTHREAD_KEYS_MAX): Raise value to reflect minimum
	value available on XP and later.

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

	* Revert to old malloc.
	* mmap.cc (MMAP_STORAGE_LOW): Set higher.  Add comment.
	(MMAP_STORAGE_HIGH): Add comment.
	(class mmap_allocator): Change comment.  Add mmap_current_low member.
	(mmap_allocator::mmap_allocator): Define default constructor.
	(mmap_allocator::alloc): Change to a round-robin mechanism.  Add or
	change comments accordingly.

2013-03-13  Kai Tietz  <ktietz@redhat.com>
	    Corinna Vinschen  <corinna@vinschen.de>

	* gendef (_sigfe): Save arguments before calling yield so they don't
	get clobbered.  Explain why.

2013-03-12  Ken Brown  <kbrown@cornell.edu>

	* include/a.out.h: Fix up for x86_64.

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

	* smallprint.cc (rnarg): Fix cast to print negative values correctly.

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

	* fhandler.cc (fhandler_base::raw_read): Replace accidentally left in
	Win32 error codes with equivalent status codes.

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

	* cygmalloc.h: Include regparm.h rather than defining __reg{1,2,3} here.
	* ptmalloc3.cc (__malloc_initialized): Define as type LONG on Cygwin
	and include windows.h.
	(ptmalloc_init): Set __malloc_initialized on Cygwin using
	InterlockedCompareExchange and carefully check for concurrency
	situation.

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

	* gendef: Add SEH information to sigfe entry points, as well as to
	_sigfe and _sigbe.

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

	* heap.cc (heap_init): Fix setting reserved_size value when using
	ptmalloc3 to avoid too much pagefile pressure at fork time.

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

	For x86_64 target:
	* dll_init.cc (dll::init): Don't set p.envptr.
	(update_envptrs): Disable entirely.
	* dll_init.h (struct per_module): Disable envptr.
	* environ.h (update_envptrs): Change to empty macro.

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

	For x86_64 target:
	* Makefile.in (COMMON_CFLAGS): Add -mcmodel=small to create smaller
	footprint.
	* cygwin64.din (__cygwin_environ): Drop export.  Only export environ
	as alias to __cygwin_environ.
	* dcrt0.cc (dll_crt0_1): Call main with __cygwin_environ as parameter.
	(_dll_crt0): Don't set main_environ.
	(cygwin_dll_init): Don't create local variable envp and don't set
	user_data->envptr.
	* dll_init.cc (dll_list::alloc): Don't assert.
	* dll_init.h (per_module::operator =): Don't set envptr.
	* environ.cc (cur_environ): Disable.
	* environ.h (main_environ): Don't define.
	(cur_environ): Change to macro.
	* globals.cc (main_environ): Don't initialize.
	(struct per_process): Drop envptr.
	* perprocess.h (SIZEOF_PER_PROCESS): Set to 41*8 to accommodate size
	change of struct per_process.
	* include/sys/cygwin.h (struct per_process): Drop envptr.
	* lib/_cygwin_crt0_common.cc (environ): Drop declaration.
	(_cygwin_crt0_common): Don't set u->envptr.

2013-03-04  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* cygwin64.din: Fix mangled operator new names for size_t==long.
	* libstdcxx_wrapper.cc: Ditto for x86_64.

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

	* autoload.cc (AttachConsole): Remove.
	(GetModuleHandleExW): Remove.
	(GetSystemWow64DirectoryW): Remove.
	(GetVolumePathNamesForVolumeNameW): Remove.
	* exceptions.cc (cygwin_stackdump): Always call RtlCaptureContext.
	(exception::handle): Drop accidentally left in debugging statement.
	Always call RtlCaptureContext.
	(sigpacket::process): Always call RtlCaptureContext for current thread.
	* fhandler_disk_file.cc (fstatvfs): Drop code using
	FileFsSizeInformation.
	(struct __DIR_cache): Remove comment.
	(fhandler_disk_file::rewinddir): Drop W2K-only code.
	* fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Don't
	check for old OS.  Extend a comment.
	* fhandler_mem.cc (fhandler_dev_mem::open): Drop NT4 and W2K from
	debug output.
	* fhandler_proc.cc (format_proc_partitions): Drop Pre-XP considerations.
	* fhandler_procnet.cc (fhandler_procnet::exists): Ditto.
	(fhandler_procnet::readdir): Ditto.
	(format_procnet_ifinet6): Ditto.
	* fhandler_socket.cc (fhandler_socket::recvmsg): Ditto.
	* fhandler_tape.cc (mtinfo_drive::get_status): Ditto.
	* init.cc (dll_entry): Drop W2K-only code.
	* net.cc (get_ifs): Rename from get_xp_ifs.
	(get_2k_ifs): Remove.
	(getifaddrs): Always call get_ifs.
	(get_ifconf): Ditto.
	(if_nametoindex): Drop Pre-XP considerations.
	(load_ipv6_funcs): Ditto.  Fix preceeding comment.
	* sec_auth.cc (lsaauth): Drop code handling fake_login_sid.
	* sec_helper.cc (fake_logon_sid): Remove.
	(set_cygwin_privileges): Fix uncommented statement to drop pre-XP
	considerations.
	* security.h (fake_logon_sid): Drop declaration.
	* shared.cc (shared_info::init_obcaseinsensitive): Drop W2K-only code.
	* wincap.cc: Throughout, remove setting all deprecated wincapc members.
	(wincap_minimal): Set to wincap_xpsp2.
	(wincap_2000): Remove.
	(wincap_2000sp4): Remove.
	(wincap_xp): Remove.
	(wincap_xpsp1): Remove.
	(wincapc::init): Drop OS 5.0 and pre-SP2 XP.
	* wincap.h (struct wincaps): Remove the following members:
	has_create_global_privilege, has_ioctl_storage_get_media_types_ex,
	has_disk_ex_ioctls, has_buggy_restart_scan, needs_logon_sid_in_sid_list,
	has_gaa_prefixes, has_recvmsg, has_stack_size_param_is_a_reservation,
	kernel_is_always_casesensitive, has_rtl_capture_context.

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

	* exceptions.cc (rtl_unwind): Convert to macro doing nothing on x86_64.
	(exception::handle): Drop creating frame variable on x86_64.
	* wincap.cc (wincap_2000sp4): Set has_rtl_capture_context to false.

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

	* cygserver.h (struct header_t): Revert msglen to simple member.
	Drop accessor methods.
	* cygserver_ipc.h (struct proc): Drop enforced 4 byte struct packing.
	Remove members for 64<->32 bit IPC.  Revert to original member order.
	(ipc_set_proc_info): Remove 64<->32 handling.
	(conv_timespec32_to_timespec): Delete.
	(conv_timespec_to_timespec32): Delete.
	* pinfo.h (struct win_heap_info): Remove.
	* shm.cc (fixup_shms_after_fork): Revert parent initialization.
	* winlean.h: Remove _TYPE64_CLR and _TYPE64_SET macros.  Remove
	usage throughout code.
	* include/cygwin/ipc.h: Drop 64<->32 bit helper structures.
	* include/cygwin/msg.h: Ditto.  Drop enforced 4 byte struct packing.
	* include/cygwin/sem.h: Ditto.
	* include/cygwin/shm.h: Ditto.
	* include/cygwin/sysproto.h: Drop enforced 4 byte struct packing.

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

	* pseudo-reloc.cc (do_pseudo_reloc): Add test to check for invalid 32
	bit relocation in 64 bit code.  Only test when building without
	optimization.

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

	* exceptions.cc (_cygtls::signal_debugger): Raise size of sigmsg buffer
	on x86_64.
	* tlsoffsets64.h: Regenerate.

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

	* include/cygwin/signal.h (struct ucontext): Add missing fields from
	Windows CONTEXT definition.  Define oldmask as 64 bit type.

-- post-ptmalloc3 tag

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

	* configure.ac (MALLOC_OFILES): Add ptmalloc3.o.
	* configure: Regenerate.
	* cygmalloc.h: Declare pt* functions rather than dl* functions.
	(mmap64): Declare.
	(mmap): Define as mmap64.
	(__malloc_lock): Drop macro.
	(__malloc_unlock): Ditto.
	(MSPACES): Define.
	(ONLY_MSPACES): Define.
	* debug.h: Include malloc.h rather than otherwise unused dlmalloc.h.
	* fork.cc (frok::parent): Drop malloc locking since that's performed
	by malloc_atfork now.
	* heap.cc (heap_init): Accommodate the fact that there's a chance
	that no heap space has been allocated at fork time.
	* malloc-private.h: New file from ptmalloc3, having malloc-machine.h
	and malloc-2.8.3.h folded in.
	* malloc.cc: Replaced by new file from ptmalloc3.
	* malloc_wrapper.cc: Throughout, remove malloc locks and call pt*
	functions rather than dl* functions.
	* pinfo.cc (winpids::set): Drop malloc locking.
	* ptmalloc3.cc: New file from ptmalloc3.

-- pre-ptmalloc3 tag

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

	* exception.h (_except_list): Don't define on x86_64.
	(class exception): Don't define members el and save on x86_64.
	(exception::~exception): Don't define on x86_64.
	* exceptions.cc (signal_exit): Fix typo in condition.

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

	* cygwin64.din: Remove all deprecated cygwin32_foo and cygwin_foo
	path conversion functions.
	* path.cc: Disable aforementioned functions on x86_64.
	* include/sys/cygwin.h: Don't declare aforementioned functions on
	x86_64.

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

	* exception.h (class exception): Add handler_installed member.
	Change parameters to handle method to match high-level exception
	handler calls.
	(exception::exception): On x86_64, install exception handler only
	once.  Explain what we do.
	* exceptions.cc (_AFMT): Change to only 11 digits on x86_64.
	(cygwin_exception::dump_exception): Print Rip with only 11 digits.
	Print 64 bit registers with 0-padding.
	(class stack_info): Add members c and hist on x86_64.
	(stack_info::init): Take PCONTEXT rather than bool as third parameter.
	Tweak code accordingly.  Initialize c and hist on x86_64.
	(stack_info::walk): Add implementation for x86_64.  Drop unneeded
	#ifndef in 32 bit code.
	(cygwin_exception::dumpstack): Call thestack.init with context as
	parameter.  Change header output for x86_64.
	(cygwin_stackdump): Prefer RtlCaptureContext over GetThreadContext.
	(CYG_EXC_CONTINUE_EXECUTION): Define generic definition matching all
	platforms.
	(CYG_EXC_CONTINUE_SEARCH): Ditto.
	(exception::handler_installed): Define here.
	(exception::handle): Define according to declaration in exception.h.
	Create 32 bit parameters as local variable on 64 bit.  Change all
	return statements to use generic definitions.  Simplify setting framep
	on x86_64.  Disable setting frame-based exception handler on x86_64.
	Fix formatting of klog output for x86_64.
	(signal_exit): Create context for cygwin_exception creation.
	(sigpacket::process): Prefer RtlCaptureContext over GetThreadContext.
	* wincap.h (wincaps::has_rtl_capture_context): New element.
	* wincap.cc: Implement above element throughout.

2013-02-22  Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
	    Corinna Vinschen <corinna@vinschen.de>

	* cygwin.din (_get_osfhandle): Make main export.  Define get_osfhandle
	from here.
	* cygwin64.din (_get_osfhandle): Rename from get_osfhandle.
	(_setmode): Rename from setmode.
	* include/io.h: Ditto. Define unprefixed names with preprocessor
	macros for backwards source compatibility.
	(access): Remove.
	* syscalls.cc (_setmode): Rename from setmode.
	(cygwin_setmode): Call _setmode.
	(_get_osfhandle): Rename from get_osfhandle.

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

	* Makefile.in (target_cpu): Define.  Check for target_cpu rather than
	target_alias for conditional compilation issues.
	(toolopts): Change --target into --cpu option and use $target_cpu as
	argument.
	($(DEF_FILE)): Call gendef with $(target_cpu) as argument, rather than
	with $(target_alias).
	* gendef: Accommodate change from --target to --cpu option.
	* mkimport: Ditto.
	* speclib: Ditto.

2013-02-20  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* cygserver_ipc (class ipc_retval): Add ssize_t member to anonymous
	union.
	(ipc_retval::operator =): Add ssize_t variant for x86_64.
	* fhandler_floppy.cc (fhandler_dev_floppy::raw_write): Change return
	type to ssize_t to match fhandler.h.
	* fhandler_socket.cc (fhandler_socket::readv): Ditto.
	(fhandler_socket::write): Ditto.
	(fhandler_socket::writev): Ditto.
	(fhandler_socket::sendmsg): Ditto.

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

	* localtime.cc: Add comment.

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

	* localtime.cc: Throughout, pull up to latest code from NetBSD.

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

	* fhandler.cc (fhandler_base::raw_read): Rearrange code to use
	NtReadFile and to fix problem using pointer to wrongly sized variable
	on x86_64.
	(fhandler_base::read): Drop redundant code.
	* fhandler_disk_file.cc (fhandler_disk_file::pread): Fix function
	to not read the information twice.  Handle STATUS_END_OF_FILE.

2013-02-17  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* Makefile.in (libcygwin.a): Move --target flag from here...
	(toolopts): to here, to be used by both mkimport and speclib.
	* speclib: Omit leading underscore in symbol names on x86_64.

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

	* cygwin.sc.in (.gnu_debuglink_overlay): Drop "64" in dbg file name.

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

	* nfs.h: Make sure packing of NFS fattr3 struct is 4 byte.
	(struct nfs_timestruc_t): Define.
	(struct fattr3): Define timestamps as type struct nfs_timestruc_t.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Copy
	each timestruc_t component separately to accommodate different size.

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

	* Makefile.in (toollibdir): Remove.  Revert to using tooldir instead.
	* configure.ac (DLL_NAME): Set to cygwin1.dll in x86_64 case, too.
	* configure: Regenerate.
	* cygwin.sc.in (SEARCH_DIR): Align to 32 bit search dir, use lib, rather
	than lib64.
	* cygwin64.din (LIBRARY): Set name to cygwin1.dll.
	* fhandler_process.cc (struct heap_info): Drop win_heap_info class
	and revert code to former heap_info implementation.
	(format_process_maps): Define heaps back to heap_info
	* hookapi.cc (hook_or_detect_cygwin): Add shortcut so the code does
	not search executable for being a Cygwin executable, if the architecture
	is not matching the current Cygwin.  Always use for "cygwin1.dll".
	* pinfo.cc (commune_process): Drop PICOM_HEAP_INFO code.
	(_pinfo::commune_request): Ditto.
	(_pinfo::win_heap_info): Remove.
	* pinfo.h (enum picom): Remove PICOM_HEAP_INFO.

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

	* autoload.cc (two_addr_t): Use __uint64_t as type for the i686
	version, analogue to __uint128_t for x86_64.
	(INIT_WRAPPER): New x86_64 macro to install a sysv_abi function wrapper
	for the DLL init functions.  Add long comment to explain why this is
	necessary.  Create wrapper for std_dll_init and wsock_init.
	(std_dll_init): Rename with leading underscore on x86_64 and take
	calling function as argument.  Disable overwriting return address on
	stack for x86_64.
	(wsock_init): Ditto.

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

	* Makefile.in (toollibdir): Define build and target dependent.
	(install-libs): Use $(toollibdir) rather than $(tooldir)/lib.
	(uninstall-libs): Ditto.
	(uninstall-man): Use $(DESTDIR)$(mandir) as in install-man, rather
	than $(tooldir)/man.

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

	* heap.cc (eval_start_address): Move heap to 0x6:00000000.  Change
	comment to explain why.
	* mmap.cc (MMAP_STORAGE_LOW): Accommodate above change.

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

	* fhandler_floppy.cc (fhandler_dev_floppy::open): Cast second parameter
	in roundup2 to same size as first parameter to make sure mask size is
	correct.
	* fhandler_process.cc (format_process_maps): Ditto.
	* fhandler_raw.cc (fhandler_dev_raw::dup): Ditto.
	* hookapi.cc (find_first_notloaded_dll): Add cast.
	* spawn.cc (av::fixup): Ditto.
	* wincap.h: Add comment to explain the following change.
	(wincapc::page_size): Return size_t.
	(wincapc::allocation_granularity): Ditto.

	* mmap.cc: Throughout, accommodate the fact that AT_ROUND_TO_PAGE isn't
	support on 64 bit at all.
	(class mmap_allocator): New class to allocate mmap slots on x86_64.
	(mmap_alloc): Define global instant of mmap_allocator.
	(mmap64): Call mmap_alloc.alloc on x86_64.

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

	* gendef (longjmp): Fix indirect addressing in x86_64 setjmp.

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

	* cygwin64.din: Add missing symbols.
	* mkimport: Make sure to use and test against platform dependent
	"imp" prefix.

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

	* cygwin.sc.in (.rdata): Add .rdata_cygwin_nocopy subsection.
	(.cygheap): Raise size to 3 Megs on x86_64.
	* dcrt0.cc (dll_crt0_0): Drop call to init_global_security.
	* dtable.cc (std_consts): Drop NO_COPY.
	* errno.cc (errmap): Drop NO_COPY, constify instead.
	(_sys_errlist): Drop NO_COPY.
	* fhandler_clipboard.cc (CYGWIN_NATIVE): Ditto.
	* fhandler_console.cc (keytable): Drop NO_COPY, constify instead.
	* grp.cc (null_ptr): Make NO_COPY_RO.
	* heap.cc (eval_start_address): Fix comment.
	* localtime.cc (wildabbr): Make NO_COPY_RO.
	(gmt): Ditto.
	* miscfuncs.cc (case_folded_lower): Drop NO_COPY.
	(case_folded_upper): Ditto.
	(isalpha_array): Ditto.
	(nice_to_winprio): Ditto for priority.
	(class thread_allocator): New class to allocate thread stack on x86_64.
	(thr_alloc): Define global NO_COPY instant of thread_allocator.
	(CygwinCreateThread): Call thr_alloc.alloc on x86_64 to reserve stack.
	* net.cc (errmap): Drop NO_COPY, constify instead.
	(host_errmap): Ditto.
	* netdb.cc (SPACE): Drop NO_COPY.
	* sec_helper.cc (null_sdp): Static NO_COPY_RO definition of null SD.
	(sec_none): Define NO_COPY_RO, define content statically.
	(sec_none_nih): Ditto.
	(sec_all): Ditto.
	(sec_all_nih): Ditto.
	(get_null_sd): Remove.
	(init_global_security): Remove.
	* security.cc (file_mapping): Define NO_COPY_RO.
	(check_registry_access): Ditto for reg_mapping.
	* spawn.cc (exe_suffixes): Drop NO_COPY, constify instead.
	(dll_suffixes): Drop unused, disabled definition and comment.
	* strsig.cc (sys_sigabbrev): Drop NO_COPY_INIT.
	(sys_siglist): Ditto.
	* syscalls.cc (def_shells): Drop NO_COPY.
	* winsup.h (NO_COPY_RO): Define to place variable in
	.rdata_cygwin_nocopy section.
	(init_global_security): Drop declaration.

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

	* fhandler_process.cc (win_heap_info::~win_heap_info): Only try to free
	heap_vm_chunks if it's not NULL.
	* pinfo.h (struct commune_result): Change type of n to DWORD.
	* pinfo.cc (_pinfo::commune_request): Change type of n to DWORD to
	fix subsequent sizeof test after reading from commune pipe on x86_64.
	Raise read timeout to match write timeout.

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

	* cygserver_ipc.h (ipc_retval::operator =): Disable size_t variant
	on x86_64 since type is identical to vm_offset_t.

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

	* regparm.h: New file to define platform dependent regparm attributes.
	Define all of them empty if __CYGMAGIC__ is defined.
	* cygerrno.h: Include regparm.h instead of defining _reg[123] here.
	* winsup.h: Ditto.
	* cygmagic: Define __CYGMAGIC__ to help generate same result on all
	platforms.

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

	* cygwin64.din (BASE): Set to 0x180040000.
	(_fe_dfl_env): Remove useless symbol.
	(_fe_nomask_env): Remove useless symbol.
	(exit): Add missing symbol.
	(setmode): Ditto.
	* gendef (longjmp): Convert all displacements to hex for readability.
	Change all movaps instructions to movdqu to accommodate unaligned
	access to 128 bit values.

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

	* pseudo-reloc.cc (do_pseudo_reloc): Enable 64 bit code for x86_64
	Cygwin.

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

	* miscfuncs.cc (RtlFillMemory): Declare.
	(RtlCopyMemory): Declare.
	(memset): Just call RtlFillMemory.
	(memcpy): Just call RtlCopyMemory.
	* mmap.cc (class mmap_record): Drop enforced packing.  Reorder members
	to allow tight packing on 32 as well as on 64 bit.
	* include/sys/dirent.h: Don't enforced structure packing on x86_64.
	(__DIRENT_COOKIE): Use different value on 64 bit.

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

	* gendef (fefunc): Fix incorrect pc-relative jmp instruction.
	(_sigfe): Fix offset to return address on stack.  Add and fix comments.
	(_sigbe): Fix stack alignment when creating spill area for call to
	yield.  Add and fix comments.
	(sigdelayed): Add fake push to make sure stack is aligned correctly.
	Use fake stack alignment on exit to store return address and call ret,
	rather than jmp.  Fix comments.
	(_cygtls::lock): Only create and destroy spill area when really calling
	yield.

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

	* autoload.cc (LoadDLLfuncEx3): Adjust address computation required
	by latest change to the 64 bit code.
	* cygmalloc.h (MALLOC_ALIGNMENT): Set to 16 on x86_64.
	* cygtls.h: Set struct alignment to 8 on x86_64.  Move inclusion of
	other header files outside of alignment-enforced code area.  Drop
	inclusion of security.h entirely.
	(_cygtls::get_signal_arrived): Use NULL SECURITY_ATTRIBUTES rather than
	&sec_none_nih.
	* gendef (_cygtls::lock): Fix stack alignment.
	* heap.cc (page_const): Change type to ptrdiff_t, otherwise negation
	operator in pround creates broken bitmask.
	* shared.cc (page_const): Add cast to ptrdiff_t.
	* tlsoffsets64.h: Regenerate.

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

	* Makefile.in ($(LIB_NAME)): Add --target option to mkimport call.
	* gendef: Drop -w option.  Make callto sigfe function pc-relative
	on x86_64.
	* miscfuncs.cc (__import_address): Drop comment and misguide attempt
	to handle absolute addressing in x86_64 mode.
	* mkimport: Add --target option.  Handle x86_64 target, especially
	create pc-relative jmp calls.

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

	* cygtls.h: Cleanup x86_64 related comment.
	(_tlsbase): Change return type to PVOID.
	(_tlstop): Ditto.
	(_my_tls): Accommodate above change.
	* dcrt0.cc (child_info_fork::alloc_stack): Revert previous patch, but
	keep cast to PVOID.
	(dll_crt0_1): Ditto.
	* exception.h: Define _exception_list as _EXCEPTION_REGISTRATION_RECORD
	on x86_64.
	(_except_list): Define in terms of NtCurrentTeb() on x86_64.
	* miscfuncs.cc (__import_address): Handle 32 bit absolute addressing
	in IAT on x86_64.
	* include/cygwin/config.h (___getreent): New inline function on
	x86_64.  Define __getreent in terms of ___getreent on x86_64.  Fix
	comment accordingly.

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

	* cygtls.h (_tlsbase): Temporary workaround for GCC bug.
	(_tlsbase): Ditto.
	* cygwin64.din: Set BASE temporariliy to address < 32 bit to workaround
	GDB bug.
	* dcrt0.cc (child_info_fork::alloc_stack): Temporary workaround for GCC
	bug.
	(dll_crt0_1): Ditto.
	* miscfuncs.cc (memset): Temporary workaround missing MSABI function in
	newlib.
	(memcpy): Ditto.
	* include/cygwin/config.h (__getreent): Drop definition for x86_64 to
	workaround GCC bug.

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

	* winbase.h (ilockcmpexch): Define always.
	(InterlockedCompareExchange): Ditto.
	(ilockcmpexch64): Define for x86_64.
	(InterlockedCompareExchange64): Ditto.
	(InterlockedCompareExchangePointer): Define in terms of
	InterlockedCompareExchange64 on x86_64.

2013-01-29  Kai Tietz  <ktietz@redhat.com>

	* cygwin.sc.in: Fix ctors and dtors filler and zero-terminator for
	64 bit.

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

	* Makefile.in (TEST_DLL_NAME): Fix to use correct name per target.
	* gendef (fefunc): Resurrect accidentally dropped 32 bit code.

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

	* heap.cc (eval_start_address): Change address and comment for 64 bit.
	(eval_initial_heap_size): Change return type to SIZE_T.  Use different
	values for 64 bit.

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

	* gendef: Add missing setjmp/longjmp functionality, still untested.

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

	* cygwin.sc.in: Accommodate extra .text, .pdata, and .xdata section on
	64 bit.
	* cygwin64.din: Set BASE to 0x200040000 to start shared sections at
	0x200000000.
	* gendef: Second cut 64 bit assembler functionality, still untested.

2013-01-25  Kai Tietz  <ktietz@redhat.com>

	* autoload.cc (LoadDLLfuncEx3): Adjust assembler for x64 to avoid
	relocations.
	(noload): Likewise.

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

	* gendef: First cut 64 bit assembler functionality, untested.

2013-01-22  Corinna Vinschen  <corinna@vinschen.de>

	* Makefile.in (speclib): Exclude main symbol.
	(NEW_FUNCTIONS): Set to empty for x86_64.
	($(DEF_FILE)): Call gendef with target_alias as additional parameter.
	* configure.ac (DLL_ENTRY): Drop leading underscore for x86_64.
	* configure: Regenerate.
	* cygwin.sc.in: Drop _SYM usage for __data_start__, __data_end__,
	__bss_start__, and __bss_end__.
	* cygwin64.din: Remove all fast-call math function entry points.
	(_alloca): Define as __alloca.
	(_dll_crt0): Drop 32 bit stdcall specifier.
	(dll_entry): Ditto.
	(dll_noncygwin_dllcrt0): Remove.
	(getpwduid): Remove.
	(lacl): Remove.
	* dcrt0.cc (dll_data_start): Define for x86_64.
	(dll_data_end): Ditto.
	(dll_bss_start): Ditto.
	(dll_bss_end): Ditto.
	* gendef: Handle new target argument.  Handle 64 bit target.
	Add preliminiary empty function definitions for 64 bit to allow linking.
	* winsup.h: Define linker data and bss section symbols with
	additional underscore for x86_64.
	* lib/_cygwin_crt0_common.cc (__image_base__): Define for 64 bit and
	map to _image_base__ via macro.
	(_cygwin_crt0_common): Fix setting data and bss section borders on
	x86_64.

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

	* miscfuncs.cc (__import_address): Fix address computation for 64 bit.

2013-01-19  Corinna Vinschen  <corinna@vinschen.de>

	* dcrt0.cc (_cygwin_exit_return): Define to allow usage of same C
	symbol name independent of target.
	* perprocess.h (SIZEOF_PER_PROCESS): Define for x86_64.
	* include/sys/cygwin.h (struct per_process): Tweak definition for
	x86_64.

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

	* include/cygwin/config.h (__SYMBOL_PREFIX): Define.
	(_SYMSTR): Define.
	* child_info.h (spawn_info): Use _SYMSTR macro to define assembler
	symbol.
	(fork_info): Ditto.
	* libstdcxx_wrapper.cc: Ditto, throughout.
	* winsup.h (dll_crt0): Ditto.
	* include/cygwin/time.h (daylight): Ditto.
	(timezone): Ditto.
	* lib/_cygwin_crt0_common.cc: Ditto, throughout.

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

	* child_info.h (spawn_info): Define asm symbol without leading
	underscore for x86_64.
	(fork_info): Ditto.
	* cygwin.sc.in (__CONCAT1): Define.
	(__CONCAT): Define.
	(_SYM): Define.
	(_data_start__): Define using _SYM macro to accommodate multiple
	platforms.
	(_data_end__): Ditto.
	(_bss_start__): Ditto.
	(_bss_end__): Ditto.
	(_cygheap_start): Ditto.
	(_cygheap_end): Ditto.

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

	* include/cygwin/config.h (_tlsbase): Define for x86_64.

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

	* cygwin.sc.in (.gnu_debuglink_overlay): Accommodate longer dbg file
	name on 64 bit.

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

	* pinfo.h (enum picom): Add PICOM_HEAP_INFO.
	(_pinfo::win_heap_info): Declare.
	(struct win_heap_info): Rename from heap_info and define here.  Change
	to accommodate 64 bit.
	* fhandler_process.cc (struct win_heap_info): Just implement here.
	(win_heap_info::gen_heap_info): New method.
	(format_process_maps): Accommodate above changes.  Add FIXME comment
	to explain 32->64 bit problem with VirtualQueryEx.
	* pinfo.cc (commune_process): Handle PICOM_HEAP_INFO.
	(_pinfo::commune_request): Ditto.
	(_pinfo::win_heap_info): New method.

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

	* cygwin.sc.in (OUTPUT_FORMAT): Fix typo in 64 bit code.
	* spawn.cc (av::fixup): Drop '!!' to keep argument to set_cygexec a
	void *.

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

	* Makefile.in (TLSOFFSETS_H): Let configure fill in.  Change all
	occurence of tlsoffsets.h to $(TLSOFFSETS_H).
	$(srcdir)/$(TLSOFFSETS_H): Add @CONFIG_DIR@ as parameter to
	gentls_offsets so the script knows the target CPU.
	* configure.ac (TLSOFFSETS_H): Set according to target.
	* configure: Regenerate.
	* gentls_offsets: Handle x86_64 as target.  Add FIXME comment.  Unlink
	all temporary files.
	* tlsoffsets64.h: New file.

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

	* Makefile.in (DLL_NAME): Let configure fill in.
	(DIN_FILE): Ditto.  Change all occurence of cygwin.din to $(DIN_FILE).
	* configure.ac (DLL_NAME): Set according to target.
	(DIN_FILE): Ditto.
	* configure: Regenerate.
	* cygwin64.din: New file.

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

	* posix_ipc.cc: Enforce 4 byte alignment on all structs used in the
	message queue file.
	(struct mq_fattr): Fixed size mq_attr structure as stored in file.
	(struct mq_hdr): Change to have same size on 32 and 64 bit.  Add
	mqh_magic to allow check for old message queue file.
	(struct msg_hdr): Change to have same size on 32 and 64 bit.  Change
	type of mqh_attr to struct mq_fattr.
	(struct mq_info): Change to have same size on 32 and 64 bit.
	(mq_open): Add check for maximum mq_maxmsg and mq_msgsize values which
	still fit into 32 bit values.  Set mqh_magic in file to MQI_MAGIC.
	Check mqh_magic value on existing file to detect old message queue file.
	(mq_getattr): Change type of local attr variable to struct mq_fattr.
	(mq_setattr): Ditto.
	(_mq_send): Ditto.
	(_mq_receive): Ditto.
	(mq_close): Ditto.

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

	* hookapi.cc (hook_or_detect_cygwin): Only check for one cygwin DLL
	file name depending on executable target type.  Return value indicating
	executable target type.  Change comment accordingly.
	* path.h (enum path_types): Add FIXME comment to definition of
	PATH_OPEN.  Add PATH_64BITEXEC.
	(iscygexec32): New method.
	(iscygexec64): New method.
	(set_cygexec): Implement additionally with void * parameter to be able
	to set PATH_64BITEXEC if required.

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

	* Throughout, fix format string of debug printf and api_fatal calls
	to work in 32 and 64 bit environment, as well as to honor signedness.
	Use %y instead of 0x%x.
	* fhandler.h (class fhandler_dev_mem): Change type of mem_size from
	DWORD to SIZE_T.
	* fhandler_mem.cc: Throughout, cast mem_size in comparisons to make
	GCC happy.
	* fhandler_process.cc (format_process_maps): Change type of ret_len
	to SIZE_T.
	(get_mem_values): Ditto for n and length.
	* mmap.cc (MapView): Ditto for commitsize and viewsize.
	(class mmap_record): Ditto for len.  Use SIZE_T througout for memory
	size in method args and return types.
	* ntdll.h (NtLockVirtualMemory): Fix type of memory size parameters
	to SIZE_T.
	(NtMapViewOfSection): Ditto.
	(NtQueryVirtualMemory): Ditto.
	(NtUnlockVirtualMemory): Ditto.
	(RtlFreeHeap): Change type of first parameter to HANDLE.
	* shm.cc (shmat): Change type of viewsize to SIZE_T.
	* timer.cc (timer_thread): Change type of sleep_ms to LONG.
	(ualarm): Drop casts to unsigned int in timer value computation.

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

	* cygserver_ipc.h (conv_timespec32_to_timespec): Implement here.
	(conv_timespec_to_timespec32): Ditto.
	* include/cygwin/ipc.h (struct _ts32): Define here.
	* include/cygwin/msg.h: Enforce 4 byte alignment on all structs.
	(struct _ts32): Move definition to include/cygwin/ipc.h.
	(struct _msqid_ds32): Drop member comments.
	* include/cygwin/sem.h: Enforce 4 byte alignment on all structs.
	(struct _semid_ds32): Define on 64 bit in _KERNEL mode.
	* include/cygwin/shm.h: Enforce 4 byte alignment on all structs.
	(struct _shmid_ds32): Define on 64 bit in _KERNEL mode.
	(struct shminfo): Enhance coment on shmall member.
	(struct shm_info): Convert type of all members to int32_t.
	* include/cygwin/sysproto.h (struct semctl_args): Change definition to
	use the same structure on 32 and 64 bit.
	(struct semop_args): Ditto.
	(struct shmat_args): Ditto.
	(struct shmctl_args): Ditto.
	(struct shmdt_args): Ditto.
	(struct shmget_args): Ditto.

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

	* cygserver.h (struct client_request::header_t): Change definition of
	msglen to use the same structure on 32 and 64 bit.  Add read and write
	accessors.  Change type of error_code to int.
	(class client_request): Align accessor methods to above change.
	* cygserver_ipc.h (ipc_set_proc_info): Use _TYPE64_CLR macros.
	* winlean.h (_TYPE64_CLR): New macro.
	(_TYPE64_SET): Ditto.
	* include/cygwin/msg.h (struct _ts32): Define on 64 bit in _KERNEL mode.
	(struct _msqid_ds32): Ditto.  Add comment to explain why.
	* include/cygwin/sysproto.h: Enforce 4 byte alignment on all structs.
	(struct msgctl_args): Change definition to use the same structure on
	32 and 64 bit.
	(struct msgrcv_args): Ditto.
	(struct msgsnd_args): Ditto.

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

	* shm.cc (fixup_shms_after_fork): Fix initialization of local variable
	parent.

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

	* winlean.h (_TYPE64): Define.
	* cygserver_ipc.h (struct proc): Rearrange to use same structure on
	32 and 64 bit.  Add member is_64bit.
	(ipc_set_proc_info): Change accordingly.

2012-12-04  Kai Tietz  <ktietz@redhat.com>

	* child_info.h (child_info): Re-type magic to DWORD.

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

	* cygtls.h (CYGTLS_PADSIZE): Change comment noting alignment has to
	be 16 bytes on x86_64.

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

	* Makefile.in: Add rule to build cygwin.sc dynamically using the
	target compiler.
	* cygwin.sc.in: Rename from cygwin.sc.  Make OUTPUT_FORMAT and
	SEARCH_DIR dependent on target CPU.  Add extra alignment and .xdata
	section on x86_64.  Keep up with latest dwarf debug section changes.

2012-11-29  Corinna Vinschen  <corinna@vinschen.de>

	* miscfuncs.cc (thread_wrapper): Use PVOID instead of VOID *.
	Fix stack alignment before calling VirtualFree.  Fix comments.

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

	* autoload.cc (wsock_init): Drop vendor info debug printout.  It's
	undefined since Wsock version 2.

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

	* autoload.cc: Extend leading comment to describe the 64 bit
	implementation as well.
	(LoadDLLprime): Define for x86_64.
	(LoadDLLfuncEx3): Ditto.
	(dll_func_load): Ditto.
	(struct dll_info): Use target-agnostic type for load_state.
	(struct func_info): Add func_addr member on x86_64.
	(two_addr_t): New type to be twice the size of an address on either
	target.
	(union retchain): Use target-agnostic type for low and high,
	use two_addr_t as type for ll member.
	(std_dll_init): Define as SYSV ABI function on x86_64.  Explain why.
	Change return type to two_addr_t.  Add casts as necessary.  Convert
	assembler code to tweak return address into C code.
	(wsock_init): Ditto.  Drop leading underscore in LoadDLLprime
	macro call on x86_64.
	(GetAdaptersAddresses): Define using LoadDLLfunc since it's not called
	on pre-XP anyway.
	(AttachConsole): Don't define on x86_64.
	(GetModuleHandleExW): Ditto.
	(GetSystemWow64DirectoryW): Ditto.
	(GetVolumePathNamesForVolumeNameW): Ditto.

2012-11-22  Corinna Vinschen  <corinna@vinschen.de>

	* include/sys/strace.h: Include sys/types.h for pid_t.

2012-11-16  Corinna Vinschen  <corinna@vinschen.de>

	* cygtls.h (CYGTLS_PADSIZE): Define for 64 bit.  Add FIXME comment.
	* profil.c: Replace usage of network types with types as documented
	in Linux, throughout.
	(get_thrpc): Fix access to instruction pointer for x86_64.
	* profil.h: Include stdin.t.h.  Replace usage of network types with
	types as documented in Linux, throughout.
	* config/x86_64/profile.h (mcount): Use unsigned long rather than
	__uintptr_t.

2012-11-16  Corinna Vinschen  <corinna@vinschen.de>

	* cygmalloc.h (dlmalloc): Change unsigned in declaration to size_t.
	(dlrealloc): Ditto.
	* wait.cc (wait4): Cast second parameter in proc_subproc call to
	uintptr_t.

2012-11-16  Corinna Vinschen  <corinna@vinschen.de>

	* thread.cc (verifyable_object_isvalid): Temporarily define as
	non-inline on x86_64 to workaround compiler bug.

2012-11-16  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_netdrive.cc: Use UINT32_MAX rather than UINT_MAX to make
	absolutely clear that we mean the 32 bit maximum.
	* fhandler_socket.cc: Ditto.
	* pinfo.cc: Ditto with INT32_MAX.
	* select.cc (fd_mask): Drop gratuitious definition.
	(sizeof_fd_set): Cast to size_t.
	* shared.cc (pround): Cast to ptrdiff_t.
	* strace.cc (strace::activate): Fix format string.
	(strace::write_childpid): Take pid_t as parameter.
	* include/sys/strace.h (strace::write_childpid): Change declaration
	accordingly.
	* sync.cc (muto::init): Cast in call to InterlockedExchangePointer to
	make compiler happy.
	* sync.h (class muto): De-const name.
	* syslog.cc (try_connect_syslogd): Take size_t as third argument.
	(vsyslog): Convert len to size_t.
	* thread.cc: Use {U}INT32_MAX rather than {U}LONG_MAX.  Througout change
	types used in Windows calls to matching Windows types.
	(pthread::cancel): Fix access to instruction pointer for x86_64.
	(pthread_attr_getstack): Cast to ptrdiff_t for pointer arithmetic.
	* thread.h: Throughout convert 'long' types to uint32_t or LONG.

2012-11-16  Corinna Vinschen  <corinna@vinschen.de>

	* include/cygwin/acl.h (struct __acl32): Drop.  Use struct acl or
	aclent_t throughout instead.
	* sec_acl.cc (aclcheck32): Mark currently unused variables as unused.
	(lacl32): Disable on x86_64.
	(acl): Alias to acl32 on x86_64.
	(facl): Alias to facl32 on x86_64.
	(aclcheck): Alias to aclcheck32 on x86_64.
	(aclsort): Alias to aclsort32 on x86_64.
	(acltomode): Alias to acltomode32 on x86_64.
	(aclfrommode): Alias to aclfrommode32 on x86_64.
	(acltopbits): Alias to acltopbits32 on x86_64.
	(aclfrompbits): Alias to aclfrompbits32 on x86_64.
	(acltotext): Alias to acltotext32 on x86_64.
	(aclfromtext): Alias to aclfromtext32 on x86_64.
	* resource.cc (getrlimit): Use correct cast to rlim_t rather than DWORD.
	* sched.cc (sched_setparam): Drop ThreadPriority and all code setting
	it.

2012-11-15  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_process.cc (format_process_stat): Add comment to explain
	the WOW64 problems concerning the BasePriority value.  Fix format
	string in __small_sprintf call.
	* ntdll.h: Mark more native structures as tested on 64 bit.
	(enum _EVENT_TYPE): Drop definition.
	(enum _TIMER_TYPE): Ditto.
	(enum _SECTION_INHERIT): Drop __MINGW64_VERSION_MAJOR guard.

2012-11-14  Corinna Vinschen  <corinna@vinschen.de>

	* ntdll.h: Mark more native structures as tested on 64 bit.
	(struct _FILE_BOTH_DIR_INFORMATION): Rename from
	_FILE_BOTH_DIRECTORY_INFORMATION as per WDK documentation.
	* fhandler_disk_file.cc: Accommodate aforementioned structure name
	change.
	* path.cc: Ditto.

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

	* cygheap.h (class fcwd_access_t): Remove wrong alignment attribute from
	Buffer member of FAST_CWD_OLD structure.  Add comment that everything
	has been tested.
	* ntdll.h: Mark more native structures as tested on 64 bit.

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

	* cygheap.h (class fcwd_access_t): Add alignment attribute to Buffer
	member of FAST_CWD_* structures to work on 64 bit.
	* path.cc (symlink_info::check_shortcut): Add cast to avoid compiler
	warning.
	(cygwin_conv_path_list): Drop ununsed variable.
	(peek32): Define with int32_t cast on 64 bit to allow easier fetching
	of instruction pointer relative addresses.
	(find_fast_cwd_pointer): Add new implementation for x86_64.
	Tweak a comment in 32 bit version.

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

	* dlfcn.cc (dlopen): Change cast to accommodate type change in ntdll.h
	* fhandler_process.cc (thread_info::thread_info): Change type of local
	variable size to ULONG to match NtQuerySystemInformation call.
	Add cast to avoid compiler warnings.
	(get_process_state): Add cast to avoid compiler warnings.  Accommodate
	name change of NextEntryOffset member of PSYSTEM_PROCESS_INFORMATION
	structure.
	* mmap.cc: Add casts to avoid compiler warnings.
	(mlock): Change type of local variables min and max to match
	GetProcessWorkingSetSize call.
	* nlsfuncs.cc (__collate_range_cmp): Add casts to avoid compiler
	warnings.
	* ntdll.h: Drop accommodations for Mingw32.  Fix a couple of formatting
	glitches.  Add a comment to all structures explicitely tested on 64 bit.
	(SYSTEM_INFORMATION_CLASS): Change SystemProcessesAndThreadsInformation
	to SystemProcessInformation and SystemProcessorTimes to
	SystemProcessorPerformanceInformation to match MSDN.
	(SYSTEM_BASIC_INFORMATION): Fix member types to match 64 bit.
	(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION): Rename from
	SYSTEM_PROCESSOR_TIMES to use official name from MSDN.  Accommodate
	throughout.  Drop unneeded align attribute.
	(VM_COUNTERS): Fix member types to match 64 bit.
	(SYSTEM_PROCESS_INFORMATION): Rename from SYSTEM_PROCESSES to use
	official name from MSDN.  Fix member types to match 64 bit.  Change
	member names to match MSDN and Mingw64.  Accommodate throughout.
	(IO_STATUS_BLOCK): Change to use MSDN definition.
	(SYSTEM_TIMEOFDAY_INFORMATION): Rename from
	SYSTEM_TIME_OF_DAY_INFORMATION to use official name from MSDN.
	Accommodate throughout.  Add Reserved1 area per MSDN.
	(LDR_DATA_TABLE_ENTRY): Add comment for future reference.  Change
	type of LoadCount to USHORT.
	(PEB_LDR_DATA): Change type of Initialized to BOOLEAN.  Add comment for
	future reference.
	(PEB): Fix member types to match 64 bit.
	(GDI_TEB_BATCH): New type.
	(TEB): Fix member types to match 64 bit.
	(PROCESS_BASIC_INFORMATION): Ditto.
	(MEMORY_WORKING_SET_LIST): Ditto.
	(SharedUserData): Change comment to note the fact that the address
	is valid on 32 and 64 bit.
	* pinfo.cc (winpids::enum_processes): Add cast to avoid compiler
	warnings.
	* select.cc (pipe_data_available): Add braces in initalization of an
	IO_STATUS_BLOCK to match new definition.
	* wincap.h (class wincapc): Change type of wow64 to ULONG_PTR to match
	MSDN description.
	(wincapc::is_wow64): Convert return value explicitely to bool.
	* wow64.cc (wow64_test_for_64bit_parent): Change type of wow64 to
	ULONG_PTR to match MSDN description.  Add a cast to avoid compiler
	warning.
	* regex/engine.c: Avoid compiler warnings about unused and potentially
	uninitialized variables.
	* regex/regcomp.c: Ditto.  Drop unnecessary definition of LCID.

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

	* pinfo.cc (_pinfo::commune_request): Accommodate the fact that LONG_MAX
	does not match sizeof LONG.

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

	* miscfuncs.cc (case_folded_lower): Change to unsigned char to avoid
	compiler warnings.
	(case_folded_upper): Ditto.
	(thread_wrapper): Add assembler code for x86_64.
	* winsup.h (case_folded_lower): Change to unsigned char.
	(case_folded_upper): Ditto.
	(cyg_tolower): Add cast to avoid compiler warnings.
	(cyg_toupper): Add cast to avoid compiler warnings.

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

	* tty.h (class tty): Store from_master and to_master HANDLEs in
	unions to make sure the storage is 64 bit compatible.  Add comment to
	explain why.
	(from_master): Convert to read accessor method.
	(to_master): Ditto.
	(set_from_master): New method to store HANDLE value 64 bit clean.
	(set_to_master): Ditto.
	* fhandler_tty.cc: Fix debug printfs to work in 64 bit mode as well.
	Change usage of from_master and to_master throughout to accommodate
	aforementioned change.
	* fhandler_termios.cc (fhandler_termios::ioctl): Add cast to avoid
	compiler warning.

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

	* cygheap.h (struct user_heap_info): Change type of chunk to SIZE_T.
	Remove unused slop member.
	* fork.cc (fork): Rename esp to stackp.  Add 64 bit asm expression to
	fetch stack pointer.
	(child_copy): Use platform independent types.
	* heap.cc (eval_start_address): Add comment. Disable 3GB code on 64 bit.
	(eval_initial_heap_size): Use platform independent types.  Fix debug
	printf format strings.
	(sbrk): Add comment.  Change argument type according to newlib
	definition.  Use platform independent types.  Drop unneeded else and
	move comment to the right spot.
	* hookapi.cc (PEHeaderFromHModule): Return PVOID.  Add comment to
	explain why.  Add bool parameter to return if target executable is
	64 bit or not.
	(rvadelta_get): New inline function to fetch section address platform
	independent.
	(rvadelta32, rvadelta64): Platform dependent wrappers.
	(rvadelta): Change to macro calling the platform dependent rvadelta
	wrappers.
	(putmem): Define platform dependent THUNK_FUNC_TYPE and use throughout.
	(RedirectIAT): Add comment.
	(get_export): Add comment.
	(find_first_notloaded_dll): Allow to fetch information in a platform
	and target independent way.
	(hook_or_detect_cygwin): Ditto.  Recognize the cyg64win1.dll file name
	as well.
	* kernel32.cc (CreateFileMappingW): Cast to avoid compiler warning.

	* fhandler.h (class fhandler_dev_tape): Replace mt_evt with an
	OVERLAPPED structure ov.
	* mtinfo.h (class mtinfo_part): Define members as int32_t rather than
	long.  Change member function declarations accordingly.
	(class mtinfo_drive): Ditto.  Store OVERLAPPED pointer rather than
	holding the full structure.  Add comment to explain why.
	* fhandler_tape.cc: Accommodate above changes throughout.

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

	* fhandler_socket.cc (fhandler_socket::ioctl): Don't use __ms_u_long
	directly.  Rather only use it on 64 bit.  Add comment to explain the
	problem.

2012-11-07  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc: Throughout, fix casts to work on 64 bit.  Move
	calls to pthread_testcancel to upper syscall level for consistency.
	Move read, readv, write, and writev methods to keep together with
	equivalent recv and send methods.
	(fhandler_socket::read): Compute WSAMSG buffer on 64 bit to overcome
	type restriction of WSABUF len member.
	(fhandler_socket::recvfrom): Ditto.
	(fhandler_socket::write): Ditto.
	(fhandler_socket::sendto): Ditto.
	(fhandler_socket::sendmsg): Restructure for readability.
	* net.cc (cygwin_sendto): Call pthread_testcancel here.
	(cygwin_recvfrom): Ditto.
	(cygwin_connect): Ditto.
	(cygwin_accept): Ditto.
	(cygwin_recv): Ditto.
	(cygwin_send): Ditto.
	(cygwin_recvmsg): Ditto.
	(cygwin_sendmsg): Ditto.

2012-11-07  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_process.cc (heap_info::heap_info): Add comment to explain a
	TODO item.

2012-11-07  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_procsysvipc.cc (format_procsysvipc_msg): Fix printf format
	string for 32 bit as well.

2012-11-07  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_procsysvipc.cc (format_procsysvipc_msg): Fix printf format
	string for 64 bit.
	* fhandler_registry.cc (fhandler_registry::readdir): Fix cast.
	* fhandler_serial.cc (ibuf): Avoid compiler warning.
	* include/cygwin/ipc.h: Include stdint.h.
	* include/cygwin/msg.h (msgqnum_t): Define as uint32_t.
	(msglen_t): Ditto.
	(struct msginfo): Convert all long members to int32_t.
	(struct msg_info): Ditto.
	* include/cygwin/sem.h (struct seminfo): Ditto.
	* include/cygwin/shm.h (shmatt_t): Define as uint32_t.
	(struct shmid_ds): Define shm_segsz as uint32_t.
	(struct shminfo): Convert all long members to int32_t.

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

	* ntdll.h (PDI_WOW64_MODULES): Define.
	(struct _DEBUG_BUFFER): Fix definition to work on 32 and 64 bit.
	(struct _DEBUG_HEAP_INFORMATION): Ditto.
	(struct _DEBUG_HEAP_BLOCK): Ditto.

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

	* fhandler_process.cc: Fix debug printf calls to be type safe.
	Add casts to avoid compiler warnings.
	(get_mem_values): Avoid using ULONG_MAX since it's NOT matching
	ULONG on 64 bit.
	* fhandler_procnet.cc (fhandler_procnet::open): Fix syscall_printf call
	to be type safe.
	(format_procnet_ifinet6): Add cast to avoid compiler warnings.
	* ntdll.h (struct _DEBUG_HEAP_BLOCK): Change Address to ULONG_PTR.

	* include/bits/wordsize.h: Fix __WORDSIZE definition for x86_64.
	Add __WORDSIZE_COMPAT32 as on Linux.
	* include/inttypes.h: Include bits/wordsize.h.  Use __WORDSIZE check
	where appropriate.
	* include/limits.h: Include bits/wordsize.h.
	(CHAR_BIT): Change definition to rely on default
	compiler definition.
	(LONG_BIT): Ditto.
	(WORD_BIT): Ditto.
	(__LONG_MAX__): Use __WORDSIZE check.
	(RTSIG_MAX): Ditto.
	* include/stdint.h: Include bits/wordsize.h.  Use __WORDSIZE check
	where appropriate.
	* include/cygwin/signal.h: Ditto.
	* include/cygwin/types.h: Ditto.

	* include/asm/byteorder.h (__ntohl): Use bswap instruction, available
	since i486.
	(__ntohs): Fix constraint to work on 64 bit CPU as well.

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

	* cpuid.h (can_set_flag): Implement for x86_64.
	* fhandler.h (class fhandler_dev_raw): Define devbuf members taking
	numerical values as DWORD, rather than size_t.
	* fhandler_dsp.cc: Fix debug printf calls to be type safe.
	(waveOut_callback): Align parameter types to latest MSDN description.
	(waveIn_callback): Ditto.
	(fhandler_dev_dsp::Audio_out::start): Change casts in call to
	waveOutOpen according to MSDN.
	(fhandler_dev_dsp::Audio_out::parsewav): Fix a cast.
	(fhandler_dev_dsp::Audio_in::start): Change casts in call to
	waveInOpen according to MSDN.
	* fhandler_floppy.cc: Fix debug printf calls to be type safe.
	(fhandler_dev_floppy::ioctl): Add casts to be on the safe side.
	* fhandler_proc.cc: Fix debug printf calls to be type safe.

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

	* cygthread.cc: Fix usage of %p in debug printfs, throughout.
	* dcrt0.cc: Ditto.
	* dtable.cc: Ditto.
	* errno.cc: Ditto.
	* exceptions.cc: Ditto.
	* fhandler.cc: Ditto.
	* fhandler_console.cc: Ditto.
	* fhandler_disk_file.cc: Ditto.

	* fhandler_clipboard.cc (cygnativeformat): Define as UINT.
	(fhandler_dev_clipboard::read): Ditto for local format variable.
	Use casts to compare off_t with size_t value.
	* fhandler_console.cc (fhandler_console::ioctl): Avoid compiler
	warnings.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): Fix cast.
	* include/sys/dirent.h (struct __DIR): Define __d_internal as uintptr_t,
	rather than unsigned int.

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

	* fcntl.cc (fcntl64): Make arg an intptr_t.  Add comment to explain a
	potential type problem.  Fix syscall_printf.
	(_fcntl): Make arg an intptr_t.
	* fhandler.cc (fhandler_base::fcntl): Ditto.
	* fhandler_socket.cc (fhandler_socket::fcntl): Ditto.
	* fhandler.h: Align declarations.

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

	* dtable.cc: Use %y rather than 0x%x.
	* exceptions.cc: Ditto.

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

	* smallprint.cc (__small_vsprintf): Add 'y' and 'Y' conversion.
	Add description to comment.
	(__small_vswprintf): Align behaviour to __small_vsprintf.

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

	* external.cc (get_cygdrive_info): Return uintptr_t rather than DWORD.
	(check_ntsec): Return bool.
	(cygwin_internal): Return uintptr_t.  Accommodate throughout.
	* include/sys/cygwin.h (cygwin_internal): Align declaration.

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

	* include/cygwin/signal.h (NSIG): Define differently for x86_64 and
	i686.  Change FIXME comment accordingly.
	(SIGRTMAX): Define in terms of NSIG.
	* include/limits.h (RTSIG_MAX): Define for x86_64.
	* strsig.cc (__signals_common): Hold all signals available on both
	platforms.
	(__signals): Define differently for x86_64 and i686.

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

	* dll_init.cc: Fix debug printf to be type-safe.
	* dtable.cc: Ditto.

2012-10-26  Corinna Vinschen  <corinna@vinschen.de>

	* cygtls.cc (_cygtls::remove): Fix debug printf to be type-safe.
	* dcrt0.cc: Ditto, throughout.
	* include/sys/cygwin.h (struct per_process): Define magic_biscuit,
	dll_major and dll_minor as uint32_t.

2012-10-26  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.h (struct init_cygheap): Define sthreads as uint32_t.

2012-10-26  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.cc: Fix debug printfs to work in 64 bit mode as well,
	throughout.
	(nthreads): Define as uint32_t to make always 4 byte.  Accommodate
	throughout.
	(threadlist_ix): Ditto.

2012-10-26  Corinna Vinschen  <corinna@vinschen.de>

	* exception.h (stackdump): Change first parameter to PUINT_PTR.
	* exceptions.cc: Define cpu specific macros _GR, _AFMT and _ADDR.
	Use throughout to avoid ifdef's.  Fix debug printfs to work in
	64 bit mode as well, throughout.
	(status_info): Define member code as NTSTATUS.  Add casts where
	necessary throughout.
	(dump_exception): Dump all x86_64 registers if building for it.
	(class stack_info): Define dummy_frame as PUINT_PTR.
	(stack_info::init): Change first parameter to PUINT_PTR.  Rename
	ebp to framep for CPU independent naming.  Drop debp macro.
	(stack_info::walk): Rename ebp to framep for CPU independent naming.
	Disable WOW64 hack in 64 bit mode.
	(stackdump): Change first parameter to PUINT_PTR.  Rename ebp to framep
	for CPU independent naming.
	(_cygtls::inside_kernel): Ignore system_wow64_directory on 64 bit.
	(rtl_unwind): Redefine for x86_64 cpu.
	(_except_list): Drop redundant definition.
	(_cygtls::copy_context): Just use __COPY_CONTEXT_SIZE.
	* sigproc.cc (_cygtls::signal_exit): Conditionalize stackdump call per
	cpu.
	* smallprint.cc (__small_vsprintf): Fix up for 64 bit.  Handle 'l' size
	modifier in 'd', 'o', 'u', 'x' conversion to print "long" values on a
	per cpu base.  Add 'O' conversion.  Change comment accrdingly.
	* include/cygwin/signal.h (struct _uc_fpxreg): Define for 64 bit.
	(struct _uc_xmmreg): Ditto.
	(struct _fpstate): Ditto.
	(struct ucontext): Ditto.
	(struct _uc_fpreg): Define for 32 bit.
	(struct _fpstate): Use struct _uc_fpreg for _st.  Use explicit sized
	types.
	(struct ucontext): Use explicit sized types.
	(__COPY_CONTEXT_SIZE): Cast safely.
	(sigset_t): Define as __uint64_t on 64 bit.  Add FIXME comment in 32
	bit case.

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

	* smallprint.cc (rnarg): Make type-safe.
	(rnargLL): Ditto.
	(__small_vsprintf): Add comment to document meaning of each possible
	conversion.  Fix 'p' conversion for 64 bit.

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

	* globals.cc: Redefine _RDATA as "const", if not already defined.
	Apply extern "C" linkage to the R/O UNICODE_STRINGs and cygwin_props.
	Change comments to explain new method.
	* winsup.h (_RDATA): Define as empty string and only if including
	globals.h.
	(cygwin_finished_initializing): Drop redundant declaration.

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

	* dtable.cc (dtable::get_debugger_info): Raise size of buf to allow
	64 bit values.  Call sprintf in a type-safe manner.

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

	* dll_init.cc (reserve_at): Use PVOID rather than DWORD as type for
	pointer parameters and return type.
	(release_at): Ditto.
	(dll_list::load_after_fork_impl): Fix format strings.  Call reserve_at
	without casts to DWORD.
	(struct dllcrt0_info): Change type of res to PVOID.
	(dll_dllcrt0): Return PVOID rather than int.
	(dll_dllcrt0_1): Accommodate type change of dllcrt0_info::res.
	(dll_noncygwin_dllcrt0): Disable on 64 bit.  Add a cast for 32 bit.
	* dll_init.h (struct pefile): Drop 32 bit decoration from Windows
	types.
	* ntdll.h (struct _DEBUG_HEAP_INFORMATION): Define Base as UINT_PTR.
	(struct _DEBUG_MODULE_INFORMATION): Define Reserved and Base as
	UINT_PTR.
	* winsup.h (dll_dllcrt0): Declare as PVOID.
	(dll_noncygwin_dllcrt0): Don't declare on 64 bit.
	* include/cygwin/cygwin_dll.h (cygwin_attach_dll): Declare as PVOID.
	(cygwin_detach_dll): Declare with PVOID parameter.
	(dll_index): Declare as PVOID.
	(_cygwin_dll_entry): Accommodate type change of dll_index.
	* lib/crt0.h (dll_dllcrt0): Declare as PVOID.
	* lib/cygwin_attach_dll.c (cygwin_attach_dll): Define PVOID.

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

	* dcrt0.cc (init_windows_system_directory): Disable setting
	system_wow64_directory{_length} on 64 bit.
	(dll_crt0_0): Disable WOW64-specific code on 64 bit.
	(_dll_crt0): Ditto.
	* globals.cc (system_wow64_directory): Don't define on 64 bit.
	(system_wow64_directory_length): Ditto.
	* wincap.cc (wincapc::init): On 64 bit, always set wow64 to 0 and
	related bool values to false.
	* wow64.cc: Disable entire code on 64 bit.
	* wow64.h: Ditto.

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

	* cygtls.h (__stack_t): Define as uintptr_t.
	* dcrt0.cc (child_info_fork::alloc_stack): Conditionalize assembler
	code on a per-CPU base.  Rename esp to stackp.
	(get_cygwin_startup_info): Cast pointers to uintptr_t in
	multiple_cygwin_problem call.  Minor formatting change.
	(_dll_crt0): Conditionalize assembler code on a per-CPU base.
	(multiple_cygwin_problem): Change parameters from unsigned to uintptr_t.
	* winsup.h (multiple_cygwin_problem): Change declaration accordingly.
	* pinfo.h (pinfo::reattach): Cast 2nd argument in proc_subproc call
	to uintptr_t.
	(pinfo::remember): Ditto.
	* sigproc.cc (proc_subproc): Change 2nd parameter to uintptr_t to allow
	pointer values.
	* sigproc.h (proc_subproc): Change declaration accordingly.
	* include/sys/cygwin.h (per_process_overwrite): Use offsetof to compute
	value.

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

	* cygheap.cc (N0): Remove.
	(N): Ditto.
	(to_cmalloc): Use offsetof to compute value.
	(tocygheap): Use offsetof to compute value.

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

	* cygtls.h (_tlsbase): Define for __x86_64__.
	(_tlstop): Ditto.
	* exception.h (exception_list): Ditto.

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

	* cygheap.cc (to_cmalloc): Fix pointer cast.
	(nextpage): Ditto.  Base definition on roundup2.
	(allocsize): Cast to SIZE_T.
	(_csbrk): Drop granmask.  Define adjsbs SIZE_T as 2nd parameter to
	VirtualAlloc.
	(tocygheap): Fix pointer cast.

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

	Avoid various type ambiguity problems showing up in the 64 bit case:
	* cygheap.h (cygheap_user::set_sid): Convert to void.
	(cygheap_user::set_saved_sid): Ditto.
	* devices.h (struct device): Drop operator int& and DWORD& entirely.
	Throughout, use dev_t or fh_devices instead.
	* devices.cc: Regenerate.
	* fhandler.h (class fhandler_base): Convert _refcnt member to LONG.
	(fhandler_base::inc_refcnt): Return LONG.
	(fhandler_base::dec_refcnt): Ditto.
	(fhandler_base::get_major): Return _major_t.
	(fhandler_base::get_minor): Return _minor_t.
	(fhandler_base::get_unit): Delete.  Throughout, use get_minor instead
	of get_unit.
	(fhandler_socket::get_socket): Use SOCKET rather than int.  Only define
	if __INSIDE_CYGWIN_NET__ is defined.
	(fhandler_pty_slave::get_unit): Drop declaration.
	* fhandler_procnet.cc: Include Windows headers early.
	* fhandler_socket.cc: Ditto.
	* fhandler_tty.cc (fhandler_pty_slave::get_unit): Remove.
	* path.h (path_conv::get_device): Rename from get_devn and change return
	type to dev_t.  Accommodate throughout.
	(path_conv::get_unitn): Remove unused method.
	* pinfo.h (class pinfo): Drop operator== for int case.
	(pinfo::operator!): Define.
	* poll.cc: Don't define __INSIDE_CYGWIN_NET__.
	* syscalls.cc (getpgid): Replace use of pinfo::operator== with
	pinfo::operator!.
	* tty.h (tty_min::setntty): Convert 2nd parameter to _minor_t.
	* tty.h (tty_min::getntty): Change return type to dev_t.
	(tty_min::get_minor): Rename from get_unit.  Change return type to
	_minor_t.

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

	* include/mntent.h: Don't include paths.h and don't define macros if
	_NOMNTENT_MACROS is set.

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

	* advapi32.cc (DuplicateTokenEx): Make ?: expression type-safe.
	* ntdll.h (KAFFINITY): Don't define if building with Mingw64 headers.
	* thread.cc: Throughout drop casts in calls to Interlocked functions.
	* thread.h (class fast_mutex): Ditto.  Define lock_counter as LONG.
	(class pthread_mutex): Define lock_counter as LONG.
	(struct MTinterface): Define threadcount as LONG.

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

	* configure.in: Add AC_NO_EXECUTABLES to allow bootstrap.
	Add x86_64 to allowed cpu types.
	* configure: Regenerate.
	* config/x86_64/profile.h: New file.

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

	* thread.cc (semaphore::_fixup_after_fork): Fix Win32 error output in
	api_fatal call.

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

	* mkvers.sh: Drop reference to w32api includes.

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

	* include/cygwin/stat.h (struct __stat64): Drop entirely in favor of
	struct stat.  Accommodate throughout Cygwin.
	* include/cygwin/types.h: Throughout, drop current, internal types
	used since Cygwin 1.5 with the base type they have been used for.
	Throughout, define types based on bitsize-specific types where
	appropriate.  Accommodate throughout Cygwin.
	* include/sys/cygwin.h: Drop __uid32_t and __gid32_t in favor of
	uid_t and gid_t.  Define uid/gid types based on bitsize-specific types.
	(struct external_pinfo): Accommodate above change.
	* cygtls.h (struct _local_storage): Drop unused members grp and
	namearray,
	* tlsoffsets.h: Regenerate.
	* devices.h (_dev_t): Drop definition.  Use dev_t throughout instead.
	* devices.cc: Regenerate.

	Probably temporary patch to drop unneeded functionality on x86_64:
	* fcntl.cc (_fcntl): Alias to fcntl64 on x86_64.
	* glob.cc (CYGWIN_gl_stat): Simplify on x86_64.
	* grp.cc (grp32togrp16): Don't define on x86_64.
	(getgrgid): Alias to getgrgid32 on x86_64.
	(getgrnam): Alias to getgrnam32 on x86_64.
	(getgrent): Alias to getgrent32 on x86_64.
	(getgroups): Alias to getgroups32 on x86_64.
	(initgroups): Alias to initgroups32 on x86_64.
	(setgroups): Alias to setgroups32 on x86_64.
	* mmap.cc (mmap): Alias to mmap64 on x86_64.
	* passwd.cc (getpwuid): Alias to getpwuid32 on x86_64.
	(getpwuid_r): Alias to getpwuid_r32 on x86_64.
	(getpwduid): Don't define on x86_64.
	* syscalls.cc (lseek): Alias to lseek64 on x86_64.
	(_lseek): Alias to lseek64 on x86_64.
	(chown): Alias to chown32 on x86_64.
	(lchown): Alias to lchown32 on x86_64.
	(fchown): Alias to fchown32 on x86_64.
	(stat64_to_stat32): Don't define on x86_64.
	(fstat): Alias to fstat64 on x86_64.
	(_fstat_r): Alias to _fstat64_r on x86_64.
	(stat): Alias to stat64 on x86_64.
	(_stat_r): Alias to _stat64_r on x86_64.
	(lstat): Alias to lstat64 on x86_64.
	(ftruncate): Alias to ftruncate64 on x86_64.
	(truncate): Alias to truncate64 on x86_64.
	(seteuid): Alias to seteuid32 on x86_64.
	(setuid): Alias to setuid32 on x86_64.
	(setreuid): Alias to setreuid32 on x86_64.
	(setegid): Alias to setegid32 on x86_64.
	(setgid): Alias to setgid32 on x86_64.
	(setregid): Alias to setregid32 on x86_64.
	* uinfo.cc (getuid): Alias to getuid32 on x86_64.
	(getgid): Alias to getgid32 on x86_64.
	(geteuid): Alias to geteuid32 on x86_64.
	(getegid): Alias to getegid32 on x86_64.
	* winsup.h (ILLEGAL_UID16): Don't define on x86_64.
	(ILLEGAL_GID16): Ditto.
	(uid16touid32): Don't declare on x86_64.
	(gid16togid32): Don't declare on x86_64.

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

	* Makefile.in (TEST_DLL_NAME): Use -nostdlib flag unconditionally.

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

	* cygwin.sc: Add default w32api search dirs.
	* Makefile.in (DLL_IMPORTS); Just use -l syntax.
	(TEST_DLL_NAME): Drop DLL_IMPORTS dependency.