[Speex-dev] os_support.h, libc overrides

Jim Crichton jim.crichton at comcast.net
Tue Nov 6 10:35:11 PST 2007


> That reminds me that I've just moved lots of stuff around with the
> allocation functions. Can you check that the TI stuff still works with
> that? In the end, it'll probably make things easier for you now. For
> example, if you link statically, wideband should be automatically left
> out if unused. Also, all the libc stuff is now in os_support.h, which is
> less messy than misc.h/misc.c were.

The TI C64x build produces bit-exact results with build 12825 (April 2007, a 
bit before 1.2beta2).  The C54x and C55x builds did not work because the 
manual allocation scheme was broken when misc.c was removed.

The old override mechanism was:

1.  Define USER_MISC in config.h
2.  In, misc.c, include user_misc.h if USER_MISC is defined
3.  Put the allocation override code in user_misc.h.

The result is that the override code is included in one source file 
(misc.c), so there are no duplicate definitions.  How would you like to see 
this implemented under the current structure?  Including the override 
functions in os_support.h does not work unless the overrides are also static 
inlines (otherwise duplicate definitions occur).  For code size efficiency, 
it would be nice if these functions were not required to be static inline.

The function prototypes were removed from misc.h, so now they are defined 
nowhere when overrides are defined.  There is no way around that without 
some change to the source.

What do you think?

- Jim 

More information about the Speex-dev mailing list