Check if stdint has been included before trying to declare int variants. Needed for mod_v8 build in Windows

This commit is contained in:
Peter Olsson 2014-01-14 09:27:56 +01:00
parent 275d8f882f
commit 5f7b00fb69
1 changed files with 2 additions and 0 deletions

View File

@ -77,6 +77,7 @@ typedef unsigned long in_addr_t;
#include <winsock2.h> #include <winsock2.h>
#include <windows.h> #include <windows.h>
typedef SOCKET stfu_socket_t; typedef SOCKET stfu_socket_t;
#ifndef _STDINT
typedef unsigned __int64 uint64_t; typedef unsigned __int64 uint64_t;
typedef unsigned __int32 uint32_t; typedef unsigned __int32 uint32_t;
typedef unsigned __int16 uint16_t; typedef unsigned __int16 uint16_t;
@ -85,6 +86,7 @@ typedef __int64 int64_t;
typedef __int32 int32_t; typedef __int32 int32_t;
typedef __int16 int16_t; typedef __int16 int16_t;
typedef __int8 int8_t; typedef __int8 int8_t;
#endif
typedef intptr_t stfu_ssize_t; typedef intptr_t stfu_ssize_t;
typedef int stfu_filehandle_t; typedef int stfu_filehandle_t;
#define STFU_SOCK_INVALID INVALID_SOCKET #define STFU_SOCK_INVALID INVALID_SOCKET