Win32 build - stage 1. Core bootstrap.#90
Conversation
5b83d9d to
95daea0
Compare
|
(force-pushed a change w/ updated gitfile) |
95daea0 to
99ebb82
Compare
99ebb82 to
05529c4
Compare
| prev = num; | ||
| num = num*16 + val; | ||
| overflow |= num<prev; | ||
| num = num*(u64)16 + (u64)val; |
There was a problem hiding this comment.
type of num could be u128 here
| return ret; | ||
| } | ||
|
|
||
| #if ! defined(WIN32) |
There was a problem hiding this comment.
is the test reversed here?
There was a problem hiding this comment.
No, but actually the function override is unnecessary at all - isatty() is deprecated and _isatty() is now preferred so I'm replacing the dummy definition with a conditional #define for win32 instead
| } | ||
| dir->iter=0; | ||
| dir->eof=dir->handle == INVALID_HANDLE_VALUE; | ||
| //dir->path = _strdup(path); |
|
|
||
| } ThreadParams; | ||
|
|
||
| int pthread_create(pthread_t *thread, pthread_attr_t *attr, ThreadFunc func, void *arg) { |
There was a problem hiding this comment.
looks like pthread_* is unused, it can be deleted in its entirety
There was a problem hiding this comment.
The functions are somewhat incomplete implementations (I can do it in full in another PR), but don't we want to offer the library functionality? Or - prefer keeping the single-threaded paradigm?
| static BOOL qpc = QueryPerformanceCounter(&freq); | ||
| if (qpc) { | ||
| LARGE_INTEGER t_now; | ||
| QueryPerformanceCounter(&t_now); |
There was a problem hiding this comment.
why is the function called twice?
There was a problem hiding this comment.
Good catch - first one should be QueryPerformanceFrequency(&freq)
|
|
||
|
|
||
|
|
||
| /* |
(Resubmitted with correct history)
Note - this is only the bootstrap portion to get a starting point for proper windows acr support. It successfully builds abt, src_hdr, src_func, and gcache build, but abt dies on an early error right now (will be handled in "stage 2"). the other binaries work as intended, verified by
/FORCE:unresolvedin linker argument (causes LNK4088 warning)gcache: openssl/EVP symbols,Sha1Ctx::Sha1CtxBTW - *nix builds remain unchanged. Hashes of the binaries change of course but I built and tested binaries with affected dependencies