mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Patch 1471925 - Weak linking support for OSX
This patch causes several symbols in the socket and posix module to be weakly linked on OSX and disables usage of ftime on OSX. These changes make it possible to use a binary build on OSX 10.4 on a 10.3 system.
This commit is contained in:
parent
a1d3b1011e
commit
d06b6f28a0
3 changed files with 98 additions and 2 deletions
|
@ -5,6 +5,18 @@
|
|||
#include "structseq.h"
|
||||
#include "timefuncs.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_FTIME)
|
||||
/*
|
||||
* floattime falls back to ftime when getttimeofday fails because the latter
|
||||
* might fail on some platforms. This fallback is unwanted on MacOSX because
|
||||
* that makes it impossible to use a binary build on OSX 10.4 on earlier
|
||||
* releases of the OS. Therefore claim we don't support ftime.
|
||||
*/
|
||||
# undef HAVE_FTIME
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -842,6 +854,7 @@ floattime(void)
|
|||
return (double)t.tv_sec + t.tv_usec*0.000001;
|
||||
#endif /* !GETTIMEOFDAY_NO_TZ */
|
||||
}
|
||||
|
||||
#endif /* !HAVE_GETTIMEOFDAY */
|
||||
{
|
||||
#if defined(HAVE_FTIME)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue