diff options
35 files changed, 112 insertions, 142 deletions
diff --git a/audio/Makefile.am b/audio/Makefile.am index 60a546e7..f7e48a3f 100644 --- a/audio/Makefile.am +++ b/audio/Makefile.am @@ -1,14 +1,6 @@ servicedir = $(libdir)/bluetooth -if GLIB -glib_cflags = @GLIB_CFLAGS@ -glib_ldadd = @GLIB_LIBS@ -else -glib_cflags = -glib_ldadd = -endif - noinst_PROGRAMS = bluetoothd-service-audio \ bluetoothd-service-headset @@ -16,10 +8,10 @@ bluetoothd_service_audio_SOURCES = main.c bluetoothd_service_headset_SOURCES = headset.c -LDADD = $(top_builddir)/common/libhelper.a $(glib_ldadd) \ - @DBUS_LIBS@ @BLUEZ_LIBS@ +LDADD = $(top_builddir)/common/libhelper.a \ + @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ -AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ $(glib_cflags) +AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ INCLUDES = -I$(top_srcdir)/common diff --git a/audio/headset.c b/audio/headset.c index 220562fd..0be529ec 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -44,11 +44,12 @@ #include <bluetooth/sdp.h> #include <bluetooth/sdp_lib.h> +#include <glib.h> + #include <dbus/dbus.h> #include "dbus.h" #include "logging.h" -#include "glib-ectomy.h" #define BUF_SIZE 1024 @@ -347,7 +348,7 @@ static gboolean rfcomm_io_cb(GIOChannel *chan, GIOCondition cond, gpointer user_ } if (hs->ring_timer) { - g_timeout_remove(hs->ring_timer); + g_source_remove(hs->ring_timer); hs->ring_timer = 0; } @@ -752,7 +753,7 @@ failed: static void sig_term(int sig) { - g_main_quit(main_loop); + g_main_loop_quit(main_loop); } static int server_socket(uint8_t *channel) @@ -1371,7 +1372,7 @@ static DBusHandlerResult hs_cancel_ringing(DBusConnection *conn, DBusMessage *ms goto done; } - g_timeout_remove(hs->ring_timer); + g_source_remove(hs->ring_timer); hs->ring_timer = 0; done: @@ -1531,7 +1532,7 @@ int main(int argc, char *argv[]) enable_debug(); - main_loop = g_main_new(FALSE); + main_loop = g_main_loop_new(NULL, FALSE); if (headset_dbus_init(NULL) < 0) { error("Unable to get on D-Bus"); @@ -1540,7 +1541,7 @@ int main(int argc, char *argv[]) create_server_socket(); - g_main_run(main_loop); + g_main_loop_run(main_loop); return 0; } diff --git a/common/Makefile.am b/common/Makefile.am index a92ff9a3..412786c9 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -11,30 +11,21 @@ else notify_sources = notify-dummy.c endif -if GLIB -glib_sources = -glib_cflags = @GLIB_CFLAGS@ -else -glib_sources = glib-ectomy.c -glib_cflags = -endif - noinst_LIBRARIES = libhelper.a libhelper_a_SOURCES = oui.h oui.c dbus.h dbus.c \ textfile.h textfile.c logging.h logging.c \ dbus-helper.h dbus-helper.c \ sdp-xml.h sdp-xml.c $(sdp_sources) \ - notify.h $(notify_sources) \ - glib-ectomy.h $(glib_sources) + notify.h $(notify_sources) noinst_PROGRAMS = test_textfile test_textfile_LDADD = libhelper.a -AM_CFLAGS = @DBUS_CFLAGS@ $(glib_cflags) +AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ EXTRA_DIST = ppoll.h sdp-dummy.c sdp-expat.c \ - notify-dummy.c notify-inotify.c glib-ectomy.c + notify-dummy.c notify-inotify.c MAINTAINERCLEANFILES = Makefile.in diff --git a/common/dbus-helper.c b/common/dbus-helper.c index 71d1eeb7..64b00cd8 100644 --- a/common/dbus-helper.c +++ b/common/dbus-helper.c @@ -28,9 +28,10 @@ #include <stdlib.h> #include <string.h> +#include <glib.h> + #include <dbus/dbus.h> -#include "glib-ectomy.h" #include "logging.h" #include "dbus-helper.h" diff --git a/common/dbus.c b/common/dbus.c index 3b211851..bdcb1684 100644 --- a/common/dbus.c +++ b/common/dbus.c @@ -32,13 +32,14 @@ #include <stdlib.h> #include <stdint.h> +#include <glib.h> + #include <dbus/dbus.h> #ifdef HAVE_DBUS_GLIB #include <dbus/dbus-glib-lowlevel.h> #endif -#include "glib-ectomy.h" #include "dbus.h" #include "logging.h" diff --git a/common/notify-inotify.c b/common/notify-inotify.c index 27719dbf..a35cf745 100644 --- a/common/notify-inotify.c +++ b/common/notify-inotify.c @@ -34,7 +34,8 @@ #define IN_ONLYDIR 0x01000000 #endif -#include "glib-ectomy.h" +#include <glib.h> + #include "logging.h" #include "notify.h" diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 336f2a25..73f11f3d 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -7,14 +7,6 @@ endif servicedir = $(libdir)/bluetooth -if GLIB -glib_cflags = @GLIB_CFLAGS@ -glib_ldadd = @GLIB_LIBS@ -else -glib_cflags = -glib_ldadd = -endif - noinst_PROGRAMS = bluetoothd service_PROGRAMS = bluetoothd-service-echo @@ -23,21 +15,22 @@ bluetoothd_SOURCES = main.c system.h \ manager.h manager.c database.h database.c \ adapter.h adapter.c service.h service.c -bluetoothd_LDADD = $(glib_ldadd) @DBUS_LIBS@ @BLUEZ_LIBS@ \ - $(top_builddir)/sdpd/libsdpserver.a \ - $(top_builddir)/common/libhelper.a +bluetoothd_LDADD = \ + $(top_builddir)/common/libhelper.a \ + $(top_builddir)/sdpd/libsdpserver.a \ + @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ bluetoothd_service_echo_SOURCES = echo.c bluetoothd_service_echo_LDADD = \ $(top_builddir)/common/libhelper.a \ - $(glib_ldadd) @DBUS_LIBS@ @BLUEZ_LIBS@ + @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ if EXPAT bluetoothd_LDADD += -lexpat endif -AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ $(glib_cflags) +AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/sdpd diff --git a/daemon/database.c b/daemon/database.c index 798a8686..231000c0 100644 --- a/daemon/database.c +++ b/daemon/database.c @@ -32,11 +32,12 @@ #include <bluetooth/sdp.h> #include <bluetooth/sdp_lib.h> +#include <glib.h> + #include <dbus/dbus.h> #include "dbus-helper.h" #include "dbus.h" -#include "glib-ectomy.h" #include "sdp-xml.h" #include "logging.h" diff --git a/daemon/echo.c b/daemon/echo.c index c79b2047..736b3a0b 100644 --- a/daemon/echo.c +++ b/daemon/echo.c @@ -36,10 +36,11 @@ #include <bluetooth/sdp.h> #include <bluetooth/sdp_lib.h> +#include <glib.h> + #include <dbus/dbus.h> #include "dbus.h" -#include "glib-ectomy.h" #include "logging.h" static GMainLoop *main_loop = NULL; diff --git a/daemon/main.c b/daemon/main.c index 56cc7782..1653ba75 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -33,11 +33,12 @@ #include <getopt.h> #include <sys/stat.h> +#include <glib.h> + #include <dbus/dbus.h> #include "dbus-helper.h" -#include "glib-ectomy.h" #include "dbus.h" #include "notify.h" #include "logging.h" diff --git a/hcid/Makefile.am b/hcid/Makefile.am index 3580d51f..4656412b 100644 --- a/hcid/Makefile.am +++ b/hcid/Makefile.am @@ -13,14 +13,6 @@ dbusdir = $(sysconfdir)/dbus-1/system.d dbus_DATA = bluetooth.conf endif -if GLIB -glib_cflags = @GLIB_CFLAGS@ -glib_ldadd = @GLIB_LIBS@ -else -glib_cflags = -glib_ldadd = -endif - noinst_LIBRARIES = libhciserver.a libhciserver_a_SOURCES = hcid.h security.c device.c \ @@ -37,10 +29,10 @@ sbin_PROGRAMS = hcid hcid_SOURCES = main.c -hcid_LDADD = $(glib_ldadd) @DBUS_LIBS@ @BLUEZ_LIBS@ \ - libhciserver.a \ - $(top_builddir)/sdpd/libsdpserver.a \ - $(top_builddir)/common/libhelper.a +hcid_LDADD = libhciserver.a \ + $(top_builddir)/sdpd/libsdpserver.a \ + $(top_builddir)/common/libhelper.a \ + @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ if EXPAT hcid_LDADD += -lexpat @@ -57,7 +49,7 @@ auth_agent_SOURCES = auth-agent.c auth_agent_LDADD = @DBUS_LIBS@ -AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ $(glib_cflags) +AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/sdpd diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index 0e7e1b3d..50a28a57 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -41,6 +41,8 @@ #include <bluetooth/hci_lib.h> #include <bluetooth/l2cap.h> +#include <glib.h> + #include <dbus/dbus.h> #include "hcid.h" diff --git a/hcid/dbus-adapter.h b/hcid/dbus-adapter.h index f4727929..29a96546 100644 --- a/hcid/dbus-adapter.h +++ b/hcid/dbus-adapter.h @@ -25,7 +25,6 @@ #define __ADAPTER_H #include <dbus/dbus.h> -#include "glib-ectomy.h" #define ADAPTER_INTERFACE "org.bluez.Adapter" diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c index f70f1c2f..0ff395ed 100644 --- a/hcid/dbus-common.c +++ b/hcid/dbus-common.c @@ -44,6 +44,8 @@ #include <bluetooth/sdp.h> #include <bluetooth/sdp_lib.h> +#include <glib.h> + #include <dbus/dbus.h> #include "hcid.h" diff --git a/hcid/dbus-database.c b/hcid/dbus-database.c index 5da84cfa..ea275b7a 100644 --- a/hcid/dbus-database.c +++ b/hcid/dbus-database.c @@ -33,6 +33,8 @@ #include <bluetooth/sdp.h> #include <bluetooth/sdp_lib.h> +#include <glib.h> + #include <dbus/dbus.h> #include "dbus.h" diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index 4b63c7c6..165eb142 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -39,9 +39,9 @@ #include <bluetooth/hci.h> #include <bluetooth/hci_lib.h> -#include <dbus/dbus.h> +#include <glib.h> -#include "glib-ectomy.h" +#include <dbus/dbus.h> #include "hcid.h" #include "dbus.h" diff --git a/hcid/dbus-manager.c b/hcid/dbus-manager.c index b9e1ef55..a81cbc8e 100644 --- a/hcid/dbus-manager.c +++ b/hcid/dbus-manager.c @@ -38,6 +38,8 @@ #include <bluetooth/sdp.h> #include <bluetooth/sdp_lib.h> +#include <glib.h> + #include <dbus/dbus.h> #include "hcid.h" diff --git a/hcid/dbus-rfcomm.c b/hcid/dbus-rfcomm.c index 69ec9be1..5a893898 100644 --- a/hcid/dbus-rfcomm.c +++ b/hcid/dbus-rfcomm.c @@ -42,10 +42,11 @@ #include <bluetooth/sdp.h> #include <bluetooth/sdp_lib.h> +#include <glib.h> + #include <dbus/dbus.h> #include "hcid.h" -#include "glib-ectomy.h" #include "dbus.h" #include "dbus-common.h" #include "dbus-hci.h" diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c index 62324b56..f16a429e 100644 --- a/hcid/dbus-sdp.c +++ b/hcid/dbus-sdp.c @@ -44,6 +44,8 @@ #include <netinet/in.h> +#include <glib.h> + #include <dbus/dbus.h> #include "dbus.h" diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c index 5e0fd6c9..98ca1df5 100644 --- a/hcid/dbus-security.c +++ b/hcid/dbus-security.c @@ -35,6 +35,8 @@ #include <bluetooth/hci.h> #include <bluetooth/hci_lib.h> +#include <glib.h> + #include <dbus/dbus.h> #include "dbus.h" diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c index 1c0e1e7b..ac3e4cc8 100644 --- a/hcid/dbus-service.c +++ b/hcid/dbus-service.c @@ -33,6 +33,8 @@ #include <signal.h> #include <sys/types.h> +#include <glib.h> + #include <dbus/dbus.h> #include "hcid.h" diff --git a/hcid/dbus-test.c b/hcid/dbus-test.c index 4232858a..1085d5c8 100644 --- a/hcid/dbus-test.c +++ b/hcid/dbus-test.c @@ -29,11 +29,13 @@ #include <errno.h> #include <stdlib.h> -#include <dbus/dbus.h> - #include <bluetooth/bluetooth.h> #include <bluetooth/l2cap.h> +#include <glib.h> + +#include <dbus/dbus.h> + #include "hcid.h" #include "dbus.h" #include "dbus-common.h" diff --git a/hcid/hcid.h b/hcid/hcid.h index be10dcc7..f8d58fc4 100644 --- a/hcid/hcid.h +++ b/hcid/hcid.h @@ -23,6 +23,9 @@ * */ +#define g_io_remove_watch g_source_remove +#define g_timeout_remove g_source_remove + #include <time.h> #include <sys/types.h> @@ -30,7 +33,6 @@ #include <bluetooth/hci.h> #include "logging.h" -#include "glib-ectomy.h" #define HCID_CONFIG_FILE CONFIGDIR "/hcid.conf" diff --git a/hcid/main.c b/hcid/main.c index 30b1c674..b6b1f671 100644 --- a/hcid/main.c +++ b/hcid/main.c @@ -42,7 +42,8 @@ #include <bluetooth/hci.h> #include <bluetooth/hci_lib.h> -#include "glib-ectomy.h" +#include <glib.h> + #include "notify.h" #include "hcid.h" @@ -599,7 +600,7 @@ static gboolean io_stack_event(GIOChannel *chan, GIOCondition cond, gpointer dat error("Read from control socket failed: %s (%d)", strerror(errno), errno); - g_main_quit(event_loop); + g_main_loop_quit(event_loop); return FALSE; } @@ -766,7 +767,7 @@ int main(int argc, char *argv[]) init_services(CONFIGDIR); /* Start event processor */ - g_main_run(event_loop); + g_main_loop_run(event_loop); if (sdp) stop_sdp_server(); diff --git a/hcid/security.c b/hcid/security.c index b2dd4e8f..ca984852 100644 --- a/hcid/security.c +++ b/hcid/security.c @@ -46,7 +46,7 @@ #include <bluetooth/hci.h> #include <bluetooth/hci_lib.h> -#include "glib-ectomy.h" +#include <glib.h> #include "hcid.h" #include "textfile.h" diff --git a/input/Makefile.am b/input/Makefile.am index e9efa972..6565d8c1 100644 --- a/input/Makefile.am +++ b/input/Makefile.am @@ -7,23 +7,15 @@ endif servicedir = $(libdir)/bluetooth -if GLIB -glib_cflags = @GLIB_CFLAGS@ -glib_ldadd = @GLIB_LIBS@ -else -glib_cflags = -glib_ldadd = -endif - noinst_PROGRAMS = bluetoothd-service-input bluetoothd_service_input_SOURCES = \ main.c input-service.h input-service.c -LDADD = $(top_builddir)/common/libhelper.a $(glib_ldadd) \ - @DBUS_LIBS@ @BLUEZ_LIBS@ +LDADD = $(top_builddir)/common/libhelper.a \ + @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ -AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ $(glib_cflags) +AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ INCLUDES = -I$(top_srcdir)/common diff --git a/input/input-service.c b/input/input-service.c index 70d2a3f3..5b9f5204 100644 --- a/input/input-service.c +++ b/input/input-service.c @@ -29,20 +29,21 @@ #include <errno.h> #include <unistd.h> -#include "dbus.h" -#include "logging.h" -#include "input-service.h" -#include "glib-ectomy.h" -#include "textfile.h" - -#include <dbus/dbus.h> - #include <bluetooth/bluetooth.h> #include <bluetooth/hci.h> #include <bluetooth/hci_lib.h> #include <bluetooth/sdp.h> #include <bluetooth/sdp_lib.h> +#include <glib.h> + +#include <dbus/dbus.h> + +#include "dbus.h" +#include "logging.h" +#include "textfile.h" +#include "input-service.h" + #define INPUT_SERVICE "org.bluez.input" #define INPUT_PATH "/org/bluez/input" #define INPUT_MANAGER_INTERFACE "org.bluez.input.Manager" @@ -294,7 +295,7 @@ static const DBusObjectPathVTable device_table = { struct input_manager { char adapter[18]; char *adapter_path; - GList *paths; + GSList *paths; }; void input_manager_free(struct input_manager *mgr) @@ -302,7 +303,7 @@ void input_manager_free(struct input_manager *mgr) if (!mgr) return; if (mgr->paths) - g_list_foreach(mgr->paths, (GFunc) free, NULL); + g_slist_foreach(mgr->paths, (GFunc) free, NULL); if (mgr->adapter_path) free(mgr->adapter_path); free(mgr); @@ -548,7 +549,7 @@ static DBusHandlerResult manager_create_device(DBusConnection *conn, DBusError derr; const char *addr; const char *keyb_path = "/org/bluez/input/keyboard0"; - GList *path; + GSList *path; dbus_error_init(&derr); if (!dbus_message_get_args(msg, &derr, @@ -559,7 +560,7 @@ static DBusHandlerResult manager_create_device(DBusConnection *conn, return DBUS_HANDLER_RESULT_HANDLED; } - path = g_list_find_custom(mgr->paths, addr, + path = g_slist_find_custom(mgr->paths, addr, (GCompareFunc) path_addr_cmp); if (path) return err_already_exists(conn, msg, "Input Already exists"); @@ -595,7 +596,7 @@ static DBusHandlerResult manager_create_device(DBusConnection *conn, return err_failed(conn, msg, "Path registration failed"); } - mgr->paths = g_list_append(mgr->paths, strdup(keyb_path)); + mgr->paths = g_slist_append(mgr->paths, strdup(keyb_path)); dbus_message_append_args(reply, DBUS_TYPE_STRING, &keyb_path, DBUS_TYPE_INVALID); @@ -615,7 +616,7 @@ static DBusHandlerResult manager_list_devices(DBusConnection *conn, struct input_manager *mgr = data; DBusMessageIter iter, iter_array; DBusMessage *reply; - GList *paths; + GSList *paths; reply = dbus_message_new_method_return(msg); if (!reply) diff --git a/input/main.c b/input/main.c index df1eee9e..e74c4482 100644 --- a/input/main.c +++ b/input/main.c @@ -35,9 +35,10 @@ #include <dbus/dbus.h> +#include <glib.h> + #include "dbus.h" #include "logging.h" -#include "glib-ectomy.h" #include "input-service.h" @@ -45,7 +46,7 @@ static GMainLoop *main_loop; static void sig_term(int sig) { - g_main_quit(main_loop); + g_main_loop_quit(main_loop); } int main(int argc, char *argv[]) @@ -67,14 +68,14 @@ int main(int argc, char *argv[]) enable_debug(); /* Create event loop */ - main_loop = g_main_new(FALSE); + main_loop = g_main_loop_new(NULL, FALSE); if (input_dbus_init() < 0) { error("Unable to get on D-Bus"); exit(1); } - g_main_run(main_loop); + g_main_loop_run(main_loop); input_dbus_exit(); diff --git a/sdpd/Makefile.am b/sdpd/Makefile.am index 0a425f74..12740584 100644 --- a/sdpd/Makefile.am +++ b/sdpd/Makefile.am @@ -1,12 +1,4 @@ -if GLIB -glib_cflags = @GLIB_CFLAGS@ -glib_ldadd = @GLIB_LIBS@ -else -glib_cflags = -glib_ldadd = -endif - noinst_LIBRARIES = libsdpserver.a libsdpserver_a_SOURCES = sdpd.h server.c cstate.c request.c service.c servicedb.c @@ -16,10 +8,12 @@ sbin_PROGRAMS = sdpd sdpd_SOURCES = main.c -sdpd_LDADD = $(glib_ldadd) @BLUEZ_LIBS@ libsdpserver.a $(top_builddir)/common/libhelper.a +sdpd_LDADD = libsdpserver.a \ + $(top_builddir)/common/libhelper.a \ + @GLIB_LIBS@ @BLUEZ_LIBS@ endif -AM_CFLAGS = @BLUEZ_CFLAGS@ $(glib_cflags) +AM_CFLAGS = @BLUEZ_CFLAGS@ @GLIB_CFLAGS@ INCLUDES = -I$(top_srcdir)/common diff --git a/sdpd/main.c b/sdpd/main.c index 1154547b..d29c8c16 100644 --- a/sdpd/main.c +++ b/sdpd/main.c @@ -36,7 +36,8 @@ #include <signal.h> #include <sys/stat.h> -#include "glib-ectomy.h" +#include <glib.h> + #include "logging.h" #include "sdpd.h" @@ -44,7 +45,7 @@ static GMainLoop *event_loop; static void sig_term(int sig) { - g_main_quit(event_loop); + g_main_loop_quit(event_loop); } static void sig_hup(int sig) @@ -143,7 +144,7 @@ int main(int argc, char *argv[]) exit(1); } - g_main_run(event_loop); + g_main_loop_run(event_loop); stop_sdp_server(); diff --git a/sdpd/server.c b/sdpd/server.c index 65d36996..c5458aac 100644 --- a/sdpd/server.c +++ b/sdpd/server.c @@ -42,7 +42,8 @@ #include <sys/un.h> #include <netinet/in.h> -#include "glib-ectomy.h" +#include <glib.h> + #include "logging.h" #include "sdpd.h" diff --git a/test/Makefile.am b/test/Makefile.am index 18989ba5..c2a456d5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,12 +1,4 @@ -if GLIB -glib_cflags = @GLIB_CFLAGS@ -glib_ldadd = @GLIB_LIBS@ -else -glib_cflags = -glib_ldadd = -endif - if TEST sbin_PROGRAMS = hciemu @@ -14,7 +6,8 @@ bin_PROGRAMS = l2test rctest noinst_PROGRAMS = sdptest scotest attest hstest bdaddr lmptest -hciemu_LDADD = $(glib_ldadd) @BLUEZ_LIBS@ $(top_builddir)/common/libhelper.a +hciemu_LDADD = $(top_builddir)/common/libhelper.a \ + @GLIB_LIBS@ @BLUEZ_LIBS@ l2test_LDADD = @BLUEZ_LIBS@ @@ -36,7 +29,7 @@ lmptest_LDADD = @BLUEZ_LIBS@ noinst_MANS = bdaddr.8 -AM_CFLAGS = @BLUEZ_CFLAGS@ $(glib_cflags) +AM_CFLAGS = @BLUEZ_CFLAGS@ @GLIB_CFLAGS@ endif INCLUDES = -I$(top_srcdir)/common diff --git a/test/hciemu.c b/test/hciemu.c index a974a0c1..79f642a4 100644 --- a/test/hciemu.c +++ b/test/hciemu.c @@ -50,7 +50,7 @@ #include <netdb.h> -#include "glib-ectomy.h" +#include <glib.h> #if __BYTE_ORDER == __LITTLE_ENDIAN static inline uint64_t ntoh64(uint64_t n) @@ -144,7 +144,7 @@ static inline void io_cancel(void) static void sig_term(int sig) { io_cancel(); - g_main_quit(event_loop); + g_main_loop_quit(event_loop); } static gboolean io_acl_data(GIOChannel *chan, GIOCondition cond, gpointer data); @@ -979,7 +979,7 @@ static gboolean io_hci_data(GIOChannel *chan, GIOCondition cond, gpointer data) syslog(LOG_ERR, "Read failed: %s (%d)", strerror(errno), errno); g_io_channel_unref(chan); - g_main_quit(event_loop); + g_main_loop_quit(event_loop); return FALSE; } @@ -1298,7 +1298,7 @@ int main(int argc, char *argv[]) dd = -1; /* Create event loop */ - event_loop = g_main_new(FALSE); + event_loop = g_main_loop_new(NULL, FALSE); if (dev >= 0) return run_proxy(fd, dev, &bdaddr); @@ -1333,7 +1333,7 @@ int main(int argc, char *argv[]) setpriority(PRIO_PROCESS, 0, -19); /* Start event processor */ - g_main_run(event_loop); + g_main_loop_run(event_loop); close(fd); diff --git a/transfer/Makefile.am b/transfer/Makefile.am index 97b9cc0d..61b61f82 100644 --- a/transfer/Makefile.am +++ b/transfer/Makefile.am @@ -8,24 +8,16 @@ endif servicedir = $(libdir)/bluetooth -if GLIB -glib_cflags = @GLIB_CFLAGS@ -glib_ldadd = @GLIB_LIBS@ -else -glib_cflags = -glib_ldadd = -endif - noinst_PROGRAMS = bluetoothd-service-transfer bluetoothd_service_transfer_SOURCES = \ main.c session.h session.c -LDADD = $(top_builddir)/common/libhelper.a $(glib_ldadd) \ - @DBUS_LIBS@ @OPENOBEX_LIBS@ @BLUEZ_LIBS@ +LDADD = $(top_builddir)/common/libhelper.a \ + @GLIB_LIBS@ @DBUS_LIBS@ @OPENOBEX_LIBS@ @BLUEZ_LIBS@ endif -AM_CFLAGS = @BLUEZ_CFLAGS@ @OPENOBEX_CFLAGS@ @DBUS_CFLAGS@ $(glib_cflags) +AM_CFLAGS = @BLUEZ_CFLAGS@ @OPENOBEX_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ INCLUDES = -I$(top_srcdir)/common diff --git a/transfer/main.c b/transfer/main.c index 39bd9248..416b871e 100644 --- a/transfer/main.c +++ b/transfer/main.c @@ -25,13 +25,14 @@ #include <config.h> #endif +#include <stdlib.h> #include <string.h> #include <signal.h> #include <sys/stat.h> #include <dbus/dbus.h> -#include "glib-ectomy.h" +#include <glib.h> #include "logging.h" #include "dbus.h" |