-
Notifications
You must be signed in to change notification settings - Fork 379
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
Support fstat larger than 4G while st_size is 64bit on Windows #1074
Conversation
@@ -2,6 +2,7 @@ | |||
#include "ace/OS_NS_unistd.h" | |||
#include "ace/OS_NS_fcntl.h" | |||
#include "ace/OS_NS_errno.h" | |||
#include "ace/OS_NS_time.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider moving ACE_MAKE_QWORD
so this include isn't needed.
else | ||
{ | ||
stp->st_size = fdata.nFileSizeLow; | ||
stp->st_size = ACE_MAKE_QWORD(fdata.nFileSizeLow, fdata.nFileSizeHigh); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be ACE_COMBINE_PARTS
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the ACE_OS::stat functions, do they have the same problem?
Looks to be reported in the past, see http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=4079 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs some more testing and check whether the macro is correct
Any suggestions for a test? |
WalkthroughThe changes update the file handling in the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Caller
participant fstat as fstat()
participant MAKER as ACE_MAKE_QWORD Macro
Caller->>fstat: Call fstat(file_descriptor)
fstat->>fstat: Retrieve file data (nFileSizeLow, nFileSizeHigh)
fstat->>MAKER: Combine low and high file size values
MAKER-->>fstat: Return 64-bit file size
fstat->>Caller: Return updated ACE_stat with st_size set
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (20)
🔇 Additional comments (4)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Looks this is the same as #2254? |
Yes. |
Summary by CodeRabbit