Skip to contentSkip to conversation

Avoid multiple inclusions of adapter.h

PATCH In review Jose Antonio Santos Cadenas 2 participants 3 messages May 13, 2010 – May 18, 2010 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Avoid multiple inclusions of adapter.h

---
 src/adapter.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
src/adapter.h +5 -0
index 9b4ce10..8812ed8 100644
@@ -22,6 +22,9 @@
  *
  */
 
+#ifndef __ADAPTER_H__
+#define __ADAPTER_H__
+
 #include <bluetooth/bluetooth.h>
 #include <dbus/dbus.h>
 #include <glib.h>
@@ -183,3 +186,5 @@ struct btd_adapter_ops {
 int btd_register_adapter_ops(struct btd_adapter_ops *btd_adapter_ops);
 void btd_adapter_cleanup_ops(struct btd_adapter_ops *btd_adapter_ops);
 int adapter_ops_setup(void);
+
+#endif /* __ADAPTER_H__ */
Signature · 1 line
1.6.3.3
#1 lore raw

Hi,

Quoted 19 lines · Jose Antonio Santos Cadenas
---
 src/adapter.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
src/adapter.h +3 -0
index 9b4ce10..8812ed8 100644
@@ -22,6 +22,9 @@
  *
  */
 
+#ifndef __ADAPTER_H__
+#define __ADAPTER_H__
+
 #include <bluetooth/bluetooth.h>
 #include <dbus/dbus.h>
 #include <glib.h>

src/adapter.h struct btd_adapter_ops { · line 190

Quoted 5 lines
src/adapter.h +2 -0
@@ -183,3 +186,5 @@ struct btd_adapter_ops {
 int btd_register_adapter_ops(struct btd_adapter_ops *btd_adapter_ops);
 void btd_adapter_cleanup_ops(struct btd_adapter_ops *btd_adapter_ops);
 int adapter_ops_setup(void);
+
+#endif /* __ADAPTER_H__ */

Lack of these defines is actually intentional for headsers which aren't part of any public library. The intention is to keep the header dependencies simple and get errors as soon as there's a circular dependency between them.

Johan

#2 lore raw

Hi,

Quoted 31 lines · El Monday 17 May 2010 18:06:58 Johan Hedberg escribió:

Hi,

Quoted 28 lines · Jose Antonio Santos Cadenas

---

 src/adapter.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
src/adapter.h +3 -0
index 9b4ce10..8812ed8 100644
@@ -22,6 +22,9 @@
 
  *
  */
 
+#ifndef __ADAPTER_H__
+#define __ADAPTER_H__
+
 
 #include <bluetooth/bluetooth.h>

#include <dbus/dbus.h>
#include <glib.h>

src/adapter.h +0 -0
@@ -183,3 +186,5 @@ struct btd_adapter_ops {
 
 int btd_register_adapter_ops(struct btd_adapter_ops *btd_adapter_ops);
 void btd_adapter_cleanup_ops(struct btd_adapter_ops *btd_adapter_ops);
 int adapter_ops_setup(void);
Quoted 7 lines

src/adapter.h struct btd_adapter_ops { · line 190

Quoted 2 lines
src/adapter.h +2 -0
+
+#endif /* __ADAPTER_H__ */

Lack of these defines is actually intentional for headsers which aren't part of any public library. The intention is to keep the header dependencies simple and get errors as soon as there's a circular dependency between them.

Thank you for the response. I guess I have to review how I do the include :)

Quoted 6 lines

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html