<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch release-2.4
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/dedca69317281ca46bf51cca8f98428c31ffb58f">https://github.com/macports/macports-base/commit/dedca69317281ca46bf51cca8f98428c31ffb58f</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit dedca69317281ca46bf51cca8f98428c31ffb58f
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Feb 4 19:00:09 2017 +1100
<span style='display:block; white-space:pre;color:#404040;'> Fix build on Tiger
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/53421
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit 70a2ae00947da22cea0cd7714192149d65b87a1e)
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit f267929500b941463d5b0e6b10346481c4d502bd)
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit fcdbfd4b020490f9fde475398e82906edd46f608)
</span>---
src/cregistry/sql.c | 10 ++++++++++
src/pextlib1.0/Makefile.in | 4 +++-
src/pextlib1.0/Pextlib.c | 8 +++++---
src/pextlib1.0/adv-flock.c | 7 ++++---
src/pextlib1.0/mktemp.c | 5 +++--
src/pextlib1.0/realpath.c | 1 +
src/pextlib1.0/system.c | 18 +++++++++++++++---
7 files changed, 41 insertions(+), 12 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/cregistry/sql.c b/src/cregistry/sql.c
</span><span style='display:block; white-space:pre;color:#808080;'>index d0e466c..59b7e9d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/cregistry/sql.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/cregistry/sql.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -39,6 +39,12 @@
</span> #include <tcl.h>
#include <time.h>
<span style='display:block; white-space:pre;background:#e0ffe0;'>+/*** Keep all SQL compatible with SQLite 3.1.3 as shipped with Tiger.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *** (Conditionally doing things a better way when possible based on
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *** SQLITE_VERSION_NUMBER is OK.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ***/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> /**
* Executes a null-terminated list of queries. Pass it a list of queries, it'll
* execute them. This is mainly intended for initialization, when you have a
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -387,7 +393,11 @@ int update_db(sqlite3* db, reg_error* errPtr) {
</span> /* Delete the file_binary index, since it's a low-quality index
* according to https://www.sqlite.org/queryplanner-ng.html#howtofix */
static char* version_1_201_queries[] = {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#if SQLITE_VERSION_NUMBER >= 3003000
</span> "DROP INDEX IF EXISTS registry.file_binary",
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "DROP INDEX registry.file_binary",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span> "UPDATE registry.metadata SET value = '1.201' WHERE key = 'version'",
"COMMIT",
NULL
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/Makefile.in b/src/pextlib1.0/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 47db902..6c326de 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -21,7 +21,6 @@ OBJS= \
</span> setmode.o \
sha1cmd.o \
sha256cmd.o \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- sip_copy_proc.o \
</span> strcasecmp.o \
strsed.o \
system.o \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -30,6 +29,9 @@ OBJS= \
</span> uid.o \
vercomp.o \
xinstall.o
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ifeq (@TRACEMODE_SUPPORT@,1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+OBJS+=sip_copy_proc.o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif
</span> ifneq (@ac_cv_func_strlcat@,yes)
OBJS+=strlcat.o
endif
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/Pextlib.c b/src/pextlib1.0/Pextlib.c
</span><span style='display:block; white-space:pre;color:#808080;'>index b00e68a..d5c7699 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/Pextlib.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/Pextlib.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -36,14 +36,16 @@
</span> #include <config.h>
#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-/* required for strdup(3) on Linux and OS X */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#ifndef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* required for strdup(3) on Linux */
</span> #define _XOPEN_SOURCE 600L
/* required for clearenv(3)/setenv(3)/unsetenv(3) on Linux */
#define _BSD_SOURCE
<span style='display:block; white-space:pre;background:#ffe0e0;'>-/* required for clearenv(3)/setenv(3)/unsetenv(3) on OS X */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#define _DARWIN_C_SOURCE
</span> /* required for vasprintf(3) on Linux */
#define _GNU_SOURCE
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* required for clearenv(3)/setenv(3)/unsetenv(3) on OS X */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define _DARWIN_C_SOURCE
</span>
#include <sys/resource.h>
#include <sys/types.h>
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/adv-flock.c b/src/pextlib1.0/adv-flock.c
</span><span style='display:block; white-space:pre;color:#808080;'>index d56725c..8939ff1 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/adv-flock.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/adv-flock.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -33,10 +33,11 @@
</span> #include <config.h>
#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-/* needed to get struct sigaction on some platforms */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#ifndef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* needed to get struct sigaction on some platforms, but
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ hides flock on OS X */
</span> #define _XOPEN_SOURCE 500L
<span style='display:block; white-space:pre;background:#ffe0e0;'>-/* the above hides flock on OS X without _DARWIN_C_SOURCE */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#define _DARWIN_C_SOURCE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span>
#if HAVE_SYS_FILE_H
#include <sys/file.h>
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/mktemp.c b/src/pextlib1.0/mktemp.c
</span><span style='display:block; white-space:pre;color:#808080;'>index e91f403..644779e 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/mktemp.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/mktemp.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -33,12 +33,13 @@
</span> #include <config.h>
#endif
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#ifndef __APPLE__
</span> /* required for strdup(3)/mkdtemp(3) on Linux */
<span style='display:block; white-space:pre;background:#e0ffe0;'>+/* hides mkdtemp(3) on OS X */
</span> #define _XOPEN_SOURCE 700L
/* required for mktemp(3) if _XOPEN_SOURCE >= 600L on Linux */
#define _BSD_SOURCE
<span style='display:block; white-space:pre;background:#ffe0e0;'>-/* required for mkdtemp(3) on OS X */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#define _DARWIN_C_SOURCE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span>
#include <errno.h>
#include <stdlib.h>
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/realpath.c b/src/pextlib1.0/realpath.c
</span><span style='display:block; white-space:pre;color:#808080;'>index e7ce83b..0ff5795 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/realpath.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/realpath.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -35,6 +35,7 @@
</span>
/* required for PATH_MAX and realpath(3) */
#define _XOPEN_SOURCE 500
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#define _DARWIN_C_SOURCE
</span>
#include <tcl.h>
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/system.c b/src/pextlib1.0/system.c
</span><span style='display:block; white-space:pre;color:#808080;'>index c5e74a7..22b4bb0 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/system.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/system.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -35,10 +35,11 @@
</span> #include <config.h>
#endif
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#ifndef __APPLE__
</span> /* required for fdopen(3)/seteuid(2), among others */
<span style='display:block; white-space:pre;background:#e0ffe0;'>+/* hides fgetln(3) on OS X */
</span> #define _XOPEN_SOURCE 600
<span style='display:block; white-space:pre;background:#ffe0e0;'>-/* required for fgetln(3) on OS X */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#define _DARWIN_C_SOURCE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span>
#include <tcl.h>
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -58,9 +59,12 @@
</span> #include <signal.h>
#include "system.h"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "sip_copy_proc.h"
</span> #include "Pextlib.h"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#if HAVE_TRACEMODE_SUPPORT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include "sip_copy_proc.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> #if HAVE_CRT_EXTERNS_H
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -265,13 +269,21 @@ int SystemCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Ob
</span> args[4] = "-c";
args[5] = cmdstring;
args[6] = NULL;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#if HAVE_TRACEMODE_SUPPORT
</span> sip_copy_execve(sandbox_exec_path, args, environ);
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ execve(sandbox_exec_path, args, environ);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span> } else {
args[0] = "sh";
args[1] = "-c";
args[2] = cmdstring;
args[3] = NULL;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#if HAVE_TRACEMODE_SUPPORT
</span> sip_copy_execve("/bin/sh", args, environ);
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ execve("/bin/sh", args, environ);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span> }
exit(128);
/*NOTREACHED*/
</pre><pre style='margin:0'>
</pre>