Commit 2a14e68
authored
Apply two upstream CL to mkwinsyscall (#278)
* Apply CL463216: write source to temp file if formatting fails
This change writes the unformatted Go source code to a temp file if
"format.Source" fails. Print the temp file path to the console to make
it easy to find. The source code is what causes formatting errors, and
it can be difficult to diagnose them without this context.
CL link: https://go-review.googlesource.com/c/sys/+/463216
commit: 4112509618ee88519f899be20efc6882496b57c8
Signed-off-by: Hamza El-Saawy <[email protected]>
* Apply CL463215: support "." and "-" in DLL name
This change adds "." and "-" support for DLL filenames in "//sys".
Supporting "." requires a change in how mkwinsyscall handles the
"= <filename>.<function>" syntax. Instead of assuming that only one "."
can appear in this string, now mkwinsyscall assumes that any additional
"." belongs to the filename.
Supporting "." also requires changing how Go identifiers are created for
each DLL. This change also allows mkwinsyscall to support "-". When
creating a Go identifier, "." and "-" in the DLL filename are replaced
with "_". Otherwise, mkwinsyscall would produce invalid Go code, causing
"format.Source" to fail.
CL link: https://go-review.googlesource.com/c/sys/+/463215
commit: 71da6904945ac440253cb5c132d64712f80ca497
Signed-off-by: Hamza El-Saawy <[email protected]>
---------
Signed-off-by: Hamza El-Saawy <[email protected]>1 parent dd5de69 commit 2a14e68
1 file changed
Lines changed: 65 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
489 | 488 | | |
490 | 489 | | |
491 | 490 | | |
| |||
502 | 501 | | |
503 | 502 | | |
504 | 503 | | |
505 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
506 | 521 | | |
507 | 522 | | |
508 | 523 | | |
| |||
648 | 663 | | |
649 | 664 | | |
650 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
651 | 673 | | |
652 | 674 | | |
653 | 675 | | |
| |||
697 | 719 | | |
698 | 720 | | |
699 | 721 | | |
700 | | - | |
| 722 | + | |
701 | 723 | | |
702 | | - | |
| 724 | + | |
703 | 725 | | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
708 | 730 | | |
709 | 731 | | |
710 | 732 | | |
711 | | - | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
712 | 736 | | |
713 | 737 | | |
714 | 738 | | |
| |||
878 | 902 | | |
879 | 903 | | |
880 | 904 | | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
881 | 921 | | |
882 | 922 | | |
883 | 923 | | |
| |||
904 | 944 | | |
905 | 945 | | |
906 | 946 | | |
907 | | - | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
908 | 953 | | |
909 | 954 | | |
910 | 955 | | |
| |||
970 | 1015 | | |
971 | 1016 | | |
972 | 1017 | | |
973 | | - | |
| 1018 | + | |
974 | 1019 | | |
975 | 1020 | | |
976 | | - | |
| 1021 | + | |
977 | 1022 | | |
978 | 1023 | | |
979 | 1024 | | |
| |||
0 commit comments