Added explicit include of time.h.

Most of the systems have it included due to namespace pollution, but
relying on this is a bad idea.  Explicit include is required for at least
Debian GNU/Hurd.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4558 73f98a42-aea0-e011-b76d-00259023448c
Fixed unconditional MAX_PATH usage (ticket #22).

POSIX doesn't require it to be defined, and Debian GNU/Hurd doesn't define
it.  Note that if there is no MAX_PATH defined we have to use realpath()
with NULL argument and free() the result.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4559 73f98a42-aea0-e011-b76d-00259023448c
Fixed more gcc46 warnings in configure tests.

Steps to reproduce:

./configure --with-cc="gcc46" --with-cc-opt="-Wall -Werror -O2"


git-svn-id: svn://svn.nginx.org/nginx/trunk@4560 73f98a42-aea0-e011-b76d-00259023448c
Xslt: parser options now set with xmlCtxtUseOptions().

Note that "ctxt->loadsubset = 1" previously used isn't really correct as
ctxt->loadsubset is a bitfield now.  The use of xmlCtxtUseOptions() with
XML_PARSE_DTDLOAD is believed to be a better way to do the same thing.

Patch by Laurence Rowe.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4561 73f98a42-aea0-e011-b76d-00259023448c
Fixed calculation of range boundaries.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4562 73f98a42-aea0-e011-b76d-00259023448c
Replaced ngx_http_realip_from_t with ngx_in_cidr_t.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4563 73f98a42-aea0-e011-b76d-00259023448c
Configure: fixed msghdr.msg_control test on 64bit platforms.

Broken by r4560.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4564 73f98a42-aea0-e011-b76d-00259023448c
Fixed win32 build after realpath changes in r4559.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4565 73f98a42-aea0-e011-b76d-00259023448c
nginx-1.1.18-RELEASE


git-svn-id: svn://svn.nginx.org/nginx/trunk@4566 73f98a42-aea0-e011-b76d-00259023448c
Corrected spelling of error message (ticket #136).


git-svn-id: svn://svn.nginx.org/nginx/trunk@4568 73f98a42-aea0-e011-b76d-00259023448c
Version bump.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4569 73f98a42-aea0-e011-b76d-00259023448c
Upstream: reject upstreams without normal servers.

Such upstreams cause CPU hog later in the code as number of peers isn't
expected to be 0.  Currently this may happen either if there are only backup
servers defined in an upstream block, or if server with ipv6 address used
in an upstream block.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4570 73f98a42-aea0-e011-b76d-00259023448c
Win32: fixed memory allocation for shmem name (ticket #134).


git-svn-id: svn://svn.nginx.org/nginx/trunk@4571 73f98a42-aea0-e011-b76d-00259023448c
Win32: improved ngx_mutex_init() stub (ticket #138).

This allows to run nginx with "master_process off" under Windows.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4572 73f98a42-aea0-e011-b76d-00259023448c
Fixed spelling in multiline C comments.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4573 73f98a42-aea0-e011-b76d-00259023448c
In ngx_ptocidr(), check that the supplied prefix length is within
the allowed range.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4574 73f98a42-aea0-e011-b76d-00259023448c
Style: the function type should be on a line by itself
preceding the function.  No functional changes.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4575 73f98a42-aea0-e011-b76d-00259023448c
Comment fixed.



git-svn-id: svn://svn.nginx.org/nginx/trunk@4576 73f98a42-aea0-e011-b76d-00259023448c
Fixed signed integer overflows in timer code (ticket #145).

Integer overflow is undefined behaviour in C and this indeed caused
problems on Solaris/SPARC (at least in some cases).  Fix is to
subtract unsigned integers instead, and then cast result to a signed
one, which is implementation-defined behaviour and used to work.

Strictly speaking, we should compare (unsigned) result with the maximum
value of the corresponding signed integer type instead, this will be
defined behaviour.  This will require much more changes though, and
considered to be overkill for now.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4577 73f98a42-aea0-e011-b76d-00259023448c
Fixed mp4 module seek.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4578 73f98a42-aea0-e011-b76d-00259023448c