Menu

#129 The latest version of giflib-5.1.8 cannot be build on windows

v1.0_(example)
closed
nobody
None
1
2019-11-21
2019-03-20
mrserb
No

The latest version of giflib-5.1.8 cannot be build on windows.
The reason is the usage of "#include <unistd.h>" in the:
giflib/gif_hash.h
giflib/dgif_lib.c</unistd.h>

I guess in the "giflib/gif_hash.h" the "<unistd.h>" is not needed and can be removed.
And in the "giflib/dgif_lib.c" it should be guarded in the same way as in 5.1.4:</unistd.h>

ifdef _WIN32

include <io.h></io.h>

else

include <unistd.h></unistd.h>

endif / _WIN32 /

Discussion

  • mrserb

    mrserb - 2019-03-20

    I found that for giflib 5.1.4 I had a separate old patch which workaround this bug. So it seems the bug is not specific to 5.1.8 but a general issue with building of giflib on windows(without cygwin or mingw)

     
  • Eric S. Raymond

    Eric S. Raymond - 2019-03-28
    • status: open --> closed
     
  • Eric S. Raymond

    Eric S. Raymond - 2019-03-28

    Fix pushed. I'll ship a 5.1.9 soon.

     
  • Ashwini Kalokhe

    Ashwini Kalokhe - 2019-06-02

    Even giftool.c isnt compiling on windows.. here is a patch

    --- giflib-5.1.9/giftool.c
    +++ giflib-5.1.9/giftool.c
    @@ -10,7 +10,7 @@ giftool.c - GIF transformation tool.
    #include <fcntl.h>
    #include <stdbool.h></stdbool.h></fcntl.h>

    -#include "getopt.h"
    +//#include "getopt.h"
    #include "getarg.h"
    #include "gif_lib.h"

     

    Last edit: Ashwini Kalokhe 2019-06-02
  • mrserb

    mrserb - 2019-11-21

    Note that the fix did not drop/wrap the usage of "<unistd.h>" in the "giflib/gif_hash.h".</unistd.h>

     

Log in to post a comment.

MongoDB Logo MongoDB