Skip to content
Myr

OSX 64bit fixes

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Check for __LP64__ preprocessor define for 64bit. Allocator fix for 64bit.

authored by blackpawn · committed by blackpawn · parent b53c08a · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:stb.h+3 added-2 removed
321 unmodified lines
322typedef char stb__testsize2_64[sizeof(stb_uint64)==8 ? 1 : -1];323324// add platform-specific ways of checking for sizeof(char*) == 8,325// and make those define STB_PTR64326#if defined(_WIN64) || defined(__x86_64__) || defined(__ia64__)326#if defined(_WIN64) || defined(__x86_64__) || defined(__ia64__) || defined(__LP64__)327 #define STB_PTR64328#endif329330#ifdef STB_PTR64
2229 unmodified lines
25602561static void * stb__try_chunk(stb__chunk *c, int size, int align, int pre_align)2562{2563 char *memblock = (char *) (c+1), *q;2564 stb_inta iq;2564 int iq, start_offset;2565 int start_offset;25662567 // we going to allocate at the end of the chunk, not the start. confusing,2568 // but it means we don't need both a 'limit' and a 'cur', just a 'cur'.2569 // the block ends at: p + c->data_left
11518 unmodified lines