Eli Zaretskii wrote:

> > I know about this method, but I'm not sure it does what we want here.
> > The number used by this method is not guaranteed to be unique on some
> > versions of Windows.  More importantly, it only works for disk files,
> > I don't know whether it reports a meaningful value for the console
> > device or the null device.
> 
> Testing clearly shows it doesn't: GetFileInformationByHandle simply
> fails for handles open on console devices and the null device.  And we
> will be comparing handles for console devices in the majority of use
> cases here.

That's right. Or perhaps pipes (I post-process make's output, to
handle the directories in messages etc. and I suppose the mentioned
Emacs mode does something similar).

> I researched this a bit, and eventually succeeded in finding a way
> that is good enough for both disk files, pipes, and console devices.

Good. (And the null device, I suppose. Though it doesn't really
matter if we write to the null device combined or separate. ;-)

> > > > > >  . STREAM_OK uses fcntl and F_GETFD which both don't exist on 
> > > > > > Windows.
> > >
> > > Basically we need just any call that succees for a valid file and
> > > fails otherwise.
>
> Found a reasonable solution for that as well.

OK, so only one problem left.

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to