aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Allen <[email protected]>2017-10-02 21:03:14 -0500
committerMark Allen <[email protected]>2017-10-02 21:03:14 -0500
commit710bef6e1ace89f566e9ccb28715302bb43bf09c (patch)
tree0ff7f0d7020ee58a01f7aeb9908b2fa41a6a00ce
parent426f34c49f4cd7975a68ccb49db1a487b0a1876f (diff)
parent6c06e60016cbf3990e6a40ab89c06fabb2635084 (diff)
downloadkerl-710bef6e1ace89f566e9ccb28715302bb43bf09c.tar.gz
kerl-710bef6e1ace89f566e9ccb28715302bb43bf09c.tar.bz2
kerl-710bef6e1ace89f566e9ccb28715302bb43bf09c.zip
Merge remote-tracking branch 'origin/wx_fixes' into high_sierra_flag
-rwxr-xr-xkerl63
1 files changed, 63 insertions, 0 deletions
diff --git a/kerl b/kerl
index a926d4a..3f4671d 100755
--- a/kerl
+++ b/kerl
@@ -500,9 +500,15 @@ maybe_patch_all()
maybe_patch_darwin()
{
+ # Reminder: $1 = OTP release version
if [ "$1" -le 14 ]; then
CFLAGS="-DERTS_DO_INCL_GLB_INLINE_FUNC_DEF"
apply_darwin_compiler_patch >> "$LOGFILE"
+ elif [ "$1" -eq 16 ]; then
+ # TODO: Maybe check if clang version == 9
+ apply_r16_wx_ptr_patch >> "$LOGFILE"
+ elif [ "$1" -ge 17 -a "$1" -le 19 ]; then
+ apply_wx_ptr_patch >> "$LOGFILE"
fi
}
@@ -1514,6 +1520,63 @@ apply_r15_beam_makeops_patch()
_END_PATCH
}
+#https://github.com/erlang/otp/commit/a64c4d806fa54848c35632114585ad82b98712e8.diff
+apply_wx_ptr_patch()
+{
+ patch -p1 <<'_END_PATCH'
+diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp
+index 0d2da5d4a79..8118136d30e 100644
+--- a/lib/wx/c_src/wxe_impl.cpp
++++ b/lib/wx/c_src/wxe_impl.cpp
+@@ -666,7 +666,7 @@ void * WxeApp::getPtr(char * bp, wxeMemEnv *memenv) {
+ throw wxe_badarg(index);
+ }
+ void * temp = memenv->ref2ptr[index];
+- if((index < memenv->next) && ((index == 0) || (temp > NULL)))
++ if((index < memenv->next) && ((index == 0) || (temp != (void *)NULL)))
+ return temp;
+ else {
+ throw wxe_badarg(index);
+@@ -678,7 +678,7 @@ void WxeApp::registerPid(char * bp, ErlDrvTermData pid, wxeMemEnv * memenv) {
+ if(!memenv)
+ throw wxe_badarg(index);
+ void * temp = memenv->ref2ptr[index];
+- if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
++ if((index < memenv->next) && ((index == 0) || (temp != (void *) NULL))) {
+ ptrMap::iterator it;
+ it = ptr2ref.find(temp);
+ if(it != ptr2ref.end()) {
+_END_PATCH
+}
+
+apply_r16_wx_ptr_patch()
+{
+ patch -p1 <<'_END_PATCH'
+diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp
+index cc9bcc995..1b1912630 100644
+--- a/lib/wx/c_src/wxe_impl.cpp
++++ b/lib/wx/c_src/wxe_impl.cpp
+@@ -757,7 +757,7 @@ void * WxeApp::getPtr(char * bp, wxeMemEnv *memenv) {
+ throw wxe_badarg(index);
+ }
+ void * temp = memenv->ref2ptr[index];
+- if((index < memenv->next) && ((index == 0) || (temp > NULL)))
++ if((index < memenv->next) && ((index == 0) || (temp != (void *)NULL)))
+ return temp;
+ else {
+ throw wxe_badarg(index);
+@@ -769,7 +769,7 @@ void WxeApp::registerPid(char * bp, ErlDrvTermData pid, wxeMemEnv * memenv) {
+ if(!memenv)
+ throw wxe_badarg(index);
+ void * temp = memenv->ref2ptr[index];
+- if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
++ if((index < memenv->next) && ((index == 0) || (temp != (void *)NULL))) {
+ ptrMap::iterator it;
+ it = ptr2ref.find(temp);
+ if(it != ptr2ref.end()) {
+_END_PATCH
+}
+
case "$1" in
version)
echo "$KERL_VERSION"