#endif
if (fd < 0)
return 0;
#ifdef GIFLIB_MAJOR >= 5
gif = DGifOpenFileHandle(fd, NULL);
#else
gif = DGifOpenFileHandle(fd);
if (!gif)
{
close(fd);