Commit f9411cc4 authored by Christophe Massiot's avatar Christophe Massiot
Browse files

If memalign isn't available, fall back on valloc.

parent f9dc58a3
This diff is collapsed.
......@@ -56,7 +56,7 @@ AC_CHECK_FUNC(inet_aton,,[
])
AC_CHECK_FUNCS(vasprintf)
AC_CHECK_FUNCS(swab)
AC_CHECK_FUNCS(memalign)
AC_CHECK_FUNCS([memalign valloc])
AC_CHECK_FUNCS(sigrelse)
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.40 2001/09/25 11:46:13 massiot Exp $
* $Id: common.h,v 1.41 2001/09/28 09:57:08 massiot Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -204,8 +204,13 @@ struct pgrm_descriptor_s;
/* Some systems have memalign() but no declaration for it */
void * memalign( size_t align, size_t size );
#else
/* Assume malloc alignment is sufficient */
# define memalign(align,size) malloc(size)
# ifdef HAVE_VALLOC
/* That's like using a hammer to kill a fly, but eh... */
# define memalign(align,size) valloc(size)
# else
/* Assume malloc alignment is sufficient */
# define memalign(align,size) malloc(size)
# endif
#endif
/* win32, cl and icl support */
......
......@@ -58,6 +58,9 @@
/* Define if you have the usleep function. */
#undef HAVE_USLEEP
/* Define if you have the valloc function. */
#undef HAVE_VALLOC
/* Define if you have the vasprintf function. */
#undef HAVE_VASPRINTF
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment