[packages] nginx: update to 0.7.65
[openwrt/svn-archive/archive.git] / net / nginx / patches / 001-feature_test_fix
1 --- a/auto/cc/conf
2 +++ b/auto/cc/conf
3 @@ -135,7 +135,8 @@ if [ "$NGX_PLATFORM" != win32 ]; then
4 ngx_feature_test="char buf[30]; buf[0] = '0';
5 var(0, buf, \"%d\", 1);
6 if (buf[0] != '1') return 1"
7 - . auto/feature
8 + #. auto/feature
9 + have=$ngx_feature_name . auto/have
10
11
12 if [ "$NGX_CC_NAME" = "ccc" ]; then
13 @@ -151,7 +152,8 @@ if [ "$NGX_PLATFORM" != win32 ]; then
14 ngx_feature_test="char buf[30]; buf[0] = '0';
15 var(0, buf, \"%d\", 1);
16 if (buf[0] != '1') return 1"
17 - . auto/feature
18 + #. auto/feature
19 + have=$ngx_feature_name . auto/have
20 fi
21
22
23 --- a/auto/cc/name
24 +++ b/auto/cc/name
25 @@ -13,12 +13,12 @@ if [ "$NGX_PLATFORM" != win32 ]; then
26 ngx_feature_test=
27 . auto/feature
28
29 - if [ $ngx_found = no ]; then
30 - echo
31 - echo $0: error: C compiler $CC is not found
32 - echo
33 - exit 1
34 - fi
35 + #if [ $ngx_found = no ]; then
36 + # echo
37 + # echo $0: error: C compiler $CC is not found
38 + # echo
39 + # exit 1
40 + #fi
41
42 fi
43
44 --- a/auto/os/linux
45 +++ b/auto/os/linux
46 @@ -49,7 +49,8 @@ ngx_feature_test="int efd = 0, fd = 1, n
47 ee.data.ptr = NULL;
48 efd = epoll_create(100);
49 if (efd == -1) return 1;"
50 -. auto/feature
51 +#. auto/feature
52 +have=$ngx_feature_name . auto/have
53
54 if [ $ngx_found = yes ]; then
55 have=NGX_HAVE_CLEAR_EVENT . auto/have
56 @@ -73,7 +74,8 @@ ngx_feature_test="int s = 0, fd = 1;
57 ssize_t n; off_t off = 0;
58 n = sendfile(s, fd, &off, 1);
59 if (n == -1 && errno == ENOSYS) return 1"
60 -. auto/feature
61 +#. auto/feature
62 +have=$ngx_feature_name . auto/have
63
64 if [ $ngx_found = yes ]; then
65 CORE_SRCS="$CORE_SRCS $LINUX_SENDFILE_SRCS"
66 @@ -94,7 +96,8 @@ ngx_feature_test="int s = 0, fd = 1;
67 ssize_t n; off_t off = 0;
68 n = sendfile(s, fd, &off, 1);
69 if (n == -1 && errno == ENOSYS) return 1"
70 -. auto/feature
71 +#. auto/feature
72 +have=$ngx_feature_name . auto/have
73
74
75 ngx_include="sys/prctl.h"; . auto/include
76 @@ -108,7 +111,8 @@ ngx_feature_incs="#include <sys/prctl.h>
77 ngx_feature_path=
78 ngx_feature_libs=
79 ngx_feature_test="if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) return 1"
80 -. auto/feature
81 +#. auto/feature
82 +have=$ngx_feature_name . auto/have
83
84
85 # sched_setaffinity()
86 --- a/auto/unix
87 +++ b/auto/unix
88 @@ -117,7 +117,7 @@ ngx_feature_path=
89 ngx_feature_libs=
90 ngx_feature_test="char buf[1024]; long n; n = strerror_r(1, buf, 1024);
91 if (n < 0 || n > 1024) return 1;"
92 -. auto/feature
93 +#. auto/feature
94
95
96 # GNU style strerror_r() returns not length, but pointer
97 @@ -130,7 +130,8 @@ ngx_feature_path=
98 ngx_feature_libs=
99 ngx_feature_test="char buf[1024]; long n; n = strerror_r(1, buf, 1024);
100 if (n >= 0 && n < 1024) return 1;"
101 -. auto/feature
102 +#. auto/feature
103 +have=$ngx_feature_name . auto/have
104
105
106 ngx_feature="localtime_r()"
107 @@ -173,7 +174,8 @@ ngx_feature_test="void *p;
108 p = mmap(NULL, 4096, PROT_READ|PROT_WRITE,
109 MAP_ANON|MAP_SHARED, -1, 0);
110 if (p == MAP_FAILED) return 1;"
111 -. auto/feature
112 +#. auto/feature
113 +have=$ngx_feature_name . auto/have
114
115
116 ngx_feature='mmap("/dev/zero", MAP_SHARED)'
117 @@ -188,7 +190,8 @@ ngx_feature_test='void *p; int fd;
118 fd = open("/dev/zero", O_RDWR);
119 p = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
120 if (p == MAP_FAILED) return 1;'
121 -. auto/feature
122 +#. auto/feature
123 +have=$ngx_feature_name . auto/have
124
125
126 ngx_feature="System V shared memory"
127 @@ -202,7 +205,8 @@ ngx_feature_test="int id;
128 id = shmget(IPC_PRIVATE, 4096, (SHM_R|SHM_W|IPC_CREAT));
129 if (id == -1) return 1;
130 shmctl(id, IPC_RMID, NULL);"
131 -. auto/feature
132 +#. auto/feature
133 +have=$ngx_feature_name . auto/have
134
135
136 ngx_feature="struct msghdr.msg_control"