X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=utils%2Faligned_malloc.h;h=b3f43c9c451ddf061290481c1a83eb67c4901e91;hp=43c9219005524a0b3b9cd8696a2aaf8f00b86c68;hb=4361b69d3178d7fc98d0388f9a223af6c2651aba;hpb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c diff --git a/utils/aligned_malloc.h b/utils/aligned_malloc.h index 43c92190..b3f43c9c 100644 --- a/utils/aligned_malloc.h +++ b/utils/aligned_malloc.h @@ -18,31 +18,9 @@ implied warranty. #include -#if HAVE_UNISTD_H -# include -#endif - -#if defined ANDROID -# include -#endif - -#if (_POSIX_VERSION >= 200112L || _XOPEN_VERSION >= 600) && \ - (!defined ANDROID || __ANDROID_API__ >= 15) -# define ALIGNED_MALLOC_HAS_MEMALIGN 1 -#endif - -#if ALIGNED_MALLOC_HAS_MEMALIGN - -# define aligned_malloc posix_memalign -# define aligned_free free - -#else /* !ALIGNED_MALLOC_HAS_MEMALIGN */ - /* This can't simply be named posix_memalign, since the real thing uses free(), but this one can't. */ int aligned_malloc(void **ptr, unsigned alignment, size_t size); void aligned_free(void *); -#endif /* ALIGNED_MALLOC_HAS_MEMALIGN */ - #endif /* __ALIGNED_MALLOC_H__ */