<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch release-2.6
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/23be03c2e16cdbf1952066ef9f865c482fbc8e3f">https://github.com/macports/macports-base/commit/23be03c2e16cdbf1952066ef9f865c482fbc8e3f</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 23be03c2e16cdbf1952066ef9f865c482fbc8e3f
</span>Author: Toby Peterson <toby@apple.com>
AuthorDate: Mon Jun 22 15:54:47 2020 -0700
<span style='display:block; white-space:pre;color:#404040;'> rev-upgrade: For libraries that exist only in the shared cache, warn but do not fail.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit 1ac9a684462c15f33fd4d58229f8de62a0f63856)
</span>---
src/machista1.0/libmachista.c | 6 ++++++
src/machista1.0/libmachista.h | 1 +
src/machista1.0/machista.i | 3 +++
src/machista1.0/machista_wrap.c | 1 +
4 files changed, 11 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/machista1.0/libmachista.c b/src/machista1.0/libmachista.c
</span><span style='display:block; white-space:pre;color:#808080;'>index c18d6552..7dddce21 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/machista1.0/libmachista.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/machista1.0/libmachista.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -56,6 +56,8 @@
</span> #include <mach-o/loader.h>
#include <libkern/OSByteOrder.h>
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include <dlfcn.h>
</span> #endif
#include "libmachista.h"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -465,6 +467,9 @@ int macho_parse_file(macho_handle_t *handle, const char *filepath, const macho_t
</span>
/* Open input file */
if ((fd = open(filepath, O_RDONLY)) < 0) {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (dlopen_preflight(filepath)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return MACHO_ECACHE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> return MACHO_EFILE;
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -559,6 +564,7 @@ const char *macho_strerror(int err) {
</span> /* 0x04 */ "Error allocating memory",
/* 0x08 */ "Premature end of data, possibly corrupt file",
/* 0x10 */ "Not a Mach-O file",
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* 0x20 */ "Shared cache only",
</span> };
return errors[num];
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/machista1.0/libmachista.h b/src/machista1.0/libmachista.h
</span><span style='display:block; white-space:pre;color:#808080;'>index de031177..3fae942a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/machista1.0/libmachista.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/machista1.0/libmachista.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -50,6 +50,7 @@ typedef int cpu_type_t;
</span> #define MACHO_EMEM (0x04)
#define MACHO_ERANGE (0x08)
#define MACHO_EMAGIC (0x10)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#define MACHO_ECACHE (0x20)
</span>
/* Blind structure; this essentially contains the hash map used to cache
* entries, but users should not have to look into this structure. struct
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/machista1.0/machista.i b/src/machista1.0/machista.i
</span><span style='display:block; white-space:pre;color:#808080;'>index fdc8c87d..35204f53 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/machista1.0/machista.i
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/machista1.0/machista.i
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -34,6 +34,9 @@
</span> %rename(EMAGIC) MACHO_EMAGIC;
#define MACHO_EMAGIC (0x10)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+%rename(ECACHE) MACHO_ECACHE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define MACHO_ECACHE (0x20)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> typedef unsigned int uint32_t;
typedef int cpu_type_t;
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/machista1.0/machista_wrap.c b/src/machista1.0/machista_wrap.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 23114944..eb04b779 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/machista1.0/machista_wrap.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/machista1.0/machista_wrap.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2734,6 +2734,7 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
</span> SWIG_Tcl_SetConstantObj(interp, "machista::EMEM", SWIG_From_int((int)((0x04))));
SWIG_Tcl_SetConstantObj(interp, "machista::ERANGE", SWIG_From_int((int)((0x08))));
SWIG_Tcl_SetConstantObj(interp, "machista::EMAGIC", SWIG_From_int((int)((0x10))));
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ SWIG_Tcl_SetConstantObj(interp, "machista::ECACHE", SWIG_From_int((int)((0x20))));
</span> return TCL_OK;
}
SWIGEXPORT int Machista_SafeInit(Tcl_Interp *interp) {
</pre><pre style='margin:0'>
</pre>