No need for stdint.h and unistd.h when building with MSVC

MSVC 2008 and lower did not provide stdint.h and unistd.h.
This patch adjusts gif.pri, accordingly. We typedef uint32_t
ourselves in gif_hash.h.

http://code.google.com/p/phantomjs/issues/detail?id=424
1.5
Alessandro Portale 2012-03-11 18:20:26 +01:00 committed by Ariya Hidayat
parent 7615582e0c
commit 5eb9d8a102
2 changed files with 6 additions and 2 deletions

View File

@ -2,10 +2,12 @@ VPATH += $$PWD
INCLUDEPATH += $$PWD
DEFINES += HAVE_CONFIG_H
DEFINES += HAVE_STDINT_H
DEFINES += HAVE_FCNTL_H
DEFINES += HAVE_UNISTD_H
DEFINES += HAVE_STDARG_H
!win32-msvc* {
DEFINES += HAVE_STDINT_H
DEFINES += HAVE_UNISTD_H
}
SOURCES += gif_err.c
SOURCES += gifalloc.c

View File

@ -17,6 +17,8 @@
/* Find a thirty-two bit int type */
#ifdef HAVE_STDINT_H
#include <stdint.h>
#else if defined(Q_CC_MSVC)
typedef unsigned __int32 uint32_t;
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>