Redmine #4730: Add findfiles support for Windows by glob() replacement
(cherry picked from commit 6b913d85822f507a0f0eb221bc2929734cf2bac5)
Add message aid on Windows to avoid dir separator errors in findfiles.
(cherry picked from commit 468e227b004e2d7374e75e34c257423d3b9c0af5)
Add env in test commands list and resort the list.
(cherry picked from commit 02e182a13a95d5a19d3ff770a65df0f004949d85)
Fix test failure on platforms with non-standard sorting locale.
(cherry picked from commit 27f69dbbb7f5436079cb6eece90e8035dc40b7bf)
only assume ID if entire string is numeric
(cherry picked from commit 7487edb8ca5ba02ad082080fced29ad3844ed8ea)
Fix incorrect pointer cast in lock purging code.

NextDB() takes a (void **) pointer, not a (void *), so we would write
the pointer value into the struct instead, giving incorrect results
when comparing the time later.
(cherry picked from commit 7a1f14b76c08f6bdcbaf074d1f4d6629f1794f9d)
Introduce timed tests in acceptance test framework.

They enable waiting for a period of time, for example to let locks
expire, while running other, non-timed tests in the meantime. See the
README for more details.
(cherry picked from commit 314be2c078e29ad67abcd7a31558796cce1bda8b)
Redmine #6088: Fix cfengine template producing a zero sized file.

The bug depends on timing: If you run a file promise with a template,
everything works fine. Now, if you run the same promise again after
more than one minute, but less than three, the resulting file is
empty.

The reason is that the internal bundle produced by the cfengine
template engine has an ifelapsed value of 3 minutes. What would happen
then is that the file promise, which has an ifelapsed value of 1,
would execute, but none of the contained edit_line promises would,
leaving the file empty.

Fixed by reducing the ifelapsed value for internal edit_line promises
to one.

Also moved the definition to a more local header file. It is not
needed globally.
(cherry picked from commit 1f737d8114241fd43360a52db82f0912590e0a21)
Redmine#6109: Make CFEngine able to compile on old OpenSSL implementations by assuming sane defaults, and alerting the user if they are not.

Modified by: Kristian Amlie <kristian.amlie@cfengine.com>
(cherry picked from commit c608b09f4fce85e025deceedd257272d28c00c20)
Fix incorrect variable incrementation in testall.
(cherry picked from commit 1e2fcb7f5525212b71fbcebdf3088c844288f2e4)
Merge pull request #1770 from kacfengine/3.6.x

3.6.x Cherry picks
Fix CFLAGS order.

(cherry picked from commit 6cbd061d92c1dc13357d0cb87b668de9cae80798)
Fix detected flags from ACX_PTHREAD being reset.

(cherry picked from commit a131311e4f19c807a58561c37cdac99be5418fe8)
Include path should be CPPFLAGS, not CFLAGS.

(cherry picked from commit 19a5d6ac640e1e75e262cc1e575a8b3470bacf7b)
Revert "Retrying SSL_accept and SSL_connect if error.", again.

This reverts commit 39375e1bb04f165d8fe996734fe17eaccc78ca81.

All our code uses *blocking* sockets. We shouldn't have to deal with
fragile polling loops and secondary time-outs with no real reason.

There *is* one case that we get the SSL_ERROR_WANT_READ error even
though our socket is blocking, but I'll comment and cover that one case
with a separate pull request.

Conflicts:
	cf-serverd/tls_server.c
	libcfnet/tls_client.c

(cherry picked from commit 098b7a4787fe24b5b92ca4d42bc502ba2b1e617b)
Make sure there are no lingering threads when we clean up.

(cherry picked from commit 7ec31723d053f3affb5e2356245dbe707c701dbf)

Conflicts:
	cf-serverd/cf-serverd-functions.c