chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch for chicken on 64-bit windows (msys and mingw-w64)


From: Peter Bex
Subject: Re: patch for chicken on 64-bit windows (msys and mingw-w64)
Date: Fri, 27 Aug 2021 08:41:05 +0200

On Wed, Aug 25, 2021 at 09:29:31PM +0300, Jani Hakala wrote:
> 
> Hi,
> 
> This patch seems to fix the problem with chicken-install when
> 
>     chicken-install -defaults ./setup.defaults -update-db
> 
> appears to hang when installing chicken.

I've done some investigation.  First off, Windows doesn't have dirent.h
nor any of its functions in the C library.  So I was wondering why
it works if you simply drop this check and our custom implementation,
and then simply include dirent.h, because it does!

It appears that Mingw comes with its own implementation of dirent.h,
which is included in its crt.  I've also briefly checked mingw32 (the
barely maintained "original" Mingw) and it looks like it has it too.

I suppose the #ifdef check was either cargo-culted from somewhere else,
came from a distant time when Mingw didn't have its own dirent.h or was
still there from when we also supported building with MSVC.

I'm a bit on the fence whether we should simply apply this patch (which
I'm not really clear on if it should work and why) or drop the check
completely and rely on Mingw's (hopefully nicely debugged, tested and
maintained) version of dirent.h

My gut says we should just drop our custom version and rely on Mingw's
dirent.h , but that is a bigger change for the RC (but we can ask people
to test again of course) and would make supporting MSVC in the future a
bit more difficult again.

Thoughts?  Opinions?

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]