在 2026-2-24 03:04, David Grayson 写道:
I tested this in the 64-bit MSYS environment from MSYS2 using my automated
test suite at https://github.com/DavidEGrayson/intsafe which checks the
type of each function by assigning a function pointer to point at it.  I
have not tested 32-bit Cygwin.

I wasn't aware until recently that we wanted our headers to work in
Cygwin/MSYS.


 From 0fbfc1209762829a0d409f7a5d3c85aa46b2d3dd Mon Sep 17 00:00:00 2001
From: David Grayson <[email protected]>
Date: Mon, 23 Feb 2026 10:57:13 -0800
Subject: [PATCH] header/intsafe: Fix Cygwin compatibility.

In 64-bit Cygwin, both "long" and "long long" are both 64-bit types,
so some 64-bit types that we assumed were the same are actually different.
- size_t (unsigned long) != UINT_PTR (unsigned long long)
- ptr_diff_t (long)      != INT_PTR (long long)
Right, but I suspect it doesn't affect values of these types, and no compiler warns about conversion between `unsigned long` and `unsigned long long` in there?

This isn't quite the same case as `UINT64_MAX` in the other patch; the latter is a standard macro, so it must expand to a value of the correct type.



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to