Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@ nghttp2相关参考:https://github.com/y123456yz/reading-and-annotate-nghttp2
===================================
步骤1:这里根据需要编译自己的模块
cd nginx-1.9.2
./configure --add-module=./src/mytest_config --add-module=./src/my_test_module --add-module=./src/mytest_subrequest --add-module=./src/mytest_upstream --add-module=./src/ngx_http_myfilter_module --with-debug --with-file-aio --add-module=./src/sendfile_test --with-threads --add-module=/var/yyz/nginx-1.9.2/src/echo-nginx-module-master --add-module=./src/nginx-requestkey-module-master/ --with-http_secure_link_module --add-module=./src/redis2-nginx-module-master/ --add-module=./src/lua-nginx-module-master/
./configure --add-module=./src/mytest_config --add-module=./src/my_test_module --add-module=./src/mytest_subrequest --add-module=./src/mytest_upstream --add-module=./src/ngx_http_myfilter_module --with-debug --with-file-aio --add-module=./src/sendfile_test --with-threads --add-module=./src/nginx-requestkey-module-master/ --with-http_secure_link_module --add-module=./src/redis2-nginx-module-master/

步骤2:make && make install
697 changes: 5 additions & 692 deletions nginx-1.9.2/objs/Makefile

Large diffs are not rendered by default.

195 changes: 93 additions & 102 deletions nginx-1.9.2/objs/autoconf.err
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ checking for limits.h
----------------------------------------
checking for sys/filio.h

objs/autotest.c:3:23: error: sys/filio.h: No such file or directory
objs/autotest.c:3:23: fatal error: sys/filio.h: No such file or directory
#include <sys/filio.h>
^
compilation terminated.
----------


Expand Down Expand Up @@ -76,29 +79,6 @@ checking for EPOLLRDHUP
----------------------------------------
checking for O_PATH

objs/autotest.c: In function 'main':
objs/autotest.c:10: error: 'O_PATH' undeclared (first use in this function)
objs/autotest.c:10: error: (Each undeclared identifier is reported only once
objs/autotest.c:10: error: for each function it appears in.)
objs/autotest.c:11: error: 'AT_EMPTY_PATH' undeclared (first use in this function)
----------

#include <sys/types.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main() {
int fd; struct stat sb;
fd = openat(AT_FDCWD, ".", O_PATH|O_DIRECTORY|O_NOFOLLOW);
if (fstatat(fd, "", &sb, AT_EMPTY_PATH) != 0) return 1;
return 0;
}

----------
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o objs/autotest objs/autotest.c
----------

----------------------------------------
checking for sendfile()
Expand Down Expand Up @@ -135,12 +115,10 @@ checking for poll()
----------------------------------------
checking for /dev/poll

objs/autotest.c:4:25: error: sys/devpoll.h: No such file or directory
objs/autotest.c: In function 'main':
objs/autotest.c:7: error: storage size of 'dvp' isn't known
objs/autotest.c:12: error: 'DP_POLL' undeclared (first use in this function)
objs/autotest.c:12: error: (Each undeclared identifier is reported only once
objs/autotest.c:12: error: for each function it appears in.)
objs/autotest.c:4:25: fatal error: sys/devpoll.h: No such file or directory
#include <sys/devpoll.h>
^
compilation terminated.
----------

#include <sys/types.h>
Expand All @@ -165,7 +143,10 @@ cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o objs/autotest objs/autotest.c
----------------------------------------
checking for kqueue

objs/autotest.c:4:23: error: sys/event.h: No such file or directory
objs/autotest.c:4:23: fatal error: sys/event.h: No such file or directory
#include <sys/event.h>
^
compilation terminated.
----------

#include <sys/types.h>
Expand All @@ -184,9 +165,9 @@ cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o objs/autotest objs/autotest.c
----------------------------------------
checking for crypt()

/tmp/ccXI9IB5.o: In function `main':
/tmp/ccd6tztX.o: In function `main':
autotest.c:(.text+0xf): undefined reference to `crypt'
collect2: ld returned 1 exit status
collect2: error: ld returned 1 exit status
----------

#include <sys/types.h>
Expand All @@ -210,9 +191,10 @@ checking for crypt() in libcrypt
checking for F_READAHEAD

objs/autotest.c: In function 'main':
objs/autotest.c:7: error: 'F_READAHEAD' undeclared (first use in this function)
objs/autotest.c:7: error: (Each undeclared identifier is reported only once
objs/autotest.c:7: error: for each function it appears in.)
objs/autotest.c:7:14: error: 'F_READAHEAD' undeclared (first use in this function)
fcntl(0, F_READAHEAD, 1);;
^
objs/autotest.c:7:14: note: each undeclared identifier is reported only once for each function it appears in
----------

#include <sys/types.h>
Expand Down Expand Up @@ -240,9 +222,10 @@ checking for O_DIRECT
checking for F_NOCACHE

objs/autotest.c: In function 'main':
objs/autotest.c:7: error: 'F_NOCACHE' undeclared (first use in this function)
objs/autotest.c:7: error: (Each undeclared identifier is reported only once
objs/autotest.c:7: error: for each function it appears in.)
objs/autotest.c:7:14: error: 'F_NOCACHE' undeclared (first use in this function)
fcntl(0, F_NOCACHE, 1);;
^
objs/autotest.c:7:14: note: each undeclared identifier is reported only once for each function it appears in
----------

#include <sys/types.h>
Expand All @@ -262,9 +245,10 @@ cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o objs/autotest objs/autotest.c
checking for directio()

objs/autotest.c: In function 'main':
objs/autotest.c:8: error: 'DIRECTIO_ON' undeclared (first use in this function)
objs/autotest.c:8: error: (Each undeclared identifier is reported only once
objs/autotest.c:8: error: for each function it appears in.)
objs/autotest.c:8:17: error: 'DIRECTIO_ON' undeclared (first use in this function)
directio(0, DIRECTIO_ON);;
^
objs/autotest.c:8:17: note: each undeclared identifier is reported only once for each function it appears in
----------

#include <sys/types.h>
Expand Down Expand Up @@ -292,9 +276,9 @@ checking for statvfs()
----------------------------------------
checking for dlopen()

/tmp/ccaWkCPG.o: In function `main':
/tmp/ccm4TCq7.o: In function `main':
autotest.c:(.text+0xf): undefined reference to `dlopen'
collect2: ld returned 1 exit status
collect2: error: ld returned 1 exit status
----------

#include <sys/types.h>
Expand Down Expand Up @@ -322,9 +306,10 @@ checking for sched_yield()
checking for SO_SETFIB

objs/autotest.c: In function 'main':
objs/autotest.c:7: error: 'SO_SETFIB' undeclared (first use in this function)
objs/autotest.c:7: error: (Each undeclared identifier is reported only once
objs/autotest.c:7: error: for each function it appears in.)
objs/autotest.c:7:31: error: 'SO_SETFIB' undeclared (first use in this function)
setsockopt(0, SOL_SOCKET, SO_SETFIB, NULL, 0);
^
objs/autotest.c:7:31: note: each undeclared identifier is reported only once for each function it appears in
----------

#include <sys/types.h>
Expand All @@ -348,9 +333,10 @@ checking for SO_REUSEPORT
checking for SO_ACCEPTFILTER

objs/autotest.c: In function 'main':
objs/autotest.c:7: error: 'SO_ACCEPTFILTER' undeclared (first use in this function)
objs/autotest.c:7: error: (Each undeclared identifier is reported only once
objs/autotest.c:7: error: for each function it appears in.)
objs/autotest.c:7:31: error: 'SO_ACCEPTFILTER' undeclared (first use in this function)
setsockopt(0, SOL_SOCKET, SO_ACCEPTFILTER, NULL, 0);
^
objs/autotest.c:7:31: note: each undeclared identifier is reported only once for each function it appears in
----------

#include <sys/types.h>
Expand All @@ -377,26 +363,6 @@ checking for TCP_KEEPIDLE
----------------------------------------
checking for TCP_FASTOPEN

objs/autotest.c: In function 'main':
objs/autotest.c:9: error: 'TCP_FASTOPEN' undeclared (first use in this function)
objs/autotest.c:9: error: (Each undeclared identifier is reported only once
objs/autotest.c:9: error: for each function it appears in.)
----------

#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>

int main() {
setsockopt(0, IPPROTO_TCP, TCP_FASTOPEN, NULL, 0);
return 0;
}

----------
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o objs/autotest objs/autotest.c
----------

----------------------------------------
checking for TCP_INFO
Expand All @@ -410,9 +376,10 @@ checking for accept4()
checking for kqueue AIO support

objs/autotest.c: In function 'main':
objs/autotest.c:8: error: 'SIGEV_KEVENT' undeclared (first use in this function)
objs/autotest.c:8: error: (Each undeclared identifier is reported only once
objs/autotest.c:8: error: for each function it appears in.)
objs/autotest.c:8:56: error: 'SIGEV_KEVENT' undeclared (first use in this function)
iocb.aio_sigevent.sigev_notify = SIGEV_KEVENT;
^
objs/autotest.c:8:56: note: each undeclared identifier is reported only once for each function it appears in
----------

#include <sys/types.h>
Expand Down Expand Up @@ -497,9 +464,9 @@ checking for time_t size
----------------------------------------
checking for setproctitle()

/tmp/ccs4eRzB.o: In function `main':
/tmp/ccWbobo6.o: In function `main':
autotest.c:(.text+0xf): undefined reference to `setproctitle'
collect2: ld returned 1 exit status
collect2: error: ld returned 1 exit status
----------

#include <sys/types.h>
Expand All @@ -526,7 +493,7 @@ checking for pwrite()
----------------------------------------
checking for sys_nerr

/tmp/ccAWbcIQ.o: In function `main':
/tmp/ccuPQ5od.o: In function `main':
autotest.c:(.text+0x6): warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
135
----------------------------------------
Expand Down Expand Up @@ -556,10 +523,10 @@ checking for System V shared memory
----------------------------------------
checking for POSIX semaphores

/tmp/ccDI4Ali.o: In function `main':
/tmp/ccfCdvYk.o: In function `main':
autotest.c:(.text+0x1a): undefined reference to `sem_init'
autotest.c:(.text+0x32): undefined reference to `sem_destroy'
collect2: ld returned 1 exit status
collect2: error: ld returned 1 exit status
----------

#include <sys/types.h>
Expand Down Expand Up @@ -597,8 +564,12 @@ checking for struct tm.tm_gmtoff
checking for struct dirent.d_namlen

objs/autotest.c: In function 'main':
objs/autotest.c:8: error: 'struct dirent' has no member named 'd_namlen'
objs/autotest.c:9: error: 'struct dirent' has no member named 'd_namlen'
objs/autotest.c:8:28: error: 'struct dirent' has no member named 'd_namlen'
struct dirent dir; dir.d_namlen = 0;
^
objs/autotest.c:9:41: error: 'struct dirent' has no member named 'd_namlen'
printf("%d", (int) dir.d_namlen);
^
----------

#include <sys/types.h>
Expand Down Expand Up @@ -633,67 +604,87 @@ checking for getaddrinfo()


----------------------------------------
checking for LuaJIT library in /usr/local/lib and /usr/local/include/luajit-2.0 (specified by the LUAJIT_LIB and LUAJIT_INC env, with -ldl)
checking for PCRE library


----------------------------------------
checking for export symbols by default (-E)
checking for PCRE JIT support


----------------------------------------
checking for export symbols by default (--export-all-symbols)
checking for md5 in system md library

/usr/bin/ld: unrecognized option '--export-all-symbols'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
objs/autotest.c:4:17: fatal error: md5.h: No such file or directory
#include <md5.h>
^
compilation terminated.
----------

#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <md5.h>

int main() {
printf("hello");;
MD5_CTX md5; MD5Init(&md5);
return 0;
}

----------
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o objs/autotest objs/autotest.c -Wl,--export-all-symbols
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o objs/autotest objs/autotest.c -lmd
----------

----------------------------------------
checking for SO_PASSCRED
checking for md5 in system md5 library

objs/autotest.c:4:17: fatal error: md5.h: No such file or directory
#include <md5.h>
^
compilation terminated.
----------

#include <sys/types.h>
#include <unistd.h>
#include <md5.h>

int main() {
MD5_CTX md5; MD5Init(&md5);
return 0;
}

----------
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o objs/autotest objs/autotest.c -lmd5
----------

----------------------------------------
checking for PCRE library
checking for md5 in system OpenSSL crypto library


----------------------------------------
checking for PCRE JIT support
checking for sha1 in system md library

objs/autotest.c: In function 'main':
objs/autotest.c:9: error: 'PCRE_CONFIG_JIT' undeclared (first use in this function)
objs/autotest.c:9: error: (Each undeclared identifier is reported only once
objs/autotest.c:9: error: for each function it appears in.)
objs/autotest.c:4:17: fatal error: sha.h: No such file or directory
#include <sha.h>
^
compilation terminated.
----------

#include <sys/types.h>
#include <unistd.h>
#include <pcre.h>
#include <sha.h>

int main() {
int jit = 0;
pcre_free_study(NULL);
pcre_config(PCRE_CONFIG_JIT, &jit);
if (jit != 1) return 1;;
SHA_CTX sha1; SHA1_Init(&sha1);
return 0;
}

----------
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o objs/autotest objs/autotest.c -lpcre
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o objs/autotest objs/autotest.c -lmd
----------

----------------------------------------
checking for sha1 in system OpenSSL crypto library


----------------------------------------
checking for zlib library

Binary file modified nginx-1.9.2/objs/nginx
Binary file not shown.
Loading