MSVC compatibility changes

- Decorate public function with __declspec(allocator) and __declspec(restrict), just like MSVC 1900
- Support JEMALLOC_HAS_RESTRICT by defining the restrict keyword
- Move __declspec(nothrow) between 'void' and '*' so it compiles once more
This commit is contained in:
Matthijs
2015-07-27 22:48:27 +02:00
committed by Jason Evans
parent b49a334a64
commit c1a6a51e40
4 changed files with 45 additions and 16 deletions

View File

@@ -43,6 +43,9 @@ typedef intptr_t ssize_t;
# define PATH_MAX 1024
# define STDERR_FILENO 2
# define __func__ __FUNCTION__
# ifdef JEMALLOC_HAS_RESTRICT
# define restrict __restrict
# endif
/* Disable warnings about deprecated system functions. */
# pragma warning(disable: 4996)
#if _MSC_VER < 1800