# HG changeset patch # User John Tsiombikas # Date 1737836800 -7200 # Node ID f4ea3a88b05ae389d11abadd9e9e2037dd5b2de5 # Parent f7de32814f343818babe2af8221f2a00e851e2d5 macos build fixes. Patch by Andrew Woods diff -r f7de32814f34 -r f4ea3a88b05a Makefile.in --- a/Makefile.in Thu Jun 28 03:42:26 2012 +0300 +++ b/Makefile.in Sat Jan 25 22:26:40 2025 +0200 @@ -26,6 +26,10 @@ CFLAGS = -pedantic -Wall -g -fPIC -Iinclude -Isrc $(wsys_cflags) $(CFLAGS_extra) LDFLAGS = $(wsys_libs) +ifeq ($(shell uname -s), Darwin) + CFLAGS += -DGL_SILENCE_DEPRECATION +endif + .PHONY: all all: $(lib_so) $(lib_a) diff -r f7de32814f34 -r f4ea3a88b05a include/sgl.h --- a/include/sgl.h Thu Jun 28 03:42:26 2012 +0300 +++ b/include/sgl.h Sat Jan 25 22:26:40 2025 +0200 @@ -4,7 +4,7 @@ #ifdef __APPLE__ #include -#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR) +#if TARGET_OS_IPHONE != 0 || TARGET_IPHONE_SIMULATOR != 0 #include #else /* !iphone */ #include @@ -162,4 +162,6 @@ void sgl_button_callback(sgl_button_callback_t func); void sgl_idle_callback(sgl_idle_callback_t func); +void sgl_log(const char *fmt, ...); + #endif /* SGL_H_ */ diff -r f7de32814f34 -r f4ea3a88b05a src/wsys_cocoa.m --- a/src/wsys_cocoa.m Thu Jun 28 03:42:26 2012 +0300 +++ b/src/wsys_cocoa.m Sat Jan 25 22:26:40 2025 +0200 @@ -77,7 +77,7 @@ static int init(void); -static void shutdown(void); +static void shutdown_app(void); /* video mode switching */ static int set_vidmode(int xsz, int ysz); @@ -112,7 +112,7 @@ static struct wsys_module ws = { "cocoa", 0, init, - shutdown, + shutdown_app, set_vidmode, get_vidmode, create_window, @@ -303,7 +303,7 @@ return 0; } -static void shutdown(void) +static void shutdown_app(void) { while(winlist) { close_window(winlist->wid); @@ -423,7 +423,7 @@ if(!dummy.next) { winlist = 0; - shutdown(); + shutdown_app(); } } diff -r f7de32814f34 -r f4ea3a88b05a tests/simple/simple.c --- a/tests/simple/simple.c Thu Jun 28 03:42:26 2012 +0300 +++ b/tests/simple/simple.c Sat Jan 25 22:26:40 2025 +0200 @@ -5,7 +5,7 @@ void disp(void); void reshape(int x, int y); void keyb(int key, int state); -void mouse(int pidx, int bn, int state, int x, int y) +void mouse(int pidx, int bn, int state, int x, int y); void motion(int pidx, int x, int y); diff -r f7de32814f34 -r f4ea3a88b05a tests/tests-makefile --- a/tests/tests-makefile Thu Jun 28 03:42:26 2012 +0300 +++ b/tests/tests-makefile Sat Jan 25 22:26:40 2025 +0200 @@ -18,6 +18,10 @@ CFLAGS = -pedantic -Wall -g -I$(sgldir)/include LDFLAGS = -L. $(rpath) -lsgl $(libgl) -lm +ifeq ($(shell uname -s), Darwin) + CFLAGS += -DGL_SILENCE_DEPRECATION +endif + $(bin): $(obj) $(libsgl) $(CC) -o $@ $(obj) $(LDFLAGS)