* [PATCH] Avoid multiple inclusions of adapter.h
@ 2010-05-13 10:38 Jose Antonio Santos Cadenas
2010-05-17 16:06 ` Johan Hedberg
0 siblings, 1 reply; 3+ messages in thread
From: Jose Antonio Santos Cadenas @ 2010-05-13 10:38 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Jose Antonio Santos Cadenas
---
src/adapter.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/adapter.h b/src/adapter.h
index 9b4ce10..8812ed8 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -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__ */
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Avoid multiple inclusions of adapter.h
2010-05-13 10:38 [PATCH] Avoid multiple inclusions of adapter.h Jose Antonio Santos Cadenas
@ 2010-05-17 16:06 ` Johan Hedberg
2010-05-18 9:57 ` José Antonio Santos Cadenas
0 siblings, 1 reply; 3+ messages in thread
From: Johan Hedberg @ 2010-05-17 16:06 UTC (permalink / raw)
To: Jose Antonio Santos Cadenas; +Cc: linux-bluetooth
Hi,
On Thu, May 13, 2010, Jose Antonio Santos Cadenas wrote:
> ---
> src/adapter.h | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/src/adapter.h b/src/adapter.h
> index 9b4ce10..8812ed8 100644
> --- a/src/adapter.h
> +++ b/src/adapter.h
> @@ -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__ */
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Avoid multiple inclusions of adapter.h
2010-05-17 16:06 ` Johan Hedberg
@ 2010-05-18 9:57 ` José Antonio Santos Cadenas
0 siblings, 0 replies; 3+ messages in thread
From: José Antonio Santos Cadenas @ 2010-05-18 9:57 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth
Hi,
El Monday 17 May 2010 18:06:58 Johan Hedberg escribió:
> Hi,
>
> On Thu, May 13, 2010, Jose Antonio Santos Cadenas wrote:
> > ---
> >
> > src/adapter.h | 5 +++++
> > 1 files changed, 5 insertions(+), 0 deletions(-)
> >
> > diff --git a/src/adapter.h b/src/adapter.h
> > index 9b4ce10..8812ed8 100644
> > --- a/src/adapter.h
> > +++ b/src/adapter.h
> > @@ -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__ */
>
> 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 :)
>
> Johan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
> in the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-18 9:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13 10:38 [PATCH] Avoid multiple inclusions of adapter.h Jose Antonio Santos Cadenas
2010-05-17 16:06 ` Johan Hedberg
2010-05-18 9:57 ` José Antonio Santos Cadenas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).