Development of v1.1 begins

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Configure: find: user -xtype instead of -type

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
utils: speed up mk_utils_utime2gmt non-cache path by 25%

Unsigned division is nicely faster than signed division.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Scheduler: register new incoming sockets with MK_EPOLL_READ

Previous this patch, the Scheduler used to register each new incoming
socket with the MK_EPOLL_WRITE flag, so when the connection was established
epoll_wait(2) triggered the write event, meaning 'the socket is ready to
write'. On that moment the Connection handler realised that no Scheduler
information exists for that socket and run the mk_sched_register_client()
function, then invoke epoll_ctl(2) to change the socket mode to
MK_EPOLL_READ, so it start to wait for the incoming request string.

In HTTP the client always begins the communication sending the request, so
having a socket on MK_EPOLL_WRITE and then change it to MK_EPOLL_READ adds
a little overhead.

This patch makes the initial socket be registered with MK_EPOLL_READ and
make the Connection handler identify this new connection in the
mk_conn_read() function, avoiding the extra system call described in the
previous behavior.

Here is a little benchmark done with Valgrind/Callgrind:

  +------------------------+----------------+-----------------+--------+
  | function()             | before patch   |  after patch    |  gain  |
  +------------------------+------+---------+-----------------+--------+
  |                        | self | called  |  self | called  |        |
  +------------------------+------+---------+-------+---------+--------+
  | epoll_ctl(2)           | 0.15 |  15000  |  0.10 | 10000   |  44%   |
  +------------------------+------+---------+-------+---------+--------+
  | mk_epoll_change_mode() | 0.57 |  10000  |  0.27 |  5000   |  63%   |
  +------------------------+------+---------+-------+---------+--------+

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
config: Move default workers to config_init

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Export the thread_key init for the lib

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
sched: Return the worker thread id

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
string: Add a function to turn a string to lowercase

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
config: Make use of the tolower function

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
request: Add a check for no index files

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
plugin: Check that the would-be-removed handler matches

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
.gitignore: Add versioned libs and pkgconfig files

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
utils: If the passed date is current, we know it's not in cache

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
headers: Enable printf warnings for the wrapped printf functions

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
header: Use the correct printf formatters

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
logger: Use correct printf formatter

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
dirlisting: Use correct printf formatter

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Utils: add missing mk_macros.h header

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
plugins: General cleanup, make possible functions static

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
dirlisting: Remove some gcc warnings (signed-unsigned, always true if)

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>