~ chicken-core (chicken-5) e902a2713b5dcbde53ad4d2ba3c436277882e6ee
commit e902a2713b5dcbde53ad4d2ba3c436277882e6ee Author: Peter Bex <peter.bex@xs4all.nl> AuthorDate: Mon Nov 18 21:31:57 2013 +0100 Commit: Peter Bex <peter.bex@xs4all.nl> CommitDate: Mon Nov 18 21:31:57 2013 +0100 Silence compiler warning due to inconsistent broken piece of shit Windows API diff --git a/posixwin.scm b/posixwin.scm index 934cf815..c5091a50 100644 --- a/posixwin.scm +++ b/posixwin.scm @@ -1725,7 +1725,12 @@ void* mmap(void* addr,int len,int prot,int flags,int fd,int off) return (void*)-1; } - hFile = _get_osfhandle(fd); + /* + * We must cast because _get_osfhandle returns intptr_t, but it must + * be compared with INVALID_HANDLE_VALUE, which is a HANDLE type. + * Who comes up with this shit? + */ + hFile = (HANDLE)_get_osfhandle(fd); if (hFile == INVALID_HANDLE_VALUE) { return (void*)-1;Trap