-
Notifications
You must be signed in to change notification settings - Fork 14
pki.h: fix macros for macOS #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
What happens with current Once macros fixed, the package installs successfully. |
|
@s-u Hmm, it is tricker than I thought. This code does not build at all, as long as it get triggered. It was obscured because of misplaced macro, so on 10.7+ it was never executed. On 10.6 it fails to compile (see above). Now, once macro is moved to its intended (I believe) place, the code is not used on 10.6, but is now used on 10.7+. And then it also fails, with the same errors: This is on 14.4.1 with Clang. How was it supposed to work? |
|
@s-u So the code was added in 238bc4f#diff-3ab4f2c730895f5d5def202e3a45ffaacc729ad717a488fe030ee1d4094473d1 and had already misplaced How was it tested? Since officially Lines 45 to 59 in 927050d
(Or am I missing something obvious here and totally wrong in my conclusions?) |
|
As noted, this was never tested due to lack of a test target. Since you are creating the PR - and thus have a way to test - please make sure it is a valid fix one way or another. The way I see it it should simply say |
|
@s-u Could you please clarify, where is that code supposed to run? Just logically, leaving aside an issue that it fails to compile. It follows from the comment to this line that the following chunk is aimed at 64-bit systems. However, in fact there is It is not just a matter of not having an archaic macOS to test: either macros are misplaced (which was my understanding) or comments to the code are misleading. Lines 45 to 60 in 927050d
I need you help to understand the case (this is not my code after all). I am not asking to test anything, I just need to figure out the logic, because currently it seems off. There are three checks there:
The problem is with 2 and 3. P. S. I tried replacing |
|
As far as I can tell the purpose of that code (Apple-specific) was simply to not use the native implementation for large vectors, because the API only supports 32-bit length so it was supposed to dynamically switch based on the requested length. The |
|
The PR was off, but good discussion, should be now fixed. |
|
@s-u Thank you very much! I will test the update. P. S. Sorry, did not get back to this, since it was unclear how to fix it, and I am still stuck with rebuilding 4000+ |
Apparently
endifis in the wrong place now, as follows both from comment to the existing code and a fact that it fails to compile on 10.6. Fix that, so that the package can actually build. (I wonder how no one noticed this so far.)Simplify the macro for macOS version: there is no need to check if
MAC_OS_X_VERSION_10_7is defined,MAC_OS_X_VERSION_MIN_REQUIREDon its own works.