mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-07 21:43:15 +00:00
Change code to match original MSVC
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -256,7 +256,8 @@ paket-files/
|
||||
*.sln
|
||||
builds/
|
||||
bin/
|
||||
*.exe
|
||||
|
||||
# - Linux/MacOS
|
||||
odin
|
||||
odin.dSYM
|
||||
odin.dSYM
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@echo off
|
||||
|
||||
rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 1> NUL
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 1> NUL
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 1> NUL
|
||||
rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 1> NUL
|
||||
set _NO_DEBUG_HEAP=1
|
||||
|
||||
|
||||
11
src/gb/gb.h
11
src/gb/gb.h
@@ -4873,7 +4873,7 @@ GB_ALLOCATOR_PROC(gb_heap_allocator_proc) {
|
||||
case gbAllocation_Resize: {
|
||||
ptr = realloc(old_memory, size);
|
||||
// ptr = gb_default_resize_align(gb_heap_allocator(), old_memory, old_size, size, alignment);
|
||||
} break;
|
||||
} break;
|
||||
#else
|
||||
// TODO(bill): *nix version that's decent
|
||||
case gbAllocation_Alloc: {
|
||||
@@ -5086,7 +5086,7 @@ void gb_affinity_init(gbAffinity *a) {
|
||||
}
|
||||
#undef AF__CHECK
|
||||
}
|
||||
|
||||
|
||||
fclose(cpu_info);
|
||||
}
|
||||
|
||||
@@ -7619,10 +7619,11 @@ gbFileError gb_file_close(gbFile *f) {
|
||||
return gbFileError_Invalid;
|
||||
}
|
||||
|
||||
//
|
||||
#if defined(GB_COMPILER_MSVC)
|
||||
if (f->filename) gb_free(gb_heap_allocator(), cast(char *)f->filename);
|
||||
#else
|
||||
// TODO HACK(bill): Memory Leak!!!
|
||||
// if (f->filename) gb_free(gb_heap_allocator(), cast(char *)f->filename);
|
||||
//
|
||||
#endif
|
||||
|
||||
#if defined(GB_SYSTEM_WINDOWS)
|
||||
if (f->fd.p == INVALID_HANDLE_VALUE) {
|
||||
|
||||
Reference in New Issue
Block a user