Solaris portability, POSIX memalign checking in configure.ac - PATCH [1/6]
Need to check whether posix_memalign exists on the target system (there is a patch for a future Solaris version to add it, so I'd rather not check for the Solaris platform, but rather for feature existence). Still a lot of work remains for a working Solaris port due to the kqueue stuff, but here are some initial patches. Joakim -----------------------------------------------
svn diff configure.ac Index: configure.ac =================================================================== --- configure.ac (revision 140) +++ configure.ac (working copy) @@ -184,7 +198,7 @@ AC_CHECK_DECLS([FD_COPY], [], [], [[#include <sys/select.h>]]) AC_CHECK_DECLS([SIGEMT], [], [], [[#include <signal.h>]]) AC_CHECK_DECLS([VQ_UPDATE, VQ_VERYLOWDISK], [], [], [[#include <sys/ mount.h>]]) -AC_CHECK_FUNCS([pthread_key_init_np pthread_main_np mach_absolute_time malloc_create_zone]) +AC_CHECK_FUNCS([pthread_key_init_np pthread_main_np mach_absolute_time malloc_create_zone sem_init posix_memalign])
AC_CHECK_DECLS([POSIX_SPAWN_START_SUSPENDED], [have_posix_spawn_start_suspended=true],
+AC_CHECK_FUNCS([pthread_key_init_np pthread_main_np mach_absolute_time malloc_create_zone sem_init posix_memalign])
Please instead add a src/shims/posix_memalign.h file and add #ifndef HAVE_POSIX_MEMALIGN #include "shims/posix_memalign.h" #endif to src/os_shims.h, this way your 2/6 patch becomes superfluous. Paolo
On Fri, 6 Nov 2009, Joakim Johansson wrote:
Need to check whether posix_memalign exists on the target system (there is a patch for a future Solaris version to add it, so I'd rather not check for the Solaris platform, but rather for feature existence).
Still a lot of work remains for a working Solaris port due to the kqueue stuff, but here are some initial patches.
In practice, it looks like malloc_zone_memalign() isn't used by libdispatch, even though it's present in Mac OS X's malloc_zone API, so perhaps we should just drop it from our shim layer and eliminate the need for checks entirely. I'll make this change tonight/tomorrow sometime. Robert
Joakim
-----------------------------------------------
svn diff configure.ac Index: configure.ac =================================================================== --- configure.ac (revision 140) +++ configure.ac (working copy) @@ -184,7 +198,7 @@ AC_CHECK_DECLS([FD_COPY], [], [], [[#include <sys/select.h>]]) AC_CHECK_DECLS([SIGEMT], [], [], [[#include <signal.h>]]) AC_CHECK_DECLS([VQ_UPDATE, VQ_VERYLOWDISK], [], [], [[#include <sys/mount.h>]]) -AC_CHECK_FUNCS([pthread_key_init_np pthread_main_np mach_absolute_time malloc_create_zone]) +AC_CHECK_FUNCS([pthread_key_init_np pthread_main_np mach_absolute_time malloc_create_zone sem_init posix_memalign])
AC_CHECK_DECLS([POSIX_SPAWN_START_SUSPENDED], [have_posix_spawn_start_suspended=true],
_______________________________________________ libdispatch-dev mailing list libdispatch-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev
participants (3)
-
Joakim Johansson
-
Paolo Bonzini
-
Robert Watson