Revert "api: fix connection to servers with hook_connect() on Windows 10 with Windows subsystem for Linux (closes #770)"

This reverts commit 399636f984.
v2.8-utf8proc
Sébastien Helleu 2016-08-19 19:44:08 +02:00
parent e218db3582
commit 091ef992dd
7 changed files with 26 additions and 96 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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 \

View File

@ -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)

View File

@ -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

View File

@ -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])
@ -1048,28 +1047,6 @@ else
not_found="$not_found eat_newline_glitch"
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

View File

@ -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