com php-src: fix macros conflicts when included intsafe.h: ext/com_dotnet/com_extension.c ext/com_dotnet/com_m isc.c win32/php_stdint.h
| From: | Anatol Belski | Date: | Fri, 27 Dec 2013 16:32:46 +0000 |
| Subject: | com php-src: fix macros conflicts when included intsafe.h: ext/com_dotnet/com_extension.c ext/com_dotnet/com_m isc.c win32/php_stdint.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75482@lists.php.net to get a copy of this message | ||
Commit: 173bd989cdbb29d17f34c584269002ec8b247fe2
Author: Anatol Belski <ab@php.net> Fri, 27 Dec 2013 17:32:46 +0100
Parents: d0ab1e4ea456ba1eb6b70fdf30123b6faed890a1
Branches: str_size_and_int64
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=173bd989cdbb29d17f34c584269002ec8b247fe2
Log:
fix macros conflicts when included intsafe.h
Changed paths:
M ext/com_dotnet/com_extension.c
M ext/com_dotnet/com_misc.c
M win32/php_stdint.h
Diff:
diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c
index 0c7e214..631287c 100644
--- a/ext/com_dotnet/com_extension.c
+++ b/ext/com_dotnet/com_extension.c
@@ -22,6 +22,8 @@
#include "config.h"
#endif
+#include <intsafe.h>
+
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
@@ -29,8 +31,6 @@
#include "php_com_dotnet_internal.h"
#include "Zend/zend_exceptions.h"
-#include <intsafe.h>
-
ZEND_DECLARE_MODULE_GLOBALS(com_dotnet)
static PHP_GINIT_FUNCTION(com_dotnet);
diff --git a/ext/com_dotnet/com_misc.c b/ext/com_dotnet/com_misc.c
index a133cf6..cf37f24 100644
--- a/ext/com_dotnet/com_misc.c
+++ b/ext/com_dotnet/com_misc.c
@@ -22,6 +22,8 @@
#include "config.h"
#endif
+#include <intsafe.h>
+
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
@@ -29,8 +31,6 @@
#include "php_com_dotnet_internal.h"
#include "Zend/zend_exceptions.h"
-#include <intsafe.h>
-
void php_com_throw_exception(HRESULT code, char *message TSRMLS_DC)
{
int free_msg = 0;
diff --git a/win32/php_stdint.h b/win32/php_stdint.h
index 5df1df4..1c5b83a 100644
--- a/win32/php_stdint.h
+++ b/win32/php_stdint.h
@@ -126,6 +126,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)
@@ -138,6 +139,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