<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-legacy-support.
</pre>
<p><a href="https://github.com/macports/macports-legacy-support/commit/bcf07c4875bbc1ee44d0bb26a2eb2365b63c8dac">https://github.com/macports/macports-legacy-support/commit/bcf07c4875bbc1ee44d0bb26a2eb2365b63c8dac</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit bcf07c4875bbc1ee44d0bb26a2eb2365b63c8dac
</span>Author: Fred Wright <fw@fwright.net>
AuthorDate: Sat Jul 20 15:39:47 2024 -0700
<span style='display:block; white-space:pre;color:#404040;'> Add SLIST_REMOVE_AFTER, SLIST_HEAD_INITIALIZER
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Several other queue macros are also missing, which is not covered by
</span><span style='display:block; white-space:pre;color:#404040;'> this commit.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/69890
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> TESTED:
</span><span style='display:block; white-space:pre;color:#404040;'> Builds and passes tests on all platforms, including the new tests for
</span><span style='display:block; white-space:pre;color:#404040;'> the new macros.
</span>---
README.md | 10 +++++++++-
include/MacportsLegacySupport.h | 10 ++++++++--
include/sys/queue.h | 23 ++++++++++++++++++++++-
3 files changed, 39 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/README.md b/README.md
</span><span style='display:block; white-space:pre;color:#808080;'>index 6f717a0..bb98225 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/README.md
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/README.md
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -148,7 +148,15 @@ Wrapped headers and replaced functions are:
</span> <td>OSX10.10</td>
</tr>
<tr>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <td><code>sys/queue.h</code></td>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <td rowspan="3"><code>sys/queue.h</code></td>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <td>Adds <code>SLIST_HEAD_INITIALIZER</code> macro</td>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <td>OSX10.4</td>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </tr>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <tr>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <td>Adds <code>SLIST_REMOVE_AFTER</code> macro</td>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <td>OSX10.6</td>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </tr>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <tr>
</span> <td>Adds <code>STAILQ_FOREACH</code> macro</td>
<td>OSX10.4</td>
</tr>
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/include/MacportsLegacySupport.h b/include/MacportsLegacySupport.h
</span><span style='display:block; white-space:pre;color:#808080;'>index 2bf8664..1e766af 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/include/MacportsLegacySupport.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/include/MacportsLegacySupport.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -254,8 +254,14 @@
</span> /* PTHREAD_RWLOCK_INITIALIZER is not defined until 10.5 */
/* The addition uses an #ifndef, so no feature flag is necessary */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-/* STAILQ_FOREACH is not defined until 10.5 */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* The addition uses an #ifndef, so no feature flag is necessary */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Macros missing from some earlier versions of sys/queue.h */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* All additions use #ifndef, so no feature flags are necessary. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Missing until 10.5 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* SLIST_HEAD_INITIALIZER, STAILQ_FOREACH */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Missing until 10.7 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* SLIST_REMOVE_AFTER */
</span>
/* c++11 <cmath> PPC 10.[45] and Intel 10.[4-6], GNU g++ 4.6 through 8. */
#if (__MPLS_TARGET_OSVER < 1070 \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/include/sys/queue.h b/include/sys/queue.h
</span><span style='display:block; white-space:pre;color:#808080;'>index 53157dd..be4501f 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/include/sys/queue.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/include/sys/queue.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -20,7 +20,28 @@
</span> /* Include the primary system sys/queue.h */
#include_next <sys/queue.h>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-/* STAILQ_FOREACH is not defined on Tiger */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* SLIST functions missing from earlier SDK versions */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Missing until 10.5 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#ifndef SLIST_HEAD_INITIALIZER
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define SLIST_HEAD_INITIALIZER(head) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ { NULL }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Missing until 10.7 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#ifndef SLIST_REMOVE_AFTER
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define SLIST_REMOVE_AFTER(elm, field) do { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SLIST_NEXT(elm, field) = \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SLIST_NEXT(SLIST_NEXT(elm, field), field); \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} while (0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* STAILQ functions missing from earlier SDK versions */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Missing until 10.5 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> #ifndef STAILQ_FOREACH
#define STAILQ_FOREACH(var, head, field) \
for((var) = STAILQ_FIRST((head)); \
</pre><pre style='margin:0'>
</pre>