Fix 32 bit windows build

This commit is contained in:
Allen Webster 2021-01-24 15:30:57 -08:00
parent 7c822233c5
commit 10bb28bb40
6 changed files with 144 additions and 149 deletions

View File

@ -184,13 +184,10 @@ get_defines_from_flags(Arena *arena, u32 flags){
"-wd4127 -wd4510 -wd4512 -wd4610 -wd4390 " \
"-wd4611 -wd4189 -WX -GR- -EHa- -nologo -FC"
#define CL_LIBS_X64 \
"user32.lib winmm.lib gdi32.lib opengl32.lib comdlg32.lib userenv.lib " \
FOREIGN_WIN "\\x64\\freetype.lib"
#define CL_LIBS_X86 \
"user32.lib winmm.lib gdi32.lib opengl32.lib comdlg32.lib " \
FOREIGN_WIN "\\x86\\freetype.lib"
#define CL_LIBS_COMMON \
"user32.lib winmm.lib gdi32.lib opengl32.lib comdlg32.lib userenv.lib "
#define CL_LIBS_X64 CL_LIBS_COMMON FOREIGN_WIN "\\x64\\freetype.lib"
#define CL_LIBS_X86 CL_LIBS_COMMON FOREIGN_WIN "\\x86\\freetype.lib"
#define CL_ICON "..\\4coder-non-source\\res\\icon.res"

View File

@ -1,3 +1,2 @@
@echo off
build.bat /DDEV_BUILD_X86
bin\build.bat /DDEV_BUILD_X86

View File

@ -19,7 +19,7 @@ data_from_file(Arena *arena, FILE *file){
result.size = ftell(file);
fseek(file, 0, SEEK_SET);
result.str = push_array(arena, u8, result.size + 1);
fread(result.str, 1, result.size, file);
fread(result.str, 1, (size_t)result.size, file);
result.str[result.size] = 0;
}
return(result);

View File

@ -1032,7 +1032,7 @@ CUSTOM_DOC("Prints the current project to the file it was loaded from; prints in
for (String8Node *node = prj_string.first;
node != 0;
node = node->next){
fwrite(node->string.str, 1, node->string.size, file);
fwrite(node->string.str, 1, (size_t)node->string.size, file);
}
fclose(file);
print_message(app, str8_lit("Reloading project buffer\n"));

View File

@ -122,9 +122,8 @@ system_memory_annotation_sig(){
// 4ed path
//
extern "C" {
BOOL GetUserProfileDirectoryW(HANDLE hToken, LPWSTR lpProfileDir, LPDWORD lpcchSize);
}
extern "C" BOOL CALL_CONVENTION
GetUserProfileDirectoryW(HANDLE hToken, LPWSTR lpProfileDir, LPDWORD lpcchSize);
internal
system_get_path_sig(){