Add the Windows CHICKEN 6 build and release scripts.
Upstream does not ship a Windows binary, so this tree fetches a release tarball, applies the MinGW patches, and publishes a UCRT64 prefix. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
21
patches/0001-mingw-builtin-setjmp.patch
Normal file
21
patches/0001-mingw-builtin-setjmp.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
--- a/chicken.h
|
||||
+++ b/chicken.h
|
||||
@@ -980,7 +980,15 @@
|
||||
# ifdef HAVE_SIGPROCMASK
|
||||
# define C_sigprocmask sigprocmask
|
||||
# endif
|
||||
-# define C_setjmp setjmp
|
||||
-# define C_longjmp longjmp
|
||||
+/* MinGW's setjmp longjmps through SEH and crashes in RtlVirtualUnwind
|
||||
+ on the alloca frames the compiler emits. CHICKEN uses longjmp only to
|
||||
+ drop back to the trampoline, so the builtin jump is the right tool. */
|
||||
+# if defined(__MINGW32__) && defined(__GNUC__)
|
||||
+# define C_setjmp __builtin_setjmp
|
||||
+# define C_longjmp __builtin_longjmp
|
||||
+# else
|
||||
+# define C_setjmp setjmp
|
||||
+# define C_longjmp longjmp
|
||||
+# endif
|
||||
# define C_alloca alloca
|
||||
# define C_strerror strerror
|
||||
|
||||
38
patches/0002-inheritable-handles.patch
Normal file
38
patches/0002-inheritable-handles.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
--- a/posixwin.scm
|
||||
+++ b/posixwin.scm
|
||||
@@ -386,10 +386,15 @@
|
||||
{
|
||||
if (f_share_io[i])
|
||||
{
|
||||
+ /* bInheritHandle is independent of DUPLICATE_SAME_ACCESS.
|
||||
+ STARTF_USESTDHANDLES needs an inheritable duplicate;
|
||||
+ FALSE fails CreateProcess with ERROR_INVALID_HANDLE
|
||||
+ when stderr is not a console. Not the SetHandleInformation
|
||||
+ pass removed for ticket 765. */
|
||||
success = DuplicateHandle(
|
||||
cur_process, standard_io_handles[i],
|
||||
cur_process, &child_io_handles[i],
|
||||
- 0, FALSE, DUPLICATE_SAME_ACCESS);
|
||||
+ 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
--- a/posixwin.c
|
||||
+++ b/posixwin.c
|
||||
@@ -458,10 +458,15 @@
|
||||
{
|
||||
if (f_share_io[i])
|
||||
{
|
||||
+ /* bInheritHandle is independent of DUPLICATE_SAME_ACCESS.
|
||||
+ STARTF_USESTDHANDLES needs an inheritable duplicate;
|
||||
+ FALSE fails CreateProcess with ERROR_INVALID_HANDLE
|
||||
+ when stderr is not a console. Not the SetHandleInformation
|
||||
+ pass removed for ticket 765. */
|
||||
success = DuplicateHandle(
|
||||
cur_process, standard_io_handles[i],
|
||||
cur_process, &child_io_handles[i],
|
||||
- 0, FALSE, DUPLICATE_SAME_ACCESS);
|
||||
+ 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
Reference in New Issue
Block a user