<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/1cc821b73d2bbc55103b71bd5086673d1b2a24b7">https://github.com/macports/macports-legacy-support/commit/1cc821b73d2bbc55103b71bd5086673d1b2a24b7</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 1cc821b73d2bbc55103b71bd5086673d1b2a24b7
</span>Author: Fred Wright <fw@fwright.net>
AuthorDate: Wed Jun 12 16:48:38 2024 -0700
<span style='display:block; white-space:pre;color:#404040;'> Use __MPLS_TARGET_OSVER in remaining applicable places.
</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;'> Tests pass on all platforms.
</span>---
include/sys/fsgetpath.h | 4 ++--
include/sys/spawn.h | 4 ++--
include/sys/stat.h | 2 +-
src/atcalls.c | 2 +-
src/best_fchdir.c | 2 +-
src/fsetattrlist.c | 2 +-
src/macports_legacy_symbol_aliases.c | 4 ++--
src/pthread_get_stacksize_np.c | 4 ++--
src/setattrlistat.c | 2 +-
src/stpncpy_chk.c | 3 +--
10 files changed, 14 insertions(+), 15 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/include/sys/fsgetpath.h b/include/sys/fsgetpath.h
</span><span style='display:block; white-space:pre;color:#808080;'>index f7e1ee3..3aa0513 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/include/sys/fsgetpath.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/include/sys/fsgetpath.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -31,7 +31,7 @@
</span>
#if __MP_LEGACY_SUPPORT_FSGETPATH__
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MPLS_TARGET_OSVER >= 1060
</span>
__MP__BEGIN_DECLS
extern ssize_t fsgetpath(char * __restrict buf, size_t bufsize, fsid_t* fsid, uint64_t objid);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -39,7 +39,7 @@ __MP__END_DECLS
</span>
#else
#error "No implementation of fsgetpath is presently available for MacOSX prior to 10.6"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif /* __MPLS_TARGET_OSVER >= 1060 */
</span>
#endif /* __MP_LEGACY_SUPPORT_FSGETPATH__ */
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/include/sys/spawn.h b/include/sys/spawn.h
</span><span style='display:block; white-space:pre;color:#808080;'>index 1c2968f..425ca7b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/include/sys/spawn.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/include/sys/spawn.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -23,7 +23,7 @@
</span> /* spawn.h exists on Leopard or later. Use this block method at present
* because gcc versions < 5 don't recognize __have_include()
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MPLS_TARGET_OSVER >= 1050
</span>
/* Include the primary system sys/spawn.h */
#include_next <sys/spawn.h>
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -33,6 +33,6 @@
</span> #define POSIX_SPAWN_CLOEXEC_DEFAULT 0x4000
#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif /* __MPLS_TARGET_OSVER >= 1050 */
</span>
#endif /* _MACPORTS_SYS_SPAWN_H_ */
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/include/sys/stat.h b/include/sys/stat.h
</span><span style='display:block; white-space:pre;color:#808080;'>index 11fe3e5..4a0f82f 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/include/sys/stat.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/include/sys/stat.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -52,7 +52,7 @@ extern int fstatat(int dirfd, const char *pathname, struct stat *buf, int flags)
</span>
/* 64bit inode types appeared only on 10.5, and currently can't be replaced on Tiger */
/* due to lack of kernel support for the underlying syscalls */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if !__DARWIN_ONLY_64_BIT_INO_T && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if !__DARWIN_ONLY_64_BIT_INO_T && __MPLS_TARGET_OSVER >= 1050
</span> extern int fstatat64(int dirfd, const char *pathname, struct stat64 *buf, int flags);
#endif
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/atcalls.c b/src/atcalls.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 2541cb2..c309dd6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/atcalls.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/atcalls.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -160,7 +160,7 @@ int fstatat(int dirfd, const char *pathname, struct stat *buf, int flags)
</span> /* 64bit inode types appeared only on 10.5, and currently can't be replaced on Tiger */
/* due to lack of kernel support for the underlying syscalls */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if !__DARWIN_ONLY_64_BIT_INO_T && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if !__DARWIN_ONLY_64_BIT_INO_T && __MPLS_TARGET_OSVER >= 1050
</span> int fstatat64(int dirfd, const char *pathname, struct stat64 *buf, int flags)
{
ERR_ON(EINVAL, flags & ~AT_SYMLINK_NOFOLLOW);
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/best_fchdir.c b/src/best_fchdir.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 7ef41e7..e1e5dd4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/best_fchdir.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/best_fchdir.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -27,7 +27,7 @@
</span>
int best_fchdir(int dirfd)
{
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MPLS_TARGET_OSVER >= 1050
</span> return syscall(SYS___pthread_fchdir, dirfd);
#else
/* Tiger does not have kernel support for __pthread_fchdir, so we have to fall back to fchdir */
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/fsetattrlist.c b/src/fsetattrlist.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 245a129..0c30847 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/fsetattrlist.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/fsetattrlist.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -44,7 +44,7 @@ int fsetattrlist(int fd, void *a, void *buf, size_t size, unsigned long flags)
</span> cont = 0;
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1080
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MPLS_TARGET_OSVER < 1080
</span> /*
* Older systems don't correctly check if no attributes are to be set, which usually
* means a buffer size of zero and return an error since they malloc a block of
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports_legacy_symbol_aliases.c b/src/macports_legacy_symbol_aliases.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 6f5b3a3..f117347 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports_legacy_symbol_aliases.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports_legacy_symbol_aliases.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -56,11 +56,11 @@ int dirfd(DIR *dirp)
</span> }
#endif /* __MP_LEGACY_SUPPORT_SYMBOL__dirfd__ */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if __MP_LEGACY_SUPPORT_ATCALLS__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MP_LEGACY_SUPPORT_ATCALLS__ && __MPLS_TARGET_OSVER >= 1050
</span> #include <sys/stat.h>
/*
The need for this function is highly limited.
The Rust compiler requires `fstatat$INODE64` to be a library symbol.
*/
int fstatat$INODE64(int dirfd, const char *pathname, struct stat64 *buf, int flags) { return fstatat64(dirfd, pathname, buf, flags); }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif /* __MP_LEGACY_SUPPORT_ATCALLS__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif /* __MP_LEGACY_SUPPORT_ATCALLS__ && __MPLS_TARGET_OSVER >= 1050 */
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pthread_get_stacksize_np.c b/src/pthread_get_stacksize_np.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 6c2051b..34d81f6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pthread_get_stacksize_np.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pthread_get_stacksize_np.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -7,7 +7,7 @@
</span> #include <dlfcn.h>
#include <stdlib.h>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MPLS_TARGET_OSVER >= 1090
</span> /* private system call available on OS X Mavericks (version 10.9) and later */
/* see https://github.com/apple-oss-distributions/libpthread/blob/ba8e1488a0e6848b710c5daad2e226f66cfed656/private/pthread/private.h#L34 */
pthread_t pthread_main_thread_np(void);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -16,7 +16,7 @@ pthread_t pthread_main_thread_np(void);
</span> #define kMaxThreadStackSize 0x40000000 /* from LLVM: 1 << 30 or 1Gb */
size_t pthread_get_stacksize_np(pthread_t t) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MPLS_TARGET_OSVER >= 1090
</span> int is_main_thread = pthread_equal(t, pthread_main_thread_np());
#else
/* taken from Apple Libc */
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/setattrlistat.c b/src/setattrlistat.c
</span><span style='display:block; white-space:pre;color:#808080;'>index f438a0d..986f48d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/setattrlistat.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/setattrlistat.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -48,7 +48,7 @@ int setattrlistat(int dirfd, const char *pathname, void *a,
</span> int cont = 1,
ret = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1080
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MPLS_TARGET_OSVER < 1080
</span> /*
* Older systems don't correctly check if no attributes are to be set, which usually
* means a buffer size of zero and return an error since they malloc a block of
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/stpncpy_chk.c b/src/stpncpy_chk.c
</span><span style='display:block; white-space:pre;color:#808080;'>index e3449da..8f03cc6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/stpncpy_chk.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/stpncpy_chk.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -42,8 +42,7 @@
</span> /* MP support header */
#include "MacportsLegacySupport.h"
/* Note that the support for this mechanism is absent prior to 10.5 */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#if __MP_LEGACY_SUPPORT_STPNCPY__ && \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MP_LEGACY_SUPPORT_STPNCPY__ && __MPLS_TARGET_OSVER >= 1050
</span>
/* Ensure that we don't create an infinitely recursive check function */
#undef _FORTIFY_SOURCE
</pre><pre style='margin:0'>
</pre>