Mercurial > hg > nginx-quic
annotate auto/types/sizeof @ 7007:ed1101bbf19f
Introduced ngx_tcp_nodelay().
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 26 May 2017 22:52:48 +0300 |
parents | e3faa5fb7772 |
children |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
370
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
370
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
4412 | 3 # Copyright (C) Nginx, Inc. |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
370
diff
changeset
|
4 |
193
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
455 | 6 echo $ngx_n "checking for $ngx_type size ...$ngx_c" |
7 | |
8 cat << END >> $NGX_AUTOCONF_ERR | |
9 | |
10 ---------------------------------------- | |
11 checking for $ngx_type size | |
12 | |
13 END | |
193
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 |
370
54f76b0b8dca
nginx-0.0.7-2004-06-27-22:01:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
250
diff
changeset
|
15 ngx_size= |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
16 |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
17 cat << END > $NGX_AUTOTEST.c |
193
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
18 |
242
5d4f49dc8de5
nginx-0.0.1-2004-01-28-18:22:37 import
Igor Sysoev <igor@sysoev.ru>
parents:
210
diff
changeset
|
19 #include <sys/types.h> |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
20 #include <sys/time.h> |
455 | 21 $NGX_INCLUDE_UNISTD_H |
370
54f76b0b8dca
nginx-0.0.7-2004-06-27-22:01:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
250
diff
changeset
|
22 #include <signal.h> |
4543
51744fa997c7
Fixed compilation warnings in configuration C tests.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
23 #include <stdio.h> |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
24 #include <sys/resource.h> |
455 | 25 $NGX_INCLUDE_INTTYPES_H |
26 $NGX_INCLUDE_AUTO_CONFIG_H | |
193
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
27 |
6624
e3faa5fb7772
Configure: fix build with -Werror=old-style-definition.
Piotr Sikora <piotrsikora@google.com>
parents:
6498
diff
changeset
|
28 int main(void) { |
4544
3a99980ac221
Some older OSes (notably FreeBSD 4.x) did not have %zu
Ruslan Ermilov <ru@nginx.com>
parents:
4543
diff
changeset
|
29 printf("%d", (int) sizeof($ngx_type)); |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
30 return 0; |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
31 } |
193
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
32 |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
33 END |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
34 |
455 | 35 |
583 | 36 ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \ |
577 | 37 -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs" |
38 | |
455 | 39 eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1" |
40 | |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
41 |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
42 if [ -x $NGX_AUTOTEST ]; then |
370
54f76b0b8dca
nginx-0.0.7-2004-06-27-22:01:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
250
diff
changeset
|
43 ngx_size=`$NGX_AUTOTEST` |
54f76b0b8dca
nginx-0.0.7-2004-06-27-22:01:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
250
diff
changeset
|
44 echo " $ngx_size bytes" |
193
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
45 fi |
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
46 |
455 | 47 |
370
54f76b0b8dca
nginx-0.0.7-2004-06-27-22:01:57 import
Igor Sysoev <igor@sysoev.ru>
parents:
250
diff
changeset
|
48 case $ngx_size in |
193
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
49 4) |
6015
e11a8e7e8e0c
Configure: fixed type max value detection.
Ruslan Ermilov <ru@nginx.com>
parents:
5309
diff
changeset
|
50 ngx_max_value=2147483647 |
657 | 51 ngx_max_len='(sizeof("-2147483648") - 1)' |
193
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
52 ;; |
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
53 |
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
54 8) |
6015
e11a8e7e8e0c
Configure: fixed type max value detection.
Ruslan Ermilov <ru@nginx.com>
parents:
5309
diff
changeset
|
55 ngx_max_value=9223372036854775807LL |
657 | 56 ngx_max_len='(sizeof("-9223372036854775808") - 1)' |
193
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
57 ;; |
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
58 |
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
59 *) |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
60 echo |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
61 echo "$0: error: can not detect $ngx_type size" |
455 | 62 |
63 echo "----------" >> $NGX_AUTOCONF_ERR | |
64 cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR | |
65 echo "----------" >> $NGX_AUTOCONF_ERR | |
66 echo $ngx_test >> $NGX_AUTOCONF_ERR | |
67 echo "----------" >> $NGX_AUTOCONF_ERR | |
68 | |
6498
82a76258a142
Configure: fixed autotest source code logging.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6015
diff
changeset
|
69 rm -rf $NGX_AUTOTEST* |
82a76258a142
Configure: fixed autotest source code logging.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6015
diff
changeset
|
70 |
193
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
71 exit 1 |
dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
72 esac |
455 | 73 |
6498
82a76258a142
Configure: fixed autotest source code logging.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6015
diff
changeset
|
74 |
82a76258a142
Configure: fixed autotest source code logging.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6015
diff
changeset
|
75 rm -rf $NGX_AUTOTEST* |
82a76258a142
Configure: fixed autotest source code logging.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6015
diff
changeset
|
76 |