It's going to be slightly more complex -- that global function will need a
mutex, and will still be a bit error prone because there's no guarantee
it's getting the right error, if there are multiple GIF files being read
simultaneously.

But let me ask a more basic question: do you actually need GIF support,
with only libgif 4, or are you just trying to get a clean compile and the
build system is confused because it sees your system's libgif?  If you are
just after a clean compile and don't need GIF support, then it's a simple
matter of having the build system ensure that it only builds GIF support if
libgif is found AND it's version 5 or above.




On Thu, Oct 10, 2013 at 3:15 AM, Ben De Luca <[email protected]> wrote:

> We need the ifdef
>
> void
> GIFInput::report_last_error (void)
> {
> #if GIFLIB_MAJOR >= 5
>     error (GifErrorString (m_gif_file->Error));
> #else
>     GifLastError();
> #endif
> }
>
>
>
>
> On Wed, Oct 9, 2013 at 7:46 PM, Larry Gritz <[email protected]> wrote:
>
>> Will GifLastError() work for both libgif 4.1 as well as 5?  Or do we need
>> some kind of #ifdef switch?
>>
>>
>> On Oct 9, 2013, at 3:03 AM, Ben De Luca wrote:
>>
>> > Hey,
>> >     trying to compile oiio against libgiff 4.1 ( system provided)
>> >
>> > compilation fails like
>> > /mnt/homes/bdeluca/src/oiio/oiio/src/gif.imageio/gifinput.cpp: In
>> member function ‘void OpenImageIO::v1_3::GIFInput::report_last_error()’:
>> > /mnt/homes/bdeluca/src/oiio/oiio/src/gif.imageio/gifinput.cpp:476:27:
>> error: ‘GifErrorString’ was not declared in this scope
>> >
>> >
>> > GifErrorString seems to be part of libgiff 5
>> >
>> > changing it too
>> > GifLastError();
>> > probably does some thing closer to what we want.
>> >
>> >
>>
>> --
>> Larry Gritz
>> [email protected]
>>
>>
>> _______________________________________________
>> Oiio-dev mailing list
>> [email protected]
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>>
>
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
>


-- 
Larry Gritz
[email protected]
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to