Fortran: Fix compile of caf_shmem on cygwin [PR124371]

Andre Vehreschild <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <20260306104503.3b2e98ec@vepi2>
Hi all,

attached patch fixing compiling of the caf_shmem library on x86_64-cygwin. 

Regtested fine on x86_64-pc-cygwin / Window10, Cygwin 2.935. Ok for trunk?

Regards,
	Andre
-- 
Andre Vehreschild * Email: vehre ad gmx dot de
pr124371_1.patch (text/x-patch, 862 B)
From 7d784f0b21661222af6c71eccd48fdfbaaff9b76 Mon Sep 17 00:00:00 2001
From: Andre Vehreschild <[email protected]>
Date: Fri, 6 Mar 2026 10:38:47 +0100
Subject: [PATCH] Fortran: Caf_shmem - Fix compile issue on cygwin [PR124371]

libgfortran/ChangeLog:

	PR Fortran/124371
	* caf/shmem/supervisor.c (startWorker): Use HAVE_FORK instead of
	WIN32 for preprocessor conditional.
---
 libgfortran/caf/shmem/supervisor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgfortran/caf/shmem/supervisor.c b/libgfortran/caf/shmem/supervisor.c
index cdb318d5910e..6068533c7469 100644
--- a/libgfortran/caf/shmem/supervisor.c
+++ b/libgfortran/caf/shmem/supervisor.c
@@ -300,7 +300,7 @@ startWorker (image *im __attribute__ ((unused)),
   return true;
 }
 
-#ifndef WIN32
+#ifdef HAVE_FORK
 static void
 kill_all_images (supervisor *m)
 {
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.