Skip to content

print uint64 using inttypes.h PRIu64 instead of llu #3423

@jangorecki

Description

@jangorecki

%llu format works fine when using from R C API functions like Rprintf, but it fails on Windows when using in plain C like sprintf. We could use PRIu64 instead, defined in inttypes.h.
According to http://r.789695.n4.nabble.com/package-config-file-for-windows-td921218.html inttypes.h is available on CRAN's Windows machines.
According to pocoproject/poco#1426 inttypes.h is available on Solaris.

We need this to be able to construct a message from plain C code, where message body contains length of a vector, thus can be int64. This is used for deferred error/warnings/verbose messages from code that runs in parallel regions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions