Message ID | 1455125248-34077-5-git-send-email-christophe.milard@linaro.org |
---|---|
State | Superseded |
Headers | show |
On Wed, Feb 10, 2016 at 11:27 AM, Christophe Milard < christophe.milard@linaro.org> wrote: > The former odp.h (now called odp_api.h) is recreated here and just > includes odp_api.h. > This is to ease the transition period for ODP applications, but > this file (odp.h) is meant to be removed in the future. > ODP applications should include odp_api.h, but those > including odp.h will keep working during this transition period. > > Signed-off-by: Christophe Milard <christophe.milard@linaro.org> > --- > include/odp.h | 30 ++++++++++++++++++++++++++++++ > platform/linux-generic/Makefile.am | 1 + > 2 files changed, 31 insertions(+) > create mode 100644 include/odp.h > > diff --git a/include/odp.h b/include/odp.h > new file mode 100644 > index 0000000..55ba3b2 > --- /dev/null > +++ b/include/odp.h > @@ -0,0 +1,30 @@ > +/* Copyright (c) 2016, Linaro Limited > + * All rights reserved > + * > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > +/** > + * @file > + * > + * WARNING: THIS FILE IS DEPRECATED AND WILL BE REMOVED!!! > + * ODP APPLICATIONS SHOULD NOW INCLUDE odp_api.h INSTEAD. > + * > + * This file is here to ease the transition period but will be removed. > + * This change has been made to enable the creation of other ODP > interfaces. > + * > + */ > + > +#ifndef ODP_H_ > +#define ODP_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > I don't believe this file should have the extern "C" wrapping since that's part of the odp_api.h file it includes. There are conflicting reports as to whether nesting this construct works on all C compilers, but it's probably safer not to do it as there's nothing in this file other than the indirect #include of odp_api.h > + > +#include <odp_api.h> > + > +#ifdef __cplusplus > +} > +#endif > +#endif > diff --git a/platform/linux-generic/Makefile.am > b/platform/linux-generic/Makefile.am > index fb7f030..5e1a328 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -9,6 +9,7 @@ AM_CFLAGS += -I$(top_srcdir)/include > AM_CFLAGS += -I$(top_srcdir)/helper/include > > include_HEADERS = \ > + $(top_srcdir)/include/odp.h \ > $(top_srcdir)/include/odp_api.h > > odpapiincludedir= $(includedir)/odp/api > -- > 2.1.4 > >
I did not know this was an issue. will do a v5... On 10 February 2016 at 17:34, Bill Fischofer <bill.fischofer@linaro.org> wrote: > > > On Wed, Feb 10, 2016 at 11:27 AM, Christophe Milard < > christophe.milard@linaro.org> wrote: > >> The former odp.h (now called odp_api.h) is recreated here and just >> includes odp_api.h. >> This is to ease the transition period for ODP applications, but >> this file (odp.h) is meant to be removed in the future. >> ODP applications should include odp_api.h, but those >> including odp.h will keep working during this transition period. >> >> Signed-off-by: Christophe Milard <christophe.milard@linaro.org> >> --- >> include/odp.h | 30 ++++++++++++++++++++++++++++++ >> platform/linux-generic/Makefile.am | 1 + >> 2 files changed, 31 insertions(+) >> create mode 100644 include/odp.h >> >> diff --git a/include/odp.h b/include/odp.h >> new file mode 100644 >> index 0000000..55ba3b2 >> --- /dev/null >> +++ b/include/odp.h >> @@ -0,0 +1,30 @@ >> +/* Copyright (c) 2016, Linaro Limited >> + * All rights reserved >> + * >> + * SPDX-License-Identifier: BSD-3-Clause >> + */ >> + >> +/** >> + * @file >> + * >> + * WARNING: THIS FILE IS DEPRECATED AND WILL BE REMOVED!!! >> + * ODP APPLICATIONS SHOULD NOW INCLUDE odp_api.h INSTEAD. >> + * >> + * This file is here to ease the transition period but will be removed. >> + * This change has been made to enable the creation of other ODP >> interfaces. >> + * >> + */ >> + >> +#ifndef ODP_H_ >> +#define ODP_H_ >> + >> +#ifdef __cplusplus >> +extern "C" { >> +#endif >> > > I don't believe this file should have the extern "C" wrapping since that's > part of the odp_api.h file it includes. There are conflicting reports as to > whether nesting this construct works on all C compilers, but it's probably > safer not to do it as there's nothing in this file other than the indirect > #include of odp_api.h > > >> + >> +#include <odp_api.h> >> + >> +#ifdef __cplusplus >> +} >> +#endif >> +#endif >> diff --git a/platform/linux-generic/Makefile.am >> b/platform/linux-generic/Makefile.am >> index fb7f030..5e1a328 100644 >> --- a/platform/linux-generic/Makefile.am >> +++ b/platform/linux-generic/Makefile.am >> @@ -9,6 +9,7 @@ AM_CFLAGS += -I$(top_srcdir)/include >> AM_CFLAGS += -I$(top_srcdir)/helper/include >> >> include_HEADERS = \ >> + $(top_srcdir)/include/odp.h \ >> $(top_srcdir)/include/odp_api.h >> >> odpapiincludedir= $(includedir)/odp/api >> -- >> 2.1.4 >> >> >
diff --git a/include/odp.h b/include/odp.h new file mode 100644 index 0000000..55ba3b2 --- /dev/null +++ b/include/odp.h @@ -0,0 +1,30 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * WARNING: THIS FILE IS DEPRECATED AND WILL BE REMOVED!!! + * ODP APPLICATIONS SHOULD NOW INCLUDE odp_api.h INSTEAD. + * + * This file is here to ease the transition period but will be removed. + * This change has been made to enable the creation of other ODP interfaces. + * + */ + +#ifndef ODP_H_ +#define ODP_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <odp_api.h> + +#ifdef __cplusplus +} +#endif +#endif diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index fb7f030..5e1a328 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -9,6 +9,7 @@ AM_CFLAGS += -I$(top_srcdir)/include AM_CFLAGS += -I$(top_srcdir)/helper/include include_HEADERS = \ + $(top_srcdir)/include/odp.h \ $(top_srcdir)/include/odp_api.h odpapiincludedir= $(includedir)/odp/api
The former odp.h (now called odp_api.h) is recreated here and just includes odp_api.h. This is to ease the transition period for ODP applications, but this file (odp.h) is meant to be removed in the future. ODP applications should include odp_api.h, but those including odp.h will keep working during this transition period. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- include/odp.h | 30 ++++++++++++++++++++++++++++++ platform/linux-generic/Makefile.am | 1 + 2 files changed, 31 insertions(+) create mode 100644 include/odp.h