1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
# Copyright (C) Igor Sysoev
# Copyright (C) NGINX, Inc.
# Linux glibc 2.1.91, FreeBSD 7.0, Solaris 11,
# MacOSX 10.6 (Snow Leopard), NetBSD 5.0.
njs_feature="posix_memalign()"
njs_feature_name=NJS_HAVE_POSIX_MEMALIGN
njs_feature_run=yes
njs_feature_incs=
njs_feature_libs=
njs_feature_test="#include <stdlib.h>
int main(void) {
void *p;
if (posix_memalign(&p, 4096, 4096) != 0)
return 1;
free(p);
return 0;
}"
. auto/feature
if [ $njs_found = no ]; then
# Solaris, HP-UX.
njs_feature="memalign()"
njs_feature_name=NJS_HAVE_MEMALIGN
njs_feature_run=yes
njs_feature_incs=
njs_feature_libs=
njs_feature_test="#include <stdlib.h>
int main(void) {
void *p;
p = memalign(4096, 4096);
if (p == NULL)
return 1;
free(p);
return 0;
}"
. auto/feature
fi
|