Welcome to mirror list, hosted at ThFree Co, Russian Federation.

longlong « types « auto - github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f843d5ae4bfca1e6d022ce5720be73e3cd6b8638 (plain)
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

echo "Checking for long long size"

BYTES=

echo "int main() {" > autotest.c
echo "printf(\"%d\", sizeof(long long));" >> autotest.c
echo "return 0; }" >> autotest.c

eval "${CC} -o autotest autotest.c > /dev/null 2>&1"

if [ -x ./autotest ]; then
    BYTES=`./autotest`
    echo " + long long is $BYTES bytes"
fi

rm autotest*

case $BYTES in
    4)
        NGX_MAX_LONG_LONG=4294967295
    ;;

    8)
        NGX_MAX_LONG_LONG=18446744073709551615
    ;;

    *)
        echo "$0: error: can not detect long long size"
        exit 1
esac