ecere/bitmaps/gif: Work around for stdbool.h issue and extra parameter for newer...
authorJerome St-Louis <jerome@ecere.com>
Tue, 22 Oct 2013 12:57:51 +0000 (08:57 -0400)
committerJerome St-Louis <jerome@ecere.com>
Tue, 22 Oct 2013 12:57:51 +0000 (08:57 -0400)
ecere/src/gfx/bitmaps/GIFFormat.ec

index 1998597..6ed1c04 100644 (file)
@@ -1,6 +1,8 @@
 namespace gfx::bitmaps;
 
+#define bool _bool
 #include "gif_lib.h"
+#undef bool
 
 import "Display"
 
@@ -26,7 +28,11 @@ class GIFFormat : BitmapFormat
    {
       bool result = false;
 
+#if GIFLIB_MAJOR > 5
+      GifFileType * gifFile = DGifOpen(f, ReadData, null);
+#else
       GifFileType * gifFile = DGifOpen(f, ReadData);
+#endif
       if(gifFile)
       {
          DGifSlurp(gifFile);