How does this look, Ben?
https://github.com/OpenImageIO/oiio/pull/695
If you could pull that and give it a spin, let me know if it works for you,
that would be much appreciated.
-- lg
On Oct 11, 2013, at 10:59 AM, Larry Gritz wrote:
> It's slightlier tricker than I thought.
>
> My machine has giflib 4.2, and it seems fine with the code as-is. Testing
> for major >= 5 seems overkill.
>
> I will propose an alternate solution, stay tuned.
>
>
>
> On Oct 10, 2013, at 9:52 AM, Ben De Luca wrote:
>
>> Hi Larry,
>> I dont need the support, I was just trying to compile and I thought I
>> would point it out.
>>
>>
>> On Thu, Oct 10, 2013 at 5:18 PM, Larry Gritz <[email protected]> wrote:
>> 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