Commit graph

117 commits

Author SHA1 Message Date
Ruslan Ermilov
fcb4524be7 Configure: removed obsolete threads bits. 2015-03-13 19:08:27 +03:00
Ruslan Ermilov
c21a57d75b Configure: removed redundant auto/have call.
The auto/feature call above is enough to set NGX_HAVE_SENDFILE.
2015-03-13 16:43:01 +03:00
Sergey Kandaurov
d0b0203843 Configure: typo fixed. 2015-02-11 20:18:55 +03:00
Valentin Bartenev
d23fd081f7 Unbreak building on FreeBSD without file AIO.
It appeared that the NGX_HAVE_AIO_SENDFILE macro was defined regardless of
the "--with-file-aio" configure option and the NGX_HAVE_FILE_AIO macro.

Now they are related.

Additionally, fixed one macro.
2015-02-11 20:00:07 +03:00
Valentin Bartenev
6a0ea01e0c Events: support for EPOLLRDHUP (ticket #320).
Since Linux 2.6.17, epoll is able to report about peer half-closed connection
using special EPOLLRDHUP flag on a read event.
2013-07-12 14:51:07 +04:00
Maxim Dounin
98f40476ad Win32: MinGW GCC compatibility.
Several warnings silenced, notably (ngx_socket_t) -1 is now checked
on socket operations instead of -1, as ngx_socket_t is unsigned on win32
and gcc complains on comparison.

With this patch, it's now possible to compile nginx using mingw gcc,
with options we normally compile on win32.
2013-09-04 20:48:28 +04:00
Valentin Bartenev
51a7051795 Disable symlinks: use O_PATH to open path components.
It was introduced in Linux 2.6.39, glibc 2.14 and allows to obtain
file descriptors without actually opening files.  Thus made it possible
to traverse path with openat() syscalls without the need to have read
permissions for path components.  It is effectively emulates O_SEARCH
which is missing on Linux.

O_PATH is used in combination with O_RDONLY.  The last one is ignored
if O_PATH is used, but it allows nginx to not fail when it was built on
modern system (i.e. glibc 2.14+) and run with a kernel older than 2.6.39.
Then O_PATH is unknown to the kernel and ignored, while O_RDONLY is used.

Sadly, fstat() is not working with O_PATH descriptors till Linux 3.6.
As a workaround we fallback to fstatat() with the AT_EMPTY_PATH flag
that was introduced at the same time as O_PATH.
2013-09-02 08:07:59 +04:00
Ruslan Ermilov
d9aa40c49e Configure: fixed test of OS X atomic(3). 2013-05-23 10:23:21 +04:00
Maxim Dounin
338e278074 Fixed "sendmsg() failed" alerts on HP-UX.
HP-UX needs _HPUX_ALT_XOPEN_SOCKET_API to be defined to be able to
use various POSIX versions of networking functions.  Notably sendmsg()
resulted in "sendmsg() failed (9: Bad file number)" alerts without it.

See xopen_networking(7) for more details.
2012-06-18 14:11:29 +00:00
Maxim Dounin
1acd38af2e Changed default alignment to 16.
This fixes alignment problems observerd on ARMs, and likely also needed
for MIPSes.  Unless we know alignment is not required just assume we
need 16, which appears to be safe default for all architectures.

See here for details:
http://mailman.nginx.org/pipermail/nginx/2012-June/034139.html
2012-06-18 14:09:54 +00:00
Maxim Dounin
2afba4d789 Fixed more gcc46 warnings in configure tests.
Steps to reproduce:

./configure --with-cc="gcc46" --with-cc-opt="-Wall -Werror -O2"
2012-03-27 16:44:52 +00:00
Ruslan Ermilov
448f8672fd worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support. 2012-03-21 13:58:51 +00:00
Ruslan Ermilov
8a4f3a138e Fixed compilation warnings in configuration C tests.
Based on a patch by Piotr Sikora.
2012-03-15 20:39:38 +00:00
Maxim Konovalov
0330b7ef84 Copyright updated. 2012-01-18 15:07:43 +00:00
Maxim Dounin
c122b33c8c Configure: catch up with new Linux version numbering (ticket #5).
Catch up with new Linux version numbering scheme as announced at [1] and
suppress unrecognized versions to actually use default 0.

[1] https://lkml.org/lkml/2011/5/29/204
2011-08-13 15:15:50 +00:00
Igor Sysoev
3a5713a9d3 concatenate auto/os/features and auto/unix 2011-05-31 08:25:10 +00:00
Igor Sysoev
188aab8d3c use POSIX semaphores in shmtx instead of sched_yield()
number of spinlock spins are increased twice
2011-05-10 11:39:13 +00:00
Igor Sysoev
a0b669ace6 Linux accept4() support 2010-11-25 10:15:04 +00:00
Igor Sysoev
cec9b84e05 listen setfib=X 2010-07-05 13:49:16 +00:00
Igor Sysoev
c8312b7e09 posix_fadvise64() had been implemented in Linux 2.5.60 2009-11-03 16:29:47 +00:00
Igor Sysoev
38f83a56bb read_ahead 2009-09-30 13:21:52 +00:00
Igor Sysoev
fc3b7088f8 fail if no file aio was found 2009-09-10 12:08:30 +00:00
Igor Sysoev
ac0738c727 aio sendfile 2009-08-30 09:52:39 +00:00
Igor Sysoev
6ae55a7a8f FreeBSD and Linux AIO support 2009-08-28 08:12:35 +00:00
Igor Sysoev
861ed123ea fix Linux "uname -r" version matching 2009-08-24 11:04:46 +00:00
Igor Sysoev
d15561923c librt must be tested before creating Makefile
the bug has been introduced in r2817
2009-06-03 04:53:01 +00:00
Igor Sysoev
b9f1f83e27 test libdl before OpenSSL configuration
the bug has been introduced in r2818 and broke
*) SSL modules linking on Solaris 9 and lower,
*) and linking with OpenSSL built from sources on Linux
2009-05-24 14:19:16 +00:00
Igor Sysoev
c0df517dd7 backout -r2827 and add correct fix 2009-05-10 19:49:14 +00:00
Igor Sysoev
d982117b9f add MSYS support 2009-05-10 18:35:39 +00:00
Igor Sysoev
8281017379 Solaris 10 has sched_yield() in libc 2009-05-08 09:36:16 +00:00
Igor Sysoev
f71852b835 IPv6 for Win32 2009-05-07 13:05:04 +00:00
Igor Sysoev
098b8ee438 divide select module into two modules: Unix and Win32 ones 2009-05-06 14:53:54 +00:00
Igor Sysoev
2a7c97b47f fix GNU strerror_r() detection, the bug has been inroduced in r2600 2009-04-24 09:38:48 +00:00
Igor Sysoev
75fb6526fc *) move advapi32.lib to core libs since it's required for Registry and Event Log
*) delete shell32.lib since we do not use tray icon anymore
2009-04-21 14:31:40 +00:00
Igor Sysoev
a4d4842b11 autoconfigure crypt_r(): uclibc has no crypt_r() 2009-04-02 13:46:39 +00:00
Igor Sysoev
c3993c79e8 fix FreeBSD before 7 building, broken in r2616 2009-03-30 12:33:33 +00:00
Igor Sysoev
9dc8b06851 ngx_fs_bsize() 2009-03-30 07:43:06 +00:00
Igor Sysoev
7638ba274f fix Linux sendfile32() test broken in 0.3.36 2009-03-23 20:30:25 +00:00
Igor Sysoev
961090566c style fix 2009-03-23 20:26:33 +00:00
Igor Sysoev
6b71af298f disable directio for unaligned reads in Linux 2008-09-12 13:50:12 +00:00
Igor Sysoev
046c266abc Solaris directio() 2008-08-04 15:32:10 +00:00
Igor Sysoev
bf12c62e56 directio 2008-07-30 12:34:04 +00:00
Igor Sysoev
825b7e8039 *) move Darwin support to separate files
*) Darwin sendfile() support
2008-07-30 12:18:07 +00:00
Igor Sysoev
6754aabd79 use uname instead of often outdated header file 2008-03-11 16:29:18 +00:00
Igor Sysoev
5faa0de556 use correct version: real hex numbers 2008-03-11 16:27:44 +00:00
Igor Sysoev
d0fb6c4044 disable rtsig automatic building in post 2.6.18 Linux kernels 2008-03-10 14:35:21 +00:00
Igor Sysoev
6e489c997f rtsig uses own poll code 2008-03-08 15:15:18 +00:00
Igor Sysoev
c7016edacd add rpath for Solaris 2007-09-19 12:14:05 +00:00
Igor Sysoev
ce561be352 test Darwin 8 atomic(3) 2006-12-22 12:54:08 +00:00
Igor Sysoev
3babe9f770 test PCRE in FreeBSD, Linux, and NetBSD 2006-11-27 11:07:09 +00:00