annotate auto/cc/name @ 8743:5d09596909c6 stable-1.20

Upstream: fixed timeouts with gRPC, SSL and select (ticket #2229). With SSL it is possible that an established connection is ready for reading after the handshake. Further, events might be already disabled in case of level-triggered event methods. If this happens and ngx_http_upstream_send_request() blocks waiting for some data from the upstream, such as flow control in case of gRPC, the connection will time out due to no read events on the upstream connection. Fix is to explicitly check the c->read->ready flag if sending request blocks and post a read event if it is set. Note that while it is possible to modify ngx_ssl_handshake() to keep read events active, this won't completely resolve the issue, since there can be data already received during the SSL handshake (see 573bd30e46b4).
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 20 Aug 2021 03:53:56 +0300
parents 325b3042edd6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
2 # Copyright (C) Igor Sysoev
4412
d620f497c50f Copyright updated.
Maxim Konovalov <maxim@nginx.com>
parents: 4229
diff changeset
3 # Copyright (C) Nginx, Inc.
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
4
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
5
946
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
6 if [ "$NGX_PLATFORM" != win32 ]; then
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
7
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
8 ngx_feature="C compiler"
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
9 ngx_feature_name=
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
10 ngx_feature_run=yes
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
11 ngx_feature_incs=
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
12 ngx_feature_path=
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
13 ngx_feature_libs=
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
14 ngx_feature_test=
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
15 . auto/feature
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
16
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
17 if [ $ngx_found = no ]; then
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
18 echo
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
19 echo $0: error: C compiler $CC is not found
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
20 echo
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
21 exit 1
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
22 fi
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
23
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
24 fi
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
25
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
26
577
4d9ea73a627a nginx-0.3.10-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 563
diff changeset
27 if [ "$CC" = cl ]; then
6397
78f8ac479735 Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5187
diff changeset
28 NGX_CC_NAME=msvc
78f8ac479735 Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5187
diff changeset
29 echo " + using Microsoft Visual C++ compiler"
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
30
4758
1f908d2dde8d Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents: 4492
diff changeset
31 elif [ "$CC" = wcl386 ]; then
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
32 NGX_CC_NAME=owc
946
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
33 echo " + using Open Watcom C compiler"
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
34
4758
1f908d2dde8d Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents: 4492
diff changeset
35 elif [ "$CC" = bcc32 ]; then
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
36 NGX_CC_NAME=bcc
946
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
37 echo " + using Borland C++ compiler"
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
38
4758
1f908d2dde8d Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents: 4492
diff changeset
39 elif `$CC -V 2>&1 | grep '^Intel(R) C' >/dev/null 2>&1`; then
4492
4871a7dc12a9 Configure: moved icc detection before gcc.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
40 NGX_CC_NAME=icc
4871a7dc12a9 Configure: moved icc detection before gcc.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
41 echo " + using Intel C++ compiler"
4871a7dc12a9 Configure: moved icc detection before gcc.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
42
4758
1f908d2dde8d Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents: 4492
diff changeset
43 elif `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
44 NGX_CC_NAME=gcc
946
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
45 echo " + using GNU C compiler"
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
46
7161
325b3042edd6 Configure: fixed clang detection on MINIX.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
47 elif `$CC -v 2>&1 | grep 'clang version' >/dev/null 2>&1`; then
325b3042edd6 Configure: fixed clang detection on MINIX.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
48 NGX_CC_NAME=clang
325b3042edd6 Configure: fixed clang detection on MINIX.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
49 echo " + using Clang C compiler"
325b3042edd6 Configure: fixed clang detection on MINIX.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
50
325b3042edd6 Configure: fixed clang detection on MINIX.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
51 elif `$CC -v 2>&1 | grep 'LLVM version' >/dev/null 2>&1`; then
4762
182aee3b1bf5 Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents: 4758
diff changeset
52 NGX_CC_NAME=clang
182aee3b1bf5 Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents: 4758
diff changeset
53 echo " + using Clang C compiler"
182aee3b1bf5 Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents: 4758
diff changeset
54
4758
1f908d2dde8d Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents: 4492
diff changeset
55 elif `$CC -V 2>&1 | grep 'Sun C' >/dev/null 2>&1`; then
561
e48ebafc6939 nginx-0.3.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 517
diff changeset
56 NGX_CC_NAME=sunc
946
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
57 echo " + using Sun C compiler"
561
e48ebafc6939 nginx-0.3.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 517
diff changeset
58
4758
1f908d2dde8d Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents: 4492
diff changeset
59 elif `$CC -V 2>&1 | grep '^Compaq C' >/dev/null 2>&1`; then
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
60 NGX_CC_NAME=ccc
946
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
61 echo " + using Compaq C compiler"
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
62
4758
1f908d2dde8d Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents: 4492
diff changeset
63 elif `$CC -V 2>&1 | grep '^aCC: ' >/dev/null 2>&1`; then
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
64 NGX_CC_NAME=acc
946
756e8a5b1f78 early C compiler test
Igor Sysoev <igor@sysoev.ru>
parents: 703
diff changeset
65 echo " + using HP aC++ compiler"
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
66
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
67 else
517
dadfa78d2270 nginx-0.1.33-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 493
diff changeset
68 NGX_CC_NAME=unknown
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
69
4758
1f908d2dde8d Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents: 4492
diff changeset
70 fi