Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase to 3.5.4 #71

Merged
merged 775 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
775 commits
Select commit Hold shift + click to select a range
9f3e8ba
Fix frv libgloss bits for c99/gcc-14\
JeffreyALaw Dec 23, 2023
886eadb
Fix ft32 libgloss for c99/gcc-14
JeffreyALaw Dec 23, 2023
f7d5bd9
Fix c6x libgloss port for c99/gcc-14
JeffreyALaw Dec 23, 2023
a1a2144
Fix rl78 libgloss port for c99/gcc-14
JeffreyALaw Dec 23, 2023
73ba287
Fix mcore libgloss port for c99/gcc-14
JeffreyALaw Dec 23, 2023
5e79655
Fix most of m32r libgloss for c99/gcc-14
JeffreyALaw Dec 23, 2023
1df8f9f
Fix epiphany libgloss for c99/gcc-14
JeffreyALaw Dec 23, 2023
1a17761
GCN: Implement '_exit' instead of 'exit'
tschwinge Nov 6, 2023
ddb6149
newlib MMIX: Fix compilation warnings that recent gcc treats as errors
hpataxisdotcom Dec 28, 2023
98230b7
libgloss: xtensa: fix crt0.o rule
vapier Dec 27, 2023
a84860f
libgloss: sparc: add missing m4 include
vapier Dec 29, 2023
7ef32a9
Fix another missing header file for mcore libgloss
JeffreyALaw Dec 30, 2023
3d10b04
Fix various c99/gcc-14 issues in generic libgloss code
JeffreyALaw Dec 30, 2023
ec119e1
Minor improvement to H8 startup code
JeffreyALaw Dec 31, 2023
26f7004
Changes for newlib 4.4.0 snapshot
jjohnstn Dec 31, 2023
99f3898
newlib: libc: Improved the readability of strspn with minor optimization
Jan 2, 2024
a2ddc21
libgloss: fix up incorrect "it's"
vapier Dec 25, 2023
cd75406
libgloss: moxie: delete unused/invalid assembly file
vapier Dec 27, 2023
50d6410
libgloss: merge moxie into top-level Makefile
vapier Dec 27, 2023
6a3bc17
libgloss: merge v850 into top-level Makefile
vapier Dec 27, 2023
6879bfa
libgloss: i960: delete dead/broken code
vapier Dec 27, 2023
6bbeed7
libgloss: merge i960 into top-level Makefile
vapier Dec 27, 2023
94d871e
Cygwin: check remote drives for being SSDs as well
github-cygwin Dec 7, 2023
573458e
RISC-V: Initialize the jvt CSR
hau-hsu Jan 5, 2024
9a863f7
fix strverscmp comparison of digit sequence with non-digits
BrianInglis Jan 8, 2024
c419bbb
RISC-V: fix setting up std streams in init_semihosting()
RamNalamothu Jan 3, 2024
d11629d
Cygwin: Fix a stray '\n' in cygcheck manpage
jon-turney Jan 10, 2024
5edd189
Cygwin: path.cc: fix comment starting with // but ending in */
github-cygwin Jan 11, 2024
241b50a
Cygwin: Clarifications in 3.5 changes doc
jon-turney Jan 10, 2024
4ecfb5b
Cygwin: api docs: add missing fallocate
github-cygwin Jan 15, 2024
d8c0fb0
Cygwin: introduce close_range(2)
chrfranke Jan 15, 2024
9145737
Cygwin: Make 'ulimit -c' control writing a coredump
jon-turney Jan 11, 2024
b7868e7
Cygwin: Disable writing core dumps by default.
jon-turney Jan 9, 2024
a83b93e
Cygwin: Define and use __WCOREFLAG
jon-turney Jan 10, 2024
aa82248
Cygwin: Treat api_fatal() similarly to a core-dumping signal
jon-turney Jan 11, 2024
07cccc7
Cygwin: Update documentation for cygwin_stackdump
jon-turney Jan 11, 2024
70b27ce
Cygwin: copy doc changes from commit 241b50a7abe2 to release notes
github-cygwin Jan 17, 2024
d45261f
Cygwin: replace all `fgrep' with `grep -F'
github-cygwin Jan 18, 2024
d13d922
_fputwc_r: actually return result of __fputwc
github-cygwin Jan 19, 2024
29ec333
ORIENT: avoid "expression has no effect" warning
github-cygwin Jan 19, 2024
422c4f0
memccpy: fix pointer assignment
github-cygwin Jan 19, 2024
47f079b
fputwc: call __fputwc directly
github-cygwin Jan 19, 2024
3f2d03a
Cygwin: remove warnings from testsuite build
github-cygwin Jan 19, 2024
1adfc9a
libgloss: check for objcopy & objdump properly
vapier Dec 27, 2023
0714c63
libgloss: add some objcopy/objdump build rules
vapier Dec 29, 2023
58da258
libgloss: add per-file & per-dir flag support
vapier Dec 30, 2023
0ed55d0
libgloss: msp430: delete outdated/wrong code
vapier Dec 27, 2023
2b0fd70
libgloss: msp430: delete stub crt_init.o
vapier Dec 27, 2023
f5c40e0
libgloss: msp430: split up crt0.S source
vapier Dec 27, 2023
f904792
libgloss: msp430: delete custom .S.o rule
vapier Dec 27, 2023
787b83b
libgloss: merge msp430 into top-level Makefile
vapier Dec 27, 2023
20dcee2
libgloss: merge frv into top-level Makefile
vapier Dec 27, 2023
56211d0
libgloss: merge i386 into top-level Makefile
vapier Dec 27, 2023
25f6d87
libgloss: merge mn10300 into top-level Makefile
vapier Dec 27, 2023
41de4b0
libgloss: merge mn10200 into top-level Makefile
vapier Dec 27, 2023
f4c8e16
libgloss: merge mcore into top-level Makefile
vapier Dec 27, 2023
695404d
libgloss: merge nds32 into top-level Makefile
vapier Dec 27, 2023
3342c0e
libgloss: merge xstormy16 into top-level Makefile
vapier Dec 27, 2023
1ed68b8
libgloss: merge rx into top-level Makefile
vapier Dec 27, 2023
4172a3c
libgloss: merge rl78 into top-level Makefile
vapier Dec 27, 2023
af075ae
libgloss: merge m32r into top-level Makefile
vapier Dec 27, 2023
5798c3b
libgloss: visium: fix sbrk search path
vapier Dec 27, 2023
770dd85
libgloss: merge visium into top-level Makefile
vapier Dec 27, 2023
bf37122
libgloss: xtensa: fix CPPFLAGS clobbering
vapier Dec 27, 2023
22257fc
libgloss: merge epiphany into top-level Makefile
vapier Dec 28, 2023
8c5bb84
libgloss: merge or1k into top-level Makefile
vapier Dec 29, 2023
ad17cf6
libgloss: merge fr30 into top-level Makefile
vapier Dec 29, 2023
3ecd983
libgloss: ft32: delete unused/invalid assembly file
vapier Dec 29, 2023
026422b
libgloss: merge ft32 into top-level Makefile
vapier Dec 29, 2023
50e0b04
libgloss: sparc: always install erc32 sim files
vapier Dec 29, 2023
74674f2
libgloss: merge sparc into top-level Makefile
vapier Dec 29, 2023
9b35bf8
libgloss: sparc_leon: workaround newer newlib pthread APIs
vapier Dec 29, 2023
7ba23b6
libgloss: merge sparc_leon into top-level Makefile
vapier Dec 29, 2023
ae46a83
libgloss: merge tic6x into top-level Makefile
vapier Dec 31, 2023
fecb0e5
libgloss: microblaze: use port-specific sbrk
vapier Dec 31, 2023
2f0cd37
libgloss: merge microblaze into top-level Makefile
vapier Dec 31, 2023
40b1b5c
libgloss: xc16x: drop old stub port
vapier Dec 30, 2023
6f6427b
Add Dimitar Dimitrov as maintainer for pru
jjohnstn Jan 22, 2024
fd4e96f
libgloss: doc: fix dir info entry usage
vapier Dec 27, 2023
5a8c23a
libgloss: doc: unify duplicate copyright/license content
vapier Dec 27, 2023
613267a
newlib: docs: print the function index
vapier Jan 5, 2024
72b6105
newlib: docs: add "Function " to every function node
vapier Jan 5, 2024
02572ff
Cygwin: seekdir: don't set errno
github-cygwin Jan 22, 2024
d5c4edc
libgloss: merge pru into top-level Makefile
Jan 22, 2024
276dd12
libgloss: pru: Trim crt0-minrt.o
Jan 22, 2024
90d6966
configure.ac: configurable tooldir install path
nealfrager Jan 11, 2024
752489c
libgloss: merge cr16 into top-level Makefile
vapier Jan 21, 2024
15140d6
Cygwin: Don't terminate via dumper
jon-turney Jan 16, 2024
2c5433e
Cygwin: pthread: Fix handle leak in pthread_once.
tyan0 Jan 24, 2024
4d9808d
libgloss: start a MAINTAINERS file
vapier Jan 24, 2024
1c13ca6
Cygwin: Add a timeout to ensure we don't wait forever for dumper
jon-turney Jan 23, 2024
1f68e88
Cygwin: redefine how to recognize forkee state
github-cygwin Jan 29, 2024
030a762
Cygwin: fix arc4random after fork(2)
github-cygwin Jan 29, 2024
497e6eb
ssp: add support for _FORTIFY_SOURCE=3
chrfranke Jan 26, 2024
6252fd0
Cygwin: machine/_arc4random.h: Fix copy/paste bug
github-cygwin Jan 29, 2024
31f7cd1
Hide itoa, utoa, __itoa and __utoa in stdlib.h on Cygwin only
chrfranke Jan 22, 2024
23737b0
bump DLL version to 3.5.1
github-cygwin Feb 1, 2024
aa73e11
Cygwin: console: Fix exit code for non-cygwin process.
tyan0 Feb 2, 2024
9bcfd06
Cygwin: console: Avoid slipping past disable_master_thread check.
tyan0 Feb 2, 2024
aa22a43
Cygwin: Document recent bug fix in release note.
tyan0 Feb 3, 2024
aa392df
Cygwin: net: Make if_nametoindex, etc. consistent with if_nameindex.
tyan0 Feb 3, 2024
6d6e1e3
Cygwin: Do not show Error dialogs by default
dscho Mar 31, 2021
d56fb66
Cygwin: reorder list of CYGWIN env var options alphabetically again
github-cygwin Feb 3, 2024
10e2210
Cygwin: document new winjitdebug option
github-cygwin Feb 3, 2024
70371d6
Cygwin: fix typo in winjitdebug description
github-cygwin Feb 3, 2024
a6ac7b4
Cygwin: pty: Fix handle leak in master process.
tyan0 Feb 13, 2024
73cd80c
Cygwin: pty: Fix potential handle leak regarding CallNamedPipe().
tyan0 Feb 13, 2024
02f7f65
Cygwin: console: Make VMIN and VTIME work.
tyan0 Feb 13, 2024
0795afd
Cygwin: console: Fix a problem that minor ID is incorrect in ConEmu.
tyan0 Feb 13, 2024
79db49a
Cygwin: pty: Make GNU screen and tmux work in ConEmu cygwin-connector.
tyan0 Feb 14, 2024
309c199
Cygwin: console: Unify EnumWindows() callback functions.
tyan0 Feb 14, 2024
ffdc4e3
Cygwin: dumper: use void* in place of PTR
github-cygwin Feb 12, 2024
a85f1c3
include/ansidecl.h: import from binutils-gdb
github-cygwin Feb 12, 2024
577673a
Cygwin: console: Fix a bug that cannot handle consoles more than 32.
tyan0 Feb 15, 2024
d8f6db2
Cygwin: console: Fix a bug that 64th console cannot be handled.
tyan0 Feb 15, 2024
384ea1f
Cygwin: pty: Fix failure to revert from nat-pipe in disable_pcon.
tyan0 Feb 16, 2024
57b9425
Cygwin: pty: Re-fix the last bug regarding nat-pipe.
tyan0 Feb 16, 2024
12b85be
Cygwin: gettimeofday: allow tv NULL pointer
github-cygwin Feb 20, 2024
f0ab27c
Cygwin: strptime: make sure to fail on invalid input digits
github-cygwin Feb 21, 2024
4fe5b1d
Cygwin: strptime: fix am/pm handling
github-cygwin Feb 21, 2024
83967aa
Cygwin: strptime: add release note
github-cygwin Feb 21, 2024
08df2e2
Cygwin: newgrp: fix invalid usage of argv
github-cygwin Feb 24, 2024
32024ec
Cygwin: newgrp: only allow group from supplementary group list
github-cygwin Feb 24, 2024
1f40799
Cygwin: add newgrp release notes
github-cygwin Feb 24, 2024
ec5ef42
Cygwin: Map ERROR_NO_SUCH_DEVICE and ERROR_MEDIA_CHANGED to ENODEV
chrfranke Feb 23, 2024
271f187
Cygwin: passwd/group: drop Capability SIDs
github-cygwin Feb 20, 2024
50240f2
Cygwin: getgrent: fix local SAM enumeration on domain member machines
github-cygwin Feb 20, 2024
69aba64
Cygwin: getgrent/getpwent: avoid local enumeration on DCs
github-cygwin Feb 20, 2024
a574428
Cygwin: add release text for getgrent local SAM enumeration patch
github-cygwin Feb 26, 2024
b65153e
bump DLL version to 3.5.2
github-cygwin Feb 27, 2024
cf121e0
Cygwin: console: Do not unmap shared console memory belonging to ctty.
tyan0 Mar 1, 2024
fc5e952
Cygwin: console: Fix a race issue between close() and open().
tyan0 Mar 4, 2024
f6be372
Cygwin: pipe: Give up to use query_hdl for non-cygwin apps.
tyan0 Mar 3, 2024
c1cf14a
Cygwin: try to avoid recalling offline files
github-cygwin Mar 8, 2024
66138cb
Cygwin: get/set security descriptors using FILE_OPEN_NO_RECALL
github-cygwin Mar 8, 2024
66f7dd9
Cygwin: getgrent: don't skip SAM-only builtin-accounts
github-cygwin Mar 11, 2024
83afe30
Cygwin: add 3.5.2 release entries for latest commits
github-cygwin Mar 11, 2024
55431b4
Cygwin: pipe: Make sure to set read pipe non-blocking for cygwin apps.
tyan0 Mar 11, 2024
70375b2
Revert "Cygwin: glob: perform ignore_case_with_glob on input"
github-cygwin Mar 18, 2024
18bd5d3
Cygwin: tzmap-from-unicode.org: drop support for Vista/2008
github-cygwin Mar 20, 2024
822eaf0
Cygwin: utils: refresh tzmap.h
github-cygwin Mar 20, 2024
c5882d8
bump DLL version to 3.5.3
github-cygwin Apr 3, 2024
372eaba
Cygwin: fix tzmap-from-unicode.org
github-cygwin Mar 21, 2024
6c0240b
Cygwin: tzset(1): use GetDynamicTimeZoneInformation
github-cygwin Mar 21, 2024
bd11b2d
Cygwin: tzmap-from-unicode.org: drop "E. Europe Standard Time" default
github-cygwin Mar 21, 2024
d8b21b8
Cygwin: utils: refresh tzmap.h
github-cygwin Mar 21, 2024
774d20b
bump DLL version to 3.5.4
github-cygwin Apr 3, 2024
b896891
Cygwin: add a fake 3.5.3 release file
github-cygwin Apr 3, 2024
e00cb12
Cygwin: FILE_OPEN_NO_RECALL is incompatible with FILE_DIRECTORY_FILE
github-cygwin Apr 4, 2024
14216d5
Cygwin: globify: read full 32 bit character
github-cygwin Apr 9, 2024
e567e9f
Cygwin: mixer: Fix volume control for no WAVECAPS_LRVOLUME device
tyan0 Jun 1, 2024
d49c6a7
Cygwin: pthread: Fix a race issue introduced by the commit 2c5433e5da82
tyan0 May 29, 2024
84dff09
Cygwin: disable high-entropy VA for ldh
May 28, 2024
d1670f1
Cygwin: suppress a warning generated with w32api >= 12.0.0
jon-turney Jun 7, 2024
40f751e
Cygwin: dsp: Fix incorrect openflags when opening multiple /dev/dsp
tyan0 Jun 28, 2024
936c062
Cygwin: console: Add error handling for thread_sync_event
tyan0 Jun 29, 2024
a92abb5
Cygwin: console: Add debug print on thread_sync_event creation error
tyan0 Jun 29, 2024
49018bf
Cygwin: pty: Avoid client deadlock when pty master stops to read.
tyan0 Jul 1, 2024
a8300a6
Cygwin: console: Fix conflict on shared names between sessions.
tyan0 Jul 3, 2024
186ee9b
Cygwin: console: Fixes an issue that tmux can not run on the console.
tyan0 Jul 6, 2024
ec71ae7
Cygwin: console: Bug fix for the last console code change
tyan0 Jul 6, 2024
cc9dcdb
Cygwin: console: Fix race issue on allocating console simultaneously.
tyan0 Jul 6, 2024
ce3889a
Cygwin: console: Fix for GNU screen/tmux in ConEmu
tyan0 Jul 8, 2024
a6ffd83
stdatomic: make atomics compatible with GCC-14
Lapshin Jul 8, 2024
4f8668a
Cygwin: Suppress array-bounds warning from NtCurrentTeb()
jon-turney Aug 4, 2024
6204d84
Cygwin: Fix warnings about narrowing conversions of NTSTATUS constants
jon-turney Aug 4, 2024
87b066b
Cygwin: Fix warning about address known to be non-NULL in /proc/locales
jon-turney Aug 4, 2024
25a0df8
Cygwin: Fix warning about narrowing conversions in tape options
jon-turney Aug 4, 2024
c75f393
Cygwin: asm/socket.h: drop outdated casts
github-cygwin Aug 7, 2024
510cbdf
Cygwin: Fix warnings about narrowing conversions of socket ioctls
jon-turney Aug 4, 2024
65e3e2f
Cygwin: Avoid use-after-free warnings in __set_lc_time_from_win() etc.
jon-turney Aug 4, 2024
bc6fd19
Cygwin: getopt.h: fix a comment
github-cygwin Aug 15, 2024
54a6a90
stdlib.h: define __itoa/__utoa while building newlib
github-cygwin Aug 15, 2024
3d9eb1b
Cygwin: pipe: handle signals explicitely in raw_write
github-cygwin Aug 18, 2024
555afcb
Cygwin: select: set pipe writable only if PIPE_BUF bytes left
github-cygwin Aug 18, 2024
ef844ce
Cygwin: pipe: improve writing when pipe buffer is almost full
github-cygwin Aug 18, 2024
61dc66d
Cygwin: pipe: fix comparison
github-cygwin Aug 19, 2024
d83183e
Cygwin: pipe: do short writes only once in nonblocking case too
github-cygwin Aug 19, 2024
d14b65b
nl_langinfo_l: drop erroneus messages::codeset entry
github-cygwin Aug 22, 2024
1807336
locales: Fix definition of lc_messages_T::codeset
github-cygwin Aug 22, 2024
74768ac
Cygwin: Add locale patches to release message
github-cygwin Aug 22, 2024
0bc1222
Cygwin: add release message for latest pipe changes
github-cygwin Aug 22, 2024
51380ec
Add MSYS2 triplet
Alexpux Apr 14, 2019
a116f41
Fix msys library name in import libraries
ktbarrett Mar 14, 2021
f858c02
Rename dll from cygwin to msys
Alexpux Apr 14, 2019
b084abe
Add functionality for converting UNIX paths in arguments and environm…
Alexpux Apr 14, 2019
f160385
Add functionality for changing OS name via MSYSTEM environment variab…
Alexpux Apr 14, 2019
6393488
- Move root to /usr. - Change sorting mount points. - By default moun…
Alexpux Apr 14, 2019
06ea20e
Instead of creating Cygwin symlinks, use deep copy by default
Alexpux Apr 14, 2019
222fd37
Automatically rewrite TERM=msys to TERM=cygwin
Alexpux Apr 14, 2019
41e8ada
Do not convert environment for strace
Alexpux Apr 14, 2019
766e55c
strace.cc: Don't set MSYS=noglob
mingwandroid Aug 23, 2015
4f01c3f
Add debugging for strace make_command_line
mingwandroid Aug 21, 2015
d43f1ee
strace --quiet: be *really* quiet
dscho May 17, 2017
0053f7b
path_conv: special-case root directory to have trailing slash
Alexpux Apr 14, 2019
1e8a891
When converting to a Unix path, avoid double trailing slashes
dscho Nov 8, 2022
673065d
msys2_path_conv: pass PC_NOFULL to path_conv
lazka Nov 20, 2022
e1db148
path-conversion: Introduce ability to switch off conversion.
Jun 17, 2015
f6e516d
dcrt0.cc: Untangle allow_glob from winshell
mingwandroid Aug 21, 2015
1059fbb
dcrt0.cc (globify): Don't quote literal strings differently when dos_…
mingwandroid Aug 23, 2015
f8da08f
Add debugging for build_argv
mingwandroid Aug 21, 2015
03d6fe1
environ.cc: New facility/environment variable MSYS2_ENV_CONV_EXCL
mingwandroid Apr 10, 2016
90d66ee
Fix native symbolic link spawn passing wrong arg0
SquallATF Sep 10, 2018
7b84fed
Introduce the `enable_pcon` value for `MSYS`
dscho May 19, 2020
6f87e23
popen: call /usr/bin/sh instead of /bin/sh
lazka Jun 5, 2020
df7a56e
Disable the 'cygwin' GitHub workflow
dscho Mar 17, 2021
cf56ccd
CI: add a GHA for doing a basic build test
lazka Aug 9, 2020
083c245
CI: fix the build with gcc 13
lazka Nov 10, 2023
91f46df
Set up a GitHub Action to keep in sync with Cygwin
dscho Nov 22, 2019
4dd6aad
Expose full command-lines to other Win32 processes by default
dscho Aug 12, 2020
6ef58ed
Add a helper to obtain a function's address in kernel32.dll
dscho Apr 16, 2018
38a8880
Emulate GenerateConsoleCtrlEvent() upon Ctrl+C
dscho Mar 20, 2015
b9d1fad
kill: kill Win32 processes more gently
dscho Mar 20, 2015
715f6ce
Cygwin: make option for native inner link handling.
jeremyd2019 Jul 22, 2021
abeeb31
docs: skip building texinfo and PDF files
dscho Nov 8, 2021
fbe8ae3
install-libs: depend on the "toollibs"
dscho Nov 8, 2021
38abc7c
POSIX-ify the SHELL variable
dscho Nov 23, 2015
9c758e8
Handle ORIGINAL_PATH just like PATH
dscho Mar 21, 2017
312f766
uname: allow setting the system name to CYGWIN
lazka Jul 3, 2022
e19af20
Pass environment variables with empty values
dscho Feb 18, 2015
4deb751
Optionally disallow empty environment values again
dscho Sep 6, 2022
a1f282d
build_env(): respect the `MSYS` environment variable
dscho Sep 6, 2022
d1b382b
Revert "Cygwin: Enable dynamicbase on the Cygwin DLL by default"
lazka Dec 17, 2022
997f6f3
CI: set -Wno-error=maybe-uninitialized
lazka May 17, 2024
e347515
Avoid sharing cygheaps across Cygwin versions
dscho Jan 30, 2023
dd9d970
uname: report msys2-runtime commit hash, too
dscho Feb 21, 2023
886813e
Start the merging-rebase to cygwin-3.5.4
dscho Aug 30, 2024
2bfb773
Cygwin: pipe: Fix a regression that raw_write() slows down
tyan0 Aug 31, 2024
fe5797d
Merge branch 'msys2-3.5.4'
dscho Aug 14, 2020
c325a46
fixup!!! CI: add a GHA for doing a basic build test
dscho Aug 30, 2024
3cf583c
Handle 8-bit characters under LOCALE=C
dscho Feb 20, 2015
23958eb
Bump actions/checkout from 2 to 4
dependabot[bot] Feb 14, 2024
51d19bb
Mention the extremely useful small_printf() function
dscho Feb 20, 2015
699c573
dependabot: help keeping GitHub Actions versions up to date
dscho Feb 6, 2024
885c2fa
Fixed path converting with non ascii char.
Mar 9, 2015
76c8b24
Do not try to sync with Cygwin
dscho Aug 20, 2020
70b4715
Make paths' WCS->MBS conversion explicit
dscho Dec 18, 2015
9614377
Allow native symlinks to non-existing targets in 'nativestrict' mode
kblees May 20, 2015
97cefff
Use MB_CUR_MAX == 6 by default
dscho Nov 21, 2019
0472dec
Change the default base address for x86_64
chirpnot Mar 10, 2022
02f2b24
Merge pull request #1 from dscho/git-for-windows
dscho Feb 12, 2018
48ca2cf
Merge pull request #10 from kblees/kb/symlinks
dscho Feb 12, 2018
5ba33f7
Merge branch 'wcstombs'
dscho Feb 12, 2018
1ff1749
Merge pull request #37 from chirpnot/main
dscho May 13, 2022
900a410
Cygwin: console: Disable cons_master_thread in win32-input-mode
tyan0 Aug 31, 2024
8854bb4
Cygwin: pipe: Fix a regression that raw_write() slows down
tyan0 Aug 31, 2024
f4fb564
msys2-runtime: restore fast path for current user primary group
rglidden Aug 24, 2023
9d0d6e1
Cygwin: pipe: Restore blocking mode of read pipe on close()/raw_read()
tyan0 Sep 6, 2024
faebbcd
Merge pull request #57 from rglidden/main
dscho Aug 28, 2023
1e8cf1a
Merge branch 'backports-from-cygwin-3_5-branch'
dscho Sep 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Instead of creating Cygwin symlinks, use deep copy by default
The new `winsymlinks` mode `deepcopy` (which is made the default) lets
calls to `symlink()` create (deep) copies of the source file/directory.

This is necessary because unlike Cygwin, MSYS2 does not try to be its
own little ecosystem that lives its life separate from regular Win32
programs: the latter have _no idea_ about Cygwin-emulated symbolic links
(i.e. system files whose contents start with `!<symlink>\xff\xfe` and
the remainder consists of the NUL-terminated, UTF-16LE-encoded symlink
target).

To support Cygwin-style symlinks, the new mode `sysfile` is introduced.

Co-authored-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Alexpux and dscho committed Aug 27, 2024
commit 06ea20e4eceef17d67a404d670b439e87f282450
4 changes: 4 additions & 0 deletions winsup/cygwin/environ.cc
Original file line number Diff line number Diff line change
@@ -88,6 +88,10 @@ set_winsymlinks (const char *buf)
else if (ascii_strncasematch (buf, "native", 6))
allow_winsymlinks = ascii_strcasematch (buf + 6, "strict")
? WSYM_nativestrict : WSYM_native;
else if (ascii_strncasematch (buf, "deepcopy", 8))
allow_winsymlinks = WSYM_deepcopy;
else
allow_winsymlinks = WSYM_sysfile;
}

/* The structure below is used to set up an array which is used to
3 changes: 2 additions & 1 deletion winsup/cygwin/globals.cc
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ enum winsym_t
WSYM_nativestrict,
WSYM_nfs,
WSYM_sysfile,
WSYM_deepcopy
};

exit_states NO_COPY exit_state;
@@ -70,7 +71,7 @@ bool ignore_case_with_glob;
bool pipe_byte = true; /* Default to byte mode so that C# programs work. */
bool reset_com;
bool wincmdln;
winsym_t allow_winsymlinks = WSYM_default;
winsym_t allow_winsymlinks = WSYM_deepcopy;
bool disable_pcon;
bool winjitdebug = false;

154 changes: 154 additions & 0 deletions winsup/cygwin/path.cc
Original file line number Diff line number Diff line change
@@ -1682,6 +1682,89 @@ conv_path_list (const char *src, char *dst, size_t size,

/********************** Symbolic Link Support **************************/

/*
Create a deep copy of src as dst, while avoiding descending in origpath.
*/
static int
recursiveCopy (char * src, char * dst, const char * origpath)
{
WIN32_FIND_DATA dHfile;
HANDLE dH = INVALID_HANDLE_VALUE;
BOOL findfiles;
int srcpos = strlen (src);
int dstpos = strlen (dst);
int res = -1;

debug_printf("recursiveCopy (%s, %s)", src, dst);

/* Create the destination directory */
if (!CreateDirectoryEx (src, dst, NULL))
{
debug_printf("CreateDirectoryEx(%s, %s, 0) failed", src, dst);
__seterrno ();
goto done;
}
/* Descend into the source directory */
if (srcpos + 2 >= MAX_PATH || dstpos + 1 >= MAX_PATH)
{
set_errno (ENAMETOOLONG);
goto done;
}
strcat (src, "\\*");
strcat (dst, "\\");
dH = FindFirstFile (src, &dHfile);
debug_printf("dHfile(1): %s", dHfile.cFileName);
findfiles = FindNextFile (dH, &dHfile);
debug_printf("dHfile(2): %s", dHfile.cFileName);
findfiles = FindNextFile (dH, &dHfile);
while (findfiles)
{
/* Append the directory item filename to both source and destination */
int filelen = strlen (dHfile.cFileName);
debug_printf("dHfile(3): %s", dHfile.cFileName);
if (srcpos + 1 + filelen >= MAX_PATH ||
dstpos + 1 + filelen >= MAX_PATH)
{
set_errno (ENAMETOOLONG);
goto done;
}
strcpy (&src[srcpos+1], dHfile.cFileName);
strcpy (&dst[dstpos+1], dHfile.cFileName);
debug_printf("%s -> %s", src, dst);
if (dHfile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
/* Recurse into the child directory */
debug_printf("%s <-> %s", src, origpath);
if (strcmp (src, origpath)) // avoids endless recursion
if (recursiveCopy (src, dst, origpath))
goto done;
}
else
{
/* Just copy the file */
if (!CopyFile (src, dst, FALSE))
{
__seterrno ();
goto done;
}
}
findfiles = FindNextFile (dH, &dHfile);
}
if (GetLastError() != ERROR_NO_MORE_FILES)
{
__seterrno ();
goto done;
}
res = 0;

done:

if (dH != INVALID_HANDLE_VALUE)
FindClose (dH);

return res;
}

/* Create a symlink from FROMPATH to TOPATH. */

extern "C" int
@@ -2219,6 +2302,77 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
}
else /* wsym_type == WSYM_sysfile */
{
if (wsym_type == WSYM_deepcopy)
{
path_conv src_path;
src_path.check (oldpath, PC_SYM_NOFOLLOW, stat_suffixes);
if (src_path.error)
{
set_errno (src_path.error);
__leave;
}
if (!src_path.isdevice () && !src_path.is_fs_special ())
{
/* MSYS copy file instead make symlink */

char * real_oldpath;
if (isabspath (oldpath))
strcpy (real_oldpath = tp.c_get (), oldpath);
else
/* Find the real source path, relative
to the directory of the destination */
{
/* Determine the character position of the last path component */
const char *newpath = win32_newpath.get_posix();
int pos = strlen (newpath);
while (--pos >= 0)
if (isdirsep (newpath[pos]))
break;
/* Append the source path to the directory
component of the destination */
if (pos+1+strlen(oldpath) >= MAX_PATH)
{
set_errno(ENAMETOOLONG);
__leave;
}
strcpy (real_oldpath = tp.c_get (), newpath);
strcpy (&real_oldpath[pos+1], oldpath);
}

/* As a MSYS limitation, the source path must exist. */
path_conv win32_oldpath;
win32_oldpath.check (real_oldpath, PC_SYM_NOFOLLOW, stat_suffixes);
if (!win32_oldpath.exists ())
{
set_errno (ENOENT);
__leave;
}

char *w_newpath;
char *w_oldpath;
stpcpy (w_newpath = tp.c_get (), win32_newpath.get_win32());
stpcpy (w_oldpath = tp.c_get (), win32_oldpath.get_win32());
if (win32_oldpath.isdir())
{
char *origpath;
strcpy (origpath = tp.c_get (), w_oldpath);
res = recursiveCopy (w_oldpath, w_newpath, origpath);
}
else
{
if (!CopyFile (w_oldpath, w_newpath, FALSE))
{
__seterrno ();
}
else
{
res = 0;
}
}
__leave;
}
}

/* Default technique creating a symlink. */
buf = tp.t_get ();
cp = stpcpy (buf, SYMLINK_COOKIE);