mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
hhvm: use upstream patches to fix the build
(cherry picked from commit b7894032b4
)
Signed-off-by: Domen Kožar <domen@dev.si>
This commit is contained in:
parent
5c405a8152
commit
f4bde46b0f
@ -0,0 +1,40 @@
|
||||
From 3918a2ccceb98230ff517601ad60aa6bee36e2c4 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Malyshev <alexanderm@fb.com>
|
||||
Date: Tue, 28 Oct 2014 15:55:34 -0700
|
||||
Subject: [PATCH] Replace use of MAX macro with std::max in ZendPack
|
||||
|
||||
Summary: This has randomly bitten me in open source builds. I intermittently get
|
||||
an error saying that MAX isn't defined.
|
||||
|
||||
Instead of trying to figure out what's going on, I'm just gonna switch
|
||||
it to std::max.
|
||||
|
||||
Reviewed By: @paulbiss
|
||||
|
||||
Differential Revision: D1636740
|
||||
---
|
||||
hphp/runtime/base/zend-pack.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hphp/runtime/base/zend-pack.cpp b/hphp/runtime/base/zend-pack.cpp
|
||||
index d878ea4..c3ee14d 100644
|
||||
--- a/hphp/runtime/base/zend-pack.cpp
|
||||
+++ b/hphp/runtime/base/zend-pack.cpp
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "hphp/runtime/base/builtin-functions.h"
|
||||
#include "hphp/util/tiny-vector.h"
|
||||
|
||||
+#include <algorithm>
|
||||
+
|
||||
namespace HPHP {
|
||||
|
||||
#define INC_OUTPUTPOS(a,b) \
|
||||
@@ -294,7 +296,7 @@ Variant ZendPack::pack(const String& fmt, const Array& argv) {
|
||||
case 'a':
|
||||
case 'A':
|
||||
case 'Z': {
|
||||
- int arg_cp = (code != 'Z') ? arg : MAX(0, arg - 1);
|
||||
+ int arg_cp = (code != 'Z') ? arg : std::max(0, arg - 1);
|
||||
memset(&output[outputpos], (code != 'A') ? '\0' : ' ', arg);
|
||||
val = argv[currentarg++].toString();
|
||||
s = val.c_str();
|
@ -0,0 +1,40 @@
|
||||
From 8207a31c26cc42fee79363a14c4a8f4fcbfffe63 Mon Sep 17 00:00:00 2001
|
||||
From: Jordan DeLong <jdelong@fb.com>
|
||||
Date: Mon, 6 Oct 2014 18:30:28 -0700
|
||||
Subject: [PATCH] Remove some MIN/MAX macro uses in the emitter
|
||||
|
||||
Summary: <algorithm> has preferable type-safe versions that don't double-eval
|
||||
their args.
|
||||
|
||||
Reviewed By: @paulbiss
|
||||
|
||||
Differential Revision: D1599803
|
||||
---
|
||||
hphp/compiler/analysis/emitter.cpp | 6 +++---
|
||||
hphp/util/compatibility.h | 4 ----
|
||||
2 files changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/hphp/compiler/analysis/emitter.cpp b/hphp/compiler/analysis/emitter.cpp
|
||||
index 321e637..b1d3f2d 100644
|
||||
--- a/hphp/compiler/analysis/emitter.cpp
|
||||
+++ b/hphp/compiler/analysis/emitter.cpp
|
||||
@@ -799,8 +799,8 @@ void SymbolicStack::push(char sym) {
|
||||
if (sym != StackSym::W && sym != StackSym::K && sym != StackSym::L &&
|
||||
sym != StackSym::T && sym != StackSym::I && sym != StackSym::H) {
|
||||
m_actualStack.push_back(m_symStack.size());
|
||||
- *m_actualStackHighWaterPtr = MAX(*m_actualStackHighWaterPtr,
|
||||
- (int)m_actualStack.size());
|
||||
+ *m_actualStackHighWaterPtr = std::max(*m_actualStackHighWaterPtr,
|
||||
+ (int)m_actualStack.size());
|
||||
}
|
||||
m_symStack.push_back(SymEntry(sym));
|
||||
}
|
||||
@@ -1010,7 +1010,7 @@ int SymbolicStack::sizeActual() const {
|
||||
|
||||
void SymbolicStack::pushFDesc() {
|
||||
m_fdescCount += kNumActRecCells;
|
||||
- *m_fdescHighWaterPtr = MAX(*m_fdescHighWaterPtr, m_fdescCount);
|
||||
+ *m_fdescHighWaterPtr = std::max(*m_fdescHighWaterPtr, m_fdescCount);
|
||||
}
|
||||
|
||||
void SymbolicStack::popFDesc() {
|
@ -17,6 +17,11 @@ stdenv.mkDerivation rec {
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./3918a2ccceb98230ff517601ad60aa6bee36e2c4.patch
|
||||
./8207a31c26cc42fee79363a14c4a8f4fcbfffe63.patch
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[ cmake pkgconfig boost libunwind mariadb libmemcached pcre gdb
|
||||
libevent gd curl libxml2 icu flex bison openssl zlib php expat libcap
|
||||
|
Loading…
Reference in New Issue
Block a user