[asterisk-dev] [asterisk-commits] rizzo: trunk r89426 - in /trunk: include/ include/asterisk/ utils/

Luigi Rizzo rizzo at icir.org
Mon Nov 19 15:36:30 CST 2007

On Mon, Nov 19, 2007 at 03:25:04PM -0600, Kevin P. Fleming wrote:
> SVN commits to the Asterisk project wrote:
> > +/*! \brief
> > + * Definition of various structures that many asterisk files need,
> > + * but only because they need to know that the type exists.
> > + *
> > + * We can move them to a different global header if necessary.
> > + */
> > +struct ast_channel;
> > +struct ast_frame;
> > +struct ast_module;
> > +
> >  #endif
> Two of these three were already *in* a different global header, one that
> pretty much every module needs to include anyway (asterisk.h). I think
> it makes much more sense to leave them there and just move the one that
> was missing...

Probably yes, at least in the long term. But right now, i needed something that
worked also for files that only included asterisk/compat.h .

The thing is, asterisk.h has quite a bit more than what is strictly
necessary for generic applications/modules/etc, and some of the
files in utils/ only include asterisk/compat.h
Probably in the long term it is a good idea to remove the unnecessary
stuff (i am thinking of the init_*() functions, etc.) somewhere else
and have "asterisk.h" as the main include file (with these struct
put back in).


More information about the asterisk-dev mailing list