-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print uint64 using inttypes.h PRIu64
instead of llu
#3423
Comments
See https://github.com/Rdatatable/data.table/blob/master/src/fread.c#L30 |
@mattdowle Is it going to work on windows 32bit? |
@jangorecki The line in fread.c and in my comment above uses |
@mattdowle
|
I see what you mean and given those warnings about The first thing I noticed was that the target pointer ( Also we should never use I made these changes to the PR and it's passing now: 17d2c52 and 605d0b0. This shows that I left the 500 that I added hard coded just as a first step to make sure it passed CI first. Could you clear that up from here please. Maybe |
AFAIU |
Yes the 500 applies to each message and it's the maximum written (if the message is longer it is safely truncated to 500). There's an implicit upper bound of 8 messages per buffer then (8*500 < 4096). In practice, it will safely hold many more than 8 messages since the messages are a lot shorter than 500. Ok since you're happy with it (sounds like you know the maximum number of messages is 8 or less), I'll merge it so we can move on. Maybe limiting the number of messages is the easiest way to make it rock solid. That could be an |
Hold on. |
%llu
format works fine when using from R C API functions likeRprintf
, but it fails on Windows when using in plain C likesprintf
. We could usePRIu64
instead, defined ininttypes.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.
The text was updated successfully, but these errors were encountered: