mirror of
https://github.com/holub/mame
synced 2025-06-01 10:31:48 +03:00
libco: Fix linking and compiling under osx. (nw)
This commit is contained in:
parent
8d77f85937
commit
06623947e3
@ -69,7 +69,7 @@ cothread_t co_create(unsigned int size, void (*entrypoint)(void)) {
|
||||
size += 256; /* allocate additional space for storage */
|
||||
size &= ~15; /* align stack to 16-byte boundary */
|
||||
|
||||
if(handle = (cothread_t)malloc(size)) {
|
||||
if((handle = (cothread_t)malloc(size))) {
|
||||
long *p = (long*)((char*)handle + size); /* seek to top of stack */
|
||||
*--p = (long)crash; /* crash if entrypoint returns */
|
||||
*--p = (long)entrypoint; /* start of function */
|
||||
|
@ -210,4 +210,4 @@ $(OBJ)/libco.a: $(COTHREADOBJS)
|
||||
|
||||
$(LIBOBJ)/cothread/%.o: $(LIBSRC)/cothread/%.c | $(OSPREBUILD)
|
||||
@echo Compiling $<...
|
||||
$(CC) -c -fomit-frame-pointer $< -o $@
|
||||
$(CC) $(CDEFS) $(CCOMFLAGS) -c -fomit-frame-pointer $< -o $@
|
||||
|
Loading…
Reference in New Issue
Block a user