summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-01-20 05:26:15 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-01-20 05:26:15 +0000
commit8cc5595d9091b484b9a4abe314c0f3ec055e0581 (patch)
tree0d20c6f621673dbdb6095fb4854077152c1d9b40 /hcid
parent884cfe825db1a0e8c98aa6a604fd4588a1de1340 (diff)
Make it possible to support an embedded GLib
Diffstat (limited to 'hcid')
-rw-r--r--hcid/Makefile.am18
-rw-r--r--hcid/dbus-adapter.c2
-rw-r--r--hcid/dbus-adapter.h1
-rw-r--r--hcid/dbus-common.c2
-rw-r--r--hcid/dbus-database.c2
-rw-r--r--hcid/dbus-hci.c4
-rw-r--r--hcid/dbus-manager.c2
-rw-r--r--hcid/dbus-rfcomm.c3
-rw-r--r--hcid/dbus-sdp.c2
-rw-r--r--hcid/dbus-security.c2
-rw-r--r--hcid/dbus-service.c2
-rw-r--r--hcid/dbus-test.c6
-rw-r--r--hcid/hcid.h4
-rw-r--r--hcid/main.c7
-rw-r--r--hcid/security.c2
15 files changed, 35 insertions, 24 deletions
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"