> > +/**
> > + * Deprecated API definitions
> > + *
> > + * Some API definitions may be deprecated by this or a previous API
> version.
> > + * This macro controls if those are enabled (and visible to the
> application)
> > + * or disabled.
> > + *
> > + * * 0: Deprecated API definitions are disabled
> > + * * 1: Deprecated API definitions are enabled
> > + */
> > +#define ODP_DEPRECATED @ODP_DEPRECATED@
> 
> I am confused here because this turns a compiler dependency into a
> build system + compiler dependency.
> 
> Lots of libraries choose to use Autotools as a build system, but it's
> unnatural
> to require API header files like odp.h to also use Autotools.  Anyone can
> grab
> these API header files and: include them in their application to use ODP,
> to
> create stubs for an ODP implementation, and most importantly they should
> be usable with any build system (Makefile, Autotools, CMake, ninja...).

See version.h.in, it has the same design. Implementations can generate 
version.h/deprecated.h in various ways.


> 
> The original problem stated here is that the current code for the
> deprecated
> macro requires the use of GCC.  The fix, or the way to address
> portability, can
> simply be to conditionally compile different code for different compilers:

The original problem is to reliably remove deprecated API defienes/types/struct 
fields/function calls/etc from application, and all unnecessary code from an 
implementation. GCC __attribute__ is not suitable for all that.


-Petri

Reply via email to