gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] GNU libmicrohttpd branch master updated. c3


From: gitolite
Subject: [GNUnet-SVN] [libmicrohttpd] GNU libmicrohttpd branch master updated. c39f9bfb2696e0b7c04c6f4b90ea0ab8b646e064
Date: Mon, 7 Nov 2016 23:00:31 +0100 (CET)

The branch, master has been updated
       via  c39f9bfb2696e0b7c04c6f4b90ea0ab8b646e064 (commit)
       via  fdf24fa69fb92db404db45f37563729947c9e380 (commit)
       via  bae7dc05a841adfd7788076c83c7c02aa3c57046 (commit)
       via  a48ca85fb74479a8a81e137138a30fab58f3eb1e (commit)
      from  4e4a1ce2bb9f6cd1d38fdc5f169d8956afab70c0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c39f9bfb2696e0b7c04c6f4b90ea0ab8b646e064
Author: Evgeny Grin (Karlson2k) <address@hidden>
Date:   Tue Nov 8 00:37:29 2016 +0300

    Specify that flag MHD_USE_INTERNAL_POLLING_THREAD is mandatory if 
MHD_USE_THREAD_PER_CONNECTION is used

commit fdf24fa69fb92db404db45f37563729947c9e380
Author: Evgeny Grin (Karlson2k) <address@hidden>
Date:   Tue Nov 8 00:21:02 2016 +0300

    Fixed descriptions in comments

commit bae7dc05a841adfd7788076c83c7c02aa3c57046
Author: Evgeny Grin (Karlson2k) <address@hidden>
Date:   Tue Nov 8 00:46:42 2016 +0300

    Fixed wrong flag name in documentation.

commit a48ca85fb74479a8a81e137138a30fab58f3eb1e
Author: Evgeny Grin (Karlson2k) <address@hidden>
Date:   Mon Nov 7 23:15:42 2016 +0300

    Renamed daemon flags:
    MHD_USE_SELECT_INTERNALLY -> MHD_USE_INTERNAL_POLLING_THREAD
    MHD_USE_POLL_INTERNALLY -> MHD_USE_POLL_INTERNAL_THREAD
    MHD_USE_EPOLL_INTERNALLY -> MHD_USE_EPOLL_INTERNAL_THREAD

-----------------------------------------------------------------------

Summary of changes:
 doc/chapters/hellobrowser.inc                      |  2 +-
 doc/chapters/processingpost.inc                    |  2 +-
 doc/chapters/tlsauthentication.inc                 |  6 +-
 doc/examples/basicauthentication.c                 |  2 +-
 doc/examples/hellobrowser.c                        |  2 +-
 doc/examples/largepost.c                           |  2 +-
 doc/examples/logging.c                             |  2 +-
 doc/examples/responseheaders.c                     |  2 +-
 doc/examples/simplepost.c                          |  2 +-
 doc/examples/tlsauthentication.c                   |  2 +-
 doc/libmicrohttpd.texi                             | 34 +++++-----
 src/examples/benchmark.c                           |  2 +-
 src/examples/benchmark_https.c                     |  2 +-
 src/examples/chunked_example.c                     |  4 +-
 src/examples/demo.c                                |  2 +-
 src/examples/demo_https.c                          |  2 +-
 src/examples/dual_stack_example.c                  |  2 +-
 src/examples/minimal_example.c                     |  4 +-
 src/examples/upgrade_example.c                     |  2 +-
 src/include/microhttpd.h                           | 75 ++++++++++++++--------
 src/microhttpd/connection.c                        |  4 +-
 src/microhttpd/daemon.c                            | 41 +++++++-----
 src/microhttpd/internal.h                          |  3 +-
 src/microhttpd/test_daemon.c                       |  4 +-
 src/microhttpd/test_upgrade.c                      | 19 +++---
 src/testcurl/https/test_empty_response.c           |  2 +-
 src/testcurl/https/test_https_get.c                |  4 +-
 src/testcurl/https/test_https_get_parallel.c       |  8 +--
 .../https/test_https_get_parallel_threads.c        |  4 +-
 src/testcurl/https/test_https_multi_daemon.c       |  4 +-
 src/testcurl/https/test_https_session_info.c       |  2 +-
 src/testcurl/https/test_https_sni.c                |  2 +-
 src/testcurl/https/test_https_time_out.c           |  2 +-
 src/testcurl/https/test_tls_authentication.c       |  2 +-
 src/testcurl/https/test_tls_extensions.c           |  2 +-
 src/testcurl/https/test_tls_options.c              |  2 +-
 src/testcurl/perf_get.c                            |  6 +-
 src/testcurl/perf_get_concurrent.c                 |  6 +-
 src/testcurl/test_concurrent_stop.c                |  4 +-
 src/testcurl/test_delete.c                         |  6 +-
 src/testcurl/test_digestauth.c                     |  2 +-
 src/testcurl/test_digestauth_with_arguments.c      |  2 +-
 src/testcurl/test_get.c                            | 12 ++--
 src/testcurl/test_get_chunked.c                    |  6 +-
 src/testcurl/test_get_response_cleanup.c           |  6 +-
 src/testcurl/test_get_sendfile.c                   |  8 +--
 src/testcurl/test_iplimit.c                        |  4 +-
 src/testcurl/test_large_put.c                      |  6 +-
 src/testcurl/test_long_header.c                    |  4 +-
 src/testcurl/test_post.c                           |  8 +--
 src/testcurl/test_post_loop.c                      |  6 +-
 src/testcurl/test_postform.c                       |  6 +-
 src/testcurl/test_process_headers.c                |  6 +-
 src/testcurl/test_put.c                            |  6 +-
 src/testcurl/test_put_chunked.c                    |  6 +-
 src/testcurl/test_quiesce.c                        | 16 ++---
 src/testcurl/test_quiesce_stream.c                 |  2 +-
 src/testcurl/test_start_stop.c                     |  6 +-
 src/testcurl/test_termination.c                    |  2 +-
 src/testcurl/test_timeout.c                        |  4 +-
 src/testcurl/test_urlparse.c                       |  2 +-
 src/testzzuf/test_get.c                            |  4 +-
 src/testzzuf/test_get_chunked.c                    |  4 +-
 src/testzzuf/test_long_header.c                    |  4 +-
 src/testzzuf/test_post.c                           |  4 +-
 src/testzzuf/test_post_form.c                      |  4 +-
 src/testzzuf/test_put.c                            |  4 +-
 src/testzzuf/test_put_chunked.c                    |  4 +-
 src/testzzuf/test_put_large.c                      |  4 +-
 69 files changed, 232 insertions(+), 200 deletions(-)

diff --git a/doc/chapters/hellobrowser.inc b/doc/chapters/hellobrowser.inc
index bcd259b..73b7b0b 100644
--- a/doc/chapters/hellobrowser.inc
+++ b/doc/chapters/hellobrowser.inc
@@ -95,7 +95,7 @@ int main ()
 {
   struct MHD_Daemon *daemon;
 
-  daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL,
+  daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL,
                              &answer_to_connection, NULL, MHD_OPTION_END);
   if (NULL == daemon) return 1;
 
diff --git a/doc/chapters/processingpost.inc b/doc/chapters/processingpost.inc
index 92f93f5..920dac3 100644
--- a/doc/chapters/processingpost.inc
+++ b/doc/chapters/processingpost.inc
@@ -134,7 +134,7 @@ in the main function.
 
 @verbatim
 ...
-daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL,
+daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL,
                            &answer_to_connection, NULL, 
                           MHD_OPTION_NOTIFY_COMPLETED, &request_completed, 
NULL,
                           MHD_OPTION_END);
diff --git a/doc/chapters/tlsauthentication.inc 
b/doc/chapters/tlsauthentication.inc
index c1b6673..8bdfa76 100644
--- a/doc/chapters/tlsauthentication.inc
+++ b/doc/chapters/tlsauthentication.inc
@@ -68,7 +68,7 @@ main ()
 and then we point the @emph{MHD} daemon to it upon initalization.
 @verbatim
 
-  daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL,
+  daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL,
                             PORT, NULL, NULL,
                              &answer_to_connection, NULL,
                              MHD_OPTION_HTTPS_MEM_KEY, key_pem,
@@ -138,7 +138,7 @@ To do this, you will need to link your application against 
@emph{gnutls}.
 Next, when you start the MHD daemon, you must specify the root CA that you're
 willing to trust:
 @verbatim
-  daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL,
+  daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL,
                             PORT, NULL, NULL,
                              &answer_to_connection, NULL,
                              MHD_OPTION_HTTPS_MEM_KEY, key_pem,
@@ -326,7 +326,7 @@ of one domain is that you need to provide a callback 
instead of the key
 and certificate.  For example, when you start the MHD daemon, you could
 do this:
 @verbatim
-  daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL,
+  daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL,
                             PORT, NULL, NULL,
                              &answer_to_connection, NULL,
                              MHD_OPTION_HTTPS_CERT_CALLBACK, &sni_callback,
diff --git a/doc/examples/basicauthentication.c 
b/doc/examples/basicauthentication.c
index 407738b..22873d8 100644
--- a/doc/examples/basicauthentication.c
+++ b/doc/examples/basicauthentication.c
@@ -71,7 +71,7 @@ main ()
 {
   struct MHD_Daemon *daemon;
 
-  daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL,
+  daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL,
                              &answer_to_connection, NULL, MHD_OPTION_END);
   if (NULL == daemon)
     return 1;
diff --git a/doc/examples/hellobrowser.c b/doc/examples/hellobrowser.c
index df38e72..5031685 100644
--- a/doc/examples/hellobrowser.c
+++ b/doc/examples/hellobrowser.c
@@ -39,7 +39,7 @@ main ()
 {
   struct MHD_Daemon *daemon;
 
-  daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL,
+  daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL,
                              &answer_to_connection, NULL, MHD_OPTION_END);
   if (NULL == daemon)
     return 1;
diff --git a/doc/examples/largepost.c b/doc/examples/largepost.c
index dc0e76c..edaebd0 100644
--- a/doc/examples/largepost.c
+++ b/doc/examples/largepost.c
@@ -282,7 +282,7 @@ main ()
 {
   struct MHD_Daemon *daemon;
 
-  daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY,
+  daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD,
                              PORT, NULL, NULL,
                              &answer_to_connection, NULL,
                              MHD_OPTION_NOTIFY_COMPLETED, &request_completed, 
NULL,
diff --git a/doc/examples/logging.c b/doc/examples/logging.c
index c896a7d..aff2142 100644
--- a/doc/examples/logging.c
+++ b/doc/examples/logging.c
@@ -43,7 +43,7 @@ main ()
 {
   struct MHD_Daemon *daemon;
 
-  daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL,
+  daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL,
                              &answer_to_connection, NULL, MHD_OPTION_END);
   if (NULL == daemon)
     return 1;
diff --git a/doc/examples/responseheaders.c b/doc/examples/responseheaders.c
index 1ab89e0..aa5cd7e 100644
--- a/doc/examples/responseheaders.c
+++ b/doc/examples/responseheaders.c
@@ -73,7 +73,7 @@ main ()
 {
   struct MHD_Daemon *daemon;
 
-  daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL,
+  daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL,
                              &answer_to_connection, NULL, MHD_OPTION_END);
   if (NULL == daemon)
     return 1;
diff --git a/doc/examples/simplepost.c b/doc/examples/simplepost.c
index d167151..b0b458c 100644
--- a/doc/examples/simplepost.c
+++ b/doc/examples/simplepost.c
@@ -183,7 +183,7 @@ main ()
 {
   struct MHD_Daemon *daemon;
 
-  daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL,
+  daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL,
                              &answer_to_connection, NULL,
                              MHD_OPTION_NOTIFY_COMPLETED, request_completed,
                              NULL, MHD_OPTION_END);
diff --git a/doc/examples/tlsauthentication.c b/doc/examples/tlsauthentication.c
index 4147813..742837e 100644
--- a/doc/examples/tlsauthentication.c
+++ b/doc/examples/tlsauthentication.c
@@ -254,7 +254,7 @@ main ()
     }
 
   daemon =
-    MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS, PORT, NULL,
+    MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS, PORT, 
NULL,
                       NULL, &answer_to_connection, NULL,
                       MHD_OPTION_HTTPS_MEM_KEY, key_pem,
                       MHD_OPTION_HTTPS_MEM_CERT, cert_pem, MHD_OPTION_END);
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi
index 82bf9b2..ae26295 100644
--- a/doc/libmicrohttpd.texi
+++ b/doc/libmicrohttpd.texi
@@ -435,15 +435,16 @@ compiler).
 @deftp {Enumeration} MHD_FLAG
 Options for the MHD daemon.
 
-Note that if neither @code{MHD_USE_THREAD_PER_CONNECTION} nor
address@hidden is used, the client wants control over
-the process and will call the appropriate microhttpd callbacks.
+Note that MHD will run automatically in background thread(s) only
+if @code{MHD_USE_INTERNAL_POLLING_THREAD} is used. Otherwise caller
+(application) must use @code{MHD_run} or @code{MHD_run_from_select}
+to have MHD processed network connections and data.
 
 Starting the daemon may also fail if a particular option is not
 implemented or not supported on the target platform (i.e. no support for
 @acronym{SSL}, threads or IPv6).  SSL support generally depends on
 options given during MHD compilation.  Threaded operations
-(including @code{MHD_USE_SELECT_INTERNALLY}) are not supported on
+(including @code{MHD_USE_INTERNAL_POLLING_THREAD}) are not supported on
 Symbian.
 
 @table @code
@@ -468,7 +469,7 @@ NULL.
 @item MHD_USE_THREAD_PER_CONNECTION
 Run using one thread per connection.
 
address@hidden MHD_USE_SELECT_INTERNALLY
address@hidden MHD_USE_INTERNAL_POLLING_THREAD
 Run using an internal thread doing @code{SELECT}.
 
 @item MHD_USE_IPv6
@@ -502,10 +503,9 @@ production.
 @cindex select
 Use @code{poll()} instead of @code{select()}. This allows sockets with
 descriptors @code{>= FD_SETSIZE}.  This option currently only works in
-conjunction with @code{MHD_USE_THREAD_PER_CONNECTION} or
address@hidden (at this point).  If you specify
address@hidden and the local platform does not support it,
address@hidden will return NULL.
+conjunction with @code{MHD_USE_INTERNAL_POLLING_THREAD} (at this point).
+If you specify @code{MHD_USE_POLL} and the local platform does not
+support it, @code{MHD_start_daemon} will return NULL.
 
 @item MHD_USE_EPOLL
 @cindex FD_SETSIZE
@@ -566,10 +566,10 @@ with using a thread pool; if it is used,
 @cindex quiesce
 Force MHD to use a signal inter-thread communication channel to notify
 the event loop (of threads) of our shutdown and other events.
-This is required if an appliction uses
address@hidden or @code{MHD_USE_THREAD_PER_CONNECTION}
-and then performs @code{MHD_quiesce_daemon} (which eliminates our
-ability to signal termination via the listen socket).  In these modes,
+This is required if an application uses
address@hidden and then performs
address@hidden (which eliminates our ability to signal
+termination via the listen socket).  In these modes,
 @code{MHD_quiesce_daemon} will fail if this option was not set.  Also,
 use of this option is automatic (as in, you do not even have to
 specify it), if @code{MHD_USE_NO_LISTEN_SOCKET} is specified.  In
@@ -890,7 +890,7 @@ with the "--disable-messages" flag.
 Number (unsigned int) of threads in thread pool. Enable
 thread pooling by setting this value to to something
 greater than 1. Currently, thread model must be
-MHD_USE_SELECT_INTERNALLY if thread pooling is enabled
+MHD_USE_INTERNAL_POLLING_THREAD if thread pooling is enabled
 (@code{MHD_start_daemon} returns @code{NULL} for an unsupported thread
 model).
 
@@ -1603,7 +1603,7 @@ set for connections.  This function must not be called if 
the
 @code{MHD_USE_THREAD_PER_CONNECTION} mode is in use (since then it is
 not meaningful to ask for a timeout, after all, there is concurrenct
 activity).  The function must also not be called by user-code if
address@hidden is in use.  In the latter case, the
address@hidden is in use.  In the latter case, the
 behavior is undefined.
 
 @table @var
@@ -2663,7 +2663,7 @@ Request the file-descriptor number that MHD is using for 
epoll.  If
 the build is not supporting epoll, NULL is returned; if we are using a
 thread pool or this daemon was not started with
 @code{MHD_USE_EPOLL}, (a pointer to) -1 is returned.  If we are
-using @code{MHD_USE_SELECT_INTERNALLY} or are in 'external' select mode, the
+using @code{MHD_USE_INTERNAL_POLLING_THREAD} or are in 'external' select mode, 
the
 internal epoll FD is returned.  This function must be used in external
 select mode with epoll to obtain the FD to call epoll on.  No extra
 arguments should be passed.
@@ -2891,7 +2891,7 @@ MHD_USE_POLL can be used.
 @item MHD_FEATURE_EPOLL
 Get whether @code{epoll()} is supported. If supported then Flags
 MHD_USE_EPOLL and
-MHD_USE_EPOLL_INTERNALLY can be used.
+MHD_USE_EPOLL_INTERNAL_THREAD can be used.
 
 @item MHD_FEATURE_SHUTDOWN_LISTEN_SOCKET
 Get whether shutdown on listen socket to signal other
diff --git a/src/examples/benchmark.c b/src/examples/benchmark.c
index 54ee0c9..bd17b37 100644
--- a/src/examples/benchmark.c
+++ b/src/examples/benchmark.c
@@ -134,7 +134,7 @@ main (int argc, char *const *argv)
                                  MHD_HTTP_HEADER_CONNECTION,
                                  "close");
 #endif
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | 
MHD_USE_SUPPRESS_DATE_NO_CLOCK
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | 
MHD_USE_SUPPRESS_DATE_NO_CLOCK
 #ifdef EPOLL_SUPPORT
                        | MHD_USE_EPOLL | MHD_USE_EPOLL_TURBO
 #endif
diff --git a/src/examples/benchmark_https.c b/src/examples/benchmark_https.c
index d382517..009944d 100644
--- a/src/examples/benchmark_https.c
+++ b/src/examples/benchmark_https.c
@@ -180,7 +180,7 @@ main (int argc, char *const *argv)
   response = MHD_create_response_from_buffer (strlen (PAGE),
                                              (void *) PAGE,
                                              MHD_RESPMEM_PERSISTENT);
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS
 #ifdef EPOLL_SUPPORT
                        | MHD_USE_EPOLL | MHD_USE_EPOLL_TURBO
 #endif
diff --git a/src/examples/chunked_example.c b/src/examples/chunked_example.c
index 08bb82d..c9baa5b 100644
--- a/src/examples/chunked_example.c
+++ b/src/examples/chunked_example.c
@@ -78,8 +78,8 @@ main (int argc, char *const *argv)
       printf ("%s PORT\n", argv[0]);
       return 1;
     }
-  d = MHD_start_daemon (// MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | 
MHD_USE_POLL,
-                       MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (// MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | 
MHD_USE_POLL,
+                       MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                        // MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | 
MHD_USE_POLL,
                        // MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
                         atoi (argv[1]),
diff --git a/src/examples/demo.c b/src/examples/demo.c
index 400f31c..ef2a178 100644
--- a/src/examples/demo.c
+++ b/src/examples/demo.c
@@ -883,7 +883,7 @@ main (int argc, char *const *argv)
                                                             
MHD_RESPMEM_PERSISTENT);
   mark_as_html (internal_error_response);
   update_directory ();
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG
 #ifdef EPOLL_SUPPORT
                        | MHD_USE_EPOLL
 #endif
diff --git a/src/examples/demo_https.c b/src/examples/demo_https.c
index 78c4fdb..ee8643c 100644
--- a/src/examples/demo_https.c
+++ b/src/examples/demo_https.c
@@ -932,7 +932,7 @@ main (int argc, char *const *argv)
                                                             
MHD_RESPMEM_PERSISTENT);
   mark_as_html (internal_error_response);
   update_directory ();
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | MHD_USE_TLS
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | 
MHD_USE_TLS
 #ifdef EPOLL_SUPPORT
                        | MHD_USE_EPOLL
 #endif
diff --git a/src/examples/dual_stack_example.c 
b/src/examples/dual_stack_example.c
index 12d50f4..04ca3ca 100644
--- a/src/examples/dual_stack_example.c
+++ b/src/examples/dual_stack_example.c
@@ -68,7 +68,7 @@ main (int argc, char *const *argv)
       printf ("%s PORT\n", argv[0]);
       return 1;
     }
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | 
MHD_USE_DUAL_STACK,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | 
MHD_USE_DUAL_STACK,
                        atoi (argv[1]),
                        NULL, NULL, &ahc_echo, PAGE,
                        MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 120,
diff --git a/src/examples/minimal_example.c b/src/examples/minimal_example.c
index 313651c..a1138f2 100644
--- a/src/examples/minimal_example.c
+++ b/src/examples/minimal_example.c
@@ -67,8 +67,8 @@ main (int argc, char *const *argv)
       printf ("%s PORT\n", argv[0]);
       return 1;
     }
-  d = MHD_start_daemon (// MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | 
MHD_USE_POLL,
-                       MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (// MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | 
MHD_USE_POLL,
+                       MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                        // MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | 
MHD_USE_POLL,
                        // MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
                         atoi (argv[1]),
diff --git a/src/examples/upgrade_example.c b/src/examples/upgrade_example.c
index a917b72..c03755f 100644
--- a/src/examples/upgrade_example.c
+++ b/src/examples/upgrade_example.c
@@ -275,7 +275,7 @@ main (int argc,
       printf ("%s PORT\n", argv[0]);
       return 1;
     }
-  d = MHD_start_daemon (MHD_ALLOW_UPGRADE | MHD_USE_SELECT_INTERNALLY | 
MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_ALLOW_UPGRADE | MHD_USE_INTERNAL_POLLING_THREAD | 
MHD_USE_DEBUG,
                         atoi (argv[1]),
                         NULL, NULL,
                         &ahc_echo, NULL,
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index f87b675..4a8c814 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -516,13 +516,14 @@ struct MHD_PostProcessor;
 /**
  * @brief Flags for the `struct MHD_Daemon`.
  *
- * Note that if neither #MHD_USE_THREAD_PER_CONNECTION nor
- * #MHD_USE_SELECT_INTERNALLY is used, the client wants control over
- * the process and will call the appropriate microhttpd callbacks.
+ * Note that MHD will run automatically in background thread(s) only
+ * if #MHD_USE_INTERNAL_POLLING_THREAD is used. Otherwise caller (application)
+ * must use #MHD_run() or #MHD_run_from_select() to have MHD processed
+ * network connections and data.
  *
  * Starting the daemon may also fail if a particular option is not
  * implemented or not supported on the target platform (i.e. no
- * support for SSL, threads or IPv6).
+ * support for TLS, epoll or IPv6).
  */
 enum MHD_FLAG
 {
@@ -553,13 +554,26 @@ enum MHD_FLAG
 
   /**
    * Run using one thread per connection.
+   * Must be used only with #MHD_USE_INTERNAL_POLLING_THREAD.
    */
   MHD_USE_THREAD_PER_CONNECTION = 4,
 
   /**
-   * Run using an internal thread (or thread pool) doing `select()`.
+   * Run using an internal thread (or thread pool) for sockets sending
+   * and receiving and data processing. Without this flag MHD will not
+   * run automatically in background thread(s).
+   * If this flag is set, #MHD_run() and #MHD_run_from_select() couldn't
+   * be used.
+   * This flag is set explicitly by #MHD_USE_POLL_INTERNAL_THREAD and
+   * by #MHD_USE_EPOLL_INTERNAL_THREAD.
    */
+  MHD_USE_INTERNAL_POLLING_THREAD = 8,
+
+  /** @deprecated */
   MHD_USE_SELECT_INTERNALLY = 8,
+#define MHD_USE_SELECT_INTERNALLY \
+  _MHD_DEPR_IN_MACRO("Value MHD_USE_SELECT_INTERNALLY is deprecated, use 
MHD_USE_INTERNAL_POLLING_THREAD instead") \
+  MHD_USE_INTERNAL_POLLING_THREAD
 
   /**
    * Run using the IPv6 protocol (otherwise, MHD will just support
@@ -584,16 +598,24 @@ enum MHD_FLAG
   /**
    * Use `poll()` instead of `select()`. This allows sockets with `fd >=
    * FD_SETSIZE`.  This option is not compatible with using an
-   * 'external' `select()` mode (as there is no API to get the file
-   * descriptors for the external select from MHD) and must also not
+   * 'external' polling mode (as there is no API to get the file
+   * descriptors for the external poll() from MHD) and must also not
    * be used in combination with #MHD_USE_EPOLL.
+   * @sa ::MHD_FEATURE_POLL, #MHD_USE_POLL_INTERNAL_THREAD
    */
   MHD_USE_POLL = 64,
 
   /**
    * Run using an internal thread (or thread pool) doing `poll()`.
+   * @sa ::MHD_FEATURE_POLL, #MHD_USE_POLL, #MHD_USE_INTERNAL_POLLING_THREAD
    */
-  MHD_USE_POLL_INTERNALLY = MHD_USE_SELECT_INTERNALLY | MHD_USE_POLL,
+  MHD_USE_POLL_INTERNAL_THREAD = MHD_USE_POLL | 
MHD_USE_INTERNAL_POLLING_THREAD,
+
+  /** @deprecated */
+  MHD_USE_POLL_INTERNALLY = MHD_USE_POLL | MHD_USE_INTERNAL_POLLING_THREAD,
+#define MHD_USE_POLL_INTERNALLY \
+  _MHD_DEPR_IN_MACRO("Value MHD_USE_POLL_INTERNALLY is deprecated, use 
MHD_USE_POLL_INTERNAL_THREAD instead") \
+  MHD_USE_POLL_INTERNAL_THREAD
 
   /**
    * Suppress (automatically) adding the 'Date:' header to HTTP responses.
@@ -633,21 +655,26 @@ enum MHD_FLAG
 
   /**
    * Run using an internal thread (or thread pool) doing `epoll()`.
-   * This option is only available on Linux; using the option on
-   * non-Linux systems will cause #MHD_start_daemon to fail.
+   * This option is only available on certain platforms; using the option on
+   * platform without `epoll` support will cause #MHD_start_daemon to fail.
+   * @sa ::MHD_FEATURE_EPOLL, #MHD_USE_EPOLL, #MHD_USE_INTERNAL_POLLING_THREAD
    */
-  MHD_USE_EPOLL_INTERNALLY = MHD_USE_SELECT_INTERNALLY | MHD_USE_EPOLL,
+  MHD_USE_EPOLL_INTERNAL_THREAD = MHD_USE_EPOLL | 
MHD_USE_INTERNAL_POLLING_THREAD,
 
 /** @deprecated */
+  MHD_USE_EPOLL_INTERNALLY = MHD_USE_EPOLL | MHD_USE_INTERNAL_POLLING_THREAD,
+#define MHD_USE_EPOLL_INTERNALLY \
+  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY is deprecated, use 
MHD_USE_EPOLL_INTERNAL_THREAD") \
+  MHD_USE_EPOLL_INTERNAL_THREAD
+/** @deprecated */
 #define MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY \
-  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, 
use MHD_USE_EPOLL_INTERNALLY") \
-  MHD_USE_EPOLL_INTERNALLY
+  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, 
use MHD_USE_EPOLL_INTERNAL_THREAD") \
+  MHD_USE_EPOLL_INTERNAL_THREAD
 
   /**
    * Use inter-thread communication channel.
-   * #MHD_USE_ITC can be used with internal select/poll/other
-   * or #MHD_USE_THREAD_PER_CONNECTION and is ignored with any
-   * "external" mode.
+   * #MHD_USE_ITC can be used with #MHD_USE_INTERNAL_POLLING_THREAD
+   * and is ignored with any "external" mode.
    * It's required for use of #MHD_quiesce_daemon
    * or #MHD_add_connection.
    * This option is enforced by #MHD_ALLOW_SUSPEND_RESUME or
@@ -869,7 +896,7 @@ enum MHD_OPTION
    * Number (`unsigned int`) of threads in thread pool. Enable
    * thread pooling by setting this value to to something
    * greater than 1. Currently, thread model must be
-   * #MHD_USE_SELECT_INTERNALLY if thread pooling is enabled
+   * #MHD_USE_INTERNAL_POLLING_THREAD if thread pooling is enabled
    * (#MHD_start_daemon returns NULL for an unsupported thread
    * model).
    */
@@ -1811,10 +1838,10 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
  * This function is a convenience method, which is useful if the
  * fd_sets from #MHD_get_fdset were not directly passed to `select()`;
  * with this function, MHD will internally do the appropriate `select()`
- * call itself again.  While it is always safe to call #MHD_run (in
- * external select mode), you should call #MHD_run_from_select if
- * performance is important (as it saves an expensive call to
- * `select()`).
+ * call itself again.  While it is always safe to call #MHD_run (if
+ * ::MHD_USE_INTERNAL_POLLING_THREAD is not set), you should call
+ * #MHD_run_from_select if performance is important (as it saves an
+ * expensive call to `select()`).
  *
  * @param daemon daemon to run
  * @return #MHD_YES on success, #MHD_NO if this
@@ -1974,9 +2001,7 @@ MHD_queue_response (struct MHD_Connection *connection,
 
 /**
  * Suspend handling of network data for a given connection.  This can
- * be used to dequeue a connection from MHD's event loop (external
- * select, internal select or thread pool; not applicable to
- * thread-per-connection!) for a while.
+ * be used to dequeue a connection from MHD's event loop for a while.
  *
  * If you use this API in conjunction with a internal select or a
  * thread pool, you must set the option #MHD_USE_ITC to
@@ -2795,7 +2820,7 @@ enum MHD_FEATURE
   /**
    * Get whether `epoll()` is supported. If supported then Flags
    * #MHD_USE_EPOLL and
-   * #MHD_USE_EPOLL_INTERNALLY can be used.
+   * #MHD_USE_EPOLL_INTERNAL_THREAD can be used.
    */
   MHD_FEATURE_EPOLL = 7,
 
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 4be4a25..f256cb8 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1411,7 +1411,7 @@ MHD_connection_update_event_loop_info (struct 
MHD_Connection *connection)
             {
               if ((MHD_YES != try_grow_read_buffer (connection)) &&
                   (0 != (connection->daemon->options &
-                         (MHD_USE_SELECT_INTERNALLY |
+                         (MHD_USE_INTERNAL_POLLING_THREAD |
                           MHD_USE_THREAD_PER_CONNECTION))))
                 {
                   /* failed to grow the read buffer, and the
@@ -2009,7 +2009,7 @@ process_request_body (struct MHD_Connection *connection)
             the setup was incorrect, which may prevent us from
             handling the rest of the request */
          if ( ( (0 != (connection->daemon->options & 
MHD_USE_THREAD_PER_CONNECTION)) ||
-                (0 != (connection->daemon->options & 
MHD_USE_SELECT_INTERNALLY)) ) &&
+                (0 != (connection->daemon->options & 
MHD_USE_INTERNAL_POLLING_THREAD)) ) &&
               (MHD_NO == connection->suspended) )
            MHD_DLOG (connection->daemon,
                      _("WARNING: incomplete POST processing and connection not 
suspended will result in hung connection.\n"));
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index d769175..206b1a6 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2957,8 +2957,8 @@ MHD_run_from_select (struct MHD_Daemon *daemon,
   struct MHD_UpgradeResponseHandle *urh;
   struct MHD_UpgradeResponseHandle *urhn;
 #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */
-  unsigned int mask = MHD_ALLOW_SUSPEND_RESUME | MHD_USE_EPOLL_INTERNALLY |
-    MHD_USE_SELECT_INTERNALLY | MHD_USE_POLL_INTERNALLY | 
MHD_USE_THREAD_PER_CONNECTION;
+  unsigned int mask = MHD_ALLOW_SUSPEND_RESUME | MHD_USE_EPOLL_INTERNAL_THREAD 
|
+    MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_POLL_INTERNAL_THREAD | 
MHD_USE_THREAD_PER_CONNECTION;
 
   /* Clear ITC to avoid spinning select */
   /* Do it before any other processing so new signals
@@ -3903,8 +3903,7 @@ int
 MHD_run (struct MHD_Daemon *daemon)
 {
   if ( (MHD_YES == daemon->shutdown) ||
-       (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) ||
-       (0 != (daemon->options & MHD_USE_SELECT_INTERNALLY)) )
+       (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) )
     return MHD_NO;
   if (0 != (daemon->options & MHD_USE_POLL))
   {
@@ -4089,7 +4088,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon)
   if (MHD_INVALID_SOCKET == ret)
     return MHD_INVALID_SOCKET;
   if ( (MHD_ITC_IS_INVALID_(daemon->itc)) &&
-       (0 != (daemon->options & (MHD_USE_SELECT_INTERNALLY | 
MHD_USE_THREAD_PER_CONNECTION))) )
+       (0 != (daemon->options & (MHD_USE_INTERNAL_POLLING_THREAD))) )
     {
 #ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
@@ -4781,12 +4780,24 @@ MHD_start_daemon_va (unsigned int flags,
   daemon->custom_error_log = (MHD_LogCallback) &vfprintf;
   daemon->custom_error_log_cls = stderr;
 #endif
+  if ( (0 != (flags & MHD_USE_THREAD_PER_CONNECTION)) &&
+       (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD)) )
+    {
+#ifdef HAVE_MESSAGES
+      MHD_DLOG (daemon,
+                _("Warning: MHD_USE_THREAD_PER_CONNECTION must be used only 
with "
+                  "MHD_USE_INTERNAL_POLLING_THREAD. Flag 
MHD_USE_INTERNAL_POLLING_THREAD "
+                   "was added. Consider setting 
MHD_USE_INTERNAL_POLLING_THREAD explicitly.\n"));
+#endif
+      flags |= MHD_USE_INTERNAL_POLLING_THREAD;
+      daemon->options |= MHD_USE_INTERNAL_POLLING_THREAD;
+    }
 #ifdef HAVE_LISTEN_SHUTDOWN
   use_itc = (0 != (daemon->options & (MHD_USE_NO_LISTEN_SOCKET | 
MHD_USE_ITC)));
 #else
   use_itc = 1; /* yes, must use ITC to signal thread */
 #endif
-  if (0 == (flags & (MHD_USE_SELECT_INTERNALLY | 
MHD_USE_THREAD_PER_CONNECTION)))
+  if (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD))
     use_itc = 0; /* useless if we are using 'external' select */
   if (use_itc)
   {
@@ -4890,18 +4901,18 @@ MHD_start_daemon_va (unsigned int flags,
 #endif
 
   /* Thread pooling currently works only with internal select thread model */
-  if ( (0 == (flags & MHD_USE_SELECT_INTERNALLY)) &&
+  if ( (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD)) &&
        (daemon->worker_pool_size > 0) )
     {
 #ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
-               _("MHD thread pooling only works with 
MHD_USE_SELECT_INTERNALLY\n"));
+               _("MHD thread pooling only works with 
MHD_USE_INTERNAL_POLLING_THREAD\n"));
 #endif
       goto free_and_fail;
     }
 
 #ifdef __SYMBIAN32__
-  if (0 != (flags & (MHD_USE_SELECT_INTERNALLY | 
MHD_USE_THREAD_PER_CONNECTION)))
+  if (0 != (flags & (MHD_USE_INTERNAL_POLLING_THREAD | 
MHD_USE_THREAD_PER_CONNECTION)))
     {
 #ifdef HAVE_MESSAGES
       MHD_DLOG (daemon,
@@ -5233,9 +5244,8 @@ MHD_start_daemon_va (unsigned int flags,
       goto free_and_fail;
     }
 #endif /* HTTPS_SUPPORT */
-  if ( ( (0 != (flags & MHD_USE_THREAD_PER_CONNECTION)) ||
-        ( (0 != (flags & MHD_USE_SELECT_INTERNALLY)) &&
-          (0 == daemon->worker_pool_size)) ) &&
+  if ( ( (0 != (flags & MHD_USE_INTERNAL_POLLING_THREAD)) &&
+        (0 == daemon->worker_pool_size) ) &&
        (0 == (daemon->options & MHD_USE_NO_LISTEN_SOCKET)) &&
        (! MHD_create_named_thread_ (&daemon->pid,
                                     (flags & MHD_USE_THREAD_PER_CONNECTION) ?
@@ -5282,7 +5292,7 @@ MHD_start_daemon_va (unsigned int flags,
 
           memcpy (d, daemon, sizeof (struct MHD_Daemon));
           /* Adjust pooling params for worker daemons; note that memcpy()
-             has already copied MHD_USE_SELECT_INTERNALLY thread model into
+             has already copied MHD_USE_INTERNAL_POLLING_THREAD thread model 
into
              the worker threads. */
           d->master = daemon;
           d->worker_pool_size = 0;
@@ -5365,7 +5375,7 @@ thread_failed:
   /* If no worker threads created, then shut down normally. Calling
      MHD_stop_daemon (as we do below) doesn't work here since it
      assumes a 0-sized thread pool means we had been in the default
-     MHD_USE_SELECT_INTERNALLY mode. */
+     MHD_USE_INTERNAL_POLLING_THREAD mode. */
   if (0 == i)
     {
       if (MHD_INVALID_SOCKET != socket_fd)
@@ -5619,8 +5629,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon)
   fd = daemon->socket_fd;
   daemon->socket_fd = MHD_INVALID_SOCKET;
 
-  if ( (0 != (daemon->options & MHD_USE_SELECT_INTERNALLY)) ||
-       (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) )
+  if (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD))
     {
       /* Separate thread(s) is used for select()/poll()/etc. */
       if (NULL != daemon->worker_pool)
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 4f6635b..77679aa 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -890,8 +890,7 @@ struct MHD_Connection
 
 #ifdef UPGRADE_SUPPORT
   /**
-   * If this connection was upgraded and if we are using
-   * #MHD_USE_THREAD_PER_CONNECTION or #MHD_USE_TLS, this points to
+   * If this connection was upgraded, this points to
    * the upgrade response details such that the
    * #thread_main_connection_upgrade()-logic can perform the
    * bi-directional forwarding.
diff --git a/src/microhttpd/test_daemon.c b/src/microhttpd/test_daemon.c
index ca1f71b..4692085 100644
--- a/src/microhttpd/test_daemon.c
+++ b/src/microhttpd/test_daemon.c
@@ -75,7 +75,7 @@ testStartStop ()
 {
   struct MHD_Daemon *d;
 
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1080,
                         &apc_nothing,
                         NULL, &ahc_nothing, NULL, MHD_OPTION_END);
@@ -124,7 +124,7 @@ static int
 testThread ()
 {
   struct MHD_Daemon *d;
-  d = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_SELECT_INTERNALLY,
+  d = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_INTERNAL_POLLING_THREAD,
                         1082,
                         &apc_all, NULL, &ahc_nothing, NULL, MHD_OPTION_END);
 
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index 6ca9e7d..b28519d 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -1064,8 +1064,7 @@ test_upgrade (int flags,
                            &run_usock_client,
                            &sock))
     abort ();
-  if (0 == (flags & (MHD_USE_SELECT_INTERNALLY |
-                     MHD_USE_THREAD_PER_CONNECTION)) )
+  if (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD) )
     run_mhd_loop (d, flags);
   pthread_join (pt_client,
                 NULL);
@@ -1158,7 +1157,7 @@ main (int argc,
 #endif
 
   /* Test thread-per-connection */
-  res = test_upgrade (MHD_USE_THREAD_PER_CONNECTION,
+  res = test_upgrade (MHD_USE_INTERNAL_POLLING_THREAD | 
MHD_USE_THREAD_PER_CONNECTION,
                       0);
   error_count += res;
   if (res)
@@ -1166,7 +1165,7 @@ main (int argc,
   else if (verbose)
     printf ("PASSED: Upgrade with thread per connection.\n");
 #ifdef HAVE_POLL
-  res = test_upgrade (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_POLL,
+  res = test_upgrade (MHD_USE_INTERNAL_POLLING_THREAD | 
MHD_USE_THREAD_PER_CONNECTION | MHD_USE_POLL,
                       0);
   error_count += res;
   if (res)
@@ -1176,14 +1175,14 @@ main (int argc,
 #endif /* HAVE_POLL */
 
   /* Test different event loops, with and without thread pool */
-  res = test_upgrade (MHD_USE_SELECT_INTERNALLY,
+  res = test_upgrade (MHD_USE_INTERNAL_POLLING_THREAD,
                       0);
   error_count += res;
   if (res)
     fprintf (stderr, "FAILED: Upgrade with internal select, return code 
%d.\n", res);
   else if (verbose)
     printf ("PASSED: Upgrade with internal select.\n");
-  res = test_upgrade (MHD_USE_SELECT_INTERNALLY,
+  res = test_upgrade (MHD_USE_INTERNAL_POLLING_THREAD,
                       2);
   error_count += res;
   if (res)
@@ -1191,14 +1190,14 @@ main (int argc,
   else if (verbose)
     printf ("PASSED: Upgrade with internal select with thread pool.\n");
 #ifdef HAVE_POLL
-  res = test_upgrade (MHD_USE_POLL_INTERNALLY,
+  res = test_upgrade (MHD_USE_POLL_INTERNAL_THREAD,
                       0);
   error_count += res;
   if (res)
     fprintf (stderr, "FAILED: Upgrade with internal poll, return code %d.\n", 
res);
   else if (verbose)
     printf ("PASSED: Upgrade with internal poll.\n");
-  res = test_upgrade (MHD_USE_POLL_INTERNALLY,
+  res = test_upgrade (MHD_USE_POLL_INTERNAL_THREAD,
                       2);
   if (res)
     fprintf (stderr, "FAILED: Upgrade with internal poll with thread pool, 
return code %d.\n", res);
@@ -1206,13 +1205,13 @@ main (int argc,
     printf ("PASSED: Upgrade with internal poll with thread pool.\n");
 #endif
 #ifdef EPOLL_SUPPORT
-  res = test_upgrade (MHD_USE_EPOLL_INTERNALLY,
+  res = test_upgrade (MHD_USE_EPOLL_INTERNAL_THREAD,
                       0);
   if (res)
     fprintf (stderr, "FAILED: Upgrade with internal epoll, return code %d.\n", 
res);
   else if (verbose)
     printf ("PASSED: Upgrade with internal epoll.\n");
-  res = test_upgrade (MHD_USE_EPOLL_INTERNALLY,
+  res = test_upgrade (MHD_USE_EPOLL_INTERNAL_THREAD,
                       2);
   if (res)
     fprintf (stderr, "FAILED: Upgrade with internal epoll, return code %d.\n", 
res);
diff --git a/src/testcurl/https/test_empty_response.c 
b/src/testcurl/https/test_empty_response.c
index f65dff2..dbc0564 100644
--- a/src/testcurl/https/test_empty_response.c
+++ b/src/testcurl/https/test_empty_response.c
@@ -80,7 +80,7 @@ testInternalSelectGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_TLS | 
MHD_USE_SELECT_INTERNALLY,
+  d = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_TLS | 
MHD_USE_INTERNAL_POLLING_THREAD,
                         1082, NULL, NULL, &ahc_echo, "GET", 
                         MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem,
                         MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem,
diff --git a/src/testcurl/https/test_https_get.c 
b/src/testcurl/https/test_https_get.c
index ab0fa84..9882fc5 100644
--- a/src/testcurl/https/test_https_get.c
+++ b/src/testcurl/https/test_https_get.c
@@ -46,7 +46,7 @@ test_cipher_option (FILE * test_fd,
 
   int ret;
   struct MHD_Daemon *d;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS |
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
                         MHD_USE_DEBUG, 4233,
                         NULL, NULL, &http_ahc, NULL,
                         MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem,
@@ -75,7 +75,7 @@ test_secure_get (FILE * test_fd,
   int ret;
   struct MHD_Daemon *d;
 
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS |
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
                         MHD_USE_DEBUG, 4233,
                         NULL, NULL, &http_ahc, NULL,
                         MHD_OPTION_HTTPS_MEM_KEY, srv_signed_key_pem,
diff --git a/src/testcurl/https/test_https_get_parallel.c 
b/src/testcurl/https/test_https_get_parallel.c
index 5654cf5..4b33e01 100644
--- a/src/testcurl/https/test_https_get_parallel.c
+++ b/src/testcurl/https/test_https_get_parallel.c
@@ -151,7 +151,7 @@ main (int argc, char *const *argv)
   errorCount +=
     test_wrap ("single threaded daemon, single client, epoll", 
&test_single_client,
                NULL,
-               MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS | MHD_USE_DEBUG | 
MHD_USE_EPOLL,
+               MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG | 
MHD_USE_EPOLL,
                aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY,
                srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
                srv_self_signed_cert_pem, MHD_OPTION_END);
@@ -159,7 +159,7 @@ main (int argc, char *const *argv)
   errorCount +=
     test_wrap ("single threaded daemon, single client", &test_single_client,
                NULL,
-               MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS | MHD_USE_DEBUG,
+               MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG,
                aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY,
                srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
                srv_self_signed_cert_pem, MHD_OPTION_END);
@@ -167,7 +167,7 @@ main (int argc, char *const *argv)
   errorCount +=
     test_wrap ("single threaded daemon, parallel clients, epoll",
                &test_parallel_clients, NULL,
-               MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS | MHD_USE_DEBUG | 
MHD_USE_EPOLL,
+               MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG | 
MHD_USE_EPOLL,
                aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY,
                srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
                srv_self_signed_cert_pem, MHD_OPTION_END);
@@ -175,7 +175,7 @@ main (int argc, char *const *argv)
   errorCount +=
     test_wrap ("single threaded daemon, parallel clients",
                &test_parallel_clients, NULL,
-               MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS | MHD_USE_DEBUG,
+               MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG,
                aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY,
                srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
                srv_self_signed_cert_pem, MHD_OPTION_END);
diff --git a/src/testcurl/https/test_https_get_parallel_threads.c 
b/src/testcurl/https/test_https_get_parallel_threads.c
index f5f6421..d057e79 100644
--- a/src/testcurl/https/test_https_get_parallel_threads.c
+++ b/src/testcurl/https/test_https_get_parallel_threads.c
@@ -170,7 +170,7 @@ main (int argc, char *const *argv)
   errorCount +=
     test_wrap ("multi threaded daemon, single client", &test_single_client,
                NULL,
-               MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION,
+               MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD,
                aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY,
                srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
                srv_self_signed_cert_pem, MHD_OPTION_END);
@@ -178,7 +178,7 @@ main (int argc, char *const *argv)
   errorCount +=
     test_wrap ("multi threaded daemon, parallel client",
                &test_parallel_clients, NULL,
-               MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION,
+               MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD,
                aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY,
                srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
                srv_self_signed_cert_pem, MHD_OPTION_END);
diff --git a/src/testcurl/https/test_https_multi_daemon.c 
b/src/testcurl/https/test_https_multi_daemon.c
index 0ce49a0..672eac5 100644
--- a/src/testcurl/https/test_https_multi_daemon.c
+++ b/src/testcurl/https/test_https_multi_daemon.c
@@ -50,7 +50,7 @@ test_concurent_daemon_pair (void *cls,
   struct MHD_Daemon *d1;
   struct MHD_Daemon *d2;
 
-  d1 = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS |
+  d1 = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
                          MHD_USE_DEBUG, DEAMON_TEST_PORT,
                          NULL, NULL, &http_ahc, NULL,
                          MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem,
@@ -63,7 +63,7 @@ test_concurent_daemon_pair (void *cls,
       return -1;
     }
 
-  d2 = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS |
+  d2 = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
                          MHD_USE_DEBUG, DEAMON_TEST_PORT + 1,
                          NULL, NULL, &http_ahc, NULL,
                          MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem,
diff --git a/src/testcurl/https/test_https_session_info.c 
b/src/testcurl/https/test_https_session_info.c
index 11fa88d..2c020dd 100644
--- a/src/testcurl/https/test_https_session_info.c
+++ b/src/testcurl/https/test_https_session_info.c
@@ -107,7 +107,7 @@ test_query_session ()
   gen_test_file_url (url, DEAMON_TEST_PORT);
 
   /* setup test */
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS |
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
                         MHD_USE_DEBUG, DEAMON_TEST_PORT,
                         NULL, NULL, &query_session_ahc, NULL,
                        MHD_OPTION_HTTPS_PRIORITIES, "NORMAL:+ARCFOUR-128",
diff --git a/src/testcurl/https/test_https_sni.c 
b/src/testcurl/https/test_https_sni.c
index db4eed4..1da1ce3 100644
--- a/src/testcurl/https/test_https_sni.c
+++ b/src/testcurl/https/test_https_sni.c
@@ -260,7 +260,7 @@ main (int argc, char *const *argv)
     }
   load_keys ("host1", ABS_SRCDIR "/host1.crt", ABS_SRCDIR "/host1.key");
   load_keys ("host2", ABS_SRCDIR "/host2.crt", ABS_SRCDIR "/host2.key");
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | 
MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG,
                         4233,
                         NULL, NULL,
                         &http_ahc, NULL,
diff --git a/src/testcurl/https/test_https_time_out.c 
b/src/testcurl/https/test_https_time_out.c
index 7ef1da7..fccbd8c 100644
--- a/src/testcurl/https/test_https_time_out.c
+++ b/src/testcurl/https/test_https_time_out.c
@@ -116,7 +116,7 @@ main (int argc, char *const *argv)
   gnutls_global_init ();
   gnutls_global_set_log_level (11);
 
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS |
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
                         MHD_USE_DEBUG, DEAMON_TEST_PORT,
                         NULL, NULL, &http_dummy_ahc, NULL,
                         MHD_OPTION_CONNECTION_TIMEOUT, TIME_OUT,
diff --git a/src/testcurl/https/test_tls_authentication.c 
b/src/testcurl/https/test_tls_authentication.c
index 5b27476..4caa55b 100644
--- a/src/testcurl/https/test_tls_authentication.c
+++ b/src/testcurl/https/test_tls_authentication.c
@@ -49,7 +49,7 @@ test_secure_get (void * cls, char *cipher_suite, int 
proto_version)
   int ret;
   struct MHD_Daemon *d;
 
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS |
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
                         MHD_USE_DEBUG, DEAMON_TEST_PORT,
                         NULL, NULL, &http_ahc, NULL,
                         MHD_OPTION_HTTPS_MEM_KEY, srv_signed_key_pem,
diff --git a/src/testcurl/https/test_tls_extensions.c 
b/src/testcurl/https/test_tls_extensions.c
index 2a51c7f..365dd76 100644
--- a/src/testcurl/https/test_tls_extensions.c
+++ b/src/testcurl/https/test_tls_extensions.c
@@ -231,7 +231,7 @@ main (int argc, char *const *argv)
       return -1;
     }
 
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS |
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS |
                         MHD_USE_DEBUG, DEAMON_TEST_PORT,
                         NULL, NULL, &http_ahc, NULL,
                         MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem,
diff --git a/src/testcurl/https/test_tls_options.c 
b/src/testcurl/https/test_tls_options.c
index afa1522..bd84385 100644
--- a/src/testcurl/https/test_tls_options.c
+++ b/src/testcurl/https/test_tls_options.c
@@ -83,7 +83,7 @@ main (int argc, char *const *argv)
   unsigned int errorCount = 0;
   const char *ssl_version;
   int daemon_flags =
-    MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | MHD_USE_DEBUG;
+    MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | 
MHD_USE_TLS | MHD_USE_DEBUG;
 
   gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
   gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c
index 3378355..af9758b 100644
--- a/src/testcurl/perf_get.c
+++ b/src/testcurl/perf_get.c
@@ -192,7 +192,7 @@ testInternalGet (int port, int poll_flag)
 
   cbc.buf = buf;
   cbc.size = 2048;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG  | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | 
poll_flag,
                         port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -252,7 +252,7 @@ testMultithreadedGet (int port, int poll_flag)
 
   cbc.buf = buf;
   cbc.size = 2048;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG  | 
poll_flag,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | poll_flag,
                         port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 16;
@@ -311,7 +311,7 @@ testMultithreadedPoolGet (int port, int poll_flag)
 
   cbc.buf = buf;
   cbc.size = 2048;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | 
poll_flag,
                         port, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
   if (d == NULL)
diff --git a/src/testcurl/perf_get_concurrent.c 
b/src/testcurl/perf_get_concurrent.c
index 95ec3fa..7bc59b5 100644
--- a/src/testcurl/perf_get_concurrent.c
+++ b/src/testcurl/perf_get_concurrent.c
@@ -236,7 +236,7 @@ testInternalGet (int port, int poll_flag)
   const char * const test_desc = poll_flag ? "internal poll" : "internal 
select";
   const char * ret_val;
 
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG  | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | 
poll_flag,
                         port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -262,7 +262,7 @@ testMultithreadedGet (int port, int poll_flag)
   const char * const test_desc = poll_flag ? "thread with poll" : "thread with 
select";
   const char * ret_val;
 
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG  | 
poll_flag,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | poll_flag,
                         port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 16;
@@ -287,7 +287,7 @@ testMultithreadedPoolGet (int port, int poll_flag)
   const char * const test_desc = poll_flag ? "thread pool with poll" : "thread 
pool with select";
   const char * ret_val;
 
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | 
poll_flag,
                         port, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
   if (d == NULL)
diff --git a/src/testcurl/test_concurrent_stop.c 
b/src/testcurl/test_concurrent_stop.c
index 8fd0c21..e3759de 100644
--- a/src/testcurl/test_concurrent_stop.c
+++ b/src/testcurl/test_concurrent_stop.c
@@ -210,7 +210,7 @@ testMultithreadedGet (int port,
   struct MHD_Daemon *d;
   pthread_t p;
 
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG  | 
poll_flag,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | poll_flag,
                         port,
                         NULL, NULL,
                         &ahc_echo, "GET",
@@ -232,7 +232,7 @@ testMultithreadedPoolGet (int port,
   struct MHD_Daemon *d;
   pthread_t p;
 
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | 
poll_flag,
                         port,
                         NULL, NULL,
                         &ahc_echo, "GET",
diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c
index 5630733..318bc64 100644
--- a/src/testcurl/test_delete.c
+++ b/src/testcurl/test_delete.c
@@ -131,7 +131,7 @@ testInternalDelete ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1080,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
@@ -189,7 +189,7 @@ testMultithreadedDelete ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
@@ -247,7 +247,7 @@ testMultithreadedPoolDelete ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081,
                         NULL, NULL, &ahc_echo, &done_flag,
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c
index b111e94..7267084 100644
--- a/src/testcurl/test_digestauth.c
+++ b/src/testcurl/test_digestauth.c
@@ -189,7 +189,7 @@ testDigestAuth ()
       return 1;
   }
 #endif
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1337, NULL, NULL, &ahc_echo, PAGE,
                        MHD_OPTION_DIGEST_AUTH_RANDOM, sizeof (rnd), rnd,
                        MHD_OPTION_NONCE_NC_SIZE, 300,
diff --git a/src/testcurl/test_digestauth_with_arguments.c 
b/src/testcurl/test_digestauth_with_arguments.c
index cdaf9e4..c0c2474 100644
--- a/src/testcurl/test_digestauth_with_arguments.c
+++ b/src/testcurl/test_digestauth_with_arguments.c
@@ -184,7 +184,7 @@ testDigestAuth ()
       return 1;
   }
 #endif
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1337, NULL, NULL, &ahc_echo, PAGE,
                        MHD_OPTION_DIGEST_AUTH_RANDOM, sizeof (rnd), rnd,
                        MHD_OPTION_NONCE_NC_SIZE, 300,
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c
index 9528602..52bf353 100644
--- a/src/testcurl/test_get.c
+++ b/src/testcurl/test_get.c
@@ -120,7 +120,7 @@ testInternalGet (int poll_flag)
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG  | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | 
poll_flag,
                         11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -170,7 +170,7 @@ testMultithreadedGet (int poll_flag)
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG  | 
poll_flag,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | poll_flag,
                         1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 16;
@@ -220,7 +220,7 @@ testMultithreadedPoolGet (int poll_flag)
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | 
poll_flag,
                         1081, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
   if (d == NULL)
@@ -412,7 +412,7 @@ testUnknownPortGet (int poll_flag)
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG  | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | 
poll_flag,
                         1, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_SOCK_ADDR, &addr,
                         MHD_OPTION_END);
@@ -473,7 +473,7 @@ testStopRace (int poll_flag)
     MHD_socket fd;
     struct MHD_Daemon *d;
 
-    d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | 
poll_flag,
+    d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag,
                          1081, NULL, NULL, &ahc_echo, "GET",
                          MHD_OPTION_CONNECTION_TIMEOUT, 5, MHD_OPTION_END);
     if (d == NULL)
@@ -571,7 +571,7 @@ testEmptyGet (int poll_flag)
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG  | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | 
poll_flag,
                         11081, NULL, NULL, &ahc_empty, NULL, MHD_OPTION_END);
   if (d == NULL)
     return 4194304;
diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c
index 297d906..896adf0 100644
--- a/src/testcurl/test_get_chunked.c
+++ b/src/testcurl/test_get_chunked.c
@@ -164,7 +164,7 @@ testInternalGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -206,7 +206,7 @@ testMultithreadedGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 16;
@@ -248,7 +248,7 @@ testMultithreadedPoolGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
   if (d == NULL)
diff --git a/src/testcurl/test_get_response_cleanup.c 
b/src/testcurl/test_get_response_cleanup.c
index 56b9b99..5d846c4 100644
--- a/src/testcurl/test_get_response_cleanup.c
+++ b/src/testcurl/test_get_response_cleanup.c
@@ -150,7 +150,7 @@ testInternalGet ()
   pid_t curl;
 
   ok = 1;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -171,7 +171,7 @@ testMultithreadedGet ()
   struct MHD_Daemon *d;
   pid_t curl;
 
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, "GET",
                        MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 2,
                        MHD_OPTION_END);
@@ -207,7 +207,7 @@ testMultithreadedPoolGet ()
   struct MHD_Daemon *d;
   pid_t curl;
 
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
   if (d == NULL)
diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c
index ed4d346..70e819d 100644
--- a/src/testcurl/test_get_sendfile.c
+++ b/src/testcurl/test_get_sendfile.c
@@ -125,7 +125,7 @@ testInternalGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -175,7 +175,7 @@ testMultithreadedGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 16;
@@ -225,7 +225,7 @@ testMultithreadedPoolGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
   if (d == NULL)
@@ -417,7 +417,7 @@ testUnknownPortGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_SOCK_ADDR, &addr,
                         MHD_OPTION_END);
diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c
index 0e1adbc..4853648 100644
--- a/src/testcurl/test_iplimit.c
+++ b/src/testcurl/test_iplimit.c
@@ -117,7 +117,7 @@ testMultithreadedGet ()
   if (!oneone)
     return 0;
 
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL,
                         &ahc_echo, "GET",
                         MHD_OPTION_PER_IP_CONNECTION_LIMIT, 2,
@@ -208,7 +208,7 @@ testMultithreadedPoolGet ()
   if (!oneone)
     return 0;
 
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_PER_IP_CONNECTION_LIMIT, 2,
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c
index 8b088be..4ba102b 100644
--- a/src/testcurl/test_large_put.c
+++ b/src/testcurl/test_large_put.c
@@ -152,7 +152,7 @@ testInternalPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1080,
                         NULL, NULL, &ahc_echo, &done_flag,
                        MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) 
(1024*1024),
@@ -210,7 +210,7 @@ testMultithreadedPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081,
                         NULL, NULL, &ahc_echo, &done_flag,
                        MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) 
(1024*1024),
@@ -271,7 +271,7 @@ testMultithreadedPoolPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081,
                         NULL, NULL, &ahc_echo, &done_flag,
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
diff --git a/src/testcurl/test_long_header.c b/src/testcurl/test_long_header.c
index 0819a43..c26791d 100644
--- a/src/testcurl/test_long_header.c
+++ b/src/testcurl/test_long_header.c
@@ -101,7 +101,7 @@ testLongUrlGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         1080,
                         &apc_all,
                         NULL,
@@ -172,7 +172,7 @@ testLongHeaderGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         1080,
                         &apc_all,
                         NULL,
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c
index 18ad049..2bb19e3 100644
--- a/src/testcurl/test_post.c
+++ b/src/testcurl/test_post.c
@@ -170,7 +170,7 @@ testInternalPost ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1080, NULL, NULL, &ahc_echo, NULL,
                        MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
                        MHD_OPTION_END);
@@ -224,7 +224,7 @@ testMultithreadedPost ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, NULL,
                        MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
                        MHD_OPTION_END);
@@ -278,7 +278,7 @@ testMultithreadedPoolPost ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, NULL,
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
                        MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
@@ -559,7 +559,7 @@ testMultithreadedPostCancelPart(int flags)
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_cancel, NULL,
                        MHD_OPTION_END);
   if (d == NULL)
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c
index 0dad015..c4436a0 100644
--- a/src/testcurl/test_post_loop.c
+++ b/src/testcurl/test_post_loop.c
@@ -119,7 +119,7 @@ testInternalPost ()
 
   cbc.buf = buf;
   cbc.size = 2048;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1080, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -183,7 +183,7 @@ testMultithreadedPost ()
 
   cbc.buf = buf;
   cbc.size = 2048;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END);
   if (d == NULL)
     return 16;
@@ -247,7 +247,7 @@ testMultithreadedPoolPost ()
 
   cbc.buf = buf;
   cbc.size = 2048;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, NULL,
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
   if (d == NULL)
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c
index 41d294f..1c65504 100644
--- a/src/testcurl/test_postform.c
+++ b/src/testcurl/test_postform.c
@@ -183,7 +183,7 @@ testInternalPost ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1080, NULL, NULL, &ahc_echo, NULL,
                        MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
                        MHD_OPTION_END);
@@ -239,7 +239,7 @@ testMultithreadedPost ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, NULL,
                        MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
                        MHD_OPTION_END);
@@ -295,7 +295,7 @@ testMultithreadedPoolPost ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081, NULL, NULL, &ahc_echo, NULL,
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
                        MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
diff --git a/src/testcurl/test_process_headers.c 
b/src/testcurl/test_process_headers.c
index 43f3a17..59cb1a6 100644
--- a/src/testcurl/test_process_headers.c
+++ b/src/testcurl/test_process_headers.c
@@ -157,7 +157,7 @@ testInternalGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         21080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -206,7 +206,7 @@ testMultithreadedGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         21080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 16;
@@ -255,7 +255,7 @@ testMultithreadedPoolGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         21080, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
   if (d == NULL)
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c
index f6636f1..ef70eea 100644
--- a/src/testcurl/test_put.c
+++ b/src/testcurl/test_put.c
@@ -131,7 +131,7 @@ testInternalPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1080,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
@@ -187,7 +187,7 @@ testMultithreadedPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
@@ -244,7 +244,7 @@ testMultithreadedPoolPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1081,
                         NULL, NULL, &ahc_echo, &done_flag,
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c
index c0105af..db4db9d 100644
--- a/src/testcurl/test_put_chunked.c
+++ b/src/testcurl/test_put_chunked.c
@@ -141,7 +141,7 @@ testInternalPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         11080,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
@@ -197,7 +197,7 @@ testMultithreadedPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         11081,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
@@ -254,7 +254,7 @@ testMultithreadedPoolPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         11081,
                         NULL, NULL, &ahc_echo, &done_flag,
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c
index 429ecf4..b572cfb 100644
--- a/src/testcurl/test_quiesce.c
+++ b/src/testcurl/test_quiesce.c
@@ -487,20 +487,20 @@ main (int argc, char *const *argv)
 
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
-  errorCount += testGet (MHD_USE_SELECT_INTERNALLY, 0, 0);
-  errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION, 0, 0);
-  errorCount += testGet (MHD_USE_SELECT_INTERNALLY, CPU_COUNT, 0);
+  errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, 0);
+  errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD, 0, 0);
+  errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, 0);
   errorCount += testExternalGet ();
   if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_POLL))
     {
-      errorCount += testGet(MHD_USE_SELECT_INTERNALLY, 0, MHD_USE_POLL);
-      errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION, 0, MHD_USE_POLL);
-      errorCount += testGet (MHD_USE_SELECT_INTERNALLY, CPU_COUNT, 
MHD_USE_POLL);
+      errorCount += testGet(MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_POLL);
+      errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_POLL);
+      errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, 
MHD_USE_POLL);
     }
   if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_EPOLL))
     {
-      errorCount += testGet (MHD_USE_SELECT_INTERNALLY, 0, MHD_USE_EPOLL);
-      errorCount += testGet (MHD_USE_SELECT_INTERNALLY, CPU_COUNT, 
MHD_USE_EPOLL);
+      errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, 
MHD_USE_EPOLL);
+      errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, 
MHD_USE_EPOLL);
     }
   if (errorCount != 0)
     fprintf (stderr, "Error (code: %u)\n", errorCount);
diff --git a/src/testcurl/test_quiesce_stream.c 
b/src/testcurl/test_quiesce_stream.c
index 112f5ad..bee9548 100644
--- a/src/testcurl/test_quiesce_stream.c
+++ b/src/testcurl/test_quiesce_stream.c
@@ -168,7 +168,7 @@ main()
 
   /* Flags */
   unsigned int daemon_flags
-    = MHD_USE_SELECT_INTERNALLY
+    = MHD_USE_INTERNAL_POLLING_THREAD
     | MHD_USE_EPOLL
     | MHD_ALLOW_SUSPEND_RESUME
     | MHD_USE_ITC;
diff --git a/src/testcurl/test_start_stop.c b/src/testcurl/test_start_stop.c
index 66d19f0..ac89340 100644
--- a/src/testcurl/test_start_stop.c
+++ b/src/testcurl/test_start_stop.c
@@ -54,7 +54,7 @@ testInternalGet (int poll_flag)
 {
   struct MHD_Daemon *d;
 
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | 
poll_flag,
                         11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -67,7 +67,7 @@ testMultithreadedGet (int poll_flag)
 {
   struct MHD_Daemon *d;
 
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG  | 
poll_flag,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | poll_flag,
                         1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 2;
@@ -80,7 +80,7 @@ testMultithreadedPoolGet (int poll_flag)
 {
   struct MHD_Daemon *d;
 
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | 
poll_flag,
                         1081, NULL, NULL, &ahc_echo, "GET",
                         MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, 
MHD_OPTION_END);
   if (d == NULL)
diff --git a/src/testcurl/test_termination.c b/src/testcurl/test_termination.c
index 1f7af82..01a5819 100644
--- a/src/testcurl/test_termination.c
+++ b/src/testcurl/test_termination.c
@@ -91,7 +91,7 @@ main ()
 {
   struct MHD_Daemon *daemon;
 
-  daemon = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  daemon = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                              PORT,
                              NULL,
                              NULL, connection_handler, NULL, MHD_OPTION_END);
diff --git a/src/testcurl/test_timeout.c b/src/testcurl/test_timeout.c
index 11e4a9b..3d7379d 100644
--- a/src/testcurl/test_timeout.c
+++ b/src/testcurl/test_timeout.c
@@ -172,7 +172,7 @@ testWithoutTimeout ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1080,
                         NULL, NULL, &ahc_echo, &done_flag,
                         MHD_OPTION_CONNECTION_TIMEOUT, 2,
@@ -227,7 +227,7 @@ testWithTimeout ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         1080,
                         NULL, NULL, &ahc_echo, &done_flag,
                         MHD_OPTION_CONNECTION_TIMEOUT, 2,
diff --git a/src/testcurl/test_urlparse.c b/src/testcurl/test_urlparse.c
index cc00b4d..ca74add 100644
--- a/src/testcurl/test_urlparse.c
+++ b/src/testcurl/test_urlparse.c
@@ -134,7 +134,7 @@ testInternalGet (int poll_flag)
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG  | poll_flag,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG  | 
poll_flag,
                         11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c
index 2c0c1a1..ea1ace0 100644
--- a/src/testzzuf/test_get.c
+++ b/src/testzzuf/test_get.c
@@ -104,7 +104,7 @@ testInternalGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -148,7 +148,7 @@ testMultithreadedGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 16;
diff --git a/src/testzzuf/test_get_chunked.c b/src/testzzuf/test_get_chunked.c
index 843bc50..79179c6 100644
--- a/src/testzzuf/test_get_chunked.c
+++ b/src/testzzuf/test_get_chunked.c
@@ -130,7 +130,7 @@ testInternalGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
@@ -171,7 +171,7 @@ testMultithreadedGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 16;
diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c
index 5912529..f1b0575 100644
--- a/src/testzzuf/test_long_header.c
+++ b/src/testzzuf/test_long_header.c
@@ -103,7 +103,7 @@ testLongUrlGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080,
                         &apc_all,
                         NULL,
@@ -165,7 +165,7 @@ testLongHeaderGet ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080,
                         &apc_all,
                         NULL,
diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c
index 460f295..7d8a266 100644
--- a/src/testzzuf/test_post.c
+++ b/src/testzzuf/test_post.c
@@ -157,7 +157,7 @@ testInternalPost ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080, NULL, NULL, &ahc_echo, NULL, 
                        MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,       
                
                        MHD_OPTION_END);
@@ -208,7 +208,7 @@ testMultithreadedPost ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080, NULL, NULL, &ahc_echo, NULL, 
                        MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
                        MHD_OPTION_END);
diff --git a/src/testzzuf/test_post_form.c b/src/testzzuf/test_post_form.c
index d110b2c..c5e7026 100644
--- a/src/testzzuf/test_post_form.c
+++ b/src/testzzuf/test_post_form.c
@@ -176,7 +176,7 @@ testInternalPost ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080, NULL, NULL, &ahc_echo, NULL, 
                        MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
                        MHD_OPTION_END);
@@ -227,7 +227,7 @@ testMultithreadedPost ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080, NULL, NULL, &ahc_echo, NULL, 
                        MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
                        MHD_OPTION_END);
diff --git a/src/testzzuf/test_put.c b/src/testzzuf/test_put.c
index 455c742..71d7285 100644
--- a/src/testzzuf/test_put.c
+++ b/src/testzzuf/test_put.c
@@ -128,7 +128,7 @@ testInternalPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
@@ -179,7 +179,7 @@ testMultithreadedPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
diff --git a/src/testzzuf/test_put_chunked.c b/src/testzzuf/test_put_chunked.c
index 7dd0f06..22a9e88 100644
--- a/src/testzzuf/test_put_chunked.c
+++ b/src/testzzuf/test_put_chunked.c
@@ -134,7 +134,7 @@ testInternalPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         11080,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
@@ -185,7 +185,7 @@ testMultithreadedPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG,
                         11081,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
diff --git a/src/testzzuf/test_put_large.c b/src/testzzuf/test_put_large.c
index 4dfea46..373ce3f 100644
--- a/src/testzzuf/test_put_large.c
+++ b/src/testzzuf/test_put_large.c
@@ -142,7 +142,7 @@ testInternalPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)
@@ -194,7 +194,7 @@ testMultithreadedPut ()
   cbc.buf = buf;
   cbc.size = 2048;
   cbc.pos = 0;
-  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ ,
+  d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 
MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ ,
                         11080,
                         NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END);
   if (d == NULL)


hooks/post-receive
-- 
GNU libmicrohttpd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]