-
Notifications
You must be signed in to change notification settings - Fork 888
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
[C] Windows fixes #861
[C] Windows fixes #861
Conversation
- The buffer needs to be freed with LocalFree - Check the result of FormatMessageA - Use %s in case the error message contains a % character
aeron_unmap: - UnmapViewOfFile returns a nonzero value on success aeron_is_directory: - Check for file attributes as flags - GetFileAttributes can return INVALID_FILE_ATTRIBUTES on error
- It's not used anywhere, aeron_cmpxchg64 is used instead - The MSVC definition used GCC syntax so wouldn't compile if used
@@ -168,8 +168,14 @@ void aeron_set_windows_error() | |||
0, | |||
NULL); | |||
|
|||
aeron_set_err(errorId, messageBuffer); | |||
free(messageBuffer); | |||
if (result == 0) |
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.
Formatting is a bit screwed here. Is there something missing?
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.
Sorry, I inserted tabs here instead of spaces, will fix.
@@ -64,16 +64,6 @@ do \ | |||
} \ | |||
while (false) | |||
|
|||
#define AERON_CMPXCHG64(original, dst, expected, desired) \ |
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.
Why remove this?
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.
- It's not used anywhere,
aeron_cmpxchg64
is used instead - The MSVC definition used GCC syntax so wouldn't compile if used
@@ -226,7 +226,7 @@ int aeron_udp_channel_transport_init( | |||
if(set_socket_non_blocking(transport->fd) < 0) |
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.
Minor point on formatting here. No space after if.
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.
Ok, I'll fix that in the next PR I see you've fixed it
Here's another round of Windows fixes for the media driver. See individual commit messages for details. The cleanup commit mostly gets rid of some warnings and makes the IDE happier.
There are still other things I'll need to fix though, I'll send the fixes later.