blob: 40b5ad28fb3e5e53245d1ac4993df57bc5a489cf (
plain) (
blame)
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
|
# Copyright (C) Igor Sysoev
# Copyright (C) Andrew Clayton
# Copyright (C) NGINX, Inc.
nxt_feature="endianness"
nxt_feature_name=
nxt_feature_run=value
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <stdint.h>
#include <stdio.h>
int main(void) {
int i = 0x11223344;
uint8_t *p;
p = (uint8_t *)&i;
if (*p == 0x44)
printf(\"little endian\");
else
printf(\"big endian\");
return 0;
}"
. auto/feature
if [ "$nxt_feature_value" = "little endian" ]; then
nxt_have=NXT_HAVE_LITTLE_ENDIAN . auto/have
else
nxt_have=NXT_HAVE_BIG_ENDIAN . auto/have
fi
|