From fd40e5a8849461fd9d7f8736d95d9ffc1bc40680 Mon Sep 17 00:00:00 2001 From: Ned Bingham Date: Thu, 4 Jul 2024 10:07:58 -0400 Subject: [PATCH] now builds on osx --- lib/sockcon.c | 5 +++++ lib/wavetable.h | 1 + src/gawimg.c | 2 +- src/gawmenus.c | 8 ++++---- ttg/sockcon.c | 7 +++++++ 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/lib/sockcon.c b/lib/sockcon.c index bdab08d..7e20c36 100644 --- a/lib/sockcon.c +++ b/lib/sockcon.c @@ -16,7 +16,12 @@ #include #include #include +#ifdef __linux__ #include +#endif +#ifdef __APPLE__ +#include +#endif #include #include diff --git a/lib/wavetable.h b/lib/wavetable.h index 5a223d9..5e24f3f 100644 --- a/lib/wavetable.h +++ b/lib/wavetable.h @@ -55,6 +55,7 @@ char *wavetable_get_tblname ( WaveTable *wt ); int wavetable_fill_tables( WaveTable *wt, char *filename); int wavetable_get_ntables ( WaveTable *wt ); void wavetable_foreach_wavevar(WaveTable *wt, GFunc func, gpointer *p); +void wavetable_foreach_wavevar_sorted(WaveTable *wt, GFunc func, gpointer *p); WaveVar *wavetable_get_var_for_name(WaveTable *wt, char *varName, int tblno ); void wavetable_swvar_add(WaveTable *wt, char *varName, int type, int ncols); int wavetable_is_multisweep( WaveTable *wt); diff --git a/src/gawimg.c b/src/gawimg.c index 981885d..44f14c0 100644 --- a/src/gawimg.c +++ b/src/gawimg.c @@ -13,7 +13,7 @@ #include #include -#include +// #include #include #include diff --git a/src/gawmenus.c b/src/gawmenus.c index 8847178..92367a6 100644 --- a/src/gawmenus.c +++ b/src/gawmenus.c @@ -1206,7 +1206,7 @@ void gm_create_layout (UserData *ud) g_error ("Failed to create menu model 'gaw_menubar': %s\n", error->message); } - menumodel = g_object_ref (gtk_builder_get_object (builder,"menubar" )); + menumodel = (GMenuModel*)g_object_ref (gtk_builder_get_object (builder,"menubar" )); ud->menuBar = gtk_menu_bar_new_from_model(menumodel); gtk_widget_show(ud->menuBar); g_assert (ud->menuBar); @@ -1214,13 +1214,13 @@ void gm_create_layout (UserData *ud) /* left, top, width, height */ 0, 0, 2, 1 ); - ud->algomodel = g_object_ref (gtk_builder_get_object (builder,"algomenu" )); + ud->algomodel = (GMenuModel*)g_object_ref (gtk_builder_get_object (builder,"algomenu" )); aw_algo_menu_create( ud ); - ud->xconvmodel = g_object_ref (gtk_builder_get_object (builder,"xconvmenu" )); + ud->xconvmodel = (GMenuModel*)g_object_ref (gtk_builder_get_object (builder,"xconvmenu" )); aw_xconv_menu_create( ud ); - ud->vlmmodel = g_object_ref (gtk_builder_get_object (builder,"VarList" )); + ud->vlmmodel = (GMenuModel*)g_object_ref (gtk_builder_get_object (builder,"VarList" )); gm_update_menu(ud->menuBar, menubarTip); /* sensitive widget */ diff --git a/ttg/sockcon.c b/ttg/sockcon.c index bdab08d..a212f0a 100644 --- a/ttg/sockcon.c +++ b/ttg/sockcon.c @@ -16,7 +16,14 @@ #include #include #include +#ifdef __linux__ #include +#endif +#ifdef __APPLE__ +#include +#endif + + #include #include