Subject: bug#19909: [PATCH] Error out if with-file-notification=w32 is specified on cygwin

From: Eli Zaretskii <[email-masked]>
Date: Fri, 20 Feb 2015 12:46:36 +0200

> From: Robert Pluim <[email-masked]>
> Date: Fri, 20 Feb 2015 11:19:16 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: Robert Pluim <[email-masked]>
> >> Date: Fri, 20 Feb 2015 10:47:36 +0100
> >> 
> >> It's a combination that won't compile, so it's probably best to error
> >> out during configure.
> >
> > Why doesn't it compile?  Perhaps it's better to allow it to compile,
> > than to error out.
> 
> I guess whoever put the following in w32.h had his reasons:
> 
> #ifdef CYGWIN
> #error "w32.h is not compatible with Cygwin"
> #endif

According to the comment in w32notify.c, w32.h is included only for
w32_strerror.  Could you try commenting out the w32.h inclusion, and
instead copy the w32_strerror prototype into w32notify.c?  Does Emacs
compile then as part of the Cygwin-w32 build, and do file
notifications work?  (I don't have Cygwin installed to try that,
sorry.)

If getting the prototype of w32_strerror is the only problem, then
it's easy to solve in a way that will be compatible with the
Cygwin-w32 build.

Thanks.