<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/1146902f9226e3e0bc80aa1a3e710ce8148700e1">https://github.com/macports/macports-legacy-support/commit/1146902f9226e3e0bc80aa1a3e710ce8148700e1</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 1146902f9226e3e0bc80aa1a3e710ce8148700e1
</span>Author: Fred Wright <fw@fwright.net>
AuthorDate: Thu Jan 16 19:21:22 2025 -0800

<span style='display:block; white-space:pre;color:#404040;'>    Make stdio.h include sys/stdio.h for renameat().
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    The declaration of renameat() is in sys/stdio.h, to match Apple's
</span><span style='display:block; white-space:pre;color:#404040;'>    arrangement (when it exists) in 10.10+, but Apple also includes
</span><span style='display:block; white-space:pre;color:#404040;'>    (directly or indirectly) sys/stdio.h from stdio.h, so we need to
</span><span style='display:block; white-space:pre;color:#404040;'>    duplicate that behavior to ensure that stdio.h provides renameat() as
</span><span style='display:block; white-space:pre;color:#404040;'>    expected.
</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/71842
</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;'>    Passes all tests, including updated renameat test.
</span>---
 include/stdio.h      | 5 +++++
 test/test_renameat.c | 8 +++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/include/stdio.h b/include/stdio.h
</span><span style='display:block; white-space:pre;color:#808080;'>index 089e9fb..5f9e78d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/include/stdio.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/include/stdio.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -37,6 +37,11 @@
</span> /* Include the primary system stdio.h */
 #include_next <stdio.h>
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Extend Apple's 10.10+ include of sys/stdio.h to earlier versions. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MPLS_SDK_MAJOR < 101000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include <sys/stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif /* __MPLS_SDK_MAJOR < 101000 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> /* Additional functionality provided by:
  * POSIX.1-2008
  */
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/test/test_renameat.c b/test/test_renameat.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 9392b03..d236dce 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/test/test_renameat.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/test/test_renameat.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,5 +1,5 @@
</span> /*
<span style='display:block; white-space:pre;background:#ffe0e0;'>- * Copyright (c) 2024 Frederick H. G. Wright II <fw@fwright.net>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Copyright (c) 2025 Frederick H. G. Wright II <fw@fwright.net>
</span>  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -18,12 +18,14 @@
</span>  * Currently this is just an "almost dummy" test, just to verify that
  * renameat() is declared in the expected header and defined in the
  * library (if needed).
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * The declaration of renameat() is actually in sys/stdio.h, but that's
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * included by stdio.h, so we test it there.
</span>  */
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <sys/stdio.h>  /* Where renameat() should be declared */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include <stdio.h>
</span> 
 /*
<span style='display:block; white-space:pre;background:#ffe0e0;'>- * Reference renameat() before other includes, to check proper include.
</span>  * This is *not* static, to keep it from being optimized out, and thereby
  * forcing a reference to the library or system renameat().
  */
</pre><pre style='margin:0'>

</pre>