[Mesa-dev] talloc (Was: Merge criteria for glsl2 branch)
aras at unity3d.com
Tue Aug 10 22:57:16 PDT 2010
> > No, it's missing most of the API that talloc provides. Also,
> > http://github.com/aras-p/glsl-optimizer/ ported it to windows.
> Could then Aras Pranckevicius's talloc port to windows be merged into
> glsl2 branch before glsl2 is merged into master?
First things first: I needed to make it compile & work quickly, so I just
dropped talloc.h and talloc.c into my project (
and made some fixes. So I wouldn't call it a "full port", but apparently it
was enough without taking everything that is in official talloc tarball.
However, I'm not really sure if that is "legal" license wise (talloc is
That said, the only fixes I had to do are Visual C++ specific (I'm using
- compile talloc.c as C++ (otherwise 'inline' etc. are errors on MSVC).
This required wrapping talloc.h and talloc.c in extern "C" blocks:
- vsnprintf can't be used to determine output buffer size; under MSVC
_vcsprintf has to be used instead.
- Replaced usage of MIN to TALLOC_MIN, and defined TALLOC_MIN:
accidental line of unrelated change in that commit)
Compiling on Mac with Xcode 3.2 (using gcc 4.0) required MIN->TALLOC_MIN
change and compiling as C++ with extern "C" blocks as well.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev