Re: Fortran: Fix compile of caf_shmem on cygwin [PR124371]

Andre Vehreschild <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <20260306105331.091b323e@vepi2>
Sorry, I don't get you there.

On cygwin WIN32 is set but it also has HAVE_FORK. Therefore checking for
HAVE_FORK is in my opinion sufficient. Or what is your comment about? "I am
standing on the pipe" as Germans might say.

- Andre

On Fri, 6 Mar 2026 10:47:03 +0100
Jakub Jelinek <[email protected]> wrote:

> On Fri, Mar 06, 2026 at 10:45:03AM +0100, Andre Vehreschild wrote:
> > 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   
> 
> > >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.  
> 
> 	not WIN32 perhaps?
> 
> LGTM.
> 
> > ---
> >  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
> >   
> 
> 	Jakub
> 


-- 
Andre Vehreschild * Email: vehre ad gmx dot de
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.