Bug 1112566 - Add a isblank definition for MSVC < 2013. r=glandium

This commit is contained in:
Guilherme Goncalves 2014-12-18 15:01:21 +09:00 коммит произвёл Mike Hommey
Родитель aa02623d99
Коммит c41a18c8d2
3 изменённых файлов: 38 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,30 @@
From 4dd4193c59ff3f77e4ab36214ec63425ca834323 Mon Sep 17 00:00:00 2001
From: Guilherme Goncalves <guilherme.p.gonc@gmail.com>
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 <unistd.h>
#endif
--
2.1.3

Просмотреть файл

@ -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 <unistd.h>
#endif

Просмотреть файл

@ -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