-
Notifications
You must be signed in to change notification settings - Fork 26
Conversation
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.
Thanks! I am not set up to test it on Windows, but this seems pretty reasonable. I made a couple minor comments.
Longer term, we should probably look into setting up AppVeyor to test this if we want to support Windows.
c/tree.c
Outdated
#include <fcntl.h> | ||
#include <errno.h> | ||
#include <inttypes.h> | ||
#include <netdb.h> | ||
#include <stdbool.h> | ||
#include <stdio.h> | ||
|
||
#ifdef WIN32 | ||
// Source: https://github.com/witwall/mman-win32 |
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.
Please split out this code into a separate C file with clear licensing information. It appears that it is under the MIT license.
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.
@oschwald done
c/tree.c
Outdated
|
||
static int __map_mman_error(const DWORD err, const int deferr) | ||
{ | ||
if (err == 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.
After splitting out the code, please run dev-bin/uncrustify-all.sh
on it so that it is formatted similarly to our other code.
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.
@oschwald win32 code has been split into separate files and passed through dev-bin/uncrustify-all.sh
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.
win32 changes split into separate files and changes passed through dev-bin/uncrustify-all.sh
c/tree.c
Outdated
|
||
static int __map_mman_error(const DWORD err, const int deferr) | ||
{ | ||
if (err == 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.
@oschwald win32 code has been split into separate files and passed through dev-bin/uncrustify-all.sh
c/tree.c
Outdated
#include <fcntl.h> | ||
#include <errno.h> | ||
#include <inttypes.h> | ||
#include <netdb.h> | ||
#include <stdbool.h> | ||
#include <stdio.h> | ||
|
||
#ifdef WIN32 | ||
// Source: https://github.com/witwall/mman-win32 |
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.
@oschwald done
Thanks! This looks great. |
@oschwald my pleasure! |
@oschwald can you kindly add my name/email to the list of contributors? |
The list is generated on release. I just did a release so it should now appear there. Thanks for the reminder! |
Thanks! I'm wondering, why didn't it use my full last name? |
It gets the names from the Git history. If you want something different to appear, the |
I would appreciate if you could update ilya77@gmail.com -> Ilya Melamed |
Done in 2488748. Thanks. |
Provide Windows versions of sys/mman.h functions.
Use open() calls suitable for Windows when building on WIN32