Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

configure: remove the --enable/disable-nonblocking options

Removing this option as it currently only functions to lure people into
wrongly using it and falsely believing that libcurl will work fine
without using nonblocking sockets internally - which leads to hard to
track or understand errors.
  • Loading branch information...
commit 44154e0733c2b6fcadaaf772dfd5c93792fb07cc 1 parent d22186b
Daniel Stenberg authored August 16, 2012
4  configure.ac
@@ -3074,10 +3074,6 @@ if test "$ipv6" = "yes"; then
3074 3074
   CURL_CHECK_NI_WITHSCOPEID
3075 3075
 fi
3076 3076
 
3077  
-dnl ************************************************************
3078  
-dnl enable non-blocking communications
3079  
-dnl
3080  
-CURL_CHECK_OPTION_NONBLOCKING
3081 3077
 CURL_CHECK_NONBLOCKING_SOCKET
3082 3078
 
3083 3079
 dnl ************************************************************
68  m4/curl-confopts.m4
@@ -169,39 +169,6 @@ AC_HELP_STRING([--disable-debug],[Disable debug build options]),
169 169
   AC_MSG_RESULT([$want_debug])
170 170
 ])
171 171
 
172  
-
173  
-dnl CURL_CHECK_OPTION_NONBLOCKING
174  
-dnl -------------------------------------------------
175  
-dnl Verify if configure has been invoked with option
176  
-dnl --enable-nonblocking or --disable-nonblocking, and
177  
-dnl set shell variable want_nonblocking as appropriate.
178  
-
179  
-AC_DEFUN([CURL_CHECK_OPTION_NONBLOCKING], [
180  
-  AC_BEFORE([$0],[CURL_CHECK_NONBLOCKING_SOCKET])dnl
181  
-  AC_MSG_CHECKING([whether to enable non-blocking communications])
182  
-  OPT_NONBLOCKING="default"
183  
-  AC_ARG_ENABLE(nonblocking,
184  
-AC_HELP_STRING([--enable-nonblocking],[Enable non-blocking communications])
185  
-AC_HELP_STRING([--disable-nonblocking],[Disable non-blocking communications]),
186  
-  OPT_NONBLOCKING=$enableval)
187  
-  case "$OPT_NONBLOCKING" in
188  
-    no)
189  
-      dnl --disable-nonblocking option used
190  
-      want_nonblocking="no"
191  
-      ;;
192  
-    default)
193  
-      dnl configure option not specified
194  
-      want_nonblocking="yes"
195  
-      ;;
196  
-    *)
197  
-      dnl --enable-nonblocking option used
198  
-      want_nonblocking="yes"
199  
-      ;;
200  
-  esac
201  
-  AC_MSG_RESULT([$want_nonblocking])
202  
-])
203  
-
204  
-
205 172
 dnl CURL_CHECK_OPTION_OPTIMIZE
206 173
 dnl -------------------------------------------------
207 174
 dnl Verify if configure has been invoked with option
@@ -421,7 +388,6 @@ dnl -------------------------------------------------
421 388
 dnl Check for how to set a socket into non-blocking state.
422 389
 
423 390
 AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET], [
424  
-  AC_REQUIRE([CURL_CHECK_OPTION_NONBLOCKING])dnl
425 391
   AC_REQUIRE([CURL_CHECK_FUNC_FCNTL])dnl
426 392
   AC_REQUIRE([CURL_CHECK_FUNC_IOCTL])dnl
427 393
   AC_REQUIRE([CURL_CHECK_FUNC_IOCTLSOCKET])dnl
@@ -429,28 +395,22 @@ AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET], [
429 395
   AC_REQUIRE([CURL_CHECK_FUNC_SETSOCKOPT])dnl
430 396
   #
431 397
   tst_method="unknown"
432  
-  if test "$want_nonblocking" = "yes"; then
433  
-    AC_MSG_CHECKING([how to set a socket into non-blocking mode])
434  
-    if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
435  
-      tst_method="fcntl O_NONBLOCK"
436  
-    elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
437  
-      tst_method="ioctl FIONBIO"
438  
-    elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
439  
-      tst_method="ioctlsocket FIONBIO"
440  
-    elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
441  
-      tst_method="IoctlSocket FIONBIO"
442  
-    elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
443  
-      tst_method="setsockopt SO_NONBLOCK"
444  
-    fi
445  
-    AC_MSG_RESULT([$tst_method])
446  
-    if test "$tst_method" = "unknown"; then
447  
-      AC_MSG_WARN([cannot determine non-blocking socket method.])
448  
-    fi
  398
+
  399
+  AC_MSG_CHECKING([how to set a socket into non-blocking mode])
  400
+  if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
  401
+    tst_method="fcntl O_NONBLOCK"
  402
+  elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
  403
+    tst_method="ioctl FIONBIO"
  404
+  elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
  405
+    tst_method="ioctlsocket FIONBIO"
  406
+  elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
  407
+    tst_method="IoctlSocket FIONBIO"
  408
+  elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
  409
+    tst_method="setsockopt SO_NONBLOCK"
449 410
   fi
  411
+  AC_MSG_RESULT([$tst_method])
450 412
   if test "$tst_method" = "unknown"; then
451  
-    AC_DEFINE_UNQUOTED(USE_BLOCKING_SOCKETS, 1,
452  
-      [Define to disable non-blocking sockets.])
453  
-    AC_MSG_WARN([non-blocking sockets disabled.])
  413
+    AC_MSG_WARN([cannot determine non-blocking socket method.])
454 414
   fi
455 415
 ])
456 416
 

0 notes on commit 44154e0

Please sign in to comment.
Something went wrong with that request. Please try again.