From c1754064b46152da6519aba42ce909ccea2d94b1 Mon Sep 17 00:00:00 2001 From: Guilherme Goncalves Date: Thu, 18 Dec 2014 15:01:21 +0900 Subject: [PATCH] Bug 1112566 - Add a isblank definition for MSVC < 2013. r=glandium --- ...d-a-isblank-definition-for-MSVC-2013.patch | 30 +++++++++++++++++++ .../internal/jemalloc_internal_decls.h | 7 +++++ memory/jemalloc/update.sh | 1 + 3 files changed, 38 insertions(+) create mode 100644 memory/jemalloc/0003-Add-a-isblank-definition-for-MSVC-2013.patch diff --git a/memory/jemalloc/0003-Add-a-isblank-definition-for-MSVC-2013.patch b/memory/jemalloc/0003-Add-a-isblank-definition-for-MSVC-2013.patch new file mode 100644 index 00000000000..6b75dd367ba --- /dev/null +++ b/memory/jemalloc/0003-Add-a-isblank-definition-for-MSVC-2013.patch @@ -0,0 +1,30 @@ +From 4dd4193c59ff3f77e4ab36214ec63425ca834323 Mon Sep 17 00:00:00 2001 +From: Guilherme Goncalves +Date: Thu, 18 Dec 2014 15:01:21 +0900 +Subject: [PATCH] Add a isblank definition for MSVC < 2013 + +--- + include/jemalloc/internal/jemalloc_internal_decls.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/include/jemalloc/internal/jemalloc_internal_decls.h b/include/jemalloc/internal/jemalloc_internal_decls.h +index fb2effb..65f2e4b 100644 +--- a/include/jemalloc/internal/jemalloc_internal_decls.h ++++ b/include/jemalloc/internal/jemalloc_internal_decls.h +@@ -52,6 +52,13 @@ typedef intptr_t ssize_t; + # define __func__ __FUNCTION__ + /* Disable warnings about deprecated system functions. */ + # pragma warning(disable: 4996) ++#if _MSC_VER < 1800 ++static int ++isblank(int c) ++{ ++ return (c == '\t' || c == ' '); ++} ++#endif + #else + # include + #endif +-- +2.1.3 + diff --git a/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal_decls.h b/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal_decls.h index fb2effbf2a8..65f2e4bfe70 100644 --- a/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal_decls.h +++ b/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal_decls.h @@ -52,6 +52,13 @@ typedef intptr_t ssize_t; # define __func__ __FUNCTION__ /* Disable warnings about deprecated system functions. */ # pragma warning(disable: 4996) +#if _MSC_VER < 1800 +static int +isblank(int c) +{ + return (c == '\t' || c == ' '); +} +#endif #else # include #endif diff --git a/memory/jemalloc/update.sh b/memory/jemalloc/update.sh index 73ca408a732..7b2ae74b4ae 100755 --- a/memory/jemalloc/update.sh +++ b/memory/jemalloc/update.sh @@ -16,6 +16,7 @@ rm -rf .git .gitignore .gitattributes autom4te.cache .autom4te.cfg patch -p1 < ../0001-Dont-overwrite-VERSION-on-a-git-repository.patch patch -p1 < ../0002-Move-variable-declaration-to-the-top-its-block-for-M.patch +patch -p1 < ../0003-Add-a-isblank-definition-for-MSVC-2013.patch cd .. hg addremove -q src