Fix windows compile issues

ulong seems to be defined somewhere on Linux, thus I missed that, and of
course there's the fun with aligned memory allocation :/
This commit is contained in:
Bill Currie 2022-07-31 17:34:09 +09:00
parent 6253d775e6
commit 0897952a57
2 changed files with 7 additions and 1 deletions

View file

@ -110,7 +110,7 @@ for width in range(4):
elif width == 2:
print(f"{case} VectorCompUop(&{dst},{cast},&{src}); break;")
else:
expand = expand_str(width, src, f"({types[dst_type]})")
expand = expand_str(width, src, f"(pr_{types[dst_type]}_t)")
print(f"{case} {dst} = {cast} {expand}; break;")
elif mode == 2:
one = one_str(width, src_type)

View file

@ -59,6 +59,12 @@
#include "tools/qfcc/include/type.h"
#include "tools/qfcc/include/value.h"
//FIXME I don't like this being here (or aligned_alloc being necessary in
//the first place, but not at all sure what to do about that)
#ifdef _WIN32
#define aligned_alloc(al, sz) _aligned_malloc(sz, al)
#endif
typedef struct {
def_t *def;
union {