feat: First working Windows build

This commit is contained in:
Stéphane Lesimple
2020-08-23 16:36:56 +02:00
parent f9e8ce83bc
commit f8dbe54a8c
18 changed files with 3155 additions and 2511 deletions

View File

@@ -24,6 +24,10 @@
#include "rs03-includes.h"
#ifdef SYS_MINGW
#include <windows.h>
#endif
/* Needed version must be consistent between CRC blocks and ECC headers
since ECC headers may be reconstructed from CRC blocks. */
@@ -1220,7 +1224,15 @@ static void create_reed_solomon(ecc_closure *ec)
ec->chunkBytes = 2048*Closure->prefetchSectors;
ec->chunkSize = Closure->prefetchSectors;
#ifdef SYS_MINGW
{
SYSTEM_INFO si;
GetSystemInfo(&si);
ec->pageSize = si.dwPageSize;
}
#else
ec->pageSize = sysconf(_SC_PAGE_SIZE);
#endif
/*** Allocate stuff shared by all threads */