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:
Ronald Oussoren 2006-04-23 11:59:25 +00:00
parent a1d3b1011e
commit d06b6f28a0
3 changed files with 98 additions and 2 deletions

View file

@ -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)