From 7189039d650de1417e4e580865b1e77b39e3da55 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 7 Aug 2014 15:20:17 +0200 Subject: wrap int8_t and int16_t with #ifdef to avoid possible clashes --- win32/php_stdint.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'win32/php_stdint.h') diff --git a/win32/php_stdint.h b/win32/php_stdint.h index 5df1df4777..0d63615c6b 100644 --- a/win32/php_stdint.h +++ b/win32/php_stdint.h @@ -66,8 +66,12 @@ // 7.18.1 Integer types // 7.18.1.1 Exact-width integer types +#ifndef int8_t typedef __int8 int8_t; +#endif +#ifndef int16_t typedef __int16 int16_t; +#endif #ifndef int32_t typedef __int32 int32_t; #endif -- cgit v1.2.1 From 8ee2a4a9b5de682c0b37670e1f4f86242b1650ce Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 16 Aug 2014 11:16:11 +0200 Subject: first shot on merging the core fro the int64 branch --- win32/php_stdint.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'win32/php_stdint.h') diff --git a/win32/php_stdint.h b/win32/php_stdint.h index 0d63615c6b..4e9b869483 100644 --- a/win32/php_stdint.h +++ b/win32/php_stdint.h @@ -130,6 +130,7 @@ typedef uint64_t uintmax_t; #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 // 7.18.2.1 Limits of exact-width integer types +#if _MSC_VER >= 1700 && !defined(_INTSAFE_H_INCLUDED_) #define INT8_MIN ((int8_t)_I8_MIN) #define INT8_MAX _I8_MAX #define INT16_MIN ((int16_t)_I16_MIN) @@ -142,6 +143,7 @@ typedef uint64_t uintmax_t; #define UINT16_MAX _UI16_MAX #define UINT32_MAX _UI32_MAX #define UINT64_MAX _UI64_MAX +#endif // 7.18.2.2 Limits of minimum-width integer types #define INT_LEAST8_MIN INT8_MIN -- cgit v1.2.1 From 713e9a7eaa8344061aad0883829c42a651691c34 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 21 Aug 2014 09:08:44 +0200 Subject: avoid clash when stdint.h was included after win32/php_stdint.h --- win32/php_stdint.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'win32/php_stdint.h') diff --git a/win32/php_stdint.h b/win32/php_stdint.h index 0d63615c6b..cb5ad17061 100644 --- a/win32/php_stdint.h +++ b/win32/php_stdint.h @@ -36,6 +36,10 @@ #ifndef _MSC_STDINT_H_ // [ #define _MSC_STDINT_H_ +#ifndef _STDINT +# define _STDINT +#endif + #if _MSC_VER > 1000 #pragma once #endif -- cgit v1.2.1 From 1c252d5dd4c0499ae58b2a7bdef0118c93c587ec Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 28 Aug 2014 13:07:47 +0200 Subject: use stddef.h definitions for uintptr_t and intptr_t --- win32/php_stdint.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'win32/php_stdint.h') diff --git a/win32/php_stdint.h b/win32/php_stdint.h index 858dcb5c33..71aec2a358 100644 --- a/win32/php_stdint.h +++ b/win32/php_stdint.h @@ -116,13 +116,8 @@ typedef uint32_t u_int32_t; typedef uint64_t uint_fast64_t; // 7.18.1.4 Integer types capable of holding object pointers -#ifdef _WIN64 // [ - typedef __int64 intptr_t; - typedef unsigned __int64 uintptr_t; -#else // _WIN64 ][ - typedef _W64 int intptr_t; - typedef _W64 unsigned int uintptr_t; -#endif // _WIN64 ] +/* intptr_t and uintptr_t are available from stddef.h */ +#include // 7.18.1.5 Greatest-width integer types typedef int64_t intmax_t; -- cgit v1.2.1