diff options
author | Chris Tankersley <chris@ctankersley.com> | 2014-10-02 11:05:31 -0700 |
---|---|---|
committer | Chris Tankersley <chris@ctankersley.com> | 2014-11-05 18:00:09 -0500 |
commit | 6b0eca060f4e4885b4484ef9b16abf984da245d4 (patch) | |
tree | 25c866109901298b76a390d313d50fe33d68b362 /win32/php_stdint.h | |
parent | e24c24c1087c6405e842fdd7afcd84b224eb75bf (diff) | |
download | php-git-6b0eca060f4e4885b4484ef9b16abf984da245d4.tar.gz |
Various fixes to allow support for new VS2014 features
- Added some typeof checks to handle JS errors introduced in VS2014
- Added VS2014 to the list of compilers
- Changed to use stdint.h if we are using VS2014 or higher
- Skip defining timespec if we're using VS2014 or higher
- Moved u_char typedef out to always be defined regardless of VS version
Diffstat (limited to 'win32/php_stdint.h')
-rw-r--r-- | win32/php_stdint.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/win32/php_stdint.h b/win32/php_stdint.h index 71aec2a358..d5b90ebe26 100644 --- a/win32/php_stdint.h +++ b/win32/php_stdint.h @@ -33,6 +33,10 @@ #error "Use this header only with Microsoft Visual C++ compilers!" #endif // _MSC_VER ] +// Starting with VS2014, many of the C11 features are now included, so we only +// need many of these typedefs and defines for older VS suites +#if _MSC_VER < 1900 + #ifndef _MSC_STDINT_H_ // [ #define _MSC_STDINT_H_ @@ -85,9 +89,6 @@ typedef __int64 int64_t; #ifndef uint8_t typedef unsigned __int8 uint8_t; #endif -#ifndef u_char -typedef unsigned __int8 u_char; -#endif typedef unsigned __int16 uint16_t; #ifndef uint32_t typedef unsigned __int32 uint32_t; @@ -254,3 +255,11 @@ static __inline int64_t llabs(int64_t i) #endif // _MSC_STDINT_H_ ] + +#else +#include <stdint.h> +#endif + +#ifndef u_char +typedef unsigned __int8 u_char; +#endif |