Open
Description
Consider the following file:
#include <stdint.h>
struct rdp_bitmap
{
uint64_t key64; /* 26 */
};
The following code is generated on Windows (via clangsharppinvokegenerator -f .\graphics.h -n FreeRDP3 -o graphics.cs
):
namespace FreeRDP3
{
public partial struct rdp_bitmap
{
[NativeTypeName("uint64_t")]
public ulong key64;
}
}
whereas on Linux, the following code is generated (via ClangSharpPInvokeGenerator -f ./graphics.h -I /usr/lib/clang/17/include -n FreeRDP3 -o graphics.cs
):
namespace FreeRDP3
{
public partial struct rdp_bitmap
{
[NativeTypeName("uint64_t")]
public nuint key64;
}
}
The Linux mapping to nuint
is incorrect, since uint64_t
is, by definition, 64-bits wide and architecture-independent.
Metadata
Metadata
Assignees
Labels
No labels