blob: c0a871dd2405ef85fb9e203269dc1e5d555a7949 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
# Copyright (C) Igor Sysoev
# Copyright (C) NGINX, Inc.
# Sizes of C types.
# "-Wall -Werror" or similar constraints in default CFLAGS may require
# to use "%zu" format to printf() result of sizeof(). But "%zu" may
# be unavailable, so the "(int)" cast is a simple and portable solution:
# printf("%d", (int) sizeof(TYPE));
nxt_feature="int size"
nxt_feature_name=NXT_INT_SIZE
nxt_feature_run=value
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <stdio.h>
int main(void) {
printf(\"%d\", (int) sizeof(int));
return 0;
}"
. auto/feature
nxt_feature="long size"
nxt_feature_name=NXT_LONG_SIZE
nxt_feature_run=value
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <stdio.h>
int main(void) {
printf(\"%d\", (int) sizeof(long));
return 0;
}"
. auto/feature
nxt_feature="long long size"
nxt_feature_name=NXT_LONG_LONG_SIZE
nxt_feature_run=value
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <stdio.h>
int main(void) {
printf(\"%d\", (int) sizeof(long long));
return 0;
}"
. auto/feature
nxt_feature="void * size"
nxt_feature_name=NXT_PTR_SIZE
nxt_feature_run=value
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <stdio.h>
int main(void) {
printf(\"%d\", (int) sizeof(void *));
return 0;
}"
. auto/feature
case "$nxt_feature_value" in
8) NXT_64BIT=1 ;;
*) NXT_64BIT=0 ;;
esac
nxt_feature="size_t size"
nxt_feature_name=NXT_SIZE_T_SIZE
nxt_feature_run=value
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <stdio.h>
int main(void) {
printf(\"%d\", (int) sizeof(size_t));
return 0;
}"
. auto/feature
nxt_feature="off_t size"
nxt_feature_name=NXT_OFF_T_SIZE
nxt_feature_run=value
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#define _FILE_OFFSET_BITS 64
#include <unistd.h>
#include <stdio.h>
int main(void) {
printf(\"%d\", (int) sizeof(off_t));
return 0;
}"
. auto/feature
nxt_feature="time_t size"
nxt_feature_name=NXT_TIME_T_SIZE
nxt_feature_run=value
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <time.h>
#include <stdio.h>
int main(void) {
printf(\"%d\", (int) sizeof(time_t));
return 0;
}"
. auto/feature
|