<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/a076ae691d2cbdeaadad4fc16e58cde41bdb9f6d">https://github.com/macports/macports-legacy-support/commit/a076ae691d2cbdeaadad4fc16e58cde41bdb9f6d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit a076ae691d2cbdeaadad4fc16e58cde41bdb9f6d
</span>Author: Fred Wright <fw@fwright.net>
AuthorDate: Sun Oct 6 18:58:33 2024 -0700
<span style='display:block; white-space:pre;color:#404040;'> Deprecate C++ dirent test.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The C++ test for dirent.h was intended to test a former problem that
</span><span style='display:block; white-space:pre;color:#404040;'> no longer exists in the new fdopendir() implementation. Since C++
</span><span style='display:block; white-space:pre;color:#404040;'> tests have become somewhat problematic, that test has been moved to
</span><span style='display:block; white-space:pre;color:#404040;'> the manual tests. Given that it's now rather pointless, it's been
</span><span style='display:block; white-space:pre;color:#404040;'> replaced with a minimal test of just the include, rather than
</span><span style='display:block; white-space:pre;color:#404040;'> rewriting the whole test in C.
</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 on all OS versions with all SDKs.
</span>---
.../dirent_with_cplusplus.cpp | 0
xtest/test_dirent.c | 41 ++++++++++++++++++++++
2 files changed, 41 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/test/test_dirent_with_cplusplus.cpp b/manual_tests/dirent_with_cplusplus.cpp
</span>similarity index 100%
rename from test/test_dirent_with_cplusplus.cpp
rename to manual_tests/dirent_with_cplusplus.cpp
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/xtest/test_dirent.c b/xtest/test_dirent.c
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..8f20a59
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/xtest/test_dirent.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,41 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Copyright (c) 2024 Frederick H. G. Wright II <fw@fwright.net>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Permission to use, copy, modify, and distribute this software for any
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * purpose with or without fee is hereby granted, provided that the above
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * copyright notice and this permission notice appear in all copies.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
</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><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * An earlier implementation of fdopendir() defined seekdir as a macro,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * which originally conflicted with a C++ library definition. It was fixed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * to avoid that, and the test that this replaces was written in C++ in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * order to verify the fix. But C++ tests have become more problematic
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * as of the 15.x SDK, and meanwhile, the fdopendir() implementation was
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * rewritten to use a different approach, making the old test moot.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * This test is now just a dummy to verify the include of dirent.h.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * The original C++ test still exists, but now as:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * manual_tests/dirent_with_cplusplus.cpp
</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;'>+#include <dirent.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+int
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+main(int argc, char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void) argc; (void) argv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printf("dirent.h successfully included\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span></pre><pre style='margin:0'>
</pre>