Multiple updates - see individual commit messages#130
Conversation
This splits off the __MPLS_TARGET_OSVER definition into a separate header, to facilitate using it in most places that care about the build target. It exempts code that's intended to be similar or identical to Apple's code, as well as one test specifically intended to report such macro values. It also (at present) leaves alone a couple of tests that have not (yet) been touched recently. TESTED: All tests pass on all tested platforms.
The issue fixed by our USB.h actually appeared in gcc 4.3, not 4.5 as was assumed. Also reworks the logic to use the correct number of dummy aligns for the SDK version (since we now know the SDK version), and expands the comments to explain the issue without having to read the full bug description. TESTED: Passes the test with all available compilers, including GCC 4.3 and 4.4.
This file is missing from the Xcode 2.5 10.4 SDK, but present in the Xcode 3.1/3.2 versions. We bring it in here so that the omission can be corrected.
This adds a wrapper to provide the possibly missing Xplugin.h on 10.4. TESTED: New Xplugin test passes on 10.4 with this change.
TESTED: Correctly detects failing case, and passes with fix.
TESTED: The tool correctly doesn't add Xplugin.h to [all|rev]headers.h
The function exists in 10.4, but the prototype is missing from the SDK, so all we need to do is add it. Note that the 10.4 CoreFoundation library lacks 64-bit slices altogether, so this fix only works for 32-bit builds. This does nothing to fix the numerous issues with building against CoreFoundation with a "mismatched" SDK. TESTED: Passes new test on 10.4.
TESTED: Detects missing prototype (as warning) on 10.4. Passes on 10.4 with fix, as well as on 10.5+ always.
Also updates allheaders correspondingly. TESTED: New test now passes in all cases, including GCC 4.2 and SDK 26.
TESTED: Detects failing case, and passes with fix.
This adds the (mildly) needed undefs for recently added version macros. TESTED: Tests pass on all platforms.
This provides a macro structure for contexts similar to 10.5+, as well as adding aliases for the double-underscore versions of many field names. Since the latter has some (probably low) risk of collisions, the _MACPORTS_LEGACY_DISABLE_CONTEXT_ALIASES flag is provided to disable that aspect. The net result is that most programs built with these headers don't need to treat 10.4 differently than 10.5+ TESTED: All tests (including new context test) pass on all tested platforms.
TESTED: Passes updated test on all tested platforms, including 10.4.
Since the __dd_* aliases are now provided by dirent.h for 10.4, the definitions in the two uses are obsolete. TESTED: Still builds and passes tests.
This provides a flag in sdkversion.h for the troublesome case of _DARWIN_C_SOURCE on 10.4, as well as some derivative flags for common use cases. Fixes are currently applied to pthread.h, time.h, and dirent.h. See: https://trac.macports.org/ticket/72407 TESTED: New test passes on all tested platforms, including 10.4.
TESTED: All new targets work.
Currently this tests pthread.h, time.h, and dirent.h. TESTED: Without fixes, fails as expected on 10.4. Otherwise, passes on all tested platforms.
TESTED: Detects failures on 10.4 without fix. Otherwise passes on all tested platforms.
This makes the sources part of the library build in the case requiring the bugfixes, but does not include the actual bugfixes. The fixes in question are theoretically applicable to ppc as well as ppc64, but since no failures have been observed on ppc, we limit their use to ppc64. TESTED: New code appears in library when expected.
TESTED: New signals test now passes on 10.4 ppc64.
This tests some basic signal handling cases, including the ones that crash on 10.4 ppc64. TESTED: Detects failure on 10.4 ppc64 without fix; otherwise passes.
TESTED: Now builds (and tests pass) with 10.5 SDK, as well as 10.4. 10.6+ is irrelevant, due to lack of ppc64 support.
In 10.4, this checks both the existence and correctness of the field name aliases. In 10.5+, it merely checks the existence of the normal names. TESTED: Detects both missing and incorrect names in 10.4, without correct fix. Passes on all tested platforms otherwise.
This switches to the more recent and more reliable SDK version detection method. It also uses our more standard naming for its flag macro. TESTED: All tests pass, though there's no specific test for this header.
Apple provides "AGL" as their version of OpenGL (prior to 10.7). In many cases (including this one), the AGL file is just a symlink to its OpenGL counterpart. To make this fix work in the AGL case, we duplicate the wrapper header with the one obvious adjustment. Also adds AGL to the allheaders.sh exemption list. TESTED: All tests pass, though there's no specific test for this header.
This brings in the OpenGL header with the original 10.4 typedefs, as well as creating the corresponding symlink for its "AGL" version. It comes from the 10.4 SDK. This header has five typedefs which are inconsistent with subsequent versions. They will be fixed in a subsequent commit.
A few types are defined differently in 10.4 than in later versions. This sometimes causes trouble for programs expecting the 10.5+ definitions. This changes those types to match 10.5+. TESTED: With corresponding wrapper headers, passes new test on 10.4.
This adds a header to either substitute an updated version of the 10.4 header or pass through a 10.5+ header. It applies the same treatment to AGL. TESTED: Passes new test, including on 10.4.
This tests the OpenGL types that changed between 10.4 and 10.5. It also tests the AGL version, where applicable. TESTED: Fails on 10.4 without fix. Otherwise, passes on all tested platforms.
This works around the ugly version spoofing hack in 11.x+ OS versions. See the comment. TESTED: Now reports correct OS versions, including in spoofing cases.
This adds the missing macros for SHA256, SHA384, AND SHA512, as provided by the 10.5+ header. Also updates [all|rev]headers.h. TESTED: New test passes on all tested platforms, including 10.4.
Provides _MACPORTS_LEGACY_DISABLE_ARGLESS_DIGEST to disable this behavior if it's unwanted. TESTED: Passes new test on all tested platforms, including 10.4 and 10.5.
This tests the definitions that are normally missing from 10.4. TESTED: Fails as expected on 10.4 without the fix. Otherwise passes on all tested platforms.
This didn't work with the "function" macros used in the pre-10.6 header. This test verifies that our update works. TESTED: Passes on all tested platforms, including 10.4 and 10.5.
Makes the usual adjustments for a new SDK version. TESTED: Passes all tests with default compilers. Needs fix (next commit) for clang 6-15.
This avoids build failures with clang 6-15. TESTED: Passes tests with all available compilers, including clang 6-15.
TESTED: Passes tests with all available compilers, including clang 6-15. Avoids warnings except in "bare" include case with clang 6-15.
TESTED: Tests pass on all tested platforms.
TESTED: Passes on all tested platforms.
This now includes TargetConditionals.h before all other includes, to test cases where it doesn't benefit from earlier includes (such as the __is_target_environment()) workaround. TESTED: Passes on all tested platforms. Demonstrates unnecessary workaround prior to SDK 27.
This is probably a long-standing bug exacerbated by having the test include this header before all others. TESTED: Tests pass on all tested platforms.
|
@mascguy This is almost entirely just header and test changes. In fact, I was originally planning for this batch to be entirely headers (and tests), but the nasty 10.4 ppc64 bug got in the way of testing the context changes, so I fixed that. So the only library change is for 10.4 ppc64. |
|
@mascguy |
Notably:
Tested on: