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
Weak linking support for OSX #43230
Comments
The "itch" that is scratched by this patch is the wish to be able to use a This patch weakly links a number of functions in the posix, time and I'm not quite happy with code duplication in the time and socket modules, |
Logged In: YES I should not that I haven't checked this patch on other platforms than osx 10.4/ |
Logged In: YES The patch looks fine to me. I wonder why you are clearing As for the time changes: are you saying OSX doesn't have http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/gettimeofday.2.html This has higher resolution than ftime, and also takes higher |
Logged In: YES Good points. I was clearing errors because it seemed better to ignore errors. The change to time is interesting, I added those changes because the binary
wouldn't run without the patch, without realizing that configure/timemodule
is picking up the wrong function for finding the current time. That seems to
be caused by a bug in the preprocessor code that selects the right section of
code. OSX 10.4 has both gettimeofday and ftime, and with the current set of
#if statements this means both the gettimeofday and ftime blocks get
compiled in. The ftime-bit is dead code, but present nonetheless. I tried to rearange the #if-statements to make sure just one block gets If uploaded a new patch (version 2) that removes error clearing for the DelAttr SUS: http://www.opengroup.org/onlinepubs/007908799/xsh/ |
Logged In: YES Version 3 solves the ftime issue the other (IMO more correct) way: it ignores the |
Logged In: YES The patch is fine(*). Please do add a comment to the time One more bit on return values: gettimeofday can indeed fail If you want to be really cautious, you could return 0.0 in |
Logged In: YES Thanks for the review. I will apply this patch this weekend, including the |
Logged In: YES I've checked in weaklinking-2.patch with a better comment. This is the version Checked in as revision 45660 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: