summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2016-08-19 19:44:08 +0200
committerSébastien Helleu <flashcode@flashtux.org>2016-08-19 19:44:08 +0200
commit091ef992ddd87cb9854f8a38ebd205419a1f044f (patch)
tree4886244e2e97ca632fa22e0ce93862d043eadde9
parente218db3582c8d668c1623e3cf1c559ab590278e3 (diff)
downloadweechat-091ef992ddd87cb9854f8a38ebd205419a1f044f.zip
Revert "api: fix connection to servers with hook_connect() on Windows 10 with Windows subsystem for Linux (closes #770)"
This reverts commit 399636f98453bdc1fca19b4dbc742993549aa6c3.
-rw-r--r--CMakeLists.txt3
-rw-r--r--ChangeLog.adoc1
-rw-r--r--Makefile.am1
-rw-r--r--cmake/FindSocketpair.cmake40
-rw-r--r--config.h.cmake1
-rw-r--r--configure.ac74
-rw-r--r--src/core/wee-hook.h2
7 files changed, 26 insertions, 96 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e82dfda7f..4ba1bd461 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -191,9 +191,6 @@ if(ICONV_FOUND)
add_definitions(-DHAVE_ICONV)
endif()
-# Check for socketpair() supporting SOCK_DGRAM
-find_package(Socketpair)
-
# Check for CURL
find_package(CURL REQUIRED)
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index c0d44ebf4..6c2425adb 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -36,7 +36,6 @@ Improvements::
Bug fixes::
* core, irc, xfer: refresh domain name and name server addresses before connection to servers (issue #771)
- * api: fix connection to servers with hook_connect() on Windows 10 with Windows subsystem for Linux (issue #770)
* api: fix crash in function string_split_command() when the separator is not a semicolon (issue #731)
* irc: fix NULL pointer dereference in 734 command callback (issue #738)
* relay: return an empty hdata when the requested hdata or pointer is not found (issue #767)
diff --git a/Makefile.am b/Makefile.am
index 552269a5e..577f95980 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -57,7 +57,6 @@ EXTRA_DIST = AUTHORS.adoc \
cmake/FindPkgConfig.cmake \
cmake/FindPython.cmake \
cmake/FindRuby.cmake \
- cmake/FindSocketpair.cmake \
cmake/FindTCL.cmake \
cmake/FindV8.cmake \
cmake/FindZLIB.cmake \
diff --git a/cmake/FindSocketpair.cmake b/cmake/FindSocketpair.cmake
deleted file mode 100644
index cc6c7d968..000000000
--- a/cmake/FindSocketpair.cmake
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (C) 2016 Sébastien Helleu <flashcode@flashtux.org>
-#
-# This file is part of WeeChat, the extensible chat client.
-#
-# WeeChat is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# WeeChat is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
-#
-
-# - Find Socketpair
-# This module finds if socketpair function is available and supports SOCK_DGRAM.
-#
-
-if(SOCKETPAIR_FOUND)
- # Already in cache, be silent
- set(SOCKETPAIR_FIND_QUIETLY TRUE)
-endif()
-
-include(CheckCSourceRuns)
-
-set(CMAKE_REQUIRED_FLAGS -Werror)
-check_c_source_runs("
- #include <sys/types.h>
- #include <sys/socket.h>
- int main() {
- int socket[2];
- int rc = socketpair (AF_LOCAL, SOCK_DGRAM, 0, socket);
- return (rc == 0) ? 0 : 1;
- }
-" HAVE_SOCKETPAIR_SOCK_DGRAM)
diff --git a/config.h.cmake b/config.h.cmake
index 2f34efe97..82be05c6e 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -6,7 +6,6 @@
#cmakedefine ICONV_2ARG_IS_CONST 1
#cmakedefine HAVE_MALLINFO
#cmakedefine HAVE_EAT_NEWLINE_GLITCH
-#cmakedefine HAVE_SOCKETPAIR_SOCK_DGRAM
#cmakedefine HAVE_ASPELL_VERSION_STRING
#cmakedefine HAVE_ENCHANT_GET_VERSION
#cmakedefine HAVE_GUILE_GMP_MEMORY_FUNCTIONS
diff --git a/configure.ac b/configure.ac
index 81cf53c3b..3f9ee5220 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,7 +101,6 @@ AH_VERBATIM([WEECHAT_SHAREDIR], [#undef WEECHAT_SHAREDIR])
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
AH_VERBATIM([HAVE_FLOCK], [#undef HAVE_FLOCK])
AH_VERBATIM([HAVE_EAT_NEWLINE_GLITCH], [#undef HAVE_EAT_NEWLINE_GLITCH])
-AH_VERBATIM([HAVE_SOCKETPAIR_SOCK_DGRAM], [#undef HAVE_SOCKETPAIR_SOCK_DGRAM])
AH_VERBATIM([HAVE_ASPELL_VERSION_STRING], [#undef HAVE_ASPELL_VERSION_STRING])
AH_VERBATIM([HAVE_ENCHANT_GET_VERSION], [#undef HAVE_ENCHANT_GET_VERSION])
AH_VERBATIM([HAVE_GUILE_GMP_MEMORY_FUNCTIONS], [#undef HAVE_GUILE_GMP_MEMORY_FUNCTIONS])
@@ -1049,28 +1048,6 @@ else
fi
# ------------------------------------------------------------------------------
-# socketpair (SOCK_DGRAM)
-# ------------------------------------------------------------------------------
-
-enable_socketpair_sock_dgram="no"
-AC_CACHE_CHECK([for socketpair with SOCK_DGRAM support], ac_cv_have_socketpair_sock_dgram, [
-AC_TRY_RUN([
- #include <sys/types.h>
- #include <sys/socket.h>
- int main() {
- int socket[2];
- int rc = socketpair (AF_LOCAL, SOCK_DGRAM, 0, socket);
- return (rc == 0) ? 0 : 1;
- }],ac_have_socketpair_sock_dgram="yes", ac_have_socketpair_sock_dgram="no", ac_have_socketpair_sock_dgram="assume-yes")])
-
-if test "x$ac_have_socketpair_sock_dgram" = "xyes"; then
- enable_have_socketpair_sock_dgram="yes"
- AC_DEFINE(HAVE_SOCKETPAIR_SOCK_DGRAM)
-else
- not_found="$not_found socketpair(SOCK_DGRAM)"
-fi
-
-# ------------------------------------------------------------------------------
# zlib
# ------------------------------------------------------------------------------
@@ -1259,32 +1236,31 @@ CPPFLAGS="$CPPFLAGS -DWEECHAT_VERSION=\\\"$VERSION\\\" -DWEECHAT_LICENSE=\\\"$LI
# output Makefiles
# ------------------------------------------------------------------------------
-AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
-AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
-AM_CONDITIONAL(HAVE_EAT_NEWLINE_GLITCH, test "$enable_eatnewlineglitch" = "yes")
-AM_CONDITIONAL(HAVE_SOCKETPAIR_SOCK_DGRAM, test "$enable_socketpair_sock_dgram" = "yes")
-AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
-AM_CONDITIONAL(PLUGIN_ALIAS, test "$enable_alias" = "yes")
-AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
-AM_CONDITIONAL(PLUGIN_CHARSET, test "$enable_charset" = "yes")
-AM_CONDITIONAL(PLUGIN_EXEC, test "$enable_exec" = "yes")
-AM_CONDITIONAL(PLUGIN_FIFO, test "$enable_fifo" = "yes")
-AM_CONDITIONAL(PLUGIN_IRC, test "$enable_irc" = "yes")
-AM_CONDITIONAL(PLUGIN_LOGGER, test "$enable_logger" = "yes")
-AM_CONDITIONAL(PLUGIN_RELAY, test "$enable_relay" = "yes")
-AM_CONDITIONAL(PLUGIN_SCRIPT, test "$enable_script" = "yes")
-AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
-AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
-AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
-AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
-AM_CONDITIONAL(PLUGIN_TCL, test "$enable_tcl" = "yes")
-AM_CONDITIONAL(PLUGIN_GUILE, test "$enable_guile" = "yes")
-AM_CONDITIONAL(PLUGIN_JAVASCRIPT, test "$enable_javascript" = "yes")
-AM_CONDITIONAL(PLUGIN_TRIGGER, test "$enable_trigger" = "yes")
-AM_CONDITIONAL(PLUGIN_XFER, test "$enable_xfer" = "yes")
-AM_CONDITIONAL(TESTS, test "$enable_tests" = "yes")
-AM_CONDITIONAL(MAN, test "$enable_man" = "yes")
-AM_CONDITIONAL(DOC, test "$enable_doc" = "yes")
+AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
+AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
+AM_CONDITIONAL(HAVE_EAT_NEWLINE_GLITCH, test "$enable_eatnewlineglitch" = "yes")
+AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
+AM_CONDITIONAL(PLUGIN_ALIAS, test "$enable_alias" = "yes")
+AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
+AM_CONDITIONAL(PLUGIN_CHARSET, test "$enable_charset" = "yes")
+AM_CONDITIONAL(PLUGIN_EXEC, test "$enable_exec" = "yes")
+AM_CONDITIONAL(PLUGIN_FIFO, test "$enable_fifo" = "yes")
+AM_CONDITIONAL(PLUGIN_IRC, test "$enable_irc" = "yes")
+AM_CONDITIONAL(PLUGIN_LOGGER, test "$enable_logger" = "yes")
+AM_CONDITIONAL(PLUGIN_RELAY, test "$enable_relay" = "yes")
+AM_CONDITIONAL(PLUGIN_SCRIPT, test "$enable_script" = "yes")
+AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
+AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
+AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
+AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
+AM_CONDITIONAL(PLUGIN_TCL, test "$enable_tcl" = "yes")
+AM_CONDITIONAL(PLUGIN_GUILE, test "$enable_guile" = "yes")
+AM_CONDITIONAL(PLUGIN_JAVASCRIPT, test "$enable_javascript" = "yes")
+AM_CONDITIONAL(PLUGIN_TRIGGER, test "$enable_trigger" = "yes")
+AM_CONDITIONAL(PLUGIN_XFER, test "$enable_xfer" = "yes")
+AM_CONDITIONAL(TESTS, test "$enable_tests" = "yes")
+AM_CONDITIONAL(MAN, test "$enable_man" = "yes")
+AM_CONDITIONAL(DOC, test "$enable_doc" = "yes")
AC_OUTPUT([Makefile
doc/Makefile
diff --git a/src/core/wee-hook.h b/src/core/wee-hook.h
index ae6ba5600..cdbba4027 100644
--- a/src/core/wee-hook.h
+++ b/src/core/wee-hook.h
@@ -27,7 +27,7 @@
#include <gnutls/gnutls.h>
#endif
-#if !defined(HAVE_SOCKETPAIR_SOCK_DGRAM) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__MACH__)
+#if defined(__CYGWIN__) || defined(__APPLE__) || defined(__MACH__)
/*
* For the connect hook, when this is defined an array of sockets will
* be passed from the parent process to the child process instead of using