@@ -40,6 +40,7 @@ PREDEFINED = __GNUC__ \
__LITTLE_ENDIAN_BITFIELD \
__x86_64__ \
ODP_PACKED \
+ ODP_DEPRECATED_FIELD(x)=x \
"ODP_HANDLE_T(type)=odp_handle_t type"
INTERNAL_DOCS = YES
DOT_IMAGE_FORMAT = svg
@@ -17,4 +17,5 @@ PREDEFINED = __GNUC__ \
__LITTLE_ENDIAN_BITFIELD \
__x86_64__ \
ODP_PACKED \
+ ODP_DEPRECATED_FIELD(x)=x \
"ODP_HANDLE_T(type)=odp_handle_t type"
@@ -10,6 +10,7 @@ AM_CFLAGS += -I$(top_srcdir)/include
AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include
AM_CFLAGS += -I$(top_builddir)/include
+AM_CFLAGS += -DODP_ALLOW_DEPRECATED
AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
@@ -54,7 +54,20 @@ extern "C" {
/**
* Indicate deprecated variables, functions or types
*/
+#ifdef ODP_ALLOW_DEPRECATED
#define ODP_DEPRECATED __attribute__((__deprecated__))
+#else
+#define ODP_DEPRECATED
+#endif
+
+/**
+ * Indicate deprecated field, bitfield or enum value
+ */
+#ifndef ODP_ALLOW_DEPRECATED
+#define ODP_DEPRECATED_FIELD(x) __odp_deprecated_ ## x
+#else
+#define ODP_DEPRECATED_FIELD(x) x
+#endif
/**
* Intentionally unused variables of functions
@@ -10,6 +10,7 @@ AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
AM_CFLAGS += -I$(top_builddir)/include
AM_CFLAGS += -Iinclude
AM_CFLAGS += -DSYSCONFDIR=\"@sysconfdir@\"
+AM_CFLAGS += -DODP_ALLOW_DEPRECATED
include_HEADERS = \
$(top_srcdir)/include/odp.h \