aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-12 20:18:47 +0100
committerDavid Robillard <d@drobilla.net>2020-11-13 01:15:05 +0100
commitfebc0828f271aa06681081217ee3ab2649dbf13a (patch)
treee4123cd6fdc68ba34170e897104824dabb01000c /wscript
parentbeed84b63136603600528c0f48bcf93f6cb51de4 (diff)
downloadserd-febc0828f271aa06681081217ee3ab2649dbf13a.tar.gz
serd-febc0828f271aa06681081217ee3ab2649dbf13a.tar.bz2
serd-febc0828f271aa06681081217ee3ab2649dbf13a.zip
Use aligned allocation via C11 or Windows API where possible
Diffstat (limited to 'wscript')
-rw-r--r--wscript7
1 files changed, 7 insertions, 0 deletions
diff --git a/wscript b/wscript
index cca050b5..b9767563 100644
--- a/wscript
+++ b/wscript
@@ -120,6 +120,13 @@ def configure(conf):
if Options.options.largefile:
conf.env.append_unique('DEFINES', ['_FILE_OFFSET_BITS=64'])
+ conf.check_function('c', 'aligned_alloc',
+ header_name = 'stdlib.h',
+ return_type = 'void*',
+ arg_types = 'size_t,size_t',
+ define_name = 'HAVE_ALIGNED_ALLOC',
+ mandatory = False)
+
if not Options.options.no_posix:
funcs = {'posix_memalign': ('stdlib.h', 'int', 'void**,size_t,size_t'),
'posix_fadvise': ('fcntl.h', 'int', 'int,off_t,off_t,int'),