aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:25:08 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:25:08 +0000
commit7404da00768639b9036dc66b5f39e7dd00266a05 (patch)
tree54430c0253b69af17ddb47aac6515b5eb93eac65
parentb4dfbdab178c17f1d2466fef9787b1761dec5452 (diff)
parent7b67f806735671bbf49cc4cd74c59c7c105ce8e2 (diff)
downloadlibevent-7404da00768639b9036dc66b5f39e7dd00266a05.tar.gz
Change-Id: I387ab605fdf70e3cf81914b1a8573b65dfc6f6c9
-rw-r--r--CMakeLists.txt1531
-rw-r--r--ChangeLog232
-rw-r--r--ChangeLog-1.42
-rw-r--r--ChangeLog-2.02
-rw-r--r--METADATA11
-rw-r--r--Makefile.am57
-rw-r--r--Makefile.in1284
-rw-r--r--[l---------]NOTICE75
-rw-r--r--README.android29
-rw-r--r--README.md469
-rw-r--r--WIN32-Code/getopt.c149
-rw-r--r--WIN32-Code/getopt.h33
-rw-r--r--WIN32-Code/getopt_long.c234
-rw-r--r--WIN32-Code/nmake/event2/event-config.h26
-rw-r--r--aclocal.m4189
-rw-r--r--arc4random.c10
-rw-r--r--buffer.c38
-rw-r--r--buffer_iocp.c1
-rw-r--r--bufferevent-internal.h36
-rw-r--r--bufferevent.c115
-rw-r--r--bufferevent_async.c66
-rw-r--r--bufferevent_filter.c10
-rw-r--r--bufferevent_openssl.c75
-rw-r--r--bufferevent_pair.c4
-rw-r--r--bufferevent_ratelim.c9
-rw-r--r--bufferevent_sock.c74
-rw-r--r--cmake/AddCompilerFlags.cmake13
-rw-r--r--cmake/AddEventLibrary.cmake163
-rw-r--r--cmake/COPYING-CMAKE-SCRIPTS22
-rw-r--r--cmake/CheckConstExists.cmake25
-rw-r--r--cmake/CheckFileOffsetBits.c14
-rw-r--r--cmake/CheckFileOffsetBits.cmake43
-rw-r--r--cmake/CheckFunctionExistsEx.c28
-rw-r--r--cmake/CheckFunctionExistsEx.cmake69
-rw-r--r--cmake/CheckFunctionKeywords.cmake14
-rw-r--r--cmake/CheckPrototypeDefinition.c.in29
-rw-r--r--cmake/CheckPrototypeDefinition.cmake82
-rw-r--r--cmake/CheckWorkingKqueue.cmake52
-rw-r--r--cmake/CodeCoverage.cmake165
-rw-r--r--cmake/Copyright.txt57
-rw-r--r--cmake/FindGit.cmake45
-rw-r--r--cmake/LibeventConfig.cmake.in18
-rw-r--r--cmake/LibeventConfigBuildTree.cmake.in17
-rw-r--r--cmake/LibeventConfigVersion.cmake.in11
-rw-r--r--cmake/VersionViaGit.cmake64
-rwxr-xr-xcompile13
-rwxr-xr-xconfig.guess679
-rw-r--r--config.h.in34
-rwxr-xr-xconfig.sub304
-rwxr-xr-xconfigure630
-rw-r--r--configure.ac108
-rw-r--r--defer-internal.h3
-rwxr-xr-xdepcomp10
-rw-r--r--epoll.c9
-rw-r--r--epolltable-internal.h2
-rw-r--r--evbuffer-internal.h2
-rw-r--r--evconfig-private.h7
-rw-r--r--evconfig-private.h.cmake40
-rw-r--r--evconfig-private.h.in7
-rw-r--r--evdns.c129
-rw-r--r--event-config.h.cmake507
-rw-r--r--event-internal.h11
-rw-r--r--event.c393
-rw-r--r--event_iocp.c2
-rwxr-xr-xevent_rpcgen.py177
-rw-r--r--event_tagging.c4
-rw-r--r--evmap.c41
-rw-r--r--evrpc.c6
-rw-r--r--evthread-internal.h14
-rw-r--r--evthread.c2
-rw-r--r--evutil.c90
-rw-r--r--evutil_rand.c8
-rw-r--r--evutil_time.c7
-rw-r--r--http-internal.h9
-rw-r--r--http.c231
-rw-r--r--include/event2/buffer_compat.h3
-rw-r--r--include/event2/bufferevent.h11
-rw-r--r--include/event2/bufferevent_compat.h4
-rw-r--r--include/event2/dns.h46
-rw-r--r--include/event2/dns_compat.h24
-rw-r--r--include/event2/event.h77
-rw-r--r--include/event2/http.h13
-rw-r--r--include/event2/http_compat.h6
-rw-r--r--include/event2/listener.h12
-rw-r--r--include/event2/rpc.h48
-rw-r--r--include/event2/rpc_struct.h14
-rw-r--r--include/event2/util.h28
-rw-r--r--include/event2/visibility.h31
-rw-r--r--include/include.am7
-rwxr-xr-xinstall-sh47
-rw-r--r--iocp-internal.h14
-rw-r--r--kqueue.c12
-rw-r--r--listener.c29
-rw-r--r--log-internal.h25
-rw-r--r--log.c11
-rw-r--r--ltmain.sh766
-rw-r--r--m4/libevent_openssl.m44
-rw-r--r--m4/libtool.m4101
-rw-r--r--m4/ltoptions.m42
-rw-r--r--m4/ltsugar.m42
-rw-r--r--m4/ltversion.m412
-rw-r--r--m4/lt~obsolete.m42
-rw-r--r--make-event-config.sed10
-rw-r--r--minheap-internal.h6
-rwxr-xr-xmissing16
-rw-r--r--mm-internal.h5
-rw-r--r--openssl-compat.h13
-rwxr-xr-xpost_update.sh10
-rw-r--r--sample/dns-example.c13
-rw-r--r--sample/http-connect.c6
-rw-r--r--sample/http-server.c282
-rw-r--r--sample/https-client.c44
-rw-r--r--sample/include.am8
-rw-r--r--sample/le-proxy.c16
-rw-r--r--sample/openssl_hostname_validation.c3
-rw-r--r--sample/time-test.c3
-rw-r--r--signal.c2
-rw-r--r--strlcpy-internal.h2
-rwxr-xr-xtest-driver10
-rw-r--r--test/bench.c29
-rw-r--r--test/bench_cascade.c8
-rw-r--r--test/bench_http.c3
-rw-r--r--test/bench_httpclient.c4
-rwxr-xr-xtest/check-dumpevents.py10
-rw-r--r--test/include.am43
-rw-r--r--test/print-winsock-errors.c86
-rw-r--r--test/regress.c232
-rw-r--r--test/regress.gen.c39
-rw-r--r--test/regress.gen.h9
-rw-r--r--test/regress.h6
-rw-r--r--test/regress_buffer.c273
-rw-r--r--test/regress_bufferevent.c96
-rw-r--r--test/regress_dns.c447
-rw-r--r--test/regress_et.c144
-rw-r--r--test/regress_http.c418
-rw-r--r--test/regress_listener.c100
-rw-r--r--test/regress_main.c11
-rw-r--r--test/regress_rpc.c49
-rw-r--r--test/regress_ssl.c391
-rw-r--r--test/regress_thread.c8
-rw-r--r--test/regress_thread.h1
-rw-r--r--test/regress_util.c89
-rwxr-xr-xtest/rpcgen_wrapper.sh11
-rw-r--r--test/test-fdleak.c15
-rwxr-xr-xtest/test.sh4
-rw-r--r--test/tinytest.c80
-rw-r--r--test/tinytest.h5
-rw-r--r--test/tinytest_macros.h8
-rw-r--r--time-internal.h3
-rw-r--r--util-internal.h72
-rw-r--r--win32select.c2
151 files changed, 3276 insertions, 10391 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 70acb69..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,1531 +0,0 @@
-#
-# Libevent CMake project
-#
-# Based on initial work by:
-# Alexey Ozeritsky
-#
-# Additional changes:
-# Brodie Thiesfield
-# Joakim Soderberg
-# Trond Norbye
-# Sergei Nikulov
-#
-# Build example:
-#
-# cd libevent
-# md build
-# cd build
-# cmake -G "Visual Studio 10" ..
-# start libevent.sln
-#
-
-cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
-
-if (POLICY CMP0054)
- cmake_policy(SET CMP0054 NEW)
-endif()
-if (POLICY CMP0074)
- cmake_policy(SET CMP0074 NEW)
-endif()
-if (POLICY CMP0075)
- cmake_policy(SET CMP0075 NEW)
-endif()
-
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Release
- CACHE STRING "Set build type to Debug o Release (default Release)" FORCE)
-endif()
-string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
-
-# get rid of the extra default configurations
-# what? why would you get id of other useful build types? - Ellzey
-set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Limited configurations" FORCE)
-
-set(EVENT__LIBRARY_TYPE DEFAULT CACHE STRING
- "Set library type to SHARED/STATIC/BOTH (default SHARED for MSVC, otherwise BOTH)")
-
-project(libevent C)
-
-set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
-string(REGEX MATCH "SunOS" SOLARIS "${CMAKE_SYSTEM_NAME}")
-
-
-include(CheckTypeSize)
-include(CheckFunctionExistsEx)
-include(CheckFileOffsetBits)
-include(CheckFunctionExists)
-include(CheckIncludeFile)
-include(CheckIncludeFiles)
-include(CheckVariableExists)
-include(CheckSymbolExists)
-include(CheckStructHasMember)
-include(CheckCSourceCompiles)
-include(CheckPrototypeDefinition)
-include(CheckFunctionKeywords)
-include(CheckConstExists)
-include(AddCompilerFlags)
-include(VersionViaGit)
-
-event_fuzzy_version_from_git()
-
-set(EVENT_VERSION_MAJOR ${EVENT_GIT___VERSION_MAJOR})
-set(EVENT_VERSION_MINOR ${EVENT_GIT___VERSION_MINOR})
-set(EVENT_VERSION_PATCH ${EVENT_GIT___VERSION_PATCH})
-set(EVENT_VERSION_STAGE ${EVENT_GIT___VERSION_STAGE})
-
-
-set(EVENT_ABI_MAJOR ${EVENT_VERSION_MAJOR})
-set(EVENT_ABI_MINOR ${EVENT_VERSION_MINOR})
-set(EVENT_ABI_PATCH ${EVENT_VERSION_PATCH})
-
-set(EVENT_ABI_LIBVERSION
- "${EVENT_ABI_MAJOR}.${EVENT_ABI_MINOR}.${EVENT_ABI_PATCH}")
-
-set(EVENT_PACKAGE_VERSION
- "${EVENT_VERSION_MAJOR}.${EVENT_VERSION_MINOR}.${EVENT_VERSION_PATCH}")
-
-set(EVENT_NUMERIC_VERSION 0x02010b00)
-# equals to VERSION_INFO in Makefile.am
-set(EVENT_ABI_LIBVERSION_CURRENT 7)
-set(EVENT_ABI_LIBVERSION_REVISION 0)
-set(EVENT_ABI_LIBVERSION_AGE 0)
-
-# equals to RELEASE in Makefile.am
-set(EVENT_PACKAGE_RELEASE 2.1)
-
-# only a subset of names can be used, defaults to "beta"
-set(EVENT_STAGE_NAME ${EVENT_VERSION_STAGE})
-
-# a list that defines what can set for EVENT_STAGE_VERSION
-set(EVENT__ALLOWED_STAGE_NAMES
- rc
- beta
- alpha
- alpha-dev
- release
- stable
-)
-list(
- FIND EVENT__ALLOWED_STAGE_NAMES
- "${EVENT_STAGE_NAME}"
- EVENT__STAGE_RET
-)
-if (EVENT__STAGE_RET EQUAL -1)
- message(WARNING
- "stage ${EVENT_STAGE_NAME} is not allowed, reset to beta")
- set(EVENT_STAGE_NAME beta)
-endif()
-
-set(EVENT_VERSION
- "${EVENT_VERSION_MAJOR}.${EVENT_VERSION_MINOR}.${EVENT_VERSION_PATCH}-${EVENT_STAGE_NAME}")
-
-option(EVENT__DISABLE_DEBUG_MODE
- "Define if libevent should build without support for a debug mode" OFF)
-
-option(EVENT__ENABLE_VERBOSE_DEBUG
- "Enables verbose debugging" OFF)
-
-option(EVENT__DISABLE_MM_REPLACEMENT
- "Define if libevent should not allow replacing the mm functions" OFF)
-
-option(EVENT__DISABLE_THREAD_SUPPORT
- "Define if libevent should not be compiled with thread support" OFF)
-
-option(EVENT__DISABLE_OPENSSL
- "Define if libevent should build without support for OpenSSL encryption" OFF)
-
-option(EVENT__DISABLE_BENCHMARK
- "Defines if libevent should build without the benchmark executables" OFF)
-
-option(EVENT__DISABLE_TESTS
- "If tests should be compiled or not" OFF)
-
-option(EVENT__DISABLE_REGRESS
- "Disable the regress tests" OFF)
-
-option(EVENT__DISABLE_SAMPLES
- "Disable sample files" OFF)
-
-option(EVENT__DISABLE_CLOCK_GETTIME
- "Do not use clock_gettime even if it is available" OFF)
-
-option(EVENT__FORCE_KQUEUE_CHECK
- "When crosscompiling forces running a test program that verifies that Kqueue works with pipes. Note that this requires you to manually run the test program on the cross compilation target to verify that it works. See cmake documentation for try_run for more details" OFF)
-
-# TODO: Add --disable-largefile omit support for large files
-option(EVENT__COVERAGE
-"Enable running gcov to get a test coverage report (only works with GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well." OFF)
-
-# Put the libaries and binaries that get built into directories at the
-# top of the build tree rather than in hard-to-find leaf directories.
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
-
-if (EVENT__ENABLE_VERBOSE_DEBUG)
- add_definitions(-DUSE_DEBUG=1)
-endif()
-
-# make it colorful under ninja-build
-if ("${CMAKE_GENERATOR}" STREQUAL "Ninja")
- add_compiler_flags(-fdiagnostics-color=always)
-endif()
-
-# Setup compiler flags for coverage.
-if (EVENT__COVERAGE)
- if (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "debug")
- message(FATAL_ERROR "Coverage requires -DCMAKE_BUILD_TYPE=Debug")
- endif()
-
- message(STATUS "Setting coverage compiler flags")
-
- set(CMAKE_REQUIRED_LIBRARIES "--coverage")
- add_compiler_flags(-g -O0 --coverage)
- set(CMAKE_REQUIRED_LIBRARIES "")
-endif()
-
-set(GNUC 0)
-set(CLANG 0)
-set(MSVC 0)
-if (("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR
- ("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang"))
- set(CLANG 1)
-endif()
-if (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR (${CLANG}))
- set(GNUC 1)
-endif()
-if (("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") OR (${CLANG}))
- set(MSVC 1)
-endif()
-
-# Detect library type
-set(EVENT_LIBRARY_TYPE)
-if ("${EVENT__LIBRARY_TYPE}" STREQUAL "DEFAULT")
- if (${MSVC})
- set(EVENT_LIBRARY_TYPE SHARED)
- else()
- set(EVENT_LIBRARY_TYPE BOTH)
- endif()
-else()
- string(TOUPPER "${EVENT__LIBRARY_TYPE}" EVENT_LIBRARY_TYPE)
-endif()
-if ((${MSVC}) AND ("${EVENT_LIBRARY_TYPE}" STREQUAL "BOTH"))
- message(WARNING
- "Building SHARED and STATIC is not supported for MSVC "
- "(due to conflicts in library name"
- " between STATIC library and IMPORTED library for SHARED libraries)")
-endif()
-set(EVENT_LIBRARY_STATIC OFF)
-set(EVENT_LIBRARY_SHARED OFF)
-if ("${EVENT_LIBRARY_TYPE}" STREQUAL "BOTH")
- set(EVENT_LIBRARY_STATIC ON)
- set(EVENT_LIBRARY_SHARED ON)
-elseif ("${EVENT_LIBRARY_TYPE}" STREQUAL "STATIC")
- set(EVENT_LIBRARY_STATIC ON)
-elseif ("${EVENT_LIBRARY_TYPE}" STREQUAL "SHARED")
- set(EVENT_LIBRARY_SHARED ON)
-else()
- message(FATAL_ERROR "${EVENT_LIBRARY_TYPE} is not supported")
-endif()
-
-if (${MSVC})
- set(msvc_static_runtime OFF)
- if ("${EVENT_LIBRARY_TYPE}" STREQUAL "STATIC")
- set(msvc_static_runtime ON)
- endif()
-
- # For more info:
- # - https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library?view=vs-2017
- # - https://gitlab.kitware.com/cmake/community/wikis/FAQ#how-can-i-build-my-msvc-application-with-a-static-runtime
- option(EVENT__MSVC_STATIC_RUNTIME
- "Link static runtime libraries"
- ${msvc_static_runtime})
-
- if (EVENT__MSVC_STATIC_RUNTIME)
- foreach (flag_var
- CMAKE_C_FLAGS
- CMAKE_C_FLAGS_DEBUG
- CMAKE_C_FLAGS_RELEASE
- CMAKE_C_FLAGS_MINSIZEREL
- CMAKE_C_FLAGS_RELWITHDEBINFO
- )
- if (${flag_var} MATCHES "/MD")
- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
- endif()
- endforeach()
- endif()
-endif()
-
-# GNUC specific options.
-if (${GNUC})
- option(EVENT__DISABLE_GCC_WARNINGS "Disable verbose warnings with GCC" OFF)
- option(EVENT__ENABLE_GCC_HARDENING "Enable compiler security checks" OFF)
- option(EVENT__ENABLE_GCC_FUNCTION_SECTIONS "Enable gcc function sections" OFF)
- option(EVENT__ENABLE_GCC_WARNINGS "Make all GCC warnings into errors" OFF)
-
- set(GCC_V ${CMAKE_C_COMPILER_VERSION})
-
- list(APPEND __FLAGS
- -Wall -Wextra -Wno-unused-parameter -Wstrict-aliasing -Wstrict-prototypes
-
- -fno-strict-aliasing # gcc 2.9.5+
- -Wmissing-prototypes
-
- # gcc 4
- -Winit-self
- -Wmissing-field-initializers
- -Wdeclaration-after-statement
-
- # gcc 4.2
- -Waddress
- -Wnormalized=id
- -Woverride-init
-
- # gcc 4.5
- -Wlogical-op
-
- -Wwrite-strings
- )
-
- if (${CLANG})
- list(APPEND __FLAGS -Wno-unused-function)
- endif()
-
- if (EVENT__DISABLE_GCC_WARNINGS)
- list(APPEND __FLAGS -w)
- endif()
-
- if (EVENT__ENABLE_GCC_HARDENING)
- list(APPEND __FLAGS
- -fstack-protector-all
- -fwrapv
- -fPIE
- -Wstack-protector
- "--param ssp-buffer-size=1")
-
- add_definitions(-D_FORTIFY_SOURCE=2)
- endif()
-
- if (EVENT__ENABLE_GCC_FUNCTION_SECTIONS)
- list(APPEND __FLAGS -ffunction-sections)
- # TODO: Add --gc-sections support. We need some checks for NetBSD to ensure this works.
- endif()
-
- if (EVENT__ENABLE_GCC_WARNINGS)
- list(APPEND __FLAGS -Werror)
- endif()
-
- add_compiler_flags(${__FLAGS})
-endif()
-
-if (APPLE)
- # Get rid of deprecated warnings for OpenSSL on OSX 10.7 and greater.
- add_compiler_flags(
- -Wno-error=deprecated-declarations
- -Qunused-arguments
- )
-endif()
-
-# Winsock.
-if(WIN32)
- set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h ws2tcpip.h)
- set(CMAKE_REQUIRED_LIBRARIES ws2_32.lib shell32.lib advapi32.lib)
- set(CMAKE_REQUIRED_DEFINITIONS -FIwinsock2.h -FIws2tcpip.h)
-endif()
-if (SOLARIS)
- set(CMAKE_REQUIRED_LIBRARIES socket nsl)
-endif()
-
-# Check if _GNU_SOURCE is available.
-if (NOT DEFINED _GNU_SOURCE)
- CHECK_SYMBOL_EXISTS(__GNU_LIBRARY__ "features.h" _GNU_SOURCE)
-
- if (NOT _GNU_SOURCE)
- unset(_GNU_SOURCE CACHE)
- CHECK_SYMBOL_EXISTS(_GNU_SOURCE "features.h" _GNU_SOURCE)
- endif()
-
- if (ANDROID)
- set(_GNU_SOURCE TRUE)
- endif()
-endif()
-
-if (_GNU_SOURCE)
- add_definitions(-D_GNU_SOURCE=1)
-endif()
-
-CHECK_INCLUDE_FILE(sys/types.h EVENT__HAVE_SYS_TYPES_H)
-if(EVENT__HAVE_SYS_TYPES_H)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES sys/types.h)
-endif()
-
-CHECK_INCLUDE_FILE(sys/socket.h EVENT__HAVE_SYS_SOCKET_H)
-if(EVENT__HAVE_SYS_SOCKET_H)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
-endif()
-
-CHECK_INCLUDE_FILE(netinet/in.h EVENT__HAVE_NETINET_IN_H)
-if(EVENT__HAVE_NETINET_IN_H)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES netinet/in.h)
-endif()
-
-CHECK_INCLUDE_FILE(sys/un.h EVENT__HAVE_SYS_UN_H)
-if(EVENT__HAVE_SYS_UN_H)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES sys/un.h)
-endif()
-
-if(WIN32)
- CHECK_INCLUDE_FILE(afunix.h EVENT__HAVE_AFUNIX_H)
- if(EVENT__HAVE_AFUNIX_H)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES afunix.h)
- endif()
-endif()
-CHECK_TYPE_SIZE("struct sockaddr_un" EVENT__HAVE_STRUCT_SOCKADDR_UN)
-
-CHECK_INCLUDE_FILE(netinet/in6.h EVENT__HAVE_NETINET_IN6_H)
-if(EVENT__HAVE_NETINET_IN6_H)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES netinet/in6.h)
-endif()
-
-CHECK_INCLUDE_FILE(unistd.h EVENT__HAVE_UNISTD_H)
-CHECK_INCLUDE_FILE(netdb.h EVENT__HAVE_NETDB_H)
-CHECK_INCLUDE_FILE(dlfcn.h EVENT__HAVE_DLFCN_H)
-CHECK_INCLUDE_FILE(arpa/inet.h EVENT__HAVE_ARPA_INET_H)
-CHECK_INCLUDE_FILE(fcntl.h EVENT__HAVE_FCNTL_H)
-if(EVENT__HAVE_FCNTL_H)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES fcntl.h)
-endif()
-CHECK_INCLUDE_FILE(inttypes.h EVENT__HAVE_INTTYPES_H)
-CHECK_INCLUDE_FILE(memory.h EVENT__HAVE_MEMORY_H)
-CHECK_INCLUDE_FILE(poll.h EVENT__HAVE_POLL_H)
-CHECK_INCLUDE_FILE(port.h EVENT__HAVE_PORT_H)
-if(EVENT__HAVE_PORT_H)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES port.h)
-endif()
-CHECK_INCLUDE_FILE(signal.h EVENT__HAVE_SIGNAL_H)
-CHECK_INCLUDE_FILE(stdarg.h EVENT__HAVE_STDARG_H)
-CHECK_INCLUDE_FILE(stddef.h EVENT__HAVE_STDDEF_H)
-CHECK_INCLUDE_FILE(stdint.h EVENT__HAVE_STDINT_H)
-CHECK_INCLUDE_FILE(stdlib.h EVENT__HAVE_STDLIB_H)
-CHECK_INCLUDE_FILE(strings.h EVENT__HAVE_STRINGS_H)
-CHECK_INCLUDE_FILE(string.h EVENT__HAVE_STRING_H)
-CHECK_INCLUDE_FILE(sys/devpoll.h EVENT__HAVE_DEVPOLL)
-CHECK_INCLUDE_FILE(sys/epoll.h EVENT__HAVE_SYS_EPOLL_H)
-CHECK_INCLUDE_FILE(sys/eventfd.h EVENT__HAVE_SYS_EVENTFD_H)
-CHECK_INCLUDE_FILE(sys/event.h EVENT__HAVE_SYS_EVENT_H)
-CHECK_INCLUDE_FILE(sys/ioctl.h EVENT__HAVE_SYS_IOCTL_H)
-CHECK_INCLUDE_FILE(sys/mman.h EVENT__HAVE_SYS_MMAN_H)
-CHECK_INCLUDE_FILE(sys/param.h EVENT__HAVE_SYS_PARAM_H)
-CHECK_INCLUDE_FILE(sys/queue.h EVENT__HAVE_SYS_QUEUE_H)
-CHECK_INCLUDE_FILE(sys/select.h EVENT__HAVE_SYS_SELECT_H)
-CHECK_INCLUDE_FILE(sys/sendfile.h EVENT__HAVE_SYS_SENDFILE_H)
-CHECK_INCLUDE_FILE(sys/stat.h EVENT__HAVE_SYS_STAT_H)
-CHECK_INCLUDE_FILE(sys/time.h EVENT__HAVE_SYS_TIME_H)
-if(EVENT__HAVE_SYS_TIME_H)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES sys/time.h)
-endif()
-CHECK_INCLUDE_FILE(sys/uio.h EVENT__HAVE_SYS_UIO_H)
-CHECK_INCLUDE_FILES("sys/types.h;ifaddrs.h" EVENT__HAVE_IFADDRS_H)
-CHECK_INCLUDE_FILE(mach/mach_time.h EVENT__HAVE_MACH_MACH_TIME_H)
-CHECK_INCLUDE_FILE(netinet/tcp.h EVENT__HAVE_NETINET_TCP_H)
-CHECK_INCLUDE_FILE(sys/wait.h EVENT__HAVE_SYS_WAIT_H)
-CHECK_INCLUDE_FILE(sys/resource.h EVENT__HAVE_SYS_RESOURCE_H)
-CHECK_INCLUDE_FILE(sys/sysctl.h EVENT__HAVE_SYS_SYSCTL_H)
-CHECK_INCLUDE_FILE(sys/timerfd.h EVENT__HAVE_SYS_TIMERFD_H)
-CHECK_INCLUDE_FILE(errno.h EVENT__HAVE_ERRNO_H)
-
-
-CHECK_FUNCTION_EXISTS_EX(epoll_create EVENT__HAVE_EPOLL)
-CHECK_FUNCTION_EXISTS_EX(epoll_ctl EVENT__HAVE_EPOLL_CTL)
-CHECK_FUNCTION_EXISTS_EX(eventfd EVENT__HAVE_EVENTFD)
-if(NOT EVENT__DISABLE_CLOCK_GETTIME)
- CHECK_FUNCTION_EXISTS_EX(clock_gettime EVENT__HAVE_CLOCK_GETTIME)
-endif()
-CHECK_FUNCTION_EXISTS_EX(fcntl EVENT__HAVE_FCNTL)
-CHECK_FUNCTION_EXISTS_EX(getaddrinfo EVENT__HAVE_GETADDRINFO)
-CHECK_FUNCTION_EXISTS_EX(getnameinfo EVENT__HAVE_GETNAMEINFO)
-CHECK_FUNCTION_EXISTS_EX(gettimeofday EVENT__HAVE_GETTIMEOFDAY)
-CHECK_FUNCTION_EXISTS_EX(getprotobynumber EVENT__HAVE_GETPROTOBYNUMBER)
-CHECK_FUNCTION_EXISTS_EX(getservbyname EVENT__HAVE_GETSERVBYNAME)
-CHECK_FUNCTION_EXISTS_EX(inet_ntop EVENT__HAVE_INET_NTOP)
-CHECK_FUNCTION_EXISTS_EX(inet_pton EVENT__HAVE_INET_PTON)
-CHECK_FUNCTION_EXISTS_EX(kqueue EVENT__HAVE_KQUEUE)
-CHECK_FUNCTION_EXISTS_EX(mmap EVENT__HAVE_MMAP)
-CHECK_FUNCTION_EXISTS_EX(pipe EVENT__HAVE_PIPE)
-CHECK_FUNCTION_EXISTS_EX(pipe2 EVENT__HAVE_PIPE2)
-CHECK_FUNCTION_EXISTS_EX(poll EVENT__HAVE_POLL)
-CHECK_FUNCTION_EXISTS_EX(port_create EVENT__HAVE_PORT_CREATE)
-CHECK_FUNCTION_EXISTS_EX(sendfile EVENT__HAVE_SENDFILE)
-CHECK_FUNCTION_EXISTS_EX(sigaction EVENT__HAVE_SIGACTION)
-CHECK_FUNCTION_EXISTS_EX(signal EVENT__HAVE_SIGNAL)
-CHECK_FUNCTION_EXISTS_EX(splice EVENT__HAVE_SPLICE)
-CHECK_FUNCTION_EXISTS_EX(strlcpy EVENT__HAVE_STRLCPY)
-CHECK_FUNCTION_EXISTS_EX(strsep EVENT__HAVE_STRSEP)
-CHECK_FUNCTION_EXISTS_EX(strtok_r EVENT__HAVE_STRTOK_R)
-CHECK_FUNCTION_EXISTS_EX(strtoll EVENT__HAVE_STRTOLL)
-CHECK_FUNCTION_EXISTS_EX(vasprintf EVENT__HAVE_VASPRINTF)
-CHECK_FUNCTION_EXISTS_EX(sysctl EVENT__HAVE_SYSCTL)
-CHECK_FUNCTION_EXISTS_EX(accept4 EVENT__HAVE_ACCEPT4)
-CHECK_FUNCTION_EXISTS_EX(arc4random EVENT__HAVE_ARC4RANDOM)
-CHECK_FUNCTION_EXISTS_EX(arc4random_buf EVENT__HAVE_ARC4RANDOM_BUF)
-CHECK_FUNCTION_EXISTS_EX(arc4random_addrandom EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
-CHECK_FUNCTION_EXISTS_EX(epoll_create1 EVENT__HAVE_EPOLL_CREATE1)
-CHECK_FUNCTION_EXISTS_EX(getegid EVENT__HAVE_GETEGID)
-CHECK_FUNCTION_EXISTS_EX(geteuid EVENT__HAVE_GETEUID)
-CHECK_FUNCTION_EXISTS_EX(getifaddrs EVENT__HAVE_GETIFADDRS)
-CHECK_FUNCTION_EXISTS_EX(issetugid EVENT__HAVE_ISSETUGID)
-CHECK_FUNCTION_EXISTS_EX(mach_absolute_time EVENT__HAVE_MACH_ABSOLUTE_TIME)
-CHECK_FUNCTION_EXISTS_EX(nanosleep EVENT__HAVE_NANOSLEEP)
-CHECK_FUNCTION_EXISTS_EX(usleep EVENT__HAVE_USLEEP)
-CHECK_FUNCTION_EXISTS_EX(timeradd EVENT__HAVE_TIMERADD)
-CHECK_FUNCTION_EXISTS_EX(timerclear EVENT__HAVE_TIMERCLEAR)
-CHECK_FUNCTION_EXISTS_EX(timercmp EVENT__HAVE_TIMERCMP)
-CHECK_FUNCTION_EXISTS_EX(timerfd_create EVENT__HAVE_TIMERFD_CREATE)
-CHECK_FUNCTION_EXISTS_EX(timerisset EVENT__HAVE_TIMERISSET)
-CHECK_FUNCTION_EXISTS_EX(putenv EVENT__HAVE_PUTENV)
-CHECK_FUNCTION_EXISTS_EX(setenv EVENT__HAVE_SETENV)
-CHECK_FUNCTION_EXISTS_EX(setrlimit EVENT__HAVE_SETRLIMIT)
-CHECK_FUNCTION_EXISTS_EX(umask EVENT__HAVE_UMASK)
-CHECK_FUNCTION_EXISTS_EX(unsetenv EVENT__HAVE_UNSETENV)
-
-# Get the gethostbyname_r prototype.
-CHECK_FUNCTION_EXISTS_EX(gethostbyname_r EVENT__HAVE_GETHOSTBYNAME_R)
-
-if(EVENT__HAVE_GETHOSTBYNAME_R)
- CHECK_PROTOTYPE_DEFINITION(gethostbyname_r
- "int gethostbyname_r(const char *name, struct hostent *hp, struct hostent_data *hdata)"
- "0"
- "netdb.h"
- EVENT__HAVE_GETHOSTBYNAME_R_3_ARG)
-
- CHECK_PROTOTYPE_DEFINITION(gethostbyname_r
- "struct hostent *gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, int *herr)"
- "NULL"
- "netdb.h"
- EVENT__HAVE_GETHOSTBYNAME_R_5_ARG)
-
- CHECK_PROTOTYPE_DEFINITION(gethostbyname_r
- "int gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, struct hostent **result, int *herr)"
- "0"
- "netdb.h"
- EVENT__HAVE_GETHOSTBYNAME_R_6_ARG)
-endif()
-
-if(HAVE_PORT_H AND HAVE_PORT_CREATE)
- set(EVENT__HAVE_EVENT_PORTS 1)
-endif()
-
-if(NOT WIN32)
- CHECK_FUNCTION_EXISTS_EX(select EVENT__HAVE_SELECT)
-endif()
-
-CHECK_TYPE_SIZE("uint8_t" EVENT__HAVE_UINT8_T)
-CHECK_TYPE_SIZE("uint16_t" EVENT__HAVE_UINT16_T)
-CHECK_TYPE_SIZE("uint32_t" EVENT__HAVE_UINT32_T)
-CHECK_TYPE_SIZE("uint64_t" EVENT__HAVE_UINT64_T)
-CHECK_TYPE_SIZE("short" EVENT__SIZEOF_SHORT BUILTIN_TYPES_ONLY)
-CHECK_TYPE_SIZE("int" EVENT__SIZEOF_INT BUILTIN_TYPES_ONLY)
-CHECK_TYPE_SIZE("unsigned" EVENT__SIZEOF_UNSIGNED BUILTIN_TYPES_ONLY)
-CHECK_TYPE_SIZE("unsigned int" EVENT__SIZEOF_UNSIGNED_INT BUILTIN_TYPES_ONLY)
-CHECK_TYPE_SIZE("long" EVENT__SIZEOF_LONG BUILTIN_TYPES_ONLY)
-CHECK_TYPE_SIZE("long long" EVENT__SIZEOF_LONG_LONG BUILTIN_TYPES_ONLY)
-
-if(WIN32)
- # These aren't available until Windows Vista.
- # But you can still link them. They just won't be found when running the exe.
- set(EVENT__HAVE_INET_NTOP 0)
- set(EVENT__HAVE_INET_PTON 0)
-endif()
-
-# Check for different inline keyword versions.
-check_function_keywords("inline" "__inline" "__inline__")
-
-if (HAVE_INLINE)
- set(EVENT__inline inline)
-elseif (HAVE___INLINE)
- set(EVENT__inline __inline)
-elseif(HAVE___INLINE__)
- set(EVENT__inline __inline__)
-else()
- set(EVENT__inline)
-endif()
-
-# __func__/__FUNCTION__ is not a macros in general
-CHECK_SYMBOL_EXISTS("__func__" "" EVENT__HAVE___func__)
-CHECK_SYMBOL_EXISTS("__FUNCTION__" "" EVENT__HAVE___FUNCTION__)
-
-CHECK_SYMBOL_EXISTS(TAILQ_FOREACH sys/queue.h EVENT__HAVE_TAILQFOREACH)
-CHECK_CONST_EXISTS(CTL_KERN sys/sysctl.h EVENT__HAVE_DECL_CTL_KERN)
-CHECK_CONST_EXISTS(KERN_ARND sys/sysctl.h EVENT__HAVE_DECL_KERN_ARND)
-CHECK_CONST_EXISTS(KERN_RANDOM sys/sysctl.h EVENT__HAVE_DECL_KERN_RANDOM)
-CHECK_CONST_EXISTS(RANDOM_UUID sys/sysctl.h EVENT__HAVE_DECL_RANDOM_UUID)
-CHECK_SYMBOL_EXISTS(F_SETFD fcntl.h EVENT__HAVE_SETFD)
-
-CHECK_TYPE_SIZE(fd_mask EVENT__HAVE_FD_MASK)
-
-CHECK_TYPE_SIZE(size_t EVENT__SIZEOF_SIZE_T)
-if(NOT EVENT__SIZEOF_SIZE_T)
- set(EVENT__size_t "unsigned")
- set(EVENT__SIZEOF_SIZE_T ${EVENT__SIZEOF_UNSIGNED})
-else()
- set(EVENT__size_t size_t)
-endif()
-
-CHECK_TYPE_SIZE("off_t" EVENT__SIZEOF_OFF_T LANGUAGE C)
-
-
-# XXX we should functionalize these size and type sets. --elley
-
-# Winssck.
-if (_MSC_VER)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES BaseTsd.h)
-endif()
-CHECK_TYPE_SIZE("ssize_t" EVENT__SIZEOF_SSIZE_T_LOWER LANGUAGE C)
-CHECK_TYPE_SIZE("SSIZE_T" EVENT__SIZEOF_SSIZE_T_UPPER LANGUAGE C)
-
-if (EVENT__SIZEOF_SSIZE_T_LOWER)
- set(EVENT__ssize_t "ssize_t")
- set(EVENT__SIZEOF_SSIZE_T ${EVENT__SIZEOF_SSIZE_T_LOWER})
-elseif (EVENT__SIZEOF_SSIZE_T_UPPER)
- set(EVENT__ssize_t "SSIZE_T")
- set(EVENT__SIZEOF_SSIZE_T ${EVENT__SIZEOF_SSIZE_T_UPPER})
-else()
- set(EVENT__ssize_t "int")
- set(EVENT__SIZEOF_SSIZE_T ${EVENT__SIZEOF_INT})
-endif()
-
-CHECK_TYPE_SIZE(socklen_t EVENT__SIZEOF_SOCKLEN_T)
-if(NOT EVENT__SIZEOF_SOCKLEN_T)
- set(EVENT__socklen_t "unsigned int")
- set(EVENT__SIZEOF_SOCKLEN_T ${EVENT__SIZEOF_UNSIGNED_INT})
-else()
- set(EVENT__socklen_t "socklen_t")
-endif()
-
-CHECK_TYPE_SIZE(pid_t EVENT__SIZEOF_PID_T)
-if(NOT EVENT__SIZEOF_PID_T)
- set(EVENT__SIZEOF_PID_T ${EVENT__SIZEOF_INT})
-else()
- set(EVENT__SIZEOF_PID_T EVENT__SIZEOF_PID_T)
-endif()
-
-if (NOT EVENT__DISABLE_THREAD_SUPPORT)
- if (NOT WIN32)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES pthread.h)
- endif()
- CHECK_TYPE_SIZE(pthread_t EVENT__SIZEOF_PTHREAD_T)
-endif()
-
-if(EVENT__HAVE_CLOCK_GETTIME)
- set(EVENT__DNS_USE_CPU_CLOCK_FOR_ID 1)
-endif()
-
-# we're just getting lazy now.
-CHECK_TYPE_SIZE("uintptr_t" EVENT__HAVE_UINTPTR_T)
-CHECK_TYPE_SIZE("void *" EVENT__SIZEOF_VOID_P)
-CHECK_TYPE_SIZE("time_t" EVENT__SIZEOF_TIME_T)
-
-# Tests file offset bits.
-# TODO: Add AIX test for if -D_LARGE_FILES is needed.
-
-# XXX: Why is this here? we don't even use it. Well, we don't even use it
-# on top of that, why is it set in the config.h?! IT_MAKES_NO_SENSE
-# I'm commenting it out for now.
-# - ellzey
-
-#CHECK_FILE_OFFSET_BITS()
-
-# Verify kqueue works with pipes.
-if (EVENT__HAVE_KQUEUE)
- if ((CMAKE_CROSSCOMPILING OR APPLE) AND NOT EVENT__FORCE_KQUEUE_CHECK)
- message(WARNING "Cannot check if kqueue works with pipes when crosscompiling, use EVENT__FORCE_KQUEUE_CHECK to be sure (this requires manually running a test program on the cross compilation target)")
- set(EVENT__HAVE_WORKING_KQUEUE 1)
- else()
- message(STATUS "Checking if kqueue works with pipes...")
- include(CheckWorkingKqueue)
- endif()
-endif()
-
-if(EVENT__HAVE_NETDB_H)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES netdb.h)
- CHECK_TYPE_SIZE("struct addrinfo" EVENT__HAVE_STRUCT_ADDRINFO)
-elseif(WIN32)
- list(APPEND CMAKE_EXTRA_INCLUDE_FILES ws2tcpip.h)
- CHECK_TYPE_SIZE("struct addrinfo" EVENT__HAVE_STRUCT_ADDRINFO)
-endif()
-
-# Check for sockaddr structure sizes.
-set(SOCKADDR_HEADERS)
-if (WIN32)
- set(CMAKE_REQUIRED_DEFINITIONS "-DWIN32_LEAN_AND_MEAN")
- if (_MSC_VER LESS 1300)
- set(SOCKADDR_HEADERS winsock.h)
- else()
- set(SOCKADDR_HEADERS winsock2.h ws2tcpip.h)
- endif()
-else()
- if (EVENT__HAVE_NETINET_IN_H)
- set(SOCKADDR_HEADERS ${SOCKADDR_HEADERS} netinet/in.h)
- endif()
-
- if (EVENT__HAVE_NETINET_IN6_H)
- set(SOCKADDR_HEADERS ${SOCKADDR_HEADERS} netinet/in6.h)
- endif()
-
- if (EVENT__HAVE_SYS_SOCKET_H)
- set(SOCKADDR_HEADERS ${SOCKADDR_HEADERS} sys/socket.h)
- endif()
-
- if (EVENT__HAVE_NETDB_H)
- set(SOCKADDR_HEADERS ${SOCKADDR_HEADERS} netdb.h)
- endif()
-endif()
-
-CHECK_TYPE_SIZE("struct in6_addr" EVENT__HAVE_STRUCT_IN6_ADDR)
-if(EVENT__HAVE_STRUCT_IN6_ADDR)
- CHECK_STRUCT_HAS_MEMBER("struct in6_addr"
- s6_addr16 "${SOCKADDR_HEADERS}"
- EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16)
-
- CHECK_STRUCT_HAS_MEMBER("struct in6_addr"
- s6_addr32 "${SOCKADDR_HEADERS}"
- EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32)
-endif()
-
-CHECK_TYPE_SIZE("sa_family_t" EVENT__HAVE_SA_FAMILY_T)
-CHECK_TYPE_SIZE("struct sockaddr_in6" EVENT__HAVE_STRUCT_SOCKADDR_IN6)
-
-if(EVENT__HAVE_STRUCT_SOCKADDR_IN6)
- CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in6"
- sin6_len "${SOCKADDR_HEADERS}"
- EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN)
-
- CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in6"
- sin_len "${SOCKADDR_HEADERS}"
- EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN)
-endif()
-
-CHECK_TYPE_SIZE("struct sockaddr_storage" EVENT__HAVE_STRUCT_SOCKADDR_STORAGE)
-if(EVENT__HAVE_STRUCT_SOCKADDR_STORAGE)
- CHECK_STRUCT_HAS_MEMBER("struct sockaddr_storage"
- ss_family "${SOCKADDR_HEADERS}"
- EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)
-
- CHECK_STRUCT_HAS_MEMBER("struct sockaddr_storage"
- __ss_family "${SOCKADDR_HEADERS}" EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY)
-endif()
-
-CHECK_TYPE_SIZE("struct linger" EVENT__HAVE_STRUCT_LINGER)
-
-# Group the source files.
-set(HDR_PRIVATE
- bufferevent-internal.h
- changelist-internal.h
- defer-internal.h
- epolltable-internal.h
- evbuffer-internal.h
- event-internal.h
- evmap-internal.h
- evrpc-internal.h
- evsignal-internal.h
- evthread-internal.h
- ht-internal.h
- http-internal.h
- iocp-internal.h
- ipv6-internal.h
- log-internal.h
- minheap-internal.h
- mm-internal.h
- ratelim-internal.h
- strlcpy-internal.h
- util-internal.h
- evconfig-private.h
- compat/sys/queue.h)
-
-set(HDR_COMPAT
- include/evdns.h
- include/evrpc.h
- include/event.h
- include/evhttp.h
- include/evutil.h)
-
-set(HDR_PUBLIC
- include/event2/buffer.h
- include/event2/bufferevent.h
- include/event2/bufferevent_compat.h
- include/event2/bufferevent_struct.h
- include/event2/buffer_compat.h
- include/event2/dns.h
- include/event2/dns_compat.h
- include/event2/dns_struct.h
- include/event2/event.h
- include/event2/event_compat.h
- include/event2/event_struct.h
- include/event2/http.h
- include/event2/http_compat.h
- include/event2/http_struct.h
- include/event2/keyvalq_struct.h
- include/event2/listener.h
- include/event2/rpc.h
- include/event2/rpc_compat.h
- include/event2/rpc_struct.h
- include/event2/tag.h
- include/event2/tag_compat.h
- include/event2/thread.h
- include/event2/util.h
- include/event2/visibility.h
- ${PROJECT_BINARY_DIR}/include/event2/event-config.h)
-
-set(SRC_CORE
- buffer.c
- bufferevent.c
- bufferevent_filter.c
- bufferevent_pair.c
- bufferevent_ratelim.c
- bufferevent_sock.c
- event.c
- evmap.c
- evthread.c
- evutil.c
- evutil_rand.c
- evutil_time.c
- listener.c
- log.c
- signal.c
- strlcpy.c)
-
-if(EVENT__HAVE_SELECT)
- list(APPEND SRC_CORE select.c)
-endif()
-
-if(EVENT__HAVE_POLL)
- list(APPEND SRC_CORE poll.c)
-endif()
-
-if(EVENT__HAVE_KQUEUE)
- list(APPEND SRC_CORE kqueue.c)
-endif()
-
-if(EVENT__HAVE_DEVPOLL)
- list(APPEND SRC_CORE devpoll.c)
-endif()
-
-if(EVENT__HAVE_EPOLL)
- list(APPEND SRC_CORE epoll.c)
-endif()
-
-if(EVENT__HAVE_EVENT_PORTS)
- list(APPEND SRC_CORE evport.c)
-endif()
-
-if (NOT EVENT__DISABLE_OPENSSL)
- find_package(OpenSSL REQUIRED)
-
- set(EVENT__HAVE_OPENSSL 1)
-
- message(STATUS "OpenSSL include: ${OPENSSL_INCLUDE_DIR}")
- message(STATUS "OpenSSL lib: ${OPENSSL_LIBRARIES}")
-
- include_directories(${OPENSSL_INCLUDE_DIR})
-
- list(APPEND SRC_OPENSSL bufferevent_openssl.c)
- list(APPEND HDR_PUBLIC include/event2/bufferevent_ssl.h)
- list(APPEND LIB_APPS ${OPENSSL_LIBRARIES})
-endif()
-
-if (NOT EVENT__DISABLE_THREAD_SUPPORT)
- if (WIN32)
- list(APPEND SRC_CORE evthread_win32.c)
- else()
- find_package(Threads REQUIRED)
- if (NOT CMAKE_USE_PTHREADS_INIT)
- message(FATAL_ERROR
- "Failed to find Pthreads, set EVENT__DISABLE_THREAD_SUPPORT to disable")
- endif()
-
- set(EVENT__HAVE_PTHREADS 1)
- list(APPEND LIB_APPS ${CMAKE_THREAD_LIBS_INIT})
- endif()
-endif()
-
-if (NOT EVENT__DISABLE_TESTS)
- # Zlib is only used for testing.
- find_package(ZLIB)
-
- if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
- include_directories(${ZLIB_INCLUDE_DIRS})
-
- set(EVENT__HAVE_LIBZ 1)
- list(APPEND LIB_APPS ${ZLIB_LIBRARIES})
- endif()
-endif()
-
-set(SRC_EXTRA
- event_tagging.c
- http.c
- evdns.c
- evrpc.c)
-
-add_definitions(-DHAVE_CONFIG_H)
-
-# We use BEFORE here so we don't accidentally look in system directories
-# first for some previous versions of the headers that are installed.
-include_directories(BEFORE ${PROJECT_SOURCE_DIR}
- ${PROJECT_SOURCE_DIR}/compat
- ${PROJECT_SOURCE_DIR}/include)
-
-if(WIN32)
- list(APPEND SRC_CORE
- buffer_iocp.c
- bufferevent_async.c
- event_iocp.c
- win32select.c)
-
- list(APPEND HDR_PRIVATE WIN32-Code/getopt.h)
-
- set(EVENT__DNS_USE_FTIME_FOR_ID 1)
- set(LIB_PLATFORM ws2_32 shell32 advapi32)
- add_definitions(
- -D_CRT_SECURE_NO_WARNINGS
- -D_CRT_NONSTDC_NO_DEPRECATE)
-
- include_directories(./WIN32-Code)
-endif()
-
-if (SOLARIS)
- list(APPEND LIB_PLATFORM socket nsl)
-endif()
-
-source_group("Headers Private" FILES ${HDR_PRIVATE})
-source_group("Header Compat" FILES ${HDR_COMPAT})
-source_group("Headers Public" FILES ${HDR_PUBLIC})
-source_group("Source Core" FILES ${SRC_CORE})
-source_group("Source Extra" FILES ${SRC_EXTRA})
-
-# Generate the configure headers.
-# (Place them in the build dir so we don't polute the source tree with generated files).
-include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include)
-
-if (${GNUC})
- set(EVENT_SHARED_FLAGS -fvisibility=hidden)
-elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "SunPro")
- set(EVENT_SHARED_FLAGS -xldscope=hidden)
-endif()
-
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/event-config.h.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/include/event2/event-config.h
- NEWLINE_STYLE UNIX)
-
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/evconfig-private.h.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/include/evconfig-private.h)
-
-#
-# Create the libraries.
-#
-include(AddEventLibrary)
-add_event_library(event_core SOURCES ${SRC_CORE})
-add_event_library(event_extra
- LIBRARIES event_core_shared
- SOURCES ${SRC_EXTRA})
-
-if (NOT EVENT__DISABLE_OPENSSL)
- add_event_library(event_openssl
- LIBRARIES event_core_shared ${OPENSSL_LIBRARIES}
- SOURCES ${SRC_OPENSSL})
-endif()
-
-if (CMAKE_USE_PTHREADS_INIT)
- set(SRC_PTHREADS evthread_pthread.c)
- add_event_library(event_pthreads
- LIBRARIES event_core_shared
- SOURCES ${SRC_PTHREADS})
-endif()
-
-# library exists for historical reasons; it contains the contents of
-# both libevent_core and libevent_extra. You shouldn’t use it; it may
-# go away in a future version of Libevent.
-add_event_library(event SOURCES ${SRC_CORE} ${SRC_EXTRA})
-
-set(WIN32_GETOPT)
-if (WIN32)
- list(APPEND WIN32_GETOPT
- WIN32-Code/getopt.c
- WIN32-Code/getopt_long.c)
-endif()
-
-#
-# Samples.
-#
-macro(add_sample_prog ssl name)
- add_executable(${name} ${ARGN})
-
- target_link_libraries(${name}
- event_extra
- event_core
- ${LIB_APPS}
- ${LIB_PLATFORM})
-
- if (${ssl})
- target_link_libraries(${name} event_openssl)
- endif()
-endmacro()
-if (NOT EVENT__DISABLE_SAMPLES)
- set(SAMPLES
- event-read-fifo
- hello-world
- signal-test
- http-connect
- time-test)
-
- foreach(SAMPLE ${SAMPLES})
- add_sample_prog(OFF ${SAMPLE} sample/${SAMPLE}.c)
- endforeach()
-
- if (NOT EVENT__DISABLE_OPENSSL)
- add_sample_prog(ON https-client
- sample/https-client.c
- sample/openssl_hostname_validation.c
- sample/hostcheck.c)
- add_sample_prog(ON le-proxy
- sample/le-proxy.c)
- endif()
-
- set(SAMPLES_WOPT
- dns-example
- http-server
- )
- foreach (SAMPLE ${SAMPLES_WOPT})
- add_sample_prog(OFF ${SAMPLE} sample/${SAMPLE}.c ${WIN32_GETOPT})
- endforeach()
-endif()
-
-#
-# Benchmarks
-#
-macro(add_bench_prog prog)
- add_executable(${prog} ${ARGN})
- target_link_libraries(${prog}
- event_extra
- event_core
- ${LIB_APPS}
- ${LIB_PLATFORM})
-endmacro()
-if (NOT EVENT__DISABLE_BENCHMARK)
- foreach (BENCHMARK bench_http bench_httpclient)
- add_bench_prog(${BENCHMARK} test/${BENCHMARK}.c)
- endforeach()
-
- add_bench_prog(bench test/bench.c ${WIN32_GETOPT})
- add_bench_prog(bench_cascade test/bench_cascade.c ${WIN32_GETOPT})
-endif()
-
-#
-# Tests
-#
-macro(add_test_prog prog)
- add_executable(${prog} test/${prog}.c)
- target_link_libraries(${prog}
- ${LIB_APPS}
- ${LIB_PLATFORM}
- event_core
- event_extra
- ${ARGN})
-endmacro()
-if (NOT EVENT__DISABLE_TESTS)
- #
- # Generate Regress tests.
- #
- if (NOT EVENT__DISABLE_REGRESS)
- # (We require python to generate the regress tests)
- find_package(PythonInterp 3)
-
- if (PYTHONINTERP_FOUND)
- set(__FOUND_USABLE_PYTHON 1)
- else()
- find_package(PythonInterp 2)
- if (PYTHONINTERP_FOUND)
- set(__FOUND_USABLE_PYTHON 1)
- else()
- message(ERROR "No suitable Python version found, bailing...")
- endif()
- endif()
-
- if (__FOUND_USABLE_PYTHON)
- message(STATUS "Generating regress tests...")
-
- add_definitions(-DTINYTEST_LOCAL)
-
- add_custom_command(
- OUTPUT
- ${CMAKE_CURRENT_SOURCE_DIR}/test/regress.gen.c
- ${CMAKE_CURRENT_SOURCE_DIR}/test/regress.gen.h
- DEPENDS
- event_rpcgen.py
- test/regress.rpc
- COMMAND ${PYTHON_EXECUTABLE} ../event_rpcgen.py regress.rpc
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
-
- list(APPEND SRC_REGRESS
- test/regress.c
- test/regress.gen.c
- test/regress.gen.h
- test/regress_buffer.c
- test/regress_bufferevent.c
- test/regress_dns.c
- test/regress_et.c
- test/regress_finalize.c
- test/regress_http.c
- test/regress_listener.c
- test/regress_main.c
- test/regress_minheap.c
- test/regress_rpc.c
- test/regress_testutils.c
- test/regress_testutils.h
- test/regress_util.c
- test/tinytest.c)
-
- if (WIN32)
- list(APPEND SRC_REGRESS test/regress_iocp.c)
- if (NOT EVENT__DISABLE_THREAD_SUPPORT)
- list(APPEND SRC_REGRESS test/regress_thread.c)
- endif()
- elseif (CMAKE_USE_PTHREADS_INIT)
- list(APPEND SRC_REGRESS test/regress_thread.c)
- endif()
-
- if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
- list(APPEND SRC_REGRESS test/regress_zlib.c)
- endif()
-
- if (NOT EVENT__DISABLE_OPENSSL)
- list(APPEND SRC_REGRESS test/regress_ssl.c)
- endif()
-
- add_executable(regress ${SRC_REGRESS})
-
- target_link_libraries(regress
- ${LIB_APPS}
- ${LIB_PLATFORM}
- event_core
- event_extra)
- if (NOT EVENT__DISABLE_OPENSSL)
- target_link_libraries(regress event_openssl)
- endif()
- if (CMAKE_USE_PTHREADS_INIT)
- target_link_libraries(regress event_pthreads)
- endif()
- else()
- message(WARNING "No suitable Python interpreter found, cannot generate regress tests!")
- endif()
- endif()
-
- #
- # Test programs.
- #
- # all of these, including the cmakelists.txt should be moved
- # into the dirctory 'tests' first.
- #
- # doing this, we can remove all the DISABLE_TESTS stuff, and simply
- # do something like:
- #
- # add_custom_targets(tests)
- # add_executable(... EXCLUDE_FROM_ALL ...c)
- # add_dependencis(tests testa testb testc)
- # add_test(....)
- #
- # then you can just run 'make tests' instead of them all
- # auto-compile|running
- # - ellzey
- set(TESTPROGS test-changelist
- test-eof
- test-fdleak
- test-init
- test-time
- test-weof)
-
- foreach (TESTPROG ${TESTPROGS} test-dumpevents)
- add_test_prog(${TESTPROG})
- endforeach()
- if (UNIX)
- add_test_prog(test-ratelim m)
- else()
- add_test_prog(test-ratelim)
- endif()
-
- set(ALL_TESTPROGS
- ${TESTPROGS}
- test-dumpevents
- test-ratelim
- )
-
- #
- # We run all tests with the different backends turned on one at a time.
- #
-
- # Add event backends based on system introspection result.
- set(BACKENDS "")
-
- if (EVENT__HAVE_EPOLL)
- list(APPEND BACKENDS EPOLL)
- endif()
-
- if (EVENT__HAVE_SELECT)
- list(APPEND BACKENDS SELECT)
- endif()
-
- if (EVENT__HAVE_POLL)
- list(APPEND BACKENDS POLL)
- endif()
-
- if (EVENT__HAVE_KQUEUE)
- list(APPEND BACKENDS KQUEUE)
- endif()
-
- if (EVENT__HAVE_EVENT_PORTS)
- list(APPEND BACKENDS EVPORT)
- endif()
-
- if (EVENT__HAVE_DEVPOLL)
- list(APPEND BACKENDS DEVPOLL)
- endif()
-
- if (WIN32)
- list(APPEND BACKENDS WIN32)
- endif()
-
-
- # Default environment variables turns off all event systems,
- # then we enable each one, one at a time when creating the tests.
- set(DEFAULT_TEST_ENV_VARS "EVENT_SHOW_METHOD=1;")
- foreach(BACKEND ${BACKENDS})
- set(BACKEND_ENV_VAR "EVENT_NO${BACKEND}=1")
- list(APPEND DEFAULT_TEST_ENV_VARS "${BACKEND_ENV_VAR}")
- endforeach()
-
- # Macro that creates the ctest test for a backend.
- macro(add_backend_test BACKEND_TEST_NAME ENV_VARS)
- set(TEST_NAMES "")
-
- foreach (TESTPROG ${TESTPROGS})
- set(TEST_NAME ${TESTPROG}__${BACKEND_TEST_NAME})
-
- add_test(${TEST_NAME}
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTPROG})
-
- list(APPEND TEST_NAMES ${TEST_NAME})
-
- set_tests_properties(${TEST_NAME}
- PROPERTIES ENVIRONMENT "${ENV_VARS}")
- endforeach()
-
- # Dump events test.
- if (__FOUND_USABLE_PYTHON)
- set(TEST_NAME test-dumpevents__${BACKEND_TEST_NAME})
-
- add_test(${TEST_NAME}
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-dumpevents |
- ${PYTHON_EXECUTABLE}
- ${CMAKE_CURRENT_SOURCE_DIR}/test/check-dumpevents.py)
-
- set_tests_properties(${TEST_NAME}
- PROPERTIES ENVIRONMENT "${ENV_VARS}")
- else()
- message(WARNING "test-dumpevents will be run without output check since python was not found!")
- set(TEST_NAME test-dumpevents__${BACKEND_TEST_NAME}_no_check)
-
- add_test(${TEST_NAME}
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-dumpevents)
-
- set_tests_properties(${TEST_NAME}
- PROPERTIES ENVIRONMENT "${ENV_VARS}")
- endif()
-
- # Regress tests.
- if (NOT EVENT__DISABLE_REGRESS AND __FOUND_USABLE_PYTHON)
- set(TEST_NAME regress__${BACKEND_TEST_NAME})
-
- add_test(${TEST_NAME}
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/regress)
-
- set_tests_properties(${TEST_NAME}
- PROPERTIES ENVIRONMENT "${ENV_VARS}")
-
- add_test(${TEST_NAME}_debug
- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/regress)
-
- set_tests_properties(${TEST_NAME}_debug
- PROPERTIES ENVIRONMENT "${ENV_VARS};EVENT_DEBUG_MODE=1")
- endif()
- endmacro()
-
- # Add the tests for each backend.
- foreach(BACKEND ${BACKENDS})
- # Enable this backend only.
- set(BACKEND_ENV_VARS ${DEFAULT_TEST_ENV_VARS})
- list(REMOVE_ITEM BACKEND_ENV_VARS EVENT_NO${BACKEND}=1)
-
- # Epoll has some extra settings.
- if (${BACKEND} STREQUAL "EPOLL")
- add_backend_test(timerfd_${BACKEND}
- "${BACKEND_ENV_VARS};EVENT_PRECISE_TIMER=1")
-
- add_backend_test(changelist_${BACKEND}
- "${BACKEND_ENV_VARS};EVENT_EPOLL_USE_CHANGELIST=yes")
-
- add_backend_test(timerfd_changelist_${BACKEND}
- "${BACKEND_ENV_VARS};EVENT_EPOLL_USE_CHANGELIST=yes;EVENT_PRECISE_TIMER=1")
- else()
- add_backend_test(${BACKEND} "${BACKEND_ENV_VARS}")
- endif()
- endforeach()
-
- #
- # Rate limiter tests.
- #
-
- # Group limits, no connection limit.
- set(RL_BIN ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-ratelim)
-
- add_test(test-ratelim__group_lim
- ${RL_BIN}
- -g 30000
- -n 30
- -t 100
- --check-grouplimit 1000
- --check-stddev 100)
-
- # Connection limit, no group limit.
- add_test(test-ratelim__con_lim
- ${RL_BIN}
- -c 1000
- -n 30
- -t 100
- --check-connlimit 50
- --check-stddev 50)
-
- # Connection limit and group limit.
- add_test(test-ratelim__group_con_lim
- ${RL_BIN}
- -c 1000
- -g 30000
- -n 30
- -t 100
- --check-grouplimit 1000
- --check-connlimit 50
- --check-stddev 50)
-
- # Connection limit and group limit with independent drain.
- add_test(test-ratelim__group_con_lim_drain
- ${RL_BIN}
- -c 1000
- -g 35000
- -n 30
- -t 100
- -G 500
- --check-grouplimit 1000
- --check-connlimit 50
- --check-stddev 50)
-
- # Add a "make verify" target, same as for autoconf.
- # (Important! This will unset all EVENT_NO* environment variables.
- # If they are set in the shell the tests are running using simply "ctest" or "make test" will fail)
- if (WIN32)
- # Windows doesn't have "unset". But you can use "set VAR=" instead.
- # We need to guard against the possibility taht EVENT_NOWIN32 is set, and all test failing
- # since no event backend being available.
- file(TO_NATIVE_PATH ${CMAKE_CTEST_COMMAND} WINDOWS_CTEST_COMMAND)
-
- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp/verify_tests.bat
- "
- set EVENT_NOWIN32=
- \"${WINDOWS_CTEST_COMMAND}\"
- ")
-
- message(STATUS "${WINDOWS_CTEST_COMMAND}")
-
- file(COPY ${CMAKE_CURRENT_BINARY_DIR}/tmp/verify_tests.bat
- DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
- FILE_PERMISSIONS
- OWNER_READ
- OWNER_WRITE
- OWNER_EXECUTE
- GROUP_READ
- GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE)
-
- file(TO_NATIVE_PATH
- "${CMAKE_CURRENT_BINARY_DIR}/verify_tests.bat" VERIFY_PATH)
-
- add_custom_target(verify COMMAND "${VERIFY_PATH}"
- DEPENDS event ${ALL_TESTPROGS})
- else()
- # On some platforms doing exec(unset) as CMake does won't work, so make sure
- # we run the unset command in a shell instead.
- # First we write the script contents.
- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp/verify_tests.sh
- "
- #!/bin/bash
- unset EVENT_NOEPOLL; unset EVENT_NOPOLL; unset EVENT_NOSELECT; unset EVENT_NOWIN32; unset EVENT_NOEVPORT; unset EVENT_NOKQUEUE; unset EVENT_NODEVPOLL
- ${CMAKE_CTEST_COMMAND}
- ")
-
- # Then we copy the file (this allows us to set execute permission on it)
- file(COPY ${CMAKE_CURRENT_BINARY_DIR}/tmp/verify_tests.sh
- DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
- FILE_PERMISSIONS
- OWNER_READ
- OWNER_WRITE
- OWNER_EXECUTE
- GROUP_READ
- GROUP_EXECUTE
- WORLD_READ
- WORLD_EXECUTE)
-
- # Create the target that runs the script.
- add_custom_target(verify
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/verify_tests.sh
- DEPENDS event ${ALL_TESTPROGS})
- endif()
-
- if (NOT EVENT__DISABLE_REGRESS AND __FOUND_USABLE_PYTHON)
- add_dependencies(verify regress)
- endif()
-
- if (EVENT__COVERAGE)
- include(CodeCoverage)
-
- setup_target_for_coverage(
- verify_coverage # Coverage target name "make verify_coverage"
- make # Test runner.
- coverage # Output directory.
- verify) # Arguments passed to test runner. "make verify"
- endif()
-
- enable_testing()
-
- include(CTest)
-endif()
-
-#
-# Installation preparation.
-#
-
-if(WIN32 AND NOT CYGWIN)
- set(DEF_INSTALL_CMAKE_DIR cmake)
-else()
- set(DEF_INSTALL_CMAKE_DIR lib/cmake/libevent)
-endif()
-
-set(EVENT_INSTALL_CMAKE_DIR
- "${CMAKE_INSTALL_PREFIX}/${DEF_INSTALL_CMAKE_DIR}"
- CACHE PATH "Installation directory for CMake files")
-
-export(PACKAGE libevent)
-
-# Generate the config file for the build-tree.
-set(EVENT__INCLUDE_DIRS
- "${PROJECT_SOURCE_DIR}/include"
- "${PROJECT_BINARY_DIR}/include")
-
-set(LIBEVENT_INCLUDE_DIRS
- ${EVENT__INCLUDE_DIRS}
- CACHE PATH "Libevent include directories")
-
-configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfigBuildTree.cmake.in
- ${PROJECT_BINARY_DIR}/LibeventConfig.cmake
- @ONLY)
-
-# Generate the config file for the installation tree.
-# Calculate the relative directory from the Cmake dir.
-file(RELATIVE_PATH
- REL_INCLUDE_DIR
- "${EVENT_INSTALL_CMAKE_DIR}"
- "${CMAKE_INSTALL_PREFIX}/include")
-
-# Note the LIBEVENT_CMAKE_DIR is defined in LibeventConfig.cmake.in,
-# we escape it here so it's evaluated when it is included instead
-# so that the include dirs are given relative to where the
-# config file is located.
-set(EVENT_INSTALL_INCLUDE_DIR "\${LIBEVENT_CMAKE_DIR}/${REL_INCLUDE_DIR}")
-
-configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfig.cmake.in
- ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LibeventConfig.cmake
- @ONLY)
-
-# Generate version info for both build-tree and install-tree.
-configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfigVersion.cmake.in
- ${PROJECT_BINARY_DIR}/LibeventConfigVersion.cmake
- @ONLY)
-
-# Install compat headers
-install(FILES ${HDR_COMPAT}
- DESTINATION "include"
- COMPONENT dev)
-
-# Install the configs.
-install(FILES
- ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/LibeventConfig.cmake
- ${PROJECT_BINARY_DIR}/LibeventConfigVersion.cmake
- DESTINATION "${EVENT_INSTALL_CMAKE_DIR}"
- COMPONENT dev)
-
-# Install exports for the install-tree.
-install(EXPORT LibeventTargets
- DESTINATION "${DEF_INSTALL_CMAKE_DIR}"
- COMPONENT dev)
-
-# Install the scripts.
-install(PROGRAMS
- ${CMAKE_CURRENT_SOURCE_DIR}/event_rpcgen.py
- DESTINATION "bin"
- COMPONENT runtime)
-
-# Create documents with doxygen.
-find_program(DOXYGEN doxygen)
-if (DOXYGEN)
- add_custom_target(doxygen
- COMMAND ${DOXYGEN} Doxyfile
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-else()
- message(WARNING "The doxygen target will not support since doxygen command was not found!")
-endif()
-
-
-# Create the uninstall target.
-# https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake
-configure_file(${PROJECT_SOURCE_DIR}/cmake/Uninstall.cmake.in
- ${PROJECT_BINARY_DIR}/Uninstall.cmake
- @ONLY)
-
-add_custom_target(uninstall
- COMMAND ${CMAKE_COMMAND} -P ${PROJECT_BINARY_DIR}/Uninstall.cmake)
-
-
-message(STATUS "")
-message(STATUS " ---( Libevent " ${EVENT_VERSION} " )---")
-message(STATUS "")
-message(STATUS "Available event backends: ${BACKENDS}")
-message(STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")
-message(STATUS "CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
-message(STATUS "CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")
-message(STATUS "CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}")
-message(STATUS "PROJECT_BINARY_DIR: ${PROJECT_BINARY_DIR}")
-message(STATUS "PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}")
-message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
-message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}")
-message(STATUS "CMAKE_ROOT: ${CMAKE_ROOT}")
-message(STATUS "CMAKE_SYSTEM: ${CMAKE_SYSTEM}")
-message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
-message(STATUS "CMAKE_SYSTEM_VERSION: ${CMAKE_SYSTEM_VERSION}")
-message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
-message(STATUS "CMAKE_SKIP_RPATH: ${CMAKE_SKIP_RPATH}")
-message(STATUS "CMAKE_VERBOSE_MAKEFILE: ${CMAKE_VERBOSE_MAKEFILE}")
-message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}")
-message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER} (id ${CMAKE_C_COMPILER_ID}, clang ${CLANG}, GNUC ${GNUC})")
-message(STATUS "CMAKE_AR: ${CMAKE_AR}")
-message(STATUS "CMAKE_RANLIB: ${CMAKE_RANLIB}")
-message(STATUS "")
-
diff --git a/ChangeLog b/ChangeLog
index e89d5a8..740bdfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,235 +1,3 @@
-Changes in version 2.1.11-stable (01 Aug 2019)
-
- This release contains one ABI breakage fix (that had been introduced in
- 2.1.10, and strictly speaking this release breaks ABI again to make it
- compatible with 2.1.9 and less, please take a look at 18104973 for more
- details). Apart from that it contains some bug fixes, that grouped below.
-
- And even though the return value for evbuffer_setcb() had been changed it
- should ABI compatible (anyway that function is in -compat.h header).
-
- There is also one patch that introduce new functionality, this is 546a366c,
- to tune SO_RCVBUF/SO_SNDBUF in evdns, but one can count it as a bug-fix on
- the application level, since before you cannot tune this settings and hence
- you could stumble on problems.
-
- ABI breakage:
- o Protect min_heap_push_ against integer overflow. (8c899768 Tobias Stoeckmann)
- o Revert "Protect min_heap_push_ against integer overflow." (18104973 Azat Khuzhin)
-
- functionality:
- o evdns: add new options -- so-rcvbuf/so-sndbuf (546a366c Azat Khuzhin)
-
- build:
- o Change autoconf version to 2.62 and automake version to 1.11.2 (2a333008 yuangongji)
- o cmake: install shared library only if it was requested (596855f7 Azat Khuzhin)
- o Missing <winerror.h> on win7/MinGW(MINGW32_NT-6.1)/MSYS (9559349c yuangongji)
- o cmake: set library names to be the same as with autotools (305251b9 yuangongji)
- o Enable _GNU_SOURCE for Android (f013fc7d Keith Smiley)
- o Enable kqueue for APPLE targets (3aa68a82 Keith Smiley)
- o autotools: do not install bufferevent_ssl.h under --disable-openssl (5349a07e Azat Khuzhin)
- o cmake: link against shell32.lib/advapi32.lib (c9ce638c Azat Khuzhin)
- o Add README.md into dist archive (3660a4cc Azat Khuzhin)
- o cmake: add missing autotools targets (doxygen, uninstall, event_rpcgen.py) (2d65071c yuangongji)
- o m4/libevent_openssl.m4: fix detection of openssl (d4056e59 Fabrice Fontaine)
- o Fix detection of the __has_attribute() for apple clang [ci skip] (7fd7c5ef Azat Khuzhin)
-
- lib:
- o buffer: fix possible NULL dereference in evbuffer_setcb() on ENOMEM (598f247d Azat Khuzhin)
- o Warn if forked from the event loop during event_reinit() (b75922ae Azat Khuzhin)
- o evutil: set the have_checked_interfaces in evutil_check_interfaces()
- (ef498aa2, a09265ac jeremyerb)
-
- samples:
- o https-client: correction error checking (a8a04565 wenyg)
-
-
-Changes in version 2.1.10-stable (26 May 2019)
-
- This release contains mostly fixes (some evbuffer oddity, AF_UNIX handling in
- http server, some UB fixes and others) but also some new functionality
- (without ABI breakage as usual) and now dist archive can be used for building
- on windows (getopt had been added into it).
-
- Above you will find changelog for this particular release (but with some
- trivial fixes pruned out from it - to make it a little bit more informative).
-
- To view full changelog please use git:
- git log --format=' o %s (%h %aN)' release-2.1.9-beta...release-2.1.10-stable
-
- dist:
- o Add getopt into dist archive (7042ff24 Azat Khuzhin)
-
- functionality:
- o evdns: add DNS_OPTION_NAMESERVERS_NO_DEFAULT/EVDNS_BASE_NAMESERVERS_NO_DEFAULT
- (58e81106 Azat Khuzhin)
- o Add support for EV_TIMEOUT to event_base_active_by_fd (3f893f0a John Ohl)
-
- fixes:
- o Merge branch 'evbuffer-fixes-806-v2' (2fea04b3 Azat Khuzhin)
- o Merge branch 'issue-807-accept4-getnameinfo-AF_UNIX' (7c4da937, e2790a7f
- Azat Khuzhin)
- o kqueue: Avoid undefined behaviour. (e70e18e9 Tobias Stoeckmann)
- o Prevent integer overflow in kq_build_changes_list. (43a55a23 Tobias Stoeckmann)
- o evdns: fix lock/unlock mismatch in evdns_close_server_port() (54103883 zhuizhuhaomeng)
- o Merge remote-tracking branch 'official/pr/804' -- Enforce limit of NSIG
- signals (87fa93a8 Tobias Stoeckmann)
- o Protect min_heap_push_ against integer overflow. (0b46bb8c Tobias Stoeckmann)
- o le-proxy: initiate use of the Winsock DLL (2a1e1530 linxiaohui)
- o Fix leaks in error path of the bufferevent_init_common_() (bb0f8fe7 Azat Khuzhin)
- o buffer: make evbuffer_prepend() of zero-length array no-op (61fa7b7d Azat Khuzhin)
- o Merge branch 'evbuffer-empty-chain-handling' (6a3dd717 Azat Khuzhin)
- o Don't loose top error in SSL (3d1a7a1d Yury Korzhetsky)
- o Remove needless check for arc4_seeded_ok (6602a97d Seong-Joong Kim)
- o Merge pull request #769 from sungjungk/fix-return-handling (91084140 Nathan French)
-
- build:
- o Define `_GNU_SOURCE` properly/consistently per autoconf (00ba9fa2 Enji Cooper)
- o signal: guard __cdecl definition with #ifdef (d89045a6 Azat Khuzhin)
- o Link test/regress with event_core/event_extra over event (22380996 Azat Khuzhin)
-
- tests:
- o Use kill() over raise() for raising the signal (fixes osx 10.14 with
- kqueue) (3db5296b, a45f6733 Azat Khuzhin)
- o tinytest: implement per-test timeout (via alarm() under !win32 only)
- (b64dbfb6, 75d7e1ff Azat Khuzhin)
-
-Changes in version 2.1.9-beta (10 February 2019)
-
- This changelog will differs from other releases in the next few clauses:
- - contains only highlighted changes (so now it will not contains a lot of
- patches that fixes some stuff in regression tests, typos, leaks fixes in
- samples and so forth)
- - no authors (since merge commits breaks them anyway, but AUTHORS sections in
- README will be kept up to date)
- - group name trimmed from commit subjects trimmed
- - it's been 2 years since the previoius release, so it is pretty huge
-
- And I think that this is more useful, so from now on it will always has the
- same look (until there will too many objections of course).
-
- To view full changelog please use git:
- git log --format=' o %s (%h %aN)' release-2.1.8-stable...release-2.1.9-beta
-
-
- dist archive:
- o Add cmake rules into dist archive (bf3a67cf)
- o Add missing print-winsock-errors.c into dist archive (822d6462)
- o Include openssl-compat.h into dist archive (08658136)
-
- core:
- o Merge branch 'check-O_NONBLOCK-in-debug' (a39898f3, a8155c62)
- o Merge branch 'event-ET-#636-v2' (ca4b6404)
- o Fix visibility issues under (mostly on win32)
- (349081e1g, 802be13ag, a1f28e2f)
- o Define __EXT_POSIX2 for QNX (a2176f2c)
- o Cleanup __func__ detection (b3af7bdd)
- o Add convenience macros for user-triggered events (06ec5de6)
- o Notify event base if there are no more events, so it can exit without delay (d9d1c09e)
- o Fix base unlocking in event_del() if event_base_set() runned in another thread (4f0f40e3)
- o If precise_time is false, we should not set EVENT_BASE_FLAG_PRECISE_TIMER (27dee54d)
- o Fix race in access to ev_res from event loop with event_active() (43d92a6d)
- o Return from event_del() after the last event callback termination (876c7ac7)
-
- http:
- o Merge branch 'http-EVHTTP_CON_READ_ON_WRITE_ERROR-fixes-v2' (eb7b472b)
- o Preserve socket error from listen across closesocket cleanup (2ccd00a6)
- o fix connection retries when there more then one request for connection (d30e7bba)
- o improve error path for bufferevent_{setfd,enable,disable}() (a8cc449e)
- o Fix conceivable UAF of the bufferevent in evhttp_connection_free() (6ac2ec25)
- o Merge branch 'http-request-line-parsing' (cdcfbafe)
- o Fix evhttp_connection_get_addr() fox incomming http connections (4215c003)
- o fix leaks in evhttp_uriencode() (123362e9)
- o CONNECT method only takes an authority (7d1ffe64)
- o Allow bodies for GET/DELETE/OPTIONS/CONNECT (23eb38b9)
- o Do not crash when evhttp_send_reply_start() is called after a timeout. (826f1134)
- o Fix crashing http server when callback do not reply in place (5b40744d, b2581380)
- o fix handling of close_notify (ssl) in http with openssl bufferevents (7e91622b)
-
- evrpc:
- o use *_new_with_arg() to match function prototype (a95cc9e3)
- o avoid NULL dereference on request is not EVHTTP_REQ_POST (e05136c7)
-
- regression tests:
- o Merge branch 'TT_RETRIABLE' (6ea1ec68, f9b592aa)
-
- bufferevent:
- o Merge branch 'iocp-fixes' (6bfac964)
- o Merge branch 'be-wm-overrun-v2' (3f692fff)
- o bufferevent_socket_connect{,_hostname}() missing event callback and use ret code (1dde74ef)
- o don't fail be_null_filter if bytes are copied (b92b0792)
- o Call underlying bev ctrl GET_FD on filtered bufferevents (ebfac517)
-
- bufferevent_openssl/openssl:
- o Merge branch 'ssl_bufferevent_wm_filter-fix' (30020a35)
- o be_openssl: avoid leaking of SSL structure (e86ccfe5)
- o Fix build with LibreSSL 2.7 (894ca48a)
- o Add missing includes into openssl-compat.h (01bc36c1)
- o Explicitly call SSL_clear when reseting the fd. (29b7a516)
- o Unbreak build with LibreSSL after openssl 1.1 support added (230af9f0)
-
- samples:
- o Merge branch 'sample-http-server' (b6309bcc)
- o sample/https-client: use host SSL certificate store by default (5c0132f3)
-
- listener:
- o ipv6only socket bind support (ba148796)
- o Merge branch 'listener-immediate-close' (df2ed13f)
- o Merge branch 'evconnlistener-do-not-close-client-fd' (42e851bb)
-
- evdns:
- o evdns: handle NULL filename explicitly (0033f5cc)
- o Merge branch 'evdns_getaddrinfo-race-fix' (3237d697)
- o Generating evdns_base_config_windows_nameservers docs on all platforms (3bd2ce43)
-
- utils:
- o Merge branch 'evutil_found_ifaddr-dev' (b07e43e6)
- o Avoid possible SEGVs in select() (in unit tests) (8818c86c)
- o Port `event_rpcgen.py` and `test/check-dumpevents.py` to Python 3. (532a8cc3)
-
- buffer:
- o Fix assert() condition in evbuffer_drain() for IOCP (d6326104)
- o fix incorrect unlock of the buffer mutex (for deferred callbacks) (2b4d127d)
- o Fix wrong assert in evbuffer_drain() (9f4d0dce)
-
- cmake:
- o fix checking of devpoll backend (like in autotools, by devpoll.h existence) (7f161902)
- o support static runtime (MSVC) (c8b3ec17, 61fb055a)
- o do not build both (SHARED and STATIC) for MSVC/win32 (bc7f2fd9)
- o introduce EVENT__LIBRARY_TYPE option (eb10a738)
- o ensure windows dll's are installed as well as lib files (29590718)
- o Fix generation of LibeventConfig.cmake for the installation tree (7fa08c4b)
- o fix pkgconfig generation (copy-paste typo) (cc554d87)
- o Merge branch 'cmake-missing-bits' (9806b126)
- o Fix detection of timerfd_create() in CMake. (e50af331)
- o Merge branch 'cmake-configure-fixes-v2' (a0bfe2c4)
- o Do not add epoll_sub (syscall wrappers) for epoll in cmake (cea61de6)
- o Fix RPATH for APPLE (45b1f379)
-
- autotools:
- o include win32 specific headers for socklen_t detection on win32/mingw (d7579fb9)
- o Ignore evconfig-private.h for autotools (37423849)
- o config.h can't be prefixed unconditionally (63a054f8)
- o Merge branch 'pull-628' (7e56c8b2)
- o Provide Makefile variables LIBEVENT_{CFLAGS,CPPFLAGS,LDFLAGS} (2f060c5f)
- o confirm openssl is working before using (b39ccf8e)
- o pass $(OPENSSL_INCS) for samples (FTBFS macOS) (c2495265)
- o Add configure check for midipix (d433201e)
- o Fix tests with detached builds (c46ff439)
-
- build:
- o Fix arc4random_addrandom() detecting and fallback (regression) (303d6d77)
- o Merge branch 'win32-fixes' (ebd12e6d)
- o Merge branch 'fix-openssl-linking' (e7bd9e03)
- o Merge branch 'fix-struct-linger' (8567f2f5)
-
- CI:
- o travis-ci/appveyor now uses fast_finish+allow_failures
- (5e97b6e6, dd472e7d, dfb5fc167)
- o Merge branch 'travis-ci-osx-fixes' (9f02b39c)
- o Merge branch 'win64-fixes' (aee0fcd5)
-
-
Changes in version 2.1.8-stable (22 January 2017)
Libevent 2.1.8-stable, it contains openssl fixes for resetting fd and using
diff --git a/ChangeLog-1.4 b/ChangeLog-1.4
index d7f6517..166d308 100644
--- a/ChangeLog-1.4
+++ b/ChangeLog-1.4
@@ -175,7 +175,7 @@ Changes in 1.4.1-beta:
o support for 32-bit tag numbers in rpc structures; this is wire compatible, but changes the API slightly.
o prefix {encode,decode}_tag functions with evtag to avoid collisions
o Correctly handle DNS replies with no answers set (Fixes bug 1846282)
- o The configure script now takes an --enable-gcc-warnings option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.)
+ o The configure script now takes an --enable-gcc-warnigns option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.)
o When building with GCC, use the "format" attribute to verify type correctness of calls to printf-like functions.
o removed linger from http server socket; reported by Ilya Martynov
o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.
diff --git a/ChangeLog-2.0 b/ChangeLog-2.0
index 16f3600..a925d33 100644
--- a/ChangeLog-2.0
+++ b/ChangeLog-2.0
@@ -1143,7 +1143,7 @@ Changes in 2.0.1-alpha (17 Apr 2009):
o Check return value of event_add in signal.c
o Add a more powerful evbuffer_readln as a replacement for evbuffer_readline. The new function handles more newline styles, and is more useful with buffers that may contain a nul characters.
o Do not mangle socket handles on 64-bit windows.
- o The configure script now takes an --enable-gcc-warnings option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.)
+ o The configure script now takes an --enable-gcc-warnigns option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.)
o move EV_PERSIST handling out of the event backends
o small improvements to evhttp documentation
o always generate Date and Content-Length headers for HTTP/1.1 replies
diff --git a/METADATA b/METADATA
index d9738a9..d20e78c 100644
--- a/METADATA
+++ b/METADATA
@@ -1,5 +1,6 @@
name: "libevent"
description: "The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached."
+
third_party {
url {
type: HOMEPAGE
@@ -7,13 +8,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz"
+ value: "https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz"
}
- version: "release-2.1.11-stable"
+ version: "release-2.1.8-stable"
license_type: RECIPROCAL
last_upgrade_date {
- year: 2019
- month: 8
- day: 1
+ year: 2017
+ month: 1
+ day: 25
}
}
diff --git a/Makefile.am b/Makefile.am
index dd90502..c8354c3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,8 +5,8 @@
# See LICENSE for copying information.
# 'foreign' means that we're not enforcing GNU package rules strictly.
-# '1.11.2' means that we need automake 1.11.2 or later (and we do).
-AUTOMAKE_OPTIONS = foreign 1.11.2 subdir-objects
+# '1.9' means that we need automake 1.9 or later (and we do).
+AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
ACLOCAL_AMFLAGS = -I m4
@@ -38,7 +38,7 @@ RELEASE = -release 2.1
#
# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
# UNLESS YOU REALLY REALLY HAVE TO.
-VERSION_INFO = 7:0:0
+VERSION_INFO = 6:2:0
# History: RELEASE VERSION_INFO
# 2.0.1-alpha -- 2.0 1:0:0
@@ -71,10 +71,7 @@ VERSION_INFO = 7:0:0
# 2.1.5-beta -- 2.1 5:0:0 (ABI changed slightly)
# 2.1.6-beta -- 2.1 6:0:0 (ABI changed slightly)
# 2.1.7-beta -- 2.1 6:1:0 (ABI changed slightly)
-# 2.1.8-stable-- 2.1 6:2:0 (No ABI change)
-# 2.1.9-beta-- 2.1 6:3:0 (No ABI change)
-# 2.1.10-stable-- 2.1 6:4:0 (No ABI change, WRONG)
-# 2.1.11-stable-- 2.1 7:0:0 (ABI changed)
+# 2.1.8-stable-- 2.1 6:2:0 (ABI changed slightly)
# ABI version history for this package effectively restarts every time
# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
@@ -107,30 +104,6 @@ PLATFORM_DEPENDENT_SRC = \
arc4random.c \
epoll_sub.c
-CMAKE_FILES = \
- cmake/AddCompilerFlags.cmake \
- cmake/AddEventLibrary.cmake \
- cmake/CheckConstExists.cmake \
- cmake/CheckFileOffsetBits.c \
- cmake/CheckFileOffsetBits.cmake \
- cmake/CheckFunctionExistsEx.c \
- cmake/CheckFunctionExistsEx.cmake \
- cmake/CheckFunctionKeywords.cmake \
- cmake/CheckPrototypeDefinition.c.in \
- cmake/CheckPrototypeDefinition.cmake \
- cmake/CheckWorkingKqueue.cmake \
- cmake/CodeCoverage.cmake \
- cmake/COPYING-CMAKE-SCRIPTS \
- cmake/Copyright.txt \
- cmake/FindGit.cmake \
- cmake/LibeventConfigBuildTree.cmake.in \
- cmake/LibeventConfig.cmake.in \
- cmake/LibeventConfigVersion.cmake.in \
- cmake/VersionViaGit.cmake \
- event-config.h.cmake \
- evconfig-private.h.cmake \
- CMakeLists.txt
-
EXTRA_DIST = \
ChangeLog-1.4 \
ChangeLog-2.0 \
@@ -143,8 +116,6 @@ EXTRA_DIST = \
make-event-config.sed \
whatsnew-2.0.txt \
whatsnew-2.1.txt \
- README.md \
- $(CMAKE_FILES) \
$(PLATFORM_DEPENDENT_SRC)
LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la
@@ -257,11 +228,7 @@ NO_UNDEFINED =
MAYBE_CORE =
endif
-AM_CFLAGS = $(LIBEVENT_CFLAGS)
-AM_CPPFLAGS = -I$(srcdir)/compat -I./include -I$(srcdir)/include $(SYS_INCLUDES) $(LIBEVENT_CPPFLAGS)
-AM_LDFLAGS = $(LIBEVENT_LDFLAGS)
-
-GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED) $(AM_LDFLAGS)
+GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED)
libevent_la_SOURCES = $(CORE_SRC) $(EXTRAS_SRC)
libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
@@ -291,16 +258,14 @@ endif
noinst_HEADERS += \
WIN32-Code/nmake/evconfig-private.h \
WIN32-Code/nmake/event2/event-config.h \
- WIN32-Code/getopt.h \
- WIN32-Code/getopt.c \
- WIN32-Code/getopt_long.c \
WIN32-Code/tree.h \
- bufferevent-internal.h \
- changelist-internal.h \
+ bufferevent-internal.h \
+ changelist-internal.h \
compat/sys/queue.h \
defer-internal.h \
- epolltable-internal.h \
+ epolltable-internal.h \
evbuffer-internal.h \
+ evconfig-private.h \
event-internal.h \
evmap-internal.h \
evrpc-internal.h \
@@ -318,7 +283,7 @@ noinst_HEADERS += \
ratelim-internal.h \
strlcpy-internal.h \
time-internal.h \
- util-internal.h \
+ util-internal.h \
openssl-compat.h
EVENT1_HDRS = \
@@ -334,6 +299,8 @@ else
noinst_HEADERS += $(EVENT1_HDRS)
endif
+AM_CPPFLAGS = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES)
+
verify: check
doxygen: FORCE
diff --git a/Makefile.in b/Makefile.in
index 9f4b477..86b4d3e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@
#
# See LICENSE for copying information.
-# include/include.am for libevent
+# include/Makefile.am for libevent
# Copyright 2000-2007 Niels Provos
# Copyright 2007-2012 Niels Provos and Nick Mathewson
#
@@ -122,32 +122,31 @@ host_triplet = @host@
@OPENSSL_TRUE@am__append_4 = libevent_openssl.pc
noinst_PROGRAMS = $(am__EXEEXT_4) $(am__EXEEXT_6)
EXTRA_PROGRAMS = $(am__EXEEXT_1)
-@OPENSSL_TRUE@am__append_5 = include/event2/bufferevent_ssl.h
-@INSTALL_LIBEVENT_FALSE@am__append_6 = $(EVENT2_EXPORT)
-@OPENSSL_TRUE@am__append_7 = sample/le-proxy sample/https-client
-@OPENSSL_TRUE@am__append_8 = \
+@INSTALL_LIBEVENT_FALSE@am__append_5 = $(EVENT2_EXPORT)
+@OPENSSL_TRUE@am__append_6 = sample/le-proxy sample/https-client
+@OPENSSL_TRUE@am__append_7 = \
@OPENSSL_TRUE@ sample/hostcheck.h \
@OPENSSL_TRUE@ sample/openssl_hostname_validation.h
-@BUILD_SAMPLES_TRUE@am__append_9 = $(SAMPLES)
-@BUILD_REGRESS_TRUE@am__append_10 = $(TESTPROGRAMS)
-@BUILD_REGRESS_TRUE@am__append_11 = test/regress
-@BUILD_REGRESS_TRUE@am__append_12 = test/regress.gen.c test/regress.gen.h
-@PTHREADS_TRUE@am__append_13 = libevent_pthreads.la
-@BUILD_WIN32_TRUE@am__append_14 = test/regress_iocp.c
-@OPENSSL_TRUE@am__append_15 = test/regress_ssl.c
-@OPENSSL_TRUE@am__append_16 = $(OPENSSL_INCS)
-@OPENSSL_TRUE@am__append_17 = libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
-@BUILD_WIN32_TRUE@@THREADS_TRUE@am__append_18 = evthread_win32.c
-@STRLCPY_IMPL_TRUE@am__append_19 = strlcpy.c
-@SELECT_BACKEND_TRUE@am__append_20 = select.c
-@POLL_BACKEND_TRUE@am__append_21 = poll.c
-@DEVPOLL_BACKEND_TRUE@am__append_22 = devpoll.c
-@KQUEUE_BACKEND_TRUE@am__append_23 = kqueue.c
-@EPOLL_BACKEND_TRUE@am__append_24 = epoll.c
-@EVPORT_BACKEND_TRUE@am__append_25 = evport.c
-@SIGNAL_SUPPORT_TRUE@am__append_26 = signal.c
-@INSTALL_LIBEVENT_FALSE@am__append_27 = $(EVENT1_HDRS)
+@BUILD_SAMPLES_TRUE@am__append_8 = $(SAMPLES)
+@BUILD_REGRESS_TRUE@am__append_9 = $(TESTPROGRAMS)
+@BUILD_REGRESS_TRUE@am__append_10 = test/regress
+@BUILD_REGRESS_TRUE@am__append_11 = test/regress.gen.c test/regress.gen.h
+@PTHREADS_TRUE@am__append_12 = libevent_pthreads.la
+@BUILD_WIN32_TRUE@am__append_13 = test/regress_iocp.c
+@OPENSSL_TRUE@am__append_14 = test/regress_ssl.c
+@OPENSSL_TRUE@am__append_15 = $(OPENSSL_INCS)
+@OPENSSL_TRUE@am__append_16 = libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
+@BUILD_WIN32_TRUE@@THREADS_TRUE@am__append_17 = evthread_win32.c
+@STRLCPY_IMPL_TRUE@am__append_18 = strlcpy.c
+@SELECT_BACKEND_TRUE@am__append_19 = select.c
+@POLL_BACKEND_TRUE@am__append_20 = poll.c
+@DEVPOLL_BACKEND_TRUE@am__append_21 = devpoll.c
+@KQUEUE_BACKEND_TRUE@am__append_22 = kqueue.c
+@EPOLL_BACKEND_TRUE@am__append_23 = epoll.c
+@EVPORT_BACKEND_TRUE@am__append_24 = evport.c
+@SIGNAL_SUPPORT_TRUE@am__append_25 = signal.c
+@INSTALL_LIBEVENT_FALSE@am__append_26 = $(EVENT1_HDRS)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_backport_259_ssizet.m4 \
@@ -170,24 +169,6 @@ CONFIG_HEADER = config.h evconfig-private.h
CONFIG_CLEAN_FILES = libevent.pc libevent_openssl.pc \
libevent_pthreads.pc libevent_core.pc libevent_extra.pc
CONFIG_CLEAN_VPATH_FILES =
-@BUILD_REGRESS_TRUE@am__EXEEXT_1 = test/regress$(EXEEXT)
-@OPENSSL_TRUE@am__EXEEXT_2 = sample/le-proxy$(EXEEXT) \
-@OPENSSL_TRUE@ sample/https-client$(EXEEXT)
-am__EXEEXT_3 = sample/dns-example$(EXEEXT) \
- sample/event-read-fifo$(EXEEXT) sample/hello-world$(EXEEXT) \
- sample/http-server$(EXEEXT) sample/http-connect$(EXEEXT) \
- sample/signal-test$(EXEEXT) sample/time-test$(EXEEXT) \
- $(am__EXEEXT_2)
-@BUILD_SAMPLES_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3)
-am__EXEEXT_5 = test/bench$(EXEEXT) test/bench_cascade$(EXEEXT) \
- test/bench_http$(EXEEXT) test/bench_httpclient$(EXEEXT) \
- test/test-changelist$(EXEEXT) test/test-dumpevents$(EXEEXT) \
- test/test-eof$(EXEEXT) test/test-closed$(EXEEXT) \
- test/test-fdleak$(EXEEXT) test/test-init$(EXEEXT) \
- test/test-ratelim$(EXEEXT) test/test-time$(EXEEXT) \
- test/test-weof$(EXEEXT) test/regress$(EXEEXT)
-@BUILD_REGRESS_TRUE@am__EXEEXT_6 = $(am__EXEEXT_5)
-PROGRAMS = $(noinst_PROGRAMS)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -317,6 +298,24 @@ libevent_pthreads_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@INSTALL_LIBEVENT_FALSE@@PTHREADS_TRUE@am_libevent_pthreads_la_rpath =
@INSTALL_LIBEVENT_TRUE@@PTHREADS_TRUE@am_libevent_pthreads_la_rpath = \
@INSTALL_LIBEVENT_TRUE@@PTHREADS_TRUE@ -rpath $(libdir)
+@BUILD_REGRESS_TRUE@am__EXEEXT_1 = test/regress$(EXEEXT)
+@OPENSSL_TRUE@am__EXEEXT_2 = sample/le-proxy$(EXEEXT) \
+@OPENSSL_TRUE@ sample/https-client$(EXEEXT)
+am__EXEEXT_3 = sample/dns-example$(EXEEXT) \
+ sample/event-read-fifo$(EXEEXT) sample/hello-world$(EXEEXT) \
+ sample/http-server$(EXEEXT) sample/http-connect$(EXEEXT) \
+ sample/signal-test$(EXEEXT) sample/time-test$(EXEEXT) \
+ $(am__EXEEXT_2)
+@BUILD_SAMPLES_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3)
+am__EXEEXT_5 = test/bench$(EXEEXT) test/bench_cascade$(EXEEXT) \
+ test/bench_http$(EXEEXT) test/bench_httpclient$(EXEEXT) \
+ test/test-changelist$(EXEEXT) test/test-dumpevents$(EXEEXT) \
+ test/test-eof$(EXEEXT) test/test-closed$(EXEEXT) \
+ test/test-fdleak$(EXEEXT) test/test-init$(EXEEXT) \
+ test/test-ratelim$(EXEEXT) test/test-time$(EXEEXT) \
+ test/test-weof$(EXEEXT) test/regress$(EXEEXT)
+@BUILD_REGRESS_TRUE@am__EXEEXT_6 = $(am__EXEEXT_5)
+PROGRAMS = $(noinst_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
am_sample_dns_example_OBJECTS = sample/dns-example.$(OBJEXT)
sample_dns_example_OBJECTS = $(am_sample_dns_example_OBJECTS)
@@ -337,16 +336,15 @@ sample_http_server_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
am__sample_https_client_SOURCES_DIST = sample/https-client.c \
sample/hostcheck.c sample/openssl_hostname_validation.c
@OPENSSL_TRUE@am_sample_https_client_OBJECTS = \
-@OPENSSL_TRUE@ sample/https_client-https-client.$(OBJEXT) \
-@OPENSSL_TRUE@ sample/https_client-hostcheck.$(OBJEXT) \
-@OPENSSL_TRUE@ sample/https_client-openssl_hostname_validation.$(OBJEXT)
+@OPENSSL_TRUE@ sample/https-client.$(OBJEXT) \
+@OPENSSL_TRUE@ sample/hostcheck.$(OBJEXT) \
+@OPENSSL_TRUE@ sample/openssl_hostname_validation.$(OBJEXT)
sample_https_client_OBJECTS = $(am_sample_https_client_OBJECTS)
@OPENSSL_TRUE@sample_https_client_DEPENDENCIES = libevent.la \
@OPENSSL_TRUE@ libevent_openssl.la $(am__DEPENDENCIES_1) \
@OPENSSL_TRUE@ $(am__DEPENDENCIES_1)
am__sample_le_proxy_SOURCES_DIST = sample/le-proxy.c
-@OPENSSL_TRUE@am_sample_le_proxy_OBJECTS = \
-@OPENSSL_TRUE@ sample/le_proxy-le-proxy.$(OBJEXT)
+@OPENSSL_TRUE@am_sample_le_proxy_OBJECTS = sample/le-proxy.$(OBJEXT)
sample_le_proxy_OBJECTS = $(am_sample_le_proxy_OBJECTS)
@OPENSSL_TRUE@sample_le_proxy_DEPENDENCIES = libevent.la \
@OPENSSL_TRUE@ libevent_openssl.la $(am__DEPENDENCIES_1) \
@@ -379,36 +377,37 @@ am__test_regress_SOURCES_DIST = test/regress.c test/regress.gen.c \
test/regress_testutils.c test/regress_testutils.h \
test/regress_util.c test/tinytest.c test/regress_thread.c \
test/regress_zlib.c test/regress_iocp.c test/regress_ssl.c
-@BUILD_WIN32_FALSE@@PTHREADS_TRUE@am__objects_13 = test/regress-regress_thread.$(OBJEXT)
-@BUILD_WIN32_TRUE@@THREADS_TRUE@am__objects_13 = test/regress-regress_thread.$(OBJEXT)
-@PTHREADS_TRUE@@THREADS_FALSE@am__objects_13 = test/regress-regress_thread.$(OBJEXT)
+@BUILD_WIN32_FALSE@@PTHREADS_TRUE@am__objects_13 = test/test_regress-regress_thread.$(OBJEXT)
+@BUILD_WIN32_TRUE@@THREADS_TRUE@am__objects_13 = test/test_regress-regress_thread.$(OBJEXT)
+@PTHREADS_TRUE@@THREADS_FALSE@am__objects_13 = test/test_regress-regress_thread.$(OBJEXT)
@ZLIB_REGRESS_TRUE@am__objects_14 = \
-@ZLIB_REGRESS_TRUE@ test/regress-regress_zlib.$(OBJEXT)
+@ZLIB_REGRESS_TRUE@ test/test_regress-regress_zlib.$(OBJEXT)
@BUILD_WIN32_TRUE@am__objects_15 = \
-@BUILD_WIN32_TRUE@ test/regress-regress_iocp.$(OBJEXT)
-@OPENSSL_TRUE@am__objects_16 = test/regress-regress_ssl.$(OBJEXT)
-am_test_regress_OBJECTS = test/regress-regress.$(OBJEXT) \
- test/regress-regress.gen.$(OBJEXT) \
- test/regress-regress_buffer.$(OBJEXT) \
- test/regress-regress_bufferevent.$(OBJEXT) \
- test/regress-regress_dns.$(OBJEXT) \
- test/regress-regress_et.$(OBJEXT) \
- test/regress-regress_finalize.$(OBJEXT) \
- test/regress-regress_http.$(OBJEXT) \
- test/regress-regress_listener.$(OBJEXT) \
- test/regress-regress_main.$(OBJEXT) \
- test/regress-regress_minheap.$(OBJEXT) \
- test/regress-regress_rpc.$(OBJEXT) \
- test/regress-regress_testutils.$(OBJEXT) \
- test/regress-regress_util.$(OBJEXT) \
- test/regress-tinytest.$(OBJEXT) $(am__objects_13) \
+@BUILD_WIN32_TRUE@ test/test_regress-regress_iocp.$(OBJEXT)
+@OPENSSL_TRUE@am__objects_16 = \
+@OPENSSL_TRUE@ test/test_regress-regress_ssl.$(OBJEXT)
+am_test_regress_OBJECTS = test/test_regress-regress.$(OBJEXT) \
+ test/test_regress-regress.gen.$(OBJEXT) \
+ test/test_regress-regress_buffer.$(OBJEXT) \
+ test/test_regress-regress_bufferevent.$(OBJEXT) \
+ test/test_regress-regress_dns.$(OBJEXT) \
+ test/test_regress-regress_et.$(OBJEXT) \
+ test/test_regress-regress_finalize.$(OBJEXT) \
+ test/test_regress-regress_http.$(OBJEXT) \
+ test/test_regress-regress_listener.$(OBJEXT) \
+ test/test_regress-regress_main.$(OBJEXT) \
+ test/test_regress-regress_minheap.$(OBJEXT) \
+ test/test_regress-regress_rpc.$(OBJEXT) \
+ test/test_regress-regress_testutils.$(OBJEXT) \
+ test/test_regress-regress_util.$(OBJEXT) \
+ test/test_regress-tinytest.$(OBJEXT) $(am__objects_13) \
$(am__objects_14) $(am__objects_15) $(am__objects_16)
test_regress_OBJECTS = $(am_test_regress_OBJECTS)
-am__DEPENDENCIES_3 = $(am__append_13)
+am__DEPENDENCIES_3 = $(am__append_12)
@OPENSSL_TRUE@am__DEPENDENCIES_4 = libevent_openssl.la \
@OPENSSL_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-test_regress_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent_core.la \
- libevent_extra.la $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
+test_regress_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_4)
test_regress_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -456,64 +455,7 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = $(DEPDIR)/epoll_sub.Plo ./$(DEPDIR)/buffer.Plo \
- ./$(DEPDIR)/buffer_iocp.Plo ./$(DEPDIR)/bufferevent.Plo \
- ./$(DEPDIR)/bufferevent_async.Plo \
- ./$(DEPDIR)/bufferevent_filter.Plo \
- ./$(DEPDIR)/bufferevent_pair.Plo \
- ./$(DEPDIR)/bufferevent_ratelim.Plo \
- ./$(DEPDIR)/bufferevent_sock.Plo ./$(DEPDIR)/devpoll.Plo \
- ./$(DEPDIR)/epoll.Plo ./$(DEPDIR)/evdns.Plo \
- ./$(DEPDIR)/event.Plo ./$(DEPDIR)/event_iocp.Plo \
- ./$(DEPDIR)/event_tagging.Plo ./$(DEPDIR)/evmap.Plo \
- ./$(DEPDIR)/evport.Plo ./$(DEPDIR)/evrpc.Plo \
- ./$(DEPDIR)/evthread.Plo ./$(DEPDIR)/evthread_pthread.Plo \
- ./$(DEPDIR)/evthread_win32.Plo ./$(DEPDIR)/evutil.Plo \
- ./$(DEPDIR)/evutil_rand.Plo ./$(DEPDIR)/evutil_time.Plo \
- ./$(DEPDIR)/http.Plo ./$(DEPDIR)/kqueue.Plo \
- ./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo \
- ./$(DEPDIR)/listener.Plo ./$(DEPDIR)/log.Plo \
- ./$(DEPDIR)/poll.Plo ./$(DEPDIR)/select.Plo \
- ./$(DEPDIR)/signal.Plo ./$(DEPDIR)/strlcpy.Plo \
- ./$(DEPDIR)/win32select.Plo sample/$(DEPDIR)/dns-example.Po \
- sample/$(DEPDIR)/event-read-fifo.Po \
- sample/$(DEPDIR)/hello-world.Po \
- sample/$(DEPDIR)/http-connect.Po \
- sample/$(DEPDIR)/http-server.Po \
- sample/$(DEPDIR)/https_client-hostcheck.Po \
- sample/$(DEPDIR)/https_client-https-client.Po \
- sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po \
- sample/$(DEPDIR)/le_proxy-le-proxy.Po \
- sample/$(DEPDIR)/signal-test.Po sample/$(DEPDIR)/time-test.Po \
- test/$(DEPDIR)/bench.Po test/$(DEPDIR)/bench_cascade.Po \
- test/$(DEPDIR)/bench_http.Po \
- test/$(DEPDIR)/bench_httpclient.Po \
- test/$(DEPDIR)/regress-regress.Po \
- test/$(DEPDIR)/regress-regress.gen.Po \
- test/$(DEPDIR)/regress-regress_buffer.Po \
- test/$(DEPDIR)/regress-regress_bufferevent.Po \
- test/$(DEPDIR)/regress-regress_dns.Po \
- test/$(DEPDIR)/regress-regress_et.Po \
- test/$(DEPDIR)/regress-regress_finalize.Po \
- test/$(DEPDIR)/regress-regress_http.Po \
- test/$(DEPDIR)/regress-regress_iocp.Po \
- test/$(DEPDIR)/regress-regress_listener.Po \
- test/$(DEPDIR)/regress-regress_main.Po \
- test/$(DEPDIR)/regress-regress_minheap.Po \
- test/$(DEPDIR)/regress-regress_rpc.Po \
- test/$(DEPDIR)/regress-regress_ssl.Po \
- test/$(DEPDIR)/regress-regress_testutils.Po \
- test/$(DEPDIR)/regress-regress_thread.Po \
- test/$(DEPDIR)/regress-regress_util.Po \
- test/$(DEPDIR)/regress-regress_zlib.Po \
- test/$(DEPDIR)/regress-tinytest.Po \
- test/$(DEPDIR)/test-changelist.Po \
- test/$(DEPDIR)/test-closed.Po \
- test/$(DEPDIR)/test-dumpevents.Po test/$(DEPDIR)/test-eof.Po \
- test/$(DEPDIR)/test-fdleak.Po test/$(DEPDIR)/test-init.Po \
- test/$(DEPDIR)/test-ratelim.Po test/$(DEPDIR)/test-time.Po \
- test/$(DEPDIR)/test-weof.Po
+am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -579,6 +521,7 @@ am__include_HEADERS_DIST = include/evdns.h include/event.h \
am__include_event2_HEADERS_DIST = include/event2/buffer.h \
include/event2/buffer_compat.h include/event2/bufferevent.h \
include/event2/bufferevent_compat.h \
+ include/event2/bufferevent_ssl.h \
include/event2/bufferevent_struct.h include/event2/dns.h \
include/event2/dns_compat.h include/event2/dns_struct.h \
include/event2/event.h include/event2/event_compat.h \
@@ -588,11 +531,11 @@ am__include_event2_HEADERS_DIST = include/event2/buffer.h \
include/event2/rpc.h include/event2/rpc_compat.h \
include/event2/rpc_struct.h include/event2/tag.h \
include/event2/tag_compat.h include/event2/thread.h \
- include/event2/util.h include/event2/visibility.h \
- include/event2/bufferevent_ssl.h
+ include/event2/util.h include/event2/visibility.h
am__noinst_HEADERS_DIST = include/event2/buffer.h \
include/event2/buffer_compat.h include/event2/bufferevent.h \
include/event2/bufferevent_compat.h \
+ include/event2/bufferevent_ssl.h \
include/event2/bufferevent_struct.h include/event2/dns.h \
include/event2/dns_compat.h include/event2/dns_struct.h \
include/event2/event.h include/event2/event_compat.h \
@@ -603,22 +546,22 @@ am__noinst_HEADERS_DIST = include/event2/buffer.h \
include/event2/rpc_struct.h include/event2/tag.h \
include/event2/tag_compat.h include/event2/thread.h \
include/event2/util.h include/event2/visibility.h \
- include/event2/bufferevent_ssl.h sample/hostcheck.h \
- sample/openssl_hostname_validation.h test/regress.h \
- test/regress_thread.h test/tinytest.h test/tinytest_local.h \
- test/tinytest_macros.h WIN32-Code/nmake/evconfig-private.h \
- WIN32-Code/nmake/event2/event-config.h WIN32-Code/getopt.h \
- WIN32-Code/getopt.c WIN32-Code/getopt_long.c WIN32-Code/tree.h \
+ sample/hostcheck.h sample/openssl_hostname_validation.h \
+ test/regress.h test/regress_thread.h test/tinytest.h \
+ test/tinytest_local.h test/tinytest_macros.h \
+ WIN32-Code/nmake/evconfig-private.h \
+ WIN32-Code/nmake/event2/event-config.h WIN32-Code/tree.h \
bufferevent-internal.h changelist-internal.h \
compat/sys/queue.h defer-internal.h epolltable-internal.h \
- evbuffer-internal.h event-internal.h evmap-internal.h \
- evrpc-internal.h evsignal-internal.h evthread-internal.h \
- ht-internal.h http-internal.h iocp-internal.h ipv6-internal.h \
- kqueue-internal.h log-internal.h minheap-internal.h \
- mm-internal.h ratelim-internal.h strlcpy-internal.h \
- time-internal.h util-internal.h openssl-compat.h \
- include/evdns.h include/event.h include/evhttp.h \
- include/evrpc.h include/evutil.h
+ evbuffer-internal.h evconfig-private.h event-internal.h \
+ evmap-internal.h evrpc-internal.h evsignal-internal.h \
+ evthread-internal.h ht-internal.h http-internal.h \
+ iocp-internal.h ipv6-internal.h kqueue-internal.h \
+ log-internal.h minheap-internal.h mm-internal.h \
+ ratelim-internal.h strlcpy-internal.h time-internal.h \
+ util-internal.h openssl-compat.h include/evdns.h \
+ include/event.h include/evhttp.h include/evrpc.h \
+ include/evutil.h
HEADERS = $(include_HEADERS) $(include_event2_HEADERS) \
$(nodist_include_event2_HEADERS) $(nodist_noinst_HEADERS) \
$(noinst_HEADERS)
@@ -913,7 +856,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_13)
+PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_12)
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -976,8 +919,8 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# 'foreign' means that we're not enforcing GNU package rules strictly.
-# '1.11.2' means that we need automake 1.11.2 or later (and we do).
-AUTOMAKE_OPTIONS = foreign 1.11.2 subdir-objects
+# '1.9' means that we need automake 1.9 or later (and we do).
+AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
ACLOCAL_AMFLAGS = -I m4
# This is the "Release" of the Libevent ABI. It takes precedence over
@@ -1008,7 +951,7 @@ RELEASE = -release 2.1
#
# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
# UNLESS YOU REALLY REALLY HAVE TO.
-VERSION_INFO = 7:0:0
+VERSION_INFO = 6:2:0
# History: RELEASE VERSION_INFO
# 2.0.1-alpha -- 2.0 1:0:0
@@ -1041,10 +984,7 @@ VERSION_INFO = 7:0:0
# 2.1.5-beta -- 2.1 5:0:0 (ABI changed slightly)
# 2.1.6-beta -- 2.1 6:0:0 (ABI changed slightly)
# 2.1.7-beta -- 2.1 6:1:0 (ABI changed slightly)
-# 2.1.8-stable-- 2.1 6:2:0 (No ABI change)
-# 2.1.9-beta-- 2.1 6:3:0 (No ABI change)
-# 2.1.10-stable-- 2.1 6:4:0 (No ABI change, WRONG)
-# 2.1.11-stable-- 2.1 7:0:0 (ABI changed)
+# 2.1.8-stable-- 2.1 6:2:0 (ABI changed slightly)
# ABI version history for this package effectively restarts every time
# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
@@ -1074,94 +1014,81 @@ PLATFORM_DEPENDENT_SRC = \
arc4random.c \
epoll_sub.c
-CMAKE_FILES = \
- cmake/AddCompilerFlags.cmake \
- cmake/AddEventLibrary.cmake \
- cmake/CheckConstExists.cmake \
- cmake/CheckFileOffsetBits.c \
- cmake/CheckFileOffsetBits.cmake \
- cmake/CheckFunctionExistsEx.c \
- cmake/CheckFunctionExistsEx.cmake \
- cmake/CheckFunctionKeywords.cmake \
- cmake/CheckPrototypeDefinition.c.in \
- cmake/CheckPrototypeDefinition.cmake \
- cmake/CheckWorkingKqueue.cmake \
- cmake/CodeCoverage.cmake \
- cmake/COPYING-CMAKE-SCRIPTS \
- cmake/Copyright.txt \
- cmake/FindGit.cmake \
- cmake/LibeventConfigBuildTree.cmake.in \
- cmake/LibeventConfig.cmake.in \
- cmake/LibeventConfigVersion.cmake.in \
- cmake/VersionViaGit.cmake \
- event-config.h.cmake \
- evconfig-private.h.cmake \
- CMakeLists.txt
-
EXTRA_DIST = ChangeLog-1.4 ChangeLog-2.0 Doxyfile LICENSE \
Makefile.nmake test/Makefile.nmake autogen.sh event_rpcgen.py \
libevent.pc.in make-event-config.sed whatsnew-2.0.txt \
- whatsnew-2.1.txt README.md $(CMAKE_FILES) \
- $(PLATFORM_DEPENDENT_SRC) test/check-dumpevents.py \
- test/regress.gen.c test/regress.gen.h test/regress.rpc \
- test/rpcgen_wrapper.sh test/print-winsock-errors.c \
- test/test.sh
+ whatsnew-2.1.txt $(PLATFORM_DEPENDENT_SRC) \
+ test/check-dumpevents.py test/regress.gen.c test/regress.gen.h \
+ test/regress.rpc test/rpcgen_wrapper.sh test/test.sh
LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la \
$(am__append_1) $(am__append_3)
@INSTALL_LIBEVENT_TRUE@lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
@INSTALL_LIBEVENT_TRUE@pkgconfig_DATA = $(LIBEVENT_PKGCONFIG)
@INSTALL_LIBEVENT_FALSE@noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
EXTRA_SOURCE =
-noinst_HEADERS = $(am__append_6) $(am__append_8) test/regress.h \
+noinst_HEADERS = $(am__append_5) $(am__append_7) test/regress.h \
test/regress_thread.h test/tinytest.h test/tinytest_local.h \
test/tinytest_macros.h WIN32-Code/nmake/evconfig-private.h \
- WIN32-Code/nmake/event2/event-config.h WIN32-Code/getopt.h \
- WIN32-Code/getopt.c WIN32-Code/getopt_long.c WIN32-Code/tree.h \
+ WIN32-Code/nmake/event2/event-config.h WIN32-Code/tree.h \
bufferevent-internal.h changelist-internal.h \
compat/sys/queue.h defer-internal.h epolltable-internal.h \
- evbuffer-internal.h event-internal.h evmap-internal.h \
- evrpc-internal.h evsignal-internal.h evthread-internal.h \
- ht-internal.h http-internal.h iocp-internal.h ipv6-internal.h \
- kqueue-internal.h log-internal.h minheap-internal.h \
- mm-internal.h ratelim-internal.h ratelim-internal.h \
- strlcpy-internal.h time-internal.h util-internal.h \
- openssl-compat.h $(am__append_27)
+ evbuffer-internal.h evconfig-private.h event-internal.h \
+ evmap-internal.h evrpc-internal.h evsignal-internal.h \
+ evthread-internal.h ht-internal.h http-internal.h \
+ iocp-internal.h ipv6-internal.h kqueue-internal.h \
+ log-internal.h minheap-internal.h mm-internal.h \
+ ratelim-internal.h ratelim-internal.h strlcpy-internal.h \
+ time-internal.h util-internal.h openssl-compat.h \
+ $(am__append_26)
CLEANFILES = test/rpcgen-attempted
DISTCLEANFILES = test/regress.gen.c test/regress.gen.h *~ libevent.pc \
libevent_core.pc libevent_extra.pc \
./include/event2/event-config.h
-BUILT_SOURCES = $(am__append_12) include/event2/event-config.h
+BUILT_SOURCES = $(am__append_11) include/event2/event-config.h
include_event2dir = $(includedir)/event2
-EVENT2_EXPORT = include/event2/buffer.h include/event2/buffer_compat.h \
+EVENT2_EXPORT = \
+ include/event2/buffer.h \
+ include/event2/buffer_compat.h \
include/event2/bufferevent.h \
include/event2/bufferevent_compat.h \
- include/event2/bufferevent_struct.h include/event2/dns.h \
- include/event2/dns_compat.h include/event2/dns_struct.h \
- include/event2/event.h include/event2/event_compat.h \
- include/event2/event_struct.h include/event2/http.h \
- include/event2/http_compat.h include/event2/http_struct.h \
- include/event2/keyvalq_struct.h include/event2/listener.h \
- include/event2/rpc.h include/event2/rpc_compat.h \
- include/event2/rpc_struct.h include/event2/tag.h \
- include/event2/tag_compat.h include/event2/thread.h \
- include/event2/util.h include/event2/visibility.h \
- $(am__append_5)
+ include/event2/bufferevent_ssl.h \
+ include/event2/bufferevent_struct.h \
+ include/event2/dns.h \
+ include/event2/dns_compat.h \
+ include/event2/dns_struct.h \
+ include/event2/event.h \
+ include/event2/event_compat.h \
+ include/event2/event_struct.h \
+ include/event2/http.h \
+ include/event2/http_compat.h \
+ include/event2/http_struct.h \
+ include/event2/keyvalq_struct.h \
+ include/event2/listener.h \
+ include/event2/rpc.h \
+ include/event2/rpc_compat.h \
+ include/event2/rpc_struct.h \
+ include/event2/tag.h \
+ include/event2/tag_compat.h \
+ include/event2/thread.h \
+ include/event2/util.h \
+ include/event2/visibility.h
+
@INSTALL_LIBEVENT_TRUE@include_event2_HEADERS = $(EVENT2_EXPORT)
@INSTALL_LIBEVENT_TRUE@nodist_include_event2_HEADERS = include/event2/event-config.h
@INSTALL_LIBEVENT_FALSE@nodist_noinst_HEADERS = include/event2/event-config.h
SAMPLES = sample/dns-example sample/event-read-fifo sample/hello-world \
sample/http-server sample/http-connect sample/signal-test \
- sample/time-test $(am__append_7)
+ sample/time-test $(am__append_6)
@OPENSSL_TRUE@sample_le_proxy_SOURCES = sample/le-proxy.c
-@OPENSSL_TRUE@sample_le_proxy_LDADD = libevent.la libevent_openssl.la $(OPENSSL_LIBS) $(OPENSSL_LIBADD)
-@OPENSSL_TRUE@sample_le_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
+@OPENSSL_TRUE@sample_le_proxy_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
+@OPENSSL_TRUE@sample_le_proxy_INCLUDES = $(OPENSSL_INCS)
@OPENSSL_TRUE@sample_https_client_SOURCES = \
@OPENSSL_TRUE@ sample/https-client.c \
@OPENSSL_TRUE@ sample/hostcheck.c \
@OPENSSL_TRUE@ sample/openssl_hostname_validation.c
-@OPENSSL_TRUE@sample_https_client_LDADD = libevent.la libevent_openssl.la $(OPENSSL_LIBS) $(OPENSSL_LIBADD)
-@OPENSSL_TRUE@sample_https_client_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
+@OPENSSL_TRUE@sample_https_client_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
+@OPENSSL_TRUE@sample_https_client_INCLUDES = $(OPENSSL_INCS)
sample_event_read_fifo_SOURCES = sample/event-read-fifo.c
sample_event_read_fifo_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
sample_time_test_SOURCES = sample/time-test.c
@@ -1233,15 +1160,14 @@ test_regress_SOURCES = test/regress.c test/regress.gen.c \
test/regress_minheap.c test/regress_rpc.c \
test/regress_testutils.c test/regress_testutils.h \
test/regress_util.c test/tinytest.c $(regress_thread_SOURCES) \
- $(regress_zlib_SOURCES) $(am__append_14) $(am__append_15)
+ $(regress_zlib_SOURCES) $(am__append_13) $(am__append_14)
@BUILD_WIN32_TRUE@@THREADS_TRUE@regress_thread_SOURCES = test/regress_thread.c
@PTHREADS_TRUE@regress_thread_SOURCES = test/regress_thread.c
@ZLIB_REGRESS_TRUE@regress_zlib_SOURCES = test/regress_zlib.c
-test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la \
- libevent_extra.la $(PTHREAD_LIBS) $(ZLIB_LIBS) \
- $(am__append_17)
+test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la \
+ $(PTHREAD_LIBS) $(ZLIB_LIBS) $(am__append_16)
test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) \
- $(ZLIB_CFLAGS) -Itest $(am__append_16)
+ $(ZLIB_CFLAGS) -Itest $(am__append_15)
test_regress_LDFLAGS = $(PTHREAD_CFLAGS)
test_bench_SOURCES = test/bench.c
test_bench_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
@@ -1253,16 +1179,16 @@ test_bench_httpclient_SOURCES = test/bench_httpclient.c
test_bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la
@BUILD_WIN32_FALSE@SYS_LIBS =
@BUILD_WIN32_TRUE@SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
-@BUILD_WIN32_FALSE@SYS_SRC = $(am__append_19) $(am__append_20) \
-@BUILD_WIN32_FALSE@ $(am__append_21) $(am__append_22) \
-@BUILD_WIN32_FALSE@ $(am__append_23) $(am__append_24) \
-@BUILD_WIN32_FALSE@ $(am__append_25) $(am__append_26)
+@BUILD_WIN32_FALSE@SYS_SRC = $(am__append_18) $(am__append_19) \
+@BUILD_WIN32_FALSE@ $(am__append_20) $(am__append_21) \
+@BUILD_WIN32_FALSE@ $(am__append_22) $(am__append_23) \
+@BUILD_WIN32_FALSE@ $(am__append_24) $(am__append_25)
@BUILD_WIN32_TRUE@SYS_SRC = win32select.c buffer_iocp.c event_iocp.c \
-@BUILD_WIN32_TRUE@ bufferevent_async.c $(am__append_18) \
-@BUILD_WIN32_TRUE@ $(am__append_19) $(am__append_20) \
-@BUILD_WIN32_TRUE@ $(am__append_21) $(am__append_22) \
-@BUILD_WIN32_TRUE@ $(am__append_23) $(am__append_24) \
-@BUILD_WIN32_TRUE@ $(am__append_25) $(am__append_26)
+@BUILD_WIN32_TRUE@ bufferevent_async.c $(am__append_17) \
+@BUILD_WIN32_TRUE@ $(am__append_18) $(am__append_19) \
+@BUILD_WIN32_TRUE@ $(am__append_20) $(am__append_21) \
+@BUILD_WIN32_TRUE@ $(am__append_22) $(am__append_23) \
+@BUILD_WIN32_TRUE@ $(am__append_24) $(am__append_25)
@BUILD_WIN32_FALSE@SYS_INCLUDES =
@BUILD_WIN32_TRUE@SYS_INCLUDES = -IWIN32-Code -IWIN32-Code/nmake
CORE_SRC = \
@@ -1292,10 +1218,7 @@ EXTRAS_SRC = \
@BUILD_WITH_NO_UNDEFINED_TRUE@NO_UNDEFINED = -no-undefined
@BUILD_WITH_NO_UNDEFINED_FALSE@MAYBE_CORE =
@BUILD_WITH_NO_UNDEFINED_TRUE@MAYBE_CORE = libevent_core.la
-AM_CFLAGS = $(LIBEVENT_CFLAGS)
-AM_CPPFLAGS = -I$(srcdir)/compat -I./include -I$(srcdir)/include $(SYS_INCLUDES) $(LIBEVENT_CPPFLAGS)
-AM_LDFLAGS = $(LIBEVENT_LDFLAGS)
-GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED) $(AM_LDFLAGS)
+GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED)
libevent_la_SOURCES = $(CORE_SRC) $(EXTRAS_SRC)
libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
libevent_la_LDFLAGS = $(GENERIC_LDFLAGS)
@@ -1320,6 +1243,7 @@ EVENT1_HDRS = \
include/evutil.h
@INSTALL_LIBEVENT_TRUE@include_HEADERS = $(EVENT1_HDRS)
+AM_CPPFLAGS = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES)
all: $(BUILT_SOURCES) config.h evconfig-private.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -1346,8 +1270,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(srcdir)/include/include.am $(srcdir)/sample/include.am $(srcdir)/test/include.am $(am__empty):
@@ -1393,15 +1317,6 @@ libevent_core.pc: $(top_builddir)/config.status $(srcdir)/libevent_core.pc.in
libevent_extra.pc: $(top_builddir)/config.status $(srcdir)/libevent_extra.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
@@ -1462,6 +1377,15 @@ libevent_openssl.la: $(libevent_openssl_la_OBJECTS) $(libevent_openssl_la_DEPEND
libevent_pthreads.la: $(libevent_pthreads_la_OBJECTS) $(libevent_pthreads_la_DEPENDENCIES) $(EXTRA_libevent_pthreads_la_DEPENDENCIES)
$(AM_V_CCLD)$(libevent_pthreads_la_LINK) $(am_libevent_pthreads_la_rpath) $(libevent_pthreads_la_OBJECTS) $(libevent_pthreads_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
sample/$(am__dirstamp):
@$(MKDIR_P) sample
@: > sample/$(am__dirstamp)
@@ -1498,17 +1422,17 @@ sample/http-server.$(OBJEXT): sample/$(am__dirstamp) \
sample/http-server$(EXEEXT): $(sample_http_server_OBJECTS) $(sample_http_server_DEPENDENCIES) $(EXTRA_sample_http_server_DEPENDENCIES) sample/$(am__dirstamp)
@rm -f sample/http-server$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(sample_http_server_OBJECTS) $(sample_http_server_LDADD) $(LIBS)
-sample/https_client-https-client.$(OBJEXT): sample/$(am__dirstamp) \
+sample/https-client.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/hostcheck.$(OBJEXT): sample/$(am__dirstamp) \
sample/$(DEPDIR)/$(am__dirstamp)
-sample/https_client-hostcheck.$(OBJEXT): sample/$(am__dirstamp) \
+sample/openssl_hostname_validation.$(OBJEXT): sample/$(am__dirstamp) \
sample/$(DEPDIR)/$(am__dirstamp)
-sample/https_client-openssl_hostname_validation.$(OBJEXT): \
- sample/$(am__dirstamp) sample/$(DEPDIR)/$(am__dirstamp)
sample/https-client$(EXEEXT): $(sample_https_client_OBJECTS) $(sample_https_client_DEPENDENCIES) $(EXTRA_sample_https_client_DEPENDENCIES) sample/$(am__dirstamp)
@rm -f sample/https-client$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(sample_https_client_OBJECTS) $(sample_https_client_LDADD) $(LIBS)
-sample/le_proxy-le-proxy.$(OBJEXT): sample/$(am__dirstamp) \
+sample/le-proxy.$(OBJEXT): sample/$(am__dirstamp) \
sample/$(DEPDIR)/$(am__dirstamp)
sample/le-proxy$(EXEEXT): $(sample_le_proxy_OBJECTS) $(sample_le_proxy_DEPENDENCIES) $(EXTRA_sample_le_proxy_DEPENDENCIES) sample/$(am__dirstamp)
@@ -1556,43 +1480,43 @@ test/bench_httpclient.$(OBJEXT): test/$(am__dirstamp) \
test/bench_httpclient$(EXEEXT): $(test_bench_httpclient_OBJECTS) $(test_bench_httpclient_DEPENDENCIES) $(EXTRA_test_bench_httpclient_DEPENDENCIES) test/$(am__dirstamp)
@rm -f test/bench_httpclient$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_bench_httpclient_OBJECTS) $(test_bench_httpclient_LDADD) $(LIBS)
-test/regress-regress.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress.gen.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress.gen.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_buffer.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_buffer.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_bufferevent.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_bufferevent.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_dns.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_dns.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_et.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_et.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_finalize.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_finalize.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_http.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_http.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_listener.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_listener.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_main.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_main.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_minheap.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_minheap.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_rpc.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_rpc.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_testutils.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_testutils.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_util.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_util.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-tinytest.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-tinytest.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_thread.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_thread.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_zlib.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_zlib.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_iocp.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_iocp.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/regress-regress_ssl.$(OBJEXT): test/$(am__dirstamp) \
+test/test_regress-regress_ssl.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
test/regress$(EXEEXT): $(test_regress_OBJECTS) $(test_regress_DEPENDENCIES) $(EXTRA_test_regress_DEPENDENCIES) test/$(am__dirstamp)
@@ -1696,89 +1620,83 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/epoll_sub.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer_iocp.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_async.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_filter.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_pair.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_ratelim.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_sock.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devpoll.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evdns.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_iocp.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_tagging.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evmap.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evport.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evrpc.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread_pthread.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread_win32.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil_rand.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil_time.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kqueue.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listener.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32select.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/dns-example.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/event-read-fifo.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/hello-world.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/http-connect.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/http-server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/https_client-hostcheck.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/https_client-https-client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/le_proxy-le-proxy.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/signal-test.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/time-test.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_cascade.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_http.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_httpclient.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress.gen.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_buffer.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_bufferevent.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_dns.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_et.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_finalize.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_http.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_iocp.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_listener.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_main.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_minheap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_rpc.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_ssl.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_testutils.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_thread.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_util.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_zlib.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-tinytest.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-changelist.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-closed.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-dumpevents.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-eof.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-fdleak.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-init.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-ratelim.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-time.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-weof.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
- @$(MKDIR_P) $(@D)
- @echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/epoll_sub.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer_iocp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_async.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_filter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_pair.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_ratelim.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_sock.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devpoll.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evdns.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_iocp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_tagging.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evmap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evport.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evrpc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread_pthread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread_win32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil_rand.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil_time.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kqueue.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listener.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32select.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/dns-example.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/event-read-fifo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/hello-world.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/hostcheck.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/http-connect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/http-server.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/https-client.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/le-proxy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/openssl_hostname_validation.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/signal-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/time-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_cascade.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_http.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_httpclient.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-changelist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-closed.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-dumpevents.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-eof.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-fdleak.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-ratelim.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-weof.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress.gen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_buffer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_bufferevent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_dns.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_et.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_finalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_http.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_iocp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_listener.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_minheap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_rpc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_ssl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_testutils.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_thread.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_zlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-tinytest.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -1811,327 +1729,271 @@ libevent_openssl_la-bufferevent_openssl.lo: bufferevent_openssl.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libevent_openssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libevent_openssl_la-bufferevent_openssl.lo `test -f 'bufferevent_openssl.c' || echo '$(srcdir)/'`bufferevent_openssl.c
-sample/https_client-https-client.o: sample/https-client.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-https-client.o -MD -MP -MF sample/$(DEPDIR)/https_client-https-client.Tpo -c -o sample/https_client-https-client.o `test -f 'sample/https-client.c' || echo '$(srcdir)/'`sample/https-client.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-https-client.Tpo sample/$(DEPDIR)/https_client-https-client.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/https-client.c' object='sample/https_client-https-client.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-https-client.o `test -f 'sample/https-client.c' || echo '$(srcdir)/'`sample/https-client.c
-
-sample/https_client-https-client.obj: sample/https-client.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-https-client.obj -MD -MP -MF sample/$(DEPDIR)/https_client-https-client.Tpo -c -o sample/https_client-https-client.obj `if test -f 'sample/https-client.c'; then $(CYGPATH_W) 'sample/https-client.c'; else $(CYGPATH_W) '$(srcdir)/sample/https-client.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-https-client.Tpo sample/$(DEPDIR)/https_client-https-client.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/https-client.c' object='sample/https_client-https-client.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-https-client.obj `if test -f 'sample/https-client.c'; then $(CYGPATH_W) 'sample/https-client.c'; else $(CYGPATH_W) '$(srcdir)/sample/https-client.c'; fi`
-
-sample/https_client-hostcheck.o: sample/hostcheck.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-hostcheck.o -MD -MP -MF sample/$(DEPDIR)/https_client-hostcheck.Tpo -c -o sample/https_client-hostcheck.o `test -f 'sample/hostcheck.c' || echo '$(srcdir)/'`sample/hostcheck.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-hostcheck.Tpo sample/$(DEPDIR)/https_client-hostcheck.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/hostcheck.c' object='sample/https_client-hostcheck.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-hostcheck.o `test -f 'sample/hostcheck.c' || echo '$(srcdir)/'`sample/hostcheck.c
-
-sample/https_client-hostcheck.obj: sample/hostcheck.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-hostcheck.obj -MD -MP -MF sample/$(DEPDIR)/https_client-hostcheck.Tpo -c -o sample/https_client-hostcheck.obj `if test -f 'sample/hostcheck.c'; then $(CYGPATH_W) 'sample/hostcheck.c'; else $(CYGPATH_W) '$(srcdir)/sample/hostcheck.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-hostcheck.Tpo sample/$(DEPDIR)/https_client-hostcheck.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/hostcheck.c' object='sample/https_client-hostcheck.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress.o: test/regress.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress.Tpo -c -o test/test_regress-regress.o `test -f 'test/regress.c' || echo '$(srcdir)/'`test/regress.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.Tpo test/$(DEPDIR)/test_regress-regress.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.c' object='test/test_regress-regress.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-hostcheck.obj `if test -f 'sample/hostcheck.c'; then $(CYGPATH_W) 'sample/hostcheck.c'; else $(CYGPATH_W) '$(srcdir)/sample/hostcheck.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.o `test -f 'test/regress.c' || echo '$(srcdir)/'`test/regress.c
-sample/https_client-openssl_hostname_validation.o: sample/openssl_hostname_validation.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-openssl_hostname_validation.o -MD -MP -MF sample/$(DEPDIR)/https_client-openssl_hostname_validation.Tpo -c -o sample/https_client-openssl_hostname_validation.o `test -f 'sample/openssl_hostname_validation.c' || echo '$(srcdir)/'`sample/openssl_hostname_validation.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-openssl_hostname_validation.Tpo sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/openssl_hostname_validation.c' object='sample/https_client-openssl_hostname_validation.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress.obj: test/regress.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress.Tpo -c -o test/test_regress-regress.obj `if test -f 'test/regress.c'; then $(CYGPATH_W) 'test/regress.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.Tpo test/$(DEPDIR)/test_regress-regress.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.c' object='test/test_regress-regress.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-openssl_hostname_validation.o `test -f 'sample/openssl_hostname_validation.c' || echo '$(srcdir)/'`sample/openssl_hostname_validation.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.obj `if test -f 'test/regress.c'; then $(CYGPATH_W) 'test/regress.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.c'; fi`
-sample/https_client-openssl_hostname_validation.obj: sample/openssl_hostname_validation.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-openssl_hostname_validation.obj -MD -MP -MF sample/$(DEPDIR)/https_client-openssl_hostname_validation.Tpo -c -o sample/https_client-openssl_hostname_validation.obj `if test -f 'sample/openssl_hostname_validation.c'; then $(CYGPATH_W) 'sample/openssl_hostname_validation.c'; else $(CYGPATH_W) '$(srcdir)/sample/openssl_hostname_validation.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-openssl_hostname_validation.Tpo sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/openssl_hostname_validation.c' object='sample/https_client-openssl_hostname_validation.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress.gen.o: test/regress.gen.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.gen.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress.gen.Tpo -c -o test/test_regress-regress.gen.o `test -f 'test/regress.gen.c' || echo '$(srcdir)/'`test/regress.gen.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.gen.Tpo test/$(DEPDIR)/test_regress-regress.gen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.gen.c' object='test/test_regress-regress.gen.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-openssl_hostname_validation.obj `if test -f 'sample/openssl_hostname_validation.c'; then $(CYGPATH_W) 'sample/openssl_hostname_validation.c'; else $(CYGPATH_W) '$(srcdir)/sample/openssl_hostname_validation.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.gen.o `test -f 'test/regress.gen.c' || echo '$(srcdir)/'`test/regress.gen.c
-sample/le_proxy-le-proxy.o: sample/le-proxy.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_le_proxy_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/le_proxy-le-proxy.o -MD -MP -MF sample/$(DEPDIR)/le_proxy-le-proxy.Tpo -c -o sample/le_proxy-le-proxy.o `test -f 'sample/le-proxy.c' || echo '$(srcdir)/'`sample/le-proxy.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/le_proxy-le-proxy.Tpo sample/$(DEPDIR)/le_proxy-le-proxy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/le-proxy.c' object='sample/le_proxy-le-proxy.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress.gen.obj: test/regress.gen.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.gen.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress.gen.Tpo -c -o test/test_regress-regress.gen.obj `if test -f 'test/regress.gen.c'; then $(CYGPATH_W) 'test/regress.gen.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.gen.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.gen.Tpo test/$(DEPDIR)/test_regress-regress.gen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.gen.c' object='test/test_regress-regress.gen.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_le_proxy_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/le_proxy-le-proxy.o `test -f 'sample/le-proxy.c' || echo '$(srcdir)/'`sample/le-proxy.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.gen.obj `if test -f 'test/regress.gen.c'; then $(CYGPATH_W) 'test/regress.gen.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.gen.c'; fi`
-sample/le_proxy-le-proxy.obj: sample/le-proxy.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_le_proxy_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/le_proxy-le-proxy.obj -MD -MP -MF sample/$(DEPDIR)/le_proxy-le-proxy.Tpo -c -o sample/le_proxy-le-proxy.obj `if test -f 'sample/le-proxy.c'; then $(CYGPATH_W) 'sample/le-proxy.c'; else $(CYGPATH_W) '$(srcdir)/sample/le-proxy.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/le_proxy-le-proxy.Tpo sample/$(DEPDIR)/le_proxy-le-proxy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/le-proxy.c' object='sample/le_proxy-le-proxy.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_buffer.o: test/regress_buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_buffer.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_buffer.Tpo -c -o test/test_regress-regress_buffer.o `test -f 'test/regress_buffer.c' || echo '$(srcdir)/'`test/regress_buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_buffer.Tpo test/$(DEPDIR)/test_regress-regress_buffer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_buffer.c' object='test/test_regress-regress_buffer.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_le_proxy_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/le_proxy-le-proxy.obj `if test -f 'sample/le-proxy.c'; then $(CYGPATH_W) 'sample/le-proxy.c'; else $(CYGPATH_W) '$(srcdir)/sample/le-proxy.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_buffer.o `test -f 'test/regress_buffer.c' || echo '$(srcdir)/'`test/regress_buffer.c
-test/regress-regress.o: test/regress.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress.o -MD -MP -MF test/$(DEPDIR)/regress-regress.Tpo -c -o test/regress-regress.o `test -f 'test/regress.c' || echo '$(srcdir)/'`test/regress.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress.Tpo test/$(DEPDIR)/regress-regress.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.c' object='test/regress-regress.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_buffer.obj: test/regress_buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_buffer.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_buffer.Tpo -c -o test/test_regress-regress_buffer.obj `if test -f 'test/regress_buffer.c'; then $(CYGPATH_W) 'test/regress_buffer.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_buffer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_buffer.Tpo test/$(DEPDIR)/test_regress-regress_buffer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_buffer.c' object='test/test_regress-regress_buffer.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress.o `test -f 'test/regress.c' || echo '$(srcdir)/'`test/regress.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_buffer.obj `if test -f 'test/regress_buffer.c'; then $(CYGPATH_W) 'test/regress_buffer.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_buffer.c'; fi`
-test/regress-regress.obj: test/regress.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress.obj -MD -MP -MF test/$(DEPDIR)/regress-regress.Tpo -c -o test/regress-regress.obj `if test -f 'test/regress.c'; then $(CYGPATH_W) 'test/regress.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress.Tpo test/$(DEPDIR)/regress-regress.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.c' object='test/regress-regress.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_bufferevent.o: test/regress_bufferevent.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_bufferevent.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo -c -o test/test_regress-regress_bufferevent.o `test -f 'test/regress_bufferevent.c' || echo '$(srcdir)/'`test/regress_bufferevent.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo test/$(DEPDIR)/test_regress-regress_bufferevent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_bufferevent.c' object='test/test_regress-regress_bufferevent.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress.obj `if test -f 'test/regress.c'; then $(CYGPATH_W) 'test/regress.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_bufferevent.o `test -f 'test/regress_bufferevent.c' || echo '$(srcdir)/'`test/regress_bufferevent.c
-test/regress-regress.gen.o: test/regress.gen.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress.gen.o -MD -MP -MF test/$(DEPDIR)/regress-regress.gen.Tpo -c -o test/regress-regress.gen.o `test -f 'test/regress.gen.c' || echo '$(srcdir)/'`test/regress.gen.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress.gen.Tpo test/$(DEPDIR)/regress-regress.gen.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.gen.c' object='test/regress-regress.gen.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_bufferevent.obj: test/regress_bufferevent.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_bufferevent.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo -c -o test/test_regress-regress_bufferevent.obj `if test -f 'test/regress_bufferevent.c'; then $(CYGPATH_W) 'test/regress_bufferevent.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_bufferevent.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo test/$(DEPDIR)/test_regress-regress_bufferevent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_bufferevent.c' object='test/test_regress-regress_bufferevent.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress.gen.o `test -f 'test/regress.gen.c' || echo '$(srcdir)/'`test/regress.gen.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_bufferevent.obj `if test -f 'test/regress_bufferevent.c'; then $(CYGPATH_W) 'test/regress_bufferevent.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_bufferevent.c'; fi`
-test/regress-regress.gen.obj: test/regress.gen.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress.gen.obj -MD -MP -MF test/$(DEPDIR)/regress-regress.gen.Tpo -c -o test/regress-regress.gen.obj `if test -f 'test/regress.gen.c'; then $(CYGPATH_W) 'test/regress.gen.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.gen.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress.gen.Tpo test/$(DEPDIR)/regress-regress.gen.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.gen.c' object='test/regress-regress.gen.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_dns.o: test/regress_dns.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_dns.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_dns.Tpo -c -o test/test_regress-regress_dns.o `test -f 'test/regress_dns.c' || echo '$(srcdir)/'`test/regress_dns.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_dns.Tpo test/$(DEPDIR)/test_regress-regress_dns.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_dns.c' object='test/test_regress-regress_dns.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress.gen.obj `if test -f 'test/regress.gen.c'; then $(CYGPATH_W) 'test/regress.gen.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.gen.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_dns.o `test -f 'test/regress_dns.c' || echo '$(srcdir)/'`test/regress_dns.c
-test/regress-regress_buffer.o: test/regress_buffer.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_buffer.o -MD -MP -MF test/$(DEPDIR)/regress-regress_buffer.Tpo -c -o test/regress-regress_buffer.o `test -f 'test/regress_buffer.c' || echo '$(srcdir)/'`test/regress_buffer.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_buffer.Tpo test/$(DEPDIR)/regress-regress_buffer.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_buffer.c' object='test/regress-regress_buffer.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_dns.obj: test/regress_dns.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_dns.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_dns.Tpo -c -o test/test_regress-regress_dns.obj `if test -f 'test/regress_dns.c'; then $(CYGPATH_W) 'test/regress_dns.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_dns.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_dns.Tpo test/$(DEPDIR)/test_regress-regress_dns.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_dns.c' object='test/test_regress-regress_dns.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_buffer.o `test -f 'test/regress_buffer.c' || echo '$(srcdir)/'`test/regress_buffer.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_dns.obj `if test -f 'test/regress_dns.c'; then $(CYGPATH_W) 'test/regress_dns.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_dns.c'; fi`
-test/regress-regress_buffer.obj: test/regress_buffer.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_buffer.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_buffer.Tpo -c -o test/regress-regress_buffer.obj `if test -f 'test/regress_buffer.c'; then $(CYGPATH_W) 'test/regress_buffer.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_buffer.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_buffer.Tpo test/$(DEPDIR)/regress-regress_buffer.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_buffer.c' object='test/regress-regress_buffer.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_et.o: test/regress_et.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_et.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_et.Tpo -c -o test/test_regress-regress_et.o `test -f 'test/regress_et.c' || echo '$(srcdir)/'`test/regress_et.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_et.Tpo test/$(DEPDIR)/test_regress-regress_et.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_et.c' object='test/test_regress-regress_et.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_buffer.obj `if test -f 'test/regress_buffer.c'; then $(CYGPATH_W) 'test/regress_buffer.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_buffer.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_et.o `test -f 'test/regress_et.c' || echo '$(srcdir)/'`test/regress_et.c
-test/regress-regress_bufferevent.o: test/regress_bufferevent.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_bufferevent.o -MD -MP -MF test/$(DEPDIR)/regress-regress_bufferevent.Tpo -c -o test/regress-regress_bufferevent.o `test -f 'test/regress_bufferevent.c' || echo '$(srcdir)/'`test/regress_bufferevent.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_bufferevent.Tpo test/$(DEPDIR)/regress-regress_bufferevent.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_bufferevent.c' object='test/regress-regress_bufferevent.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_et.obj: test/regress_et.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_et.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_et.Tpo -c -o test/test_regress-regress_et.obj `if test -f 'test/regress_et.c'; then $(CYGPATH_W) 'test/regress_et.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_et.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_et.Tpo test/$(DEPDIR)/test_regress-regress_et.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_et.c' object='test/test_regress-regress_et.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_bufferevent.o `test -f 'test/regress_bufferevent.c' || echo '$(srcdir)/'`test/regress_bufferevent.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_et.obj `if test -f 'test/regress_et.c'; then $(CYGPATH_W) 'test/regress_et.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_et.c'; fi`
-test/regress-regress_bufferevent.obj: test/regress_bufferevent.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_bufferevent.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_bufferevent.Tpo -c -o test/regress-regress_bufferevent.obj `if test -f 'test/regress_bufferevent.c'; then $(CYGPATH_W) 'test/regress_bufferevent.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_bufferevent.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_bufferevent.Tpo test/$(DEPDIR)/regress-regress_bufferevent.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_bufferevent.c' object='test/regress-regress_bufferevent.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_finalize.o: test/regress_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_finalize.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_finalize.Tpo -c -o test/test_regress-regress_finalize.o `test -f 'test/regress_finalize.c' || echo '$(srcdir)/'`test/regress_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_finalize.Tpo test/$(DEPDIR)/test_regress-regress_finalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_finalize.c' object='test/test_regress-regress_finalize.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_bufferevent.obj `if test -f 'test/regress_bufferevent.c'; then $(CYGPATH_W) 'test/regress_bufferevent.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_bufferevent.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_finalize.o `test -f 'test/regress_finalize.c' || echo '$(srcdir)/'`test/regress_finalize.c
-test/regress-regress_dns.o: test/regress_dns.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_dns.o -MD -MP -MF test/$(DEPDIR)/regress-regress_dns.Tpo -c -o test/regress-regress_dns.o `test -f 'test/regress_dns.c' || echo '$(srcdir)/'`test/regress_dns.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_dns.Tpo test/$(DEPDIR)/regress-regress_dns.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_dns.c' object='test/regress-regress_dns.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_finalize.obj: test/regress_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_finalize.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_finalize.Tpo -c -o test/test_regress-regress_finalize.obj `if test -f 'test/regress_finalize.c'; then $(CYGPATH_W) 'test/regress_finalize.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_finalize.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_finalize.Tpo test/$(DEPDIR)/test_regress-regress_finalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_finalize.c' object='test/test_regress-regress_finalize.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_dns.o `test -f 'test/regress_dns.c' || echo '$(srcdir)/'`test/regress_dns.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_finalize.obj `if test -f 'test/regress_finalize.c'; then $(CYGPATH_W) 'test/regress_finalize.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_finalize.c'; fi`
-test/regress-regress_dns.obj: test/regress_dns.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_dns.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_dns.Tpo -c -o test/regress-regress_dns.obj `if test -f 'test/regress_dns.c'; then $(CYGPATH_W) 'test/regress_dns.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_dns.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_dns.Tpo test/$(DEPDIR)/regress-regress_dns.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_dns.c' object='test/regress-regress_dns.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_http.o: test/regress_http.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_http.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_http.Tpo -c -o test/test_regress-regress_http.o `test -f 'test/regress_http.c' || echo '$(srcdir)/'`test/regress_http.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_http.Tpo test/$(DEPDIR)/test_regress-regress_http.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_http.c' object='test/test_regress-regress_http.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_dns.obj `if test -f 'test/regress_dns.c'; then $(CYGPATH_W) 'test/regress_dns.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_dns.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_http.o `test -f 'test/regress_http.c' || echo '$(srcdir)/'`test/regress_http.c
-test/regress-regress_et.o: test/regress_et.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_et.o -MD -MP -MF test/$(DEPDIR)/regress-regress_et.Tpo -c -o test/regress-regress_et.o `test -f 'test/regress_et.c' || echo '$(srcdir)/'`test/regress_et.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_et.Tpo test/$(DEPDIR)/regress-regress_et.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_et.c' object='test/regress-regress_et.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_http.obj: test/regress_http.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_http.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_http.Tpo -c -o test/test_regress-regress_http.obj `if test -f 'test/regress_http.c'; then $(CYGPATH_W) 'test/regress_http.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_http.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_http.Tpo test/$(DEPDIR)/test_regress-regress_http.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_http.c' object='test/test_regress-regress_http.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_et.o `test -f 'test/regress_et.c' || echo '$(srcdir)/'`test/regress_et.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_http.obj `if test -f 'test/regress_http.c'; then $(CYGPATH_W) 'test/regress_http.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_http.c'; fi`
-test/regress-regress_et.obj: test/regress_et.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_et.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_et.Tpo -c -o test/regress-regress_et.obj `if test -f 'test/regress_et.c'; then $(CYGPATH_W) 'test/regress_et.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_et.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_et.Tpo test/$(DEPDIR)/regress-regress_et.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_et.c' object='test/regress-regress_et.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_listener.o: test/regress_listener.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_listener.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_listener.Tpo -c -o test/test_regress-regress_listener.o `test -f 'test/regress_listener.c' || echo '$(srcdir)/'`test/regress_listener.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_listener.Tpo test/$(DEPDIR)/test_regress-regress_listener.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_listener.c' object='test/test_regress-regress_listener.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_et.obj `if test -f 'test/regress_et.c'; then $(CYGPATH_W) 'test/regress_et.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_et.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_listener.o `test -f 'test/regress_listener.c' || echo '$(srcdir)/'`test/regress_listener.c
-test/regress-regress_finalize.o: test/regress_finalize.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_finalize.o -MD -MP -MF test/$(DEPDIR)/regress-regress_finalize.Tpo -c -o test/regress-regress_finalize.o `test -f 'test/regress_finalize.c' || echo '$(srcdir)/'`test/regress_finalize.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_finalize.Tpo test/$(DEPDIR)/regress-regress_finalize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_finalize.c' object='test/regress-regress_finalize.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_listener.obj: test/regress_listener.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_listener.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_listener.Tpo -c -o test/test_regress-regress_listener.obj `if test -f 'test/regress_listener.c'; then $(CYGPATH_W) 'test/regress_listener.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_listener.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_listener.Tpo test/$(DEPDIR)/test_regress-regress_listener.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_listener.c' object='test/test_regress-regress_listener.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_finalize.o `test -f 'test/regress_finalize.c' || echo '$(srcdir)/'`test/regress_finalize.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_listener.obj `if test -f 'test/regress_listener.c'; then $(CYGPATH_W) 'test/regress_listener.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_listener.c'; fi`
-test/regress-regress_finalize.obj: test/regress_finalize.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_finalize.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_finalize.Tpo -c -o test/regress-regress_finalize.obj `if test -f 'test/regress_finalize.c'; then $(CYGPATH_W) 'test/regress_finalize.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_finalize.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_finalize.Tpo test/$(DEPDIR)/regress-regress_finalize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_finalize.c' object='test/regress-regress_finalize.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_main.o: test/regress_main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_main.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_main.Tpo -c -o test/test_regress-regress_main.o `test -f 'test/regress_main.c' || echo '$(srcdir)/'`test/regress_main.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_main.Tpo test/$(DEPDIR)/test_regress-regress_main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_main.c' object='test/test_regress-regress_main.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_finalize.obj `if test -f 'test/regress_finalize.c'; then $(CYGPATH_W) 'test/regress_finalize.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_finalize.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_main.o `test -f 'test/regress_main.c' || echo '$(srcdir)/'`test/regress_main.c
-test/regress-regress_http.o: test/regress_http.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_http.o -MD -MP -MF test/$(DEPDIR)/regress-regress_http.Tpo -c -o test/regress-regress_http.o `test -f 'test/regress_http.c' || echo '$(srcdir)/'`test/regress_http.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_http.Tpo test/$(DEPDIR)/regress-regress_http.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_http.c' object='test/regress-regress_http.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_main.obj: test/regress_main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_main.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_main.Tpo -c -o test/test_regress-regress_main.obj `if test -f 'test/regress_main.c'; then $(CYGPATH_W) 'test/regress_main.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_main.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_main.Tpo test/$(DEPDIR)/test_regress-regress_main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_main.c' object='test/test_regress-regress_main.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_http.o `test -f 'test/regress_http.c' || echo '$(srcdir)/'`test/regress_http.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_main.obj `if test -f 'test/regress_main.c'; then $(CYGPATH_W) 'test/regress_main.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_main.c'; fi`
-test/regress-regress_http.obj: test/regress_http.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_http.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_http.Tpo -c -o test/regress-regress_http.obj `if test -f 'test/regress_http.c'; then $(CYGPATH_W) 'test/regress_http.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_http.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_http.Tpo test/$(DEPDIR)/regress-regress_http.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_http.c' object='test/regress-regress_http.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_minheap.o: test/regress_minheap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_minheap.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_minheap.Tpo -c -o test/test_regress-regress_minheap.o `test -f 'test/regress_minheap.c' || echo '$(srcdir)/'`test/regress_minheap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_minheap.Tpo test/$(DEPDIR)/test_regress-regress_minheap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_minheap.c' object='test/test_regress-regress_minheap.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_http.obj `if test -f 'test/regress_http.c'; then $(CYGPATH_W) 'test/regress_http.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_http.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_minheap.o `test -f 'test/regress_minheap.c' || echo '$(srcdir)/'`test/regress_minheap.c
-test/regress-regress_listener.o: test/regress_listener.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_listener.o -MD -MP -MF test/$(DEPDIR)/regress-regress_listener.Tpo -c -o test/regress-regress_listener.o `test -f 'test/regress_listener.c' || echo '$(srcdir)/'`test/regress_listener.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_listener.Tpo test/$(DEPDIR)/regress-regress_listener.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_listener.c' object='test/regress-regress_listener.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_minheap.obj: test/regress_minheap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_minheap.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_minheap.Tpo -c -o test/test_regress-regress_minheap.obj `if test -f 'test/regress_minheap.c'; then $(CYGPATH_W) 'test/regress_minheap.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_minheap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_minheap.Tpo test/$(DEPDIR)/test_regress-regress_minheap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_minheap.c' object='test/test_regress-regress_minheap.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_listener.o `test -f 'test/regress_listener.c' || echo '$(srcdir)/'`test/regress_listener.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_minheap.obj `if test -f 'test/regress_minheap.c'; then $(CYGPATH_W) 'test/regress_minheap.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_minheap.c'; fi`
-test/regress-regress_listener.obj: test/regress_listener.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_listener.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_listener.Tpo -c -o test/regress-regress_listener.obj `if test -f 'test/regress_listener.c'; then $(CYGPATH_W) 'test/regress_listener.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_listener.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_listener.Tpo test/$(DEPDIR)/regress-regress_listener.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_listener.c' object='test/regress-regress_listener.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_rpc.o: test/regress_rpc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_rpc.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_rpc.Tpo -c -o test/test_regress-regress_rpc.o `test -f 'test/regress_rpc.c' || echo '$(srcdir)/'`test/regress_rpc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_rpc.Tpo test/$(DEPDIR)/test_regress-regress_rpc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_rpc.c' object='test/test_regress-regress_rpc.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_listener.obj `if test -f 'test/regress_listener.c'; then $(CYGPATH_W) 'test/regress_listener.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_listener.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_rpc.o `test -f 'test/regress_rpc.c' || echo '$(srcdir)/'`test/regress_rpc.c
-test/regress-regress_main.o: test/regress_main.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_main.o -MD -MP -MF test/$(DEPDIR)/regress-regress_main.Tpo -c -o test/regress-regress_main.o `test -f 'test/regress_main.c' || echo '$(srcdir)/'`test/regress_main.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_main.Tpo test/$(DEPDIR)/regress-regress_main.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_main.c' object='test/regress-regress_main.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_rpc.obj: test/regress_rpc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_rpc.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_rpc.Tpo -c -o test/test_regress-regress_rpc.obj `if test -f 'test/regress_rpc.c'; then $(CYGPATH_W) 'test/regress_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_rpc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_rpc.Tpo test/$(DEPDIR)/test_regress-regress_rpc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_rpc.c' object='test/test_regress-regress_rpc.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_main.o `test -f 'test/regress_main.c' || echo '$(srcdir)/'`test/regress_main.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_rpc.obj `if test -f 'test/regress_rpc.c'; then $(CYGPATH_W) 'test/regress_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_rpc.c'; fi`
-test/regress-regress_main.obj: test/regress_main.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_main.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_main.Tpo -c -o test/regress-regress_main.obj `if test -f 'test/regress_main.c'; then $(CYGPATH_W) 'test/regress_main.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_main.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_main.Tpo test/$(DEPDIR)/regress-regress_main.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_main.c' object='test/regress-regress_main.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_testutils.o: test/regress_testutils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_testutils.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_testutils.Tpo -c -o test/test_regress-regress_testutils.o `test -f 'test/regress_testutils.c' || echo '$(srcdir)/'`test/regress_testutils.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_testutils.Tpo test/$(DEPDIR)/test_regress-regress_testutils.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_testutils.c' object='test/test_regress-regress_testutils.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_main.obj `if test -f 'test/regress_main.c'; then $(CYGPATH_W) 'test/regress_main.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_main.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_testutils.o `test -f 'test/regress_testutils.c' || echo '$(srcdir)/'`test/regress_testutils.c
-test/regress-regress_minheap.o: test/regress_minheap.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_minheap.o -MD -MP -MF test/$(DEPDIR)/regress-regress_minheap.Tpo -c -o test/regress-regress_minheap.o `test -f 'test/regress_minheap.c' || echo '$(srcdir)/'`test/regress_minheap.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_minheap.Tpo test/$(DEPDIR)/regress-regress_minheap.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_minheap.c' object='test/regress-regress_minheap.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_testutils.obj: test/regress_testutils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_testutils.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_testutils.Tpo -c -o test/test_regress-regress_testutils.obj `if test -f 'test/regress_testutils.c'; then $(CYGPATH_W) 'test/regress_testutils.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_testutils.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_testutils.Tpo test/$(DEPDIR)/test_regress-regress_testutils.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_testutils.c' object='test/test_regress-regress_testutils.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_minheap.o `test -f 'test/regress_minheap.c' || echo '$(srcdir)/'`test/regress_minheap.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_testutils.obj `if test -f 'test/regress_testutils.c'; then $(CYGPATH_W) 'test/regress_testutils.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_testutils.c'; fi`
-test/regress-regress_minheap.obj: test/regress_minheap.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_minheap.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_minheap.Tpo -c -o test/regress-regress_minheap.obj `if test -f 'test/regress_minheap.c'; then $(CYGPATH_W) 'test/regress_minheap.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_minheap.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_minheap.Tpo test/$(DEPDIR)/regress-regress_minheap.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_minheap.c' object='test/regress-regress_minheap.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_util.o: test/regress_util.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_util.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_util.Tpo -c -o test/test_regress-regress_util.o `test -f 'test/regress_util.c' || echo '$(srcdir)/'`test/regress_util.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_util.Tpo test/$(DEPDIR)/test_regress-regress_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_util.c' object='test/test_regress-regress_util.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_minheap.obj `if test -f 'test/regress_minheap.c'; then $(CYGPATH_W) 'test/regress_minheap.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_minheap.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_util.o `test -f 'test/regress_util.c' || echo '$(srcdir)/'`test/regress_util.c
-test/regress-regress_rpc.o: test/regress_rpc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_rpc.o -MD -MP -MF test/$(DEPDIR)/regress-regress_rpc.Tpo -c -o test/regress-regress_rpc.o `test -f 'test/regress_rpc.c' || echo '$(srcdir)/'`test/regress_rpc.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_rpc.Tpo test/$(DEPDIR)/regress-regress_rpc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_rpc.c' object='test/regress-regress_rpc.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_util.obj: test/regress_util.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_util.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_util.Tpo -c -o test/test_regress-regress_util.obj `if test -f 'test/regress_util.c'; then $(CYGPATH_W) 'test/regress_util.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_util.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_util.Tpo test/$(DEPDIR)/test_regress-regress_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_util.c' object='test/test_regress-regress_util.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_rpc.o `test -f 'test/regress_rpc.c' || echo '$(srcdir)/'`test/regress_rpc.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_util.obj `if test -f 'test/regress_util.c'; then $(CYGPATH_W) 'test/regress_util.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_util.c'; fi`
-test/regress-regress_rpc.obj: test/regress_rpc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_rpc.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_rpc.Tpo -c -o test/regress-regress_rpc.obj `if test -f 'test/regress_rpc.c'; then $(CYGPATH_W) 'test/regress_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_rpc.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_rpc.Tpo test/$(DEPDIR)/regress-regress_rpc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_rpc.c' object='test/regress-regress_rpc.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-tinytest.o: test/tinytest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-tinytest.o -MD -MP -MF test/$(DEPDIR)/test_regress-tinytest.Tpo -c -o test/test_regress-tinytest.o `test -f 'test/tinytest.c' || echo '$(srcdir)/'`test/tinytest.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-tinytest.Tpo test/$(DEPDIR)/test_regress-tinytest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/tinytest.c' object='test/test_regress-tinytest.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_rpc.obj `if test -f 'test/regress_rpc.c'; then $(CYGPATH_W) 'test/regress_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_rpc.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-tinytest.o `test -f 'test/tinytest.c' || echo '$(srcdir)/'`test/tinytest.c
-test/regress-regress_testutils.o: test/regress_testutils.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_testutils.o -MD -MP -MF test/$(DEPDIR)/regress-regress_testutils.Tpo -c -o test/regress-regress_testutils.o `test -f 'test/regress_testutils.c' || echo '$(srcdir)/'`test/regress_testutils.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_testutils.Tpo test/$(DEPDIR)/regress-regress_testutils.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_testutils.c' object='test/regress-regress_testutils.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-tinytest.obj: test/tinytest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-tinytest.obj -MD -MP -MF test/$(DEPDIR)/test_regress-tinytest.Tpo -c -o test/test_regress-tinytest.obj `if test -f 'test/tinytest.c'; then $(CYGPATH_W) 'test/tinytest.c'; else $(CYGPATH_W) '$(srcdir)/test/tinytest.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-tinytest.Tpo test/$(DEPDIR)/test_regress-tinytest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/tinytest.c' object='test/test_regress-tinytest.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_testutils.o `test -f 'test/regress_testutils.c' || echo '$(srcdir)/'`test/regress_testutils.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-tinytest.obj `if test -f 'test/tinytest.c'; then $(CYGPATH_W) 'test/tinytest.c'; else $(CYGPATH_W) '$(srcdir)/test/tinytest.c'; fi`
-test/regress-regress_testutils.obj: test/regress_testutils.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_testutils.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_testutils.Tpo -c -o test/regress-regress_testutils.obj `if test -f 'test/regress_testutils.c'; then $(CYGPATH_W) 'test/regress_testutils.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_testutils.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_testutils.Tpo test/$(DEPDIR)/regress-regress_testutils.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_testutils.c' object='test/regress-regress_testutils.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_thread.o: test/regress_thread.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_thread.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_thread.Tpo -c -o test/test_regress-regress_thread.o `test -f 'test/regress_thread.c' || echo '$(srcdir)/'`test/regress_thread.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_thread.Tpo test/$(DEPDIR)/test_regress-regress_thread.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_thread.c' object='test/test_regress-regress_thread.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_testutils.obj `if test -f 'test/regress_testutils.c'; then $(CYGPATH_W) 'test/regress_testutils.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_testutils.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_thread.o `test -f 'test/regress_thread.c' || echo '$(srcdir)/'`test/regress_thread.c
-test/regress-regress_util.o: test/regress_util.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_util.o -MD -MP -MF test/$(DEPDIR)/regress-regress_util.Tpo -c -o test/regress-regress_util.o `test -f 'test/regress_util.c' || echo '$(srcdir)/'`test/regress_util.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_util.Tpo test/$(DEPDIR)/regress-regress_util.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_util.c' object='test/regress-regress_util.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_thread.obj: test/regress_thread.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_thread.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_thread.Tpo -c -o test/test_regress-regress_thread.obj `if test -f 'test/regress_thread.c'; then $(CYGPATH_W) 'test/regress_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_thread.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_thread.Tpo test/$(DEPDIR)/test_regress-regress_thread.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_thread.c' object='test/test_regress-regress_thread.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_util.o `test -f 'test/regress_util.c' || echo '$(srcdir)/'`test/regress_util.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_thread.obj `if test -f 'test/regress_thread.c'; then $(CYGPATH_W) 'test/regress_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_thread.c'; fi`
-test/regress-regress_util.obj: test/regress_util.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_util.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_util.Tpo -c -o test/regress-regress_util.obj `if test -f 'test/regress_util.c'; then $(CYGPATH_W) 'test/regress_util.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_util.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_util.Tpo test/$(DEPDIR)/regress-regress_util.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_util.c' object='test/regress-regress_util.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_zlib.o: test/regress_zlib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_zlib.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_zlib.Tpo -c -o test/test_regress-regress_zlib.o `test -f 'test/regress_zlib.c' || echo '$(srcdir)/'`test/regress_zlib.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_zlib.Tpo test/$(DEPDIR)/test_regress-regress_zlib.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_zlib.c' object='test/test_regress-regress_zlib.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_util.obj `if test -f 'test/regress_util.c'; then $(CYGPATH_W) 'test/regress_util.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_util.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_zlib.o `test -f 'test/regress_zlib.c' || echo '$(srcdir)/'`test/regress_zlib.c
-test/regress-tinytest.o: test/tinytest.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-tinytest.o -MD -MP -MF test/$(DEPDIR)/regress-tinytest.Tpo -c -o test/regress-tinytest.o `test -f 'test/tinytest.c' || echo '$(srcdir)/'`test/tinytest.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-tinytest.Tpo test/$(DEPDIR)/regress-tinytest.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/tinytest.c' object='test/regress-tinytest.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_zlib.obj: test/regress_zlib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_zlib.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_zlib.Tpo -c -o test/test_regress-regress_zlib.obj `if test -f 'test/regress_zlib.c'; then $(CYGPATH_W) 'test/regress_zlib.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_zlib.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_zlib.Tpo test/$(DEPDIR)/test_regress-regress_zlib.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_zlib.c' object='test/test_regress-regress_zlib.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-tinytest.o `test -f 'test/tinytest.c' || echo '$(srcdir)/'`test/tinytest.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_zlib.obj `if test -f 'test/regress_zlib.c'; then $(CYGPATH_W) 'test/regress_zlib.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_zlib.c'; fi`
-test/regress-tinytest.obj: test/tinytest.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-tinytest.obj -MD -MP -MF test/$(DEPDIR)/regress-tinytest.Tpo -c -o test/regress-tinytest.obj `if test -f 'test/tinytest.c'; then $(CYGPATH_W) 'test/tinytest.c'; else $(CYGPATH_W) '$(srcdir)/test/tinytest.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-tinytest.Tpo test/$(DEPDIR)/regress-tinytest.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/tinytest.c' object='test/regress-tinytest.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_iocp.o: test/regress_iocp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_iocp.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_iocp.Tpo -c -o test/test_regress-regress_iocp.o `test -f 'test/regress_iocp.c' || echo '$(srcdir)/'`test/regress_iocp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_iocp.Tpo test/$(DEPDIR)/test_regress-regress_iocp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_iocp.c' object='test/test_regress-regress_iocp.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-tinytest.obj `if test -f 'test/tinytest.c'; then $(CYGPATH_W) 'test/tinytest.c'; else $(CYGPATH_W) '$(srcdir)/test/tinytest.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_iocp.o `test -f 'test/regress_iocp.c' || echo '$(srcdir)/'`test/regress_iocp.c
-test/regress-regress_thread.o: test/regress_thread.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_thread.o -MD -MP -MF test/$(DEPDIR)/regress-regress_thread.Tpo -c -o test/regress-regress_thread.o `test -f 'test/regress_thread.c' || echo '$(srcdir)/'`test/regress_thread.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_thread.Tpo test/$(DEPDIR)/regress-regress_thread.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_thread.c' object='test/regress-regress_thread.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_iocp.obj: test/regress_iocp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_iocp.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_iocp.Tpo -c -o test/test_regress-regress_iocp.obj `if test -f 'test/regress_iocp.c'; then $(CYGPATH_W) 'test/regress_iocp.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_iocp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_iocp.Tpo test/$(DEPDIR)/test_regress-regress_iocp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_iocp.c' object='test/test_regress-regress_iocp.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_thread.o `test -f 'test/regress_thread.c' || echo '$(srcdir)/'`test/regress_thread.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_iocp.obj `if test -f 'test/regress_iocp.c'; then $(CYGPATH_W) 'test/regress_iocp.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_iocp.c'; fi`
-test/regress-regress_thread.obj: test/regress_thread.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_thread.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_thread.Tpo -c -o test/regress-regress_thread.obj `if test -f 'test/regress_thread.c'; then $(CYGPATH_W) 'test/regress_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_thread.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_thread.Tpo test/$(DEPDIR)/regress-regress_thread.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_thread.c' object='test/regress-regress_thread.obj' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_ssl.o: test/regress_ssl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_ssl.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_ssl.Tpo -c -o test/test_regress-regress_ssl.o `test -f 'test/regress_ssl.c' || echo '$(srcdir)/'`test/regress_ssl.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_ssl.Tpo test/$(DEPDIR)/test_regress-regress_ssl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_ssl.c' object='test/test_regress-regress_ssl.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_thread.obj `if test -f 'test/regress_thread.c'; then $(CYGPATH_W) 'test/regress_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_thread.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_ssl.o `test -f 'test/regress_ssl.c' || echo '$(srcdir)/'`test/regress_ssl.c
-test/regress-regress_zlib.o: test/regress_zlib.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_zlib.o -MD -MP -MF test/$(DEPDIR)/regress-regress_zlib.Tpo -c -o test/regress-regress_zlib.o `test -f 'test/regress_zlib.c' || echo '$(srcdir)/'`test/regress_zlib.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_zlib.Tpo test/$(DEPDIR)/regress-regress_zlib.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_zlib.c' object='test/regress-regress_zlib.o' libtool=no @AMDEPBACKSLASH@
+test/test_regress-regress_ssl.obj: test/regress_ssl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_ssl.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_ssl.Tpo -c -o test/test_regress-regress_ssl.obj `if test -f 'test/regress_ssl.c'; then $(CYGPATH_W) 'test/regress_ssl.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_ssl.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_ssl.Tpo test/$(DEPDIR)/test_regress-regress_ssl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_ssl.c' object='test/test_regress-regress_ssl.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_zlib.o `test -f 'test/regress_zlib.c' || echo '$(srcdir)/'`test/regress_zlib.c
-
-test/regress-regress_zlib.obj: test/regress_zlib.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_zlib.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_zlib.Tpo -c -o test/regress-regress_zlib.obj `if test -f 'test/regress_zlib.c'; then $(CYGPATH_W) 'test/regress_zlib.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_zlib.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_zlib.Tpo test/$(DEPDIR)/regress-regress_zlib.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_zlib.c' object='test/regress-regress_zlib.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_zlib.obj `if test -f 'test/regress_zlib.c'; then $(CYGPATH_W) 'test/regress_zlib.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_zlib.c'; fi`
-
-test/regress-regress_iocp.o: test/regress_iocp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_iocp.o -MD -MP -MF test/$(DEPDIR)/regress-regress_iocp.Tpo -c -o test/regress-regress_iocp.o `test -f 'test/regress_iocp.c' || echo '$(srcdir)/'`test/regress_iocp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_iocp.Tpo test/$(DEPDIR)/regress-regress_iocp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_iocp.c' object='test/regress-regress_iocp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_iocp.o `test -f 'test/regress_iocp.c' || echo '$(srcdir)/'`test/regress_iocp.c
-
-test/regress-regress_iocp.obj: test/regress_iocp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_iocp.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_iocp.Tpo -c -o test/regress-regress_iocp.obj `if test -f 'test/regress_iocp.c'; then $(CYGPATH_W) 'test/regress_iocp.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_iocp.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_iocp.Tpo test/$(DEPDIR)/regress-regress_iocp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_iocp.c' object='test/regress-regress_iocp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_iocp.obj `if test -f 'test/regress_iocp.c'; then $(CYGPATH_W) 'test/regress_iocp.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_iocp.c'; fi`
-
-test/regress-regress_ssl.o: test/regress_ssl.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_ssl.o -MD -MP -MF test/$(DEPDIR)/regress-regress_ssl.Tpo -c -o test/regress-regress_ssl.o `test -f 'test/regress_ssl.c' || echo '$(srcdir)/'`test/regress_ssl.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_ssl.Tpo test/$(DEPDIR)/regress-regress_ssl.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_ssl.c' object='test/regress-regress_ssl.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_ssl.o `test -f 'test/regress_ssl.c' || echo '$(srcdir)/'`test/regress_ssl.c
-
-test/regress-regress_ssl.obj: test/regress_ssl.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_ssl.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_ssl.Tpo -c -o test/regress-regress_ssl.obj `if test -f 'test/regress_ssl.c'; then $(CYGPATH_W) 'test/regress_ssl.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_ssl.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_ssl.Tpo test/$(DEPDIR)/regress-regress_ssl.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_ssl.c' object='test/regress-regress_ssl.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_ssl.obj `if test -f 'test/regress_ssl.c'; then $(CYGPATH_W) 'test/regress_ssl.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_ssl.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_ssl.obj `if test -f 'test/regress_ssl.c'; then $(CYGPATH_W) 'test/regress_ssl.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_ssl.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
@@ -2407,7 +2269,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
fi; \
$$success || exit 1
-check-TESTS:
+check-TESTS:
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@@ -2513,10 +2375,7 @@ test_runner_timerfd_changelist.log: test_runner_timerfd_changelist
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
-distdir: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -2683,7 +2542,7 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(DATA) \
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \
$(HEADERS) config.h evconfig-private.h
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(include_event2dir)" "$(DESTDIR)$(include_event2dir)"; do \
@@ -2737,83 +2596,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -f $(DEPDIR)/epoll_sub.Plo
- -rm -f ./$(DEPDIR)/buffer.Plo
- -rm -f ./$(DEPDIR)/buffer_iocp.Plo
- -rm -f ./$(DEPDIR)/bufferevent.Plo
- -rm -f ./$(DEPDIR)/bufferevent_async.Plo
- -rm -f ./$(DEPDIR)/bufferevent_filter.Plo
- -rm -f ./$(DEPDIR)/bufferevent_pair.Plo
- -rm -f ./$(DEPDIR)/bufferevent_ratelim.Plo
- -rm -f ./$(DEPDIR)/bufferevent_sock.Plo
- -rm -f ./$(DEPDIR)/devpoll.Plo
- -rm -f ./$(DEPDIR)/epoll.Plo
- -rm -f ./$(DEPDIR)/evdns.Plo
- -rm -f ./$(DEPDIR)/event.Plo
- -rm -f ./$(DEPDIR)/event_iocp.Plo
- -rm -f ./$(DEPDIR)/event_tagging.Plo
- -rm -f ./$(DEPDIR)/evmap.Plo
- -rm -f ./$(DEPDIR)/evport.Plo
- -rm -f ./$(DEPDIR)/evrpc.Plo
- -rm -f ./$(DEPDIR)/evthread.Plo
- -rm -f ./$(DEPDIR)/evthread_pthread.Plo
- -rm -f ./$(DEPDIR)/evthread_win32.Plo
- -rm -f ./$(DEPDIR)/evutil.Plo
- -rm -f ./$(DEPDIR)/evutil_rand.Plo
- -rm -f ./$(DEPDIR)/evutil_time.Plo
- -rm -f ./$(DEPDIR)/http.Plo
- -rm -f ./$(DEPDIR)/kqueue.Plo
- -rm -f ./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo
- -rm -f ./$(DEPDIR)/listener.Plo
- -rm -f ./$(DEPDIR)/log.Plo
- -rm -f ./$(DEPDIR)/poll.Plo
- -rm -f ./$(DEPDIR)/select.Plo
- -rm -f ./$(DEPDIR)/signal.Plo
- -rm -f ./$(DEPDIR)/strlcpy.Plo
- -rm -f ./$(DEPDIR)/win32select.Plo
- -rm -f sample/$(DEPDIR)/dns-example.Po
- -rm -f sample/$(DEPDIR)/event-read-fifo.Po
- -rm -f sample/$(DEPDIR)/hello-world.Po
- -rm -f sample/$(DEPDIR)/http-connect.Po
- -rm -f sample/$(DEPDIR)/http-server.Po
- -rm -f sample/$(DEPDIR)/https_client-hostcheck.Po
- -rm -f sample/$(DEPDIR)/https_client-https-client.Po
- -rm -f sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po
- -rm -f sample/$(DEPDIR)/le_proxy-le-proxy.Po
- -rm -f sample/$(DEPDIR)/signal-test.Po
- -rm -f sample/$(DEPDIR)/time-test.Po
- -rm -f test/$(DEPDIR)/bench.Po
- -rm -f test/$(DEPDIR)/bench_cascade.Po
- -rm -f test/$(DEPDIR)/bench_http.Po
- -rm -f test/$(DEPDIR)/bench_httpclient.Po
- -rm -f test/$(DEPDIR)/regress-regress.Po
- -rm -f test/$(DEPDIR)/regress-regress.gen.Po
- -rm -f test/$(DEPDIR)/regress-regress_buffer.Po
- -rm -f test/$(DEPDIR)/regress-regress_bufferevent.Po
- -rm -f test/$(DEPDIR)/regress-regress_dns.Po
- -rm -f test/$(DEPDIR)/regress-regress_et.Po
- -rm -f test/$(DEPDIR)/regress-regress_finalize.Po
- -rm -f test/$(DEPDIR)/regress-regress_http.Po
- -rm -f test/$(DEPDIR)/regress-regress_iocp.Po
- -rm -f test/$(DEPDIR)/regress-regress_listener.Po
- -rm -f test/$(DEPDIR)/regress-regress_main.Po
- -rm -f test/$(DEPDIR)/regress-regress_minheap.Po
- -rm -f test/$(DEPDIR)/regress-regress_rpc.Po
- -rm -f test/$(DEPDIR)/regress-regress_ssl.Po
- -rm -f test/$(DEPDIR)/regress-regress_testutils.Po
- -rm -f test/$(DEPDIR)/regress-regress_thread.Po
- -rm -f test/$(DEPDIR)/regress-regress_util.Po
- -rm -f test/$(DEPDIR)/regress-regress_zlib.Po
- -rm -f test/$(DEPDIR)/regress-tinytest.Po
- -rm -f test/$(DEPDIR)/test-changelist.Po
- -rm -f test/$(DEPDIR)/test-closed.Po
- -rm -f test/$(DEPDIR)/test-dumpevents.Po
- -rm -f test/$(DEPDIR)/test-eof.Po
- -rm -f test/$(DEPDIR)/test-fdleak.Po
- -rm -f test/$(DEPDIR)/test-init.Po
- -rm -f test/$(DEPDIR)/test-ratelim.Po
- -rm -f test/$(DEPDIR)/test-time.Po
- -rm -f test/$(DEPDIR)/test-weof.Po
+ -rm -rf $(DEPDIR) ./$(DEPDIR) sample/$(DEPDIR) test/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
@@ -2862,83 +2645,7 @@ installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -f $(DEPDIR)/epoll_sub.Plo
- -rm -f ./$(DEPDIR)/buffer.Plo
- -rm -f ./$(DEPDIR)/buffer_iocp.Plo
- -rm -f ./$(DEPDIR)/bufferevent.Plo
- -rm -f ./$(DEPDIR)/bufferevent_async.Plo
- -rm -f ./$(DEPDIR)/bufferevent_filter.Plo
- -rm -f ./$(DEPDIR)/bufferevent_pair.Plo
- -rm -f ./$(DEPDIR)/bufferevent_ratelim.Plo
- -rm -f ./$(DEPDIR)/bufferevent_sock.Plo
- -rm -f ./$(DEPDIR)/devpoll.Plo
- -rm -f ./$(DEPDIR)/epoll.Plo
- -rm -f ./$(DEPDIR)/evdns.Plo
- -rm -f ./$(DEPDIR)/event.Plo
- -rm -f ./$(DEPDIR)/event_iocp.Plo
- -rm -f ./$(DEPDIR)/event_tagging.Plo
- -rm -f ./$(DEPDIR)/evmap.Plo
- -rm -f ./$(DEPDIR)/evport.Plo
- -rm -f ./$(DEPDIR)/evrpc.Plo
- -rm -f ./$(DEPDIR)/evthread.Plo
- -rm -f ./$(DEPDIR)/evthread_pthread.Plo
- -rm -f ./$(DEPDIR)/evthread_win32.Plo
- -rm -f ./$(DEPDIR)/evutil.Plo
- -rm -f ./$(DEPDIR)/evutil_rand.Plo
- -rm -f ./$(DEPDIR)/evutil_time.Plo
- -rm -f ./$(DEPDIR)/http.Plo
- -rm -f ./$(DEPDIR)/kqueue.Plo
- -rm -f ./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo
- -rm -f ./$(DEPDIR)/listener.Plo
- -rm -f ./$(DEPDIR)/log.Plo
- -rm -f ./$(DEPDIR)/poll.Plo
- -rm -f ./$(DEPDIR)/select.Plo
- -rm -f ./$(DEPDIR)/signal.Plo
- -rm -f ./$(DEPDIR)/strlcpy.Plo
- -rm -f ./$(DEPDIR)/win32select.Plo
- -rm -f sample/$(DEPDIR)/dns-example.Po
- -rm -f sample/$(DEPDIR)/event-read-fifo.Po
- -rm -f sample/$(DEPDIR)/hello-world.Po
- -rm -f sample/$(DEPDIR)/http-connect.Po
- -rm -f sample/$(DEPDIR)/http-server.Po
- -rm -f sample/$(DEPDIR)/https_client-hostcheck.Po
- -rm -f sample/$(DEPDIR)/https_client-https-client.Po
- -rm -f sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po
- -rm -f sample/$(DEPDIR)/le_proxy-le-proxy.Po
- -rm -f sample/$(DEPDIR)/signal-test.Po
- -rm -f sample/$(DEPDIR)/time-test.Po
- -rm -f test/$(DEPDIR)/bench.Po
- -rm -f test/$(DEPDIR)/bench_cascade.Po
- -rm -f test/$(DEPDIR)/bench_http.Po
- -rm -f test/$(DEPDIR)/bench_httpclient.Po
- -rm -f test/$(DEPDIR)/regress-regress.Po
- -rm -f test/$(DEPDIR)/regress-regress.gen.Po
- -rm -f test/$(DEPDIR)/regress-regress_buffer.Po
- -rm -f test/$(DEPDIR)/regress-regress_bufferevent.Po
- -rm -f test/$(DEPDIR)/regress-regress_dns.Po
- -rm -f test/$(DEPDIR)/regress-regress_et.Po
- -rm -f test/$(DEPDIR)/regress-regress_finalize.Po
- -rm -f test/$(DEPDIR)/regress-regress_http.Po
- -rm -f test/$(DEPDIR)/regress-regress_iocp.Po
- -rm -f test/$(DEPDIR)/regress-regress_listener.Po
- -rm -f test/$(DEPDIR)/regress-regress_main.Po
- -rm -f test/$(DEPDIR)/regress-regress_minheap.Po
- -rm -f test/$(DEPDIR)/regress-regress_rpc.Po
- -rm -f test/$(DEPDIR)/regress-regress_ssl.Po
- -rm -f test/$(DEPDIR)/regress-regress_testutils.Po
- -rm -f test/$(DEPDIR)/regress-regress_thread.Po
- -rm -f test/$(DEPDIR)/regress-regress_util.Po
- -rm -f test/$(DEPDIR)/regress-regress_zlib.Po
- -rm -f test/$(DEPDIR)/regress-tinytest.Po
- -rm -f test/$(DEPDIR)/test-changelist.Po
- -rm -f test/$(DEPDIR)/test-closed.Po
- -rm -f test/$(DEPDIR)/test-dumpevents.Po
- -rm -f test/$(DEPDIR)/test-eof.Po
- -rm -f test/$(DEPDIR)/test-fdleak.Po
- -rm -f test/$(DEPDIR)/test-init.Po
- -rm -f test/$(DEPDIR)/test-ratelim.Po
- -rm -f test/$(DEPDIR)/test-time.Po
- -rm -f test/$(DEPDIR)/test-weof.Po
+ -rm -rf $(DEPDIR) ./$(DEPDIR) sample/$(DEPDIR) test/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -2961,21 +2668,20 @@ uninstall-am: uninstall-dist_binSCRIPTS uninstall-includeHEADERS \
.MAKE: all check check-am install install-am install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \
- check-TESTS check-am clean clean-cscope clean-generic \
- clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
- clean-noinstPROGRAMS cscope cscopelist-am ctags ctags-am dist \
- dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
- dist-xz dist-zip distcheck distclean distclean-compile \
- distclean-generic distclean-hdr distclean-libtool \
- distclean-tags distcleancheck distdir distuninstallcheck dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dist_binSCRIPTS \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-html install-html-am install-includeHEADERS \
- install-include_event2HEADERS install-info install-info-am \
- install-libLTLIBRARIES install-man \
- install-nodist_include_event2HEADERS install-pdf \
+.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \
+ check-am clean clean-cscope clean-generic clean-libLTLIBRARIES \
+ clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
+ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
+ distcheck distclean distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags distcleancheck \
+ distdir distuninstallcheck dvi dvi-am html html-am info \
+ info-am install install-am install-data install-data-am \
+ install-dist_binSCRIPTS install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-includeHEADERS install-include_event2HEADERS \
+ install-info install-info-am install-libLTLIBRARIES \
+ install-man install-nodist_include_event2HEADERS install-pdf \
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
@@ -2991,26 +2697,26 @@ uninstall-am: uninstall-dist_binSCRIPTS uninstall-includeHEADERS \
$(SAMPLES) : libevent.la
-test_runner_epoll: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b EPOLL
-test_runner_select: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b SELECT
-test_runner_kqueue: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b KQUEUE
-test_runner_evport: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b EVPORT
-test_runner_devpoll: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b DEVPOLL
-test_runner_poll: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b POLL
-test_runner_win32: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b WIN32
-test_runner_timerfd: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b "" -t
-test_runner_changelist: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b "" -c
-test_runner_timerfd_changelist: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b "" -T
+test_runner_epoll: test/test.sh
+ test/test.sh -b EPOLL
+test_runner_select: test/test.sh
+ test/test.sh -b SELECT
+test_runner_kqueue: test/test.sh
+ test/test.sh -b KQUEUE
+test_runner_evport: test/test.sh
+ test/test.sh -b EVPORT
+test_runner_devpoll: test/test.sh
+ test/test.sh -b DEVPOLL
+test_runner_poll: test/test.sh
+ test/test.sh -b POLL
+test_runner_win32: test/test.sh
+ test/test.sh -b WIN32
+test_runner_timerfd: test/test.sh
+ test/test.sh -b "" -t
+test_runner_changelist: test/test.sh
+ test/test.sh -b "" -c
+test_runner_timerfd_changelist: test/test.sh
+ test/test.sh -b "" -T
test/regress.gen.c test/regress.gen.h: test/rpcgen-attempted
diff --git a/NOTICE b/NOTICE
index 7a694c9..70d76b3 120000..100644
--- a/NOTICE
+++ b/NOTICE
@@ -1 +1,74 @@
-LICENSE \ No newline at end of file
+Libevent is available for use under the following license, commonly known
+as the 3-clause (or "modified") BSD license:
+
+==============================
+Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+==============================
+
+Portions of Libevent are based on works by others, also made available by
+them under the three-clause BSD license above. The copyright notices are
+available in the corresponding source files; the license is as above. Here's
+a list:
+
+log.c:
+ Copyright (c) 2000 Dug Song <dugsong@monkey.org>
+ Copyright (c) 1993 The Regents of the University of California.
+
+strlcpy.c:
+ Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+
+win32select.c:
+ Copyright (c) 2003 Michael A. Davis <mike@datanerds.net>
+
+evport.c:
+ Copyright (c) 2007 Sun Microsystems
+
+ht-internal.h:
+ Copyright (c) 2002 Christopher Clark
+
+minheap-internal.h:
+ Copyright (c) 2006 Maxim Yegorushkin <maxim.yegorushkin@gmail.com>
+
+==============================
+
+The arc4module is available under the following, sometimes called the
+"OpenBSD" license:
+
+ Copyright (c) 1996, David Mazieres <dm@uun.org>
+ Copyright (c) 2008, Damien Miller <djm@openbsd.org>
+
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/README.android b/README.android
new file mode 100644
index 0000000..d4b29ee
--- /dev/null
+++ b/README.android
@@ -0,0 +1,29 @@
+This is libevent-2.1.8-stable from http://libevent.org/.
+
+No changes were made apart from the following:
+
+* copied LICENSE to NOTICE
+* added empty MODULE_LICENSE_BSD_LIKE
+* added Android.mk
+* added CleanSpec.mk
+* added missing include of event-internal.h to buffer.c
+* added custom include/event2/event-config.h
+
+
+To uprev this project, you'll likely need to reverse engineer the autotools
+generated makefiles again. This is the recipe I used:
+
+BRANCH_ROOT=/usr/local/google/home/wiley/mnc-dev
+PATH="${BRANCH_ROOT}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin:${PATH}"
+NDK_ROOT="${BRANCH_ROOT}/prebuilts/ndk/current/platforms/android-21/arch-arm64/usr"
+
+./configure --host=arm --build=`./config.guess` \
+ CC=arm-eabi-gcc \
+ CPPFLAGS="-I${NDK_ROOT}/usr/include" \
+ CFLAGS="-nostdlib
+ -Wl,-rpath-link=${BRANCH_ROOT}/out/target/product/hammerhead/obj/lib
+ -L${BRANCH_ROOT}/out/target/product/hammerhead/obj/lib
+ -I${BRANCH_ROOT}/prebuilts/ndk/current/platforms/android-21/arch-arm/usr/include" \
+ LIBS="-lc "
+
+Note that I built hammerhead first and used prebuilts from the most recent NDK.
diff --git a/README.md b/README.md
deleted file mode 100644
index 8be37f4..0000000
--- a/README.md
+++ /dev/null
@@ -1,469 +0,0 @@
-<p align="center">
- <img src="https://strcpy.net/libevent3.png" alt="libevent logo"/>
-</p>
-
-
-
-[![Appveyor Win32 Build Status](https://ci.appveyor.com/api/projects/status/ng3jg0uhy44mp7ik?svg=true)](https://ci.appveyor.com/project/libevent/libevent)
-[![Travis Build Status](https://travis-ci.org/libevent/libevent.svg?branch=master)](https://travis-ci.org/libevent/libevent)
-[![Coverage Status](https://coveralls.io/repos/github/libevent/libevent/badge.svg)](https://coveralls.io/github/libevent/libevent)
-[![Join the chat at https://gitter.im/libevent/libevent](https://badges.gitter.im/libevent/libevent.svg)](https://gitter.im/libevent/libevent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-
-
-# 0. BUILDING AND INSTALLATION (Briefly)
-
-## Autoconf
-
- $ ./configure
- $ make
- $ make verify # (optional)
- $ sudo make install
-
-## CMake (General)
-
-
-The following Libevent specific CMake variables are as follows (the values being
-the default).
-
-```
-# Type of the library to build (SHARED or STATIC)
-# Default is: SHARED for MSVC, otherwise BOTH
-EVENT__LIBRARY_TYPE:STRING=DEFAULT
-
-# Installation directory for CMake files
-EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent
-
-# Enable running gcov to get a test coverage report (only works with
-# GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well.
-EVENT__COVERAGE:BOOL=OFF
-
-# Defines if Libevent should build without the benchmark executables
-EVENT__DISABLE_BENCHMARK:BOOL=OFF
-
-# Define if Libevent should build without support for a debug mode
-EVENT__DISABLE_DEBUG_MODE:BOOL=OFF
-
-# Define if Libevent should not allow replacing the mm functions
-EVENT__DISABLE_MM_REPLACEMENT:BOOL=OFF
-
-# Define if Libevent should build without support for OpenSSL encryption
-EVENT__DISABLE_OPENSSL:BOOL=OFF
-
-# Disable the regress tests
-EVENT__DISABLE_REGRESS:BOOL=OFF
-
-# Disable sample files
-EVENT__DISABLE_SAMPLES:BOOL=OFF
-
-# If tests should be compiled or not
-EVENT__DISABLE_TESTS:BOOL=OFF
-
-# Define if Libevent should not be compiled with thread support
-EVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF
-
-# Enables verbose debugging
-EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF
-
-# When cross compiling, forces running a test program that verifies that Kqueue
-# works with pipes. Note that this requires you to manually run the test program
-# on the the cross compilation target to verify that it works. See CMake
-# documentation for try_run for more details
-EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF
-```
-
-__More variables can be found by running `cmake -LAH <sourcedir_path>`__
-
-
-## CMake (Windows)
-
-Install CMake: <https://www.cmake.org>
-
-
- $ md build && cd build
- $ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list.
- $ start libevent.sln
-
-## CMake (Unix)
-
- $ mkdir build && cd build
- $ cmake .. # Default to Unix Makefiles.
- $ make
- $ make verify # (optional)
-
-
-# 1. BUILDING AND INSTALLATION (In Depth)
-
-## Autoconf
-
-To build Libevent, type
-
- $ ./configure && make
-
-
- (If you got Libevent from the git repository, you will
- first need to run the included "autogen.sh" script in order to
- generate the configure script.)
-
-You can run the regression tests by running
-
- $ make verify
-
-Install as root via
-
- $ make install
-
-Before reporting any problems, please run the regression tests.
-
-To enable low-level tracing, build the library as:
-
- $ CFLAGS=-DUSE_DEBUG ./configure [...]
-
-Standard configure flags should work. In particular, see:
-
- --disable-shared Only build static libraries.
- --prefix Install all files relative to this directory.
-
-
-The configure script also supports the following flags:
-
- --enable-gcc-warnings Enable extra compiler checking with GCC.
- --disable-malloc-replacement
- Don't let applications replace our memory
- management functions.
- --disable-openssl Disable support for OpenSSL encryption.
- --disable-thread-support Don't support multithreaded environments.
-
-## CMake (Windows)
-
-(Note that autoconf is currently the most mature and supported build
-environment for Libevent; the CMake instructions here are new and
-experimental, though they _should_ be solid. We hope that CMake will
-still be supported in future versions of Libevent, and will try to
-make sure that happens.)
-
-First of all install <https://www.cmake.org>.
-
-To build Libevent using Microsoft Visual studio open the "Visual Studio Command prompt" and type:
-
-```
-$ cd <libevent source dir>
-$ mkdir build && cd build
-$ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list.
-$ start libevent.sln
-```
-
-In the above, the ".." refers to the dir containing the Libevent source code.
-You can build multiple versions (with different compile time settings) from the same source tree
-by creating other build directories.
-
-It is highly recommended to build "out of source" when using
-CMake instead of "in source" like the normal behaviour of autoconf for this reason.
-
-The "NMake Makefiles" CMake generator can be used to build entirely via the command line.
-
-To get a list of settings available for the project you can type:
-
-```
-$ cmake -LH ..
-```
-
-### GUI
-
-CMake also provides a GUI that lets you specify the source directory and output (binary) directory
-that the build should be placed in.
-
-# 2. USEFUL LINKS:
-
-For the latest released version of Libevent, see the official website at
-<http://libevent.org/> .
-
-There's a pretty good work-in-progress manual up at
- <http://www.wangafu.net/~nickm/libevent-book/> .
-
-For the latest development versions of Libevent, access our Git repository
-via
-
-```
-$ git clone https://github.com/libevent/libevent.git
-```
-
-You can browse the git repository online at:
-
-<https://github.com/libevent/libevent>
-
-To report bugs, issues, or ask for new features:
-
-__Patches__: https://github.com/libevent/libevent/pulls
-> OK, those are not really _patches_. You fork, modify, and hit the "Create Pull Request" button.
-> You can still submit normal git patches via the mailing list.
-
-__Bugs, Features [RFC], and Issues__: https://github.com/libevent/libevent/issues
-> Or you can do it via the mailing list.
-
-There's also a libevent-users mailing list for talking about Libevent
-use and development:
-
-<http://archives.seul.org/libevent/users/>
-
-# 3. ACKNOWLEDGMENTS
-
-The following people have helped with suggestions, ideas, code or
-fixing bugs:
-
- * Samy Al Bahra
- * Antony Antony
- * Jacob Appelbaum
- * Arno Bakker
- * Weston Andros Adamson
- * William Ahern
- * Ivan Andropov
- * Sergey Avseyev
- * Avi Bab
- * Joachim Bauch
- * Andrey Belobrov
- * Gilad Benjamini
- * Stas Bekman
- * Denis Bilenko
- * Julien Blache
- * Kevin Bowling
- * Tomash Brechko
- * Kelly Brock
- * Ralph Castain
- * Adrian Chadd
- * Lawnstein Chan
- * Shuo Chen
- * Ka-Hing Cheung
- * Andrew Cox
- * Paul Croome
- * George Danchev
- * Andrew Danforth
- * Ed Day
- * Christopher Davis
- * Mike Davis
- * Frank Denis
- * Antony Dovgal
- * Mihai Draghicioiu
- * Alexander Drozdov
- * Mark Ellzey
- * Shie Erlich
- * Leonid Evdokimov
- * Juan Pablo Fernandez
- * Christophe Fillot
- * Mike Frysinger
- * Remi Gacogne
- * Artem Germanov
- * Alexander von Gernler
- * Diego Giagio
- * Artur Grabowski
- * Diwaker Gupta
- * Kuldeep Gupta
- * Sebastian Hahn
- * Dave Hart
- * Greg Hazel
- * Nicholas Heath
- * Michael Herf
- * Savg He
- * Mark Heily
- * Maxime Henrion
- * Michael Herf
- * Greg Hewgill
- * Andrew Hochhaus
- * Aaron Hopkins
- * Tani Hosokawa
- * Jamie Iles
- * Xiuqiang Jiang
- * Claudio Jeker
- * Evan Jones
- * Marcin Juszkiewicz
- * George Kadianakis
- * Makoto Kato
- * Phua Keat
- * Azat Khuzhin
- * Alexander Klauer
- * Kevin Ko
- * Brian Koehmstedt
- * Marko Kreen
- * Ondřej Kuzník
- * Valery Kyholodov
- * Ross Lagerwall
- * Scott Lamb
- * Christopher Layne
- * Adam Langley
- * Graham Leggett
- * Volker Lendecke
- * Philip Lewis
- * Zhou Li
- * David Libenzi
- * Yan Lin
- * Moshe Litvin
- * Simon Liu
- * Mitchell Livingston
- * Hagne Mahre
- * Lubomir Marinov
- * Abilio Marques
- * Nicolas Martyanoff
- * Abel Mathew
- * Nick Mathewson
- * James Mansion
- * Nicholas Marriott
- * Andrey Matveev
- * Caitlin Mercer
- * Dagobert Michelsen
- * Andrea Montefusco
- * Mansour Moufid
- * Mina Naguib
- * Felix Nawothnig
- * Trond Norbye
- * Linus Nordberg
- * Richard Nyberg
- * Jon Oberheide
- * John Ohl
- * Phil Oleson
- * Alexey Ozeritsky
- * Dave Pacheco
- * Derrick Pallas
- * Tassilo von Parseval
- * Catalin Patulea
- * Patrick Pelletier
- * Simon Perreault
- * Dan Petro
- * Pierre Phaneuf
- * Amarin Phaosawasdi
- * Ryan Phillips
- * Dimitre Piskyulev
- * Pavel Plesov
- * Jon Poland
- * Roman Puls
- * Nate R
- * Robert Ransom
- * Balint Reczey
- * Bert JW Regeer
- * Nate Rosenblum
- * Peter Rosin
- * Maseeb Abdul Qadir
- * Wang Qin
- * Alex S
- * Gyepi Sam
- * Hanna Schroeter
- * Ralf Schmitt
- * Mike Smellie
- * Steve Snyder
- * Nir Soffer
- * Dug Song
- * Dongsheng Song
- * Hannes Sowa
- * Joakim Soderberg
- * Joseph Spadavecchia
- * Kevin Springborn
- * Harlan Stenn
- * Andrew Sweeney
- * Ferenc Szalai
- * Brodie Thiesfield
- * Jason Toffaletti
- * Brian Utterback
- * Gisle Vanem
- * Bas Verhoeven
- * Constantine Verutin
- * Colin Watt
- * Zack Weinberg
- * Jardel Weyrich
- * Jay R. Wren
- * Zack Weinberg
- * Mobai Zhang
- * Alejo
- * Alex
- * Taral
- * propanbutan
- * masksqwe
- * mmadia
- * yangacer
- * Andrey Skriabin
- * basavesh.as
- * billsegall
- * Bill Vaughan
- * Christopher Wiley
- * David Paschich
- * Ed Schouten
- * Eduardo Panisset
- * Jan Heylen
- * jer-gentoo
- * Joakim Söderberg
- * kirillDanshin
- * lzmths
- * Marcus Sundberg
- * Mark Mentovai
- * Mattes D
- * Matyas Dolak
- * Neeraj Badlani
- * Nick Mathewson
- * Rainer Keller
- * Seungmo Koo
- * Thomas Bernard
- * Xiao Bao Clark
- * zeliard
- * Zonr Chang
- * Kurt Roeckx
- * Seven
- * Simone Basso
- * Vlad Shcherban
- * Tim Hentenaar
- * Breaker
- * johnsonlee
- * Philip Prindeville
- * Vis Virial
- * Andreas Gustafsson
- * Andrey Okoshkin
- * an-tao
- * baixiangcpp
- * Bernard Spil
- * Bogdan Harjoc
- * Carlo Marcelo Arenas Belón
- * David Benjamin
- * David Disseldorp
- * Dmitry Alimov
- * Dominic Chen
- * dpayne
- * ejurgensen
- * Fredrik Strupe
- * Gonçalo Ribeiro
- * James Synge
- * Jan Beich
- * Jesse Fang
- * Jiri Luznicky
- * José Luis Millán
- * Kiyoshi Aman
- * Leo Zhang
- * lightningkay
- * Luke Dashjr
- * Marcin Szewczyk
- * Maximilian Brunner
- * Maya Rashish
- * Murat Demirten
- * Nathan French
- * Nikolay Edigaryev
- * Philip Herron
- * Redfoxmoon
- * stenn
- * SuckShit
- * The Gitter Badger
- * tim-le
- * Vincent JARDIN
- * Xiang Zhang
- * Xiaozhou Liu
- * yongqing.jiao
- * Enji Cooper
- * linxiaohui
- * Seong-Joong Kim
- * Tobias Stoeckmann
- * Yury Korzhetsky
- * zhuizhuhaomeng
- * Pierce Lopez
- * yuangongji
- * Keith Smiley
- * jeremyerb
- * Fabrice Fontaine
- * wenyg
-
-
-If we have forgotten your name, please contact us.
diff --git a/WIN32-Code/getopt.c b/WIN32-Code/getopt.c
deleted file mode 100644
index 0fcba5d..0000000
--- a/WIN32-Code/getopt.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* $NetBSD: getopt.c,v 1.16 1999/12/02 13:15:56 kleink Exp $ */
-
-/*
- * Copyright (c) 1987, 1993, 1994, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the names of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
- * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if 0
-static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95";
-#endif
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#define __P(x) x
-#define _DIAGASSERT(x) assert(x)
-
-#ifdef __weak_alias
-__weak_alias(getopt,_getopt);
-#endif
-
-
-int opterr = 1, /* if error message should be printed */
- optind = 1, /* index into parent argv vector */
- optopt, /* character checked for validity */
- optreset; /* reset getopt */
-char *optarg; /* argument associated with option */
-
-static char * _progname __P((char *));
-int getopt_internal __P((int, char * const *, const char *));
-
-static char *
-_progname(nargv0)
- char * nargv0;
-{
- char * tmp;
-
- _DIAGASSERT(nargv0 != NULL);
-
- tmp = strrchr(nargv0, '/');
- if (tmp)
- tmp++;
- else
- tmp = nargv0;
- return(tmp);
-}
-
-#define BADCH (int)'?'
-#define BADARG (int)':'
-#define EMSG ""
-
-/*
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-getopt(nargc, nargv, ostr)
- int nargc;
- char * const nargv[];
- const char *ostr;
-{
- static char *__progname = 0;
- static char *place = EMSG; /* option letter processing */
- char *oli; /* option letter list index */
- __progname = __progname?__progname:_progname(*nargv);
-
- _DIAGASSERT(nargv != NULL);
- _DIAGASSERT(ostr != NULL);
-
- if (optreset || !*place) { /* update scanning pointer */
- optreset = 0;
- if (optind >= nargc || *(place = nargv[optind]) != '-') {
- place = EMSG;
- return (-1);
- }
- if (place[1] && *++place == '-' /* found "--" */
- && place[1] == '\0') {
- ++optind;
- place = EMSG;
- return (-1);
- }
- } /* option letter okay? */
- if ((optopt = (int)*place++) == (int)':' ||
- !(oli = strchr(ostr, optopt))) {
- /*
- * if the user didn't specify '-' as an option,
- * assume it means -1.
- */
- if (optopt == (int)'-')
- return (-1);
- if (!*place)
- ++optind;
- if (opterr && *ostr != ':')
- (void)fprintf(stderr,
- "%s: illegal option -- %c\n", __progname, optopt);
- return (BADCH);
- }
- if (*++oli != ':') { /* don't need argument */
- optarg = NULL;
- if (!*place)
- ++optind;
- }
- else { /* need an argument */
- if (*place) /* no white space */
- optarg = place;
- else if (nargc <= ++optind) { /* no arg */
- place = EMSG;
- if (*ostr == ':')
- return (BADARG);
- if (opterr)
- (void)fprintf(stderr,
- "%s: option requires an argument -- %c\n",
- __progname, optopt);
- return (BADCH);
- }
- else /* white space */
- optarg = nargv[optind];
- place = EMSG;
- ++optind;
- }
- return (optopt); /* dump back option letter */
-}
-
diff --git a/WIN32-Code/getopt.h b/WIN32-Code/getopt.h
deleted file mode 100644
index 796f455..0000000
--- a/WIN32-Code/getopt.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef __GETOPT_H__
-#define __GETOPT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern int opterr; /* if error message should be printed */
-extern int optind; /* index into parent argv vector */
-extern int optopt; /* character checked for validity */
-extern int optreset; /* reset getopt */
-extern char *optarg; /* argument associated with option */
-
-struct option
-{
- const char *name;
- int has_arg;
- int *flag;
- int val;
-};
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-int getopt(int, char**, const char*);
-int getopt_long(int, char**, const char*, const struct option*, int*);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __GETOPT_H__ */
diff --git a/WIN32-Code/getopt_long.c b/WIN32-Code/getopt_long.c
deleted file mode 100644
index 092defb..0000000
--- a/WIN32-Code/getopt_long.c
+++ /dev/null
@@ -1,234 +0,0 @@
-
-/*
- * Copyright (c) 1987, 1993, 1994, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the names of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
- * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "getopt.h"
-
-extern int opterr; /* if error message should be printed */
-extern int optind; /* index into parent argv vector */
-extern int optopt; /* character checked for validity */
-extern int optreset; /* reset getopt */
-extern char *optarg; /* argument associated with option */
-
-#define __P(x) x
-#define _DIAGASSERT(x) assert(x)
-
-static char * __progname __P((char *));
-int getopt_internal __P((int, char * const *, const char *));
-
-static char *
-__progname(nargv0)
- char * nargv0;
-{
- char * tmp;
-
- _DIAGASSERT(nargv0 != NULL);
-
- tmp = strrchr(nargv0, '/');
- if (tmp)
- tmp++;
- else
- tmp = nargv0;
- return(tmp);
-}
-
-#define BADCH (int)'?'
-#define BADARG (int)':'
-#define EMSG ""
-
-/*
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-getopt_internal(nargc, nargv, ostr)
- int nargc;
- char * const *nargv;
- const char *ostr;
-{
- static char *place = EMSG; /* option letter processing */
- char *oli; /* option letter list index */
-
- _DIAGASSERT(nargv != NULL);
- _DIAGASSERT(ostr != NULL);
-
- if (optreset || !*place) { /* update scanning pointer */
- optreset = 0;
- if (optind >= nargc || *(place = nargv[optind]) != '-') {
- place = EMSG;
- return (-1);
- }
- if (place[1] && *++place == '-') { /* found "--" */
- /* ++optind; */
- place = EMSG;
- return (-2);
- }
- } /* option letter okay? */
- if ((optopt = (int)*place++) == (int)':' ||
- !(oli = strchr(ostr, optopt))) {
- /*
- * if the user didn't specify '-' as an option,
- * assume it means -1.
- */
- if (optopt == (int)'-')
- return (-1);
- if (!*place)
- ++optind;
- if (opterr && *ostr != ':')
- (void)fprintf(stderr,
- "%s: illegal option -- %c\n", __progname(nargv[0]), optopt);
- return (BADCH);
- }
- if (*++oli != ':') { /* don't need argument */
- optarg = NULL;
- if (!*place)
- ++optind;
- } else { /* need an argument */
- if (*place) /* no white space */
- optarg = place;
- else if (nargc <= ++optind) { /* no arg */
- place = EMSG;
- if ((opterr) && (*ostr != ':'))
- (void)fprintf(stderr,
- "%s: option requires an argument -- %c\n",
- __progname(nargv[0]), optopt);
- return (BADARG);
- } else /* white space */
- optarg = nargv[optind];
- place = EMSG;
- ++optind;
- }
- return (optopt); /* dump back option letter */
-}
-
-#if 0
-/*
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-getopt2(nargc, nargv, ostr)
- int nargc;
- char * const *nargv;
- const char *ostr;
-{
- int retval;
-
- if ((retval = getopt_internal(nargc, nargv, ostr)) == -2) {
- retval = -1;
- ++optind;
- }
- return(retval);
-}
-#endif
-
-/*
- * getopt_long --
- * Parse argc/argv argument vector.
- */
-int
-getopt_long(nargc, nargv, options, long_options, index)
- int nargc;
- char ** nargv;
- const char * options;
- const struct option * long_options;
- int * index;
-{
- int retval;
-
- _DIAGASSERT(nargv != NULL);
- _DIAGASSERT(options != NULL);
- _DIAGASSERT(long_options != NULL);
- /* index may be NULL */
-
- if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
- char *current_argv = nargv[optind++] + 2, *has_equal;
- int i, match = -1;
- size_t current_argv_len;
-
- if (*current_argv == '\0') {
- return(-1);
- }
- if ((has_equal = strchr(current_argv, '=')) != NULL) {
- current_argv_len = has_equal - current_argv;
- has_equal++;
- } else
- current_argv_len = strlen(current_argv);
-
- for (i = 0; long_options[i].name; i++) {
- if (strncmp(current_argv, long_options[i].name, current_argv_len))
- continue;
-
- if (strlen(long_options[i].name) == current_argv_len) {
- match = i;
- break;
- }
- if (match == -1)
- match = i;
- }
- if (match != -1) {
- if (long_options[match].has_arg == required_argument ||
- long_options[match].has_arg == optional_argument) {
- if (has_equal)
- optarg = has_equal;
- else
- optarg = nargv[optind++];
- }
- if ((long_options[match].has_arg == required_argument)
- && (optarg == NULL)) {
- /*
- * Missing argument, leading :
- * indicates no error should be generated
- */
- if ((opterr) && (*options != ':'))
- (void)fprintf(stderr,
- "%s: option requires an argument -- %s\n",
- __progname(nargv[0]), current_argv);
- return (BADARG);
- }
- } else { /* No matching argument */
- if ((opterr) && (*options != ':'))
- (void)fprintf(stderr,
- "%s: illegal option -- %s\n", __progname(nargv[0]), current_argv);
- return (BADCH);
- }
- if (long_options[match].flag) {
- *long_options[match].flag = long_options[match].val;
- retval = 0;
- } else
- retval = long_options[match].val;
- if (index)
- *index = match;
- }
- return(retval);
-}
diff --git a/WIN32-Code/nmake/event2/event-config.h b/WIN32-Code/nmake/event2/event-config.h
index 35ec16f..e6ed3aa 100644
--- a/WIN32-Code/nmake/event2/event-config.h
+++ b/WIN32-Code/nmake/event2/event-config.h
@@ -192,6 +192,9 @@
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1
+/* Define to 1 if you have the <sys/devpoll.h> header file. */
+/* #undef EVENT__HAVE_SYS_DEVPOLL_H */
+
/* Define to 1 if you have the <sys/epoll.h> header file. */
/* #undef EVENT__HAVE_SYS_EPOLL_H */
@@ -271,7 +274,7 @@
/* #undef EVENT__HAVE_WORKING_KQUEUE */
/* Numeric representation of the version */
-#define EVENT__NUMERIC_VERSION 0x02010b00
+#define EVENT__NUMERIC_VERSION 0x02010800
/* Name of package */
#define EVENT__PACKAGE "libevent"
@@ -321,22 +324,29 @@
#define EVENT__SIZEOF_VOID_P 4
#endif
-/* The size of `time_t`, as computed by sizeof. */
-#ifdef _WIN64
-#define EVENT__SIZEOF_TIME_T 8
-#else
-#define EVENT__SIZEOF_TIME_T 4
-#endif
+/* Define to 1 if you have the ANSI C header files. */
+#define EVENT__STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define EVENT__TIME_WITH_SYS_TIME 1
/* Version number of package */
-#define EVENT__VERSION "2.1.11-stable"
+#define EVENT__VERSION "2.1.8-stable"
+
+/* Define to appropriate substitue if compiler doesnt have __func__ */
+#define EVENT____func__ __FUNCTION__
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef EVENT__const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef _EVENT___cplusplus
#define EVENT__inline __inline
+#endif
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef EVENT__pid_t */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef EVENT__size_t */
diff --git a/aclocal.m4 b/aclocal.m4
index 9678d0b..402effb 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.16'
+[am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.16.1], [],
+m4_if([$1], [1.15], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.1])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -332,12 +332,13 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -345,41 +346,49 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- # TODO: see whether this extra hack can be removed once we start
- # requiring Autoconf 2.70 or later.
- AS_CASE([$CONFIG_FILES],
- [*\'*], [eval set x "$CONFIG_FILES"],
- [*], [set x $CONFIG_FILES])
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
shift
- # Used to flag and report bootstrapping failures.
- am_rc=0
- for am_mf
+ for mf
do
# Strip MF so we end up with the name of the file.
- am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile which includes
- # dependency-tracking related rules and includes.
- # Grep'ing the whole file directly is not great: AIX grep has a line
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
- || continue
- am_dirpart=`AS_DIRNAME(["$am_mf"])`
- am_filepart=`AS_BASENAME(["$am_mf"])`
- AM_RUN_LOG([cd "$am_dirpart" \
- && sed -e '/# am--include-marker/d' "$am_filepart" \
- | $MAKE -f - am--depfiles]) || am_rc=$?
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
done
- if test $am_rc -ne 0; then
- AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
- for automatic dependency tracking. Try re-running configure with the
- '--disable-dependency-tracking' option to at least be able to build
- the package (albeit without support for automatic dependency tracking).])
- fi
- AS_UNSET([am_dirpart])
- AS_UNSET([am_filepart])
- AS_UNSET([am_mf])
- AS_UNSET([am_rc])
- rm -f conftest-deps.mk
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
@@ -388,17 +397,18 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
-# This code is only required when automatic dependency tracking is enabled.
-# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
-# order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -485,8 +495,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
-# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
@@ -553,7 +563,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <https://www.gnu.org/software/coreutils/>.
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -595,7 +605,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -616,7 +626,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -637,7 +647,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -645,42 +655,49 @@ AC_SUBST([am__leading_dot])])
# AM_MAKE_INCLUDE()
# -----------------
-# Check whether make has an 'include' directive that can support all
-# the idioms we need for our automatic dependency tracking code.
+# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
-[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
-cat > confinc.mk << 'END'
+[am_make=${MAKE-make}
+cat > confinc << 'END'
am__doit:
- @echo this is the am__doit target >confinc.out
+ @echo this is the am__doit target
.PHONY: am__doit
END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
-# BSD make does it like this.
-echo '.include "confinc.mk" # ignored' > confmf.BSD
-# Other make implementations (GNU, Solaris 10, AIX) do it like this.
-echo 'include confinc.mk # ignored' > confmf.GNU
-_am_result=no
-for s in GNU BSD; do
- AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
- AS_CASE([$?:`cat confinc.out 2>/dev/null`],
- ['0:this is the am__doit target'],
- [AS_CASE([$s],
- [BSD], [am__include='.include' am__quote='"'],
- [am__include='include' am__quote=''])])
- if test "$am__include" != "#"; then
- _am_result="yes ($s style)"
- break
- fi
-done
-rm -f confinc.* confmf.*
-AC_MSG_RESULT([${_am_result}])
-AC_SUBST([am__include])])
-AC_SUBST([am__quote])])
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -719,7 +736,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -748,7 +765,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -795,7 +812,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -814,7 +831,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -895,7 +912,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -955,7 +972,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -983,7 +1000,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1002,7 +1019,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2018 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/arc4random.c b/arc4random.c
index be64452..a2338e6 100644
--- a/arc4random.c
+++ b/arc4random.c
@@ -54,7 +54,6 @@
#ifdef _WIN32
#include <wincrypt.h>
#include <process.h>
-#include <winerror.h>
#else
#include <fcntl.h>
#include <unistd.h>
@@ -90,6 +89,7 @@ static int rs_initialized;
static struct arc4_stream rs;
static pid_t arc4_stir_pid;
static int arc4_count;
+static int arc4_seeded_ok;
static inline unsigned char arc4_getbyte(void);
@@ -163,6 +163,7 @@ arc4_seed_win32(void)
return -1;
arc4_addrandom(buf, sizeof(buf));
evutil_memclear_(buf, sizeof(buf));
+ arc4_seeded_ok = 1;
return 0;
}
#endif
@@ -200,6 +201,7 @@ arc4_seed_sysctl_linux(void)
arc4_addrandom(buf, sizeof(buf));
evutil_memclear_(buf, sizeof(buf));
+ arc4_seeded_ok = 1;
return 0;
}
#endif
@@ -239,6 +241,7 @@ arc4_seed_sysctl_bsd(void)
arc4_addrandom(buf, sizeof(buf));
evutil_memclear_(buf, sizeof(buf));
+ arc4_seeded_ok = 1;
return 0;
}
#endif
@@ -284,6 +287,7 @@ arc4_seed_proc_sys_kernel_random_uuid(void)
}
evutil_memclear_(entropy, sizeof(entropy));
evutil_memclear_(buf, sizeof(buf));
+ arc4_seeded_ok = 1;
return 0;
}
#endif
@@ -307,6 +311,7 @@ static int arc4_seed_urandom_helper_(const char *fname)
return -1;
arc4_addrandom(buf, sizeof(buf));
evutil_memclear_(buf, sizeof(buf));
+ arc4_seeded_ok = 1;
return 0;
}
@@ -374,7 +379,8 @@ arc4_stir(void)
rs_initialized = 1;
}
- if (0 != arc4_seed())
+ arc4_seed();
+ if (!arc4_seeded_ok)
return -1;
/*
diff --git a/buffer.c b/buffer.c
index a51b6c5..b7e3a69 100644
--- a/buffer.c
+++ b/buffer.c
@@ -95,7 +95,6 @@
#include "evthread-internal.h"
#include "evbuffer-internal.h"
#include "bufferevent-internal.h"
-#include "event-internal.h"
/* some systems do not have MAP_FAILED */
#ifndef MAP_FAILED
@@ -523,8 +522,8 @@ evbuffer_invoke_callbacks_(struct evbuffer *buffer)
evbuffer_incref_and_lock_(buffer);
if (buffer->parent)
bufferevent_incref_(buffer->parent);
- EVBUFFER_UNLOCK(buffer);
}
+ EVBUFFER_UNLOCK(buffer);
}
evbuffer_run_callbacks(buffer, 0);
@@ -704,17 +703,13 @@ static int
advance_last_with_data(struct evbuffer *buf)
{
int n = 0;
- struct evbuffer_chain **chainp = buf->last_with_datap;
-
ASSERT_EVBUFFER_LOCKED(buf);
- if (!*chainp)
+ if (!*buf->last_with_datap)
return 0;
- while ((*chainp)->next) {
- chainp = &(*chainp)->next;
- if ((*chainp)->off)
- buf->last_with_datap = chainp;
+ while ((*buf->last_with_datap)->next && (*buf->last_with_datap)->next->off) {
+ buf->last_with_datap = &(*buf->last_with_datap)->next;
++n;
}
return n;
@@ -1151,7 +1146,7 @@ evbuffer_drain(struct evbuffer *buf, size_t len)
}
buf->first = chain;
- EVUTIL_ASSERT(remaining <= chain->off);
+ EVUTIL_ASSERT(chain && remaining <= chain->off);
chain->misalign += remaining;
chain->off -= remaining;
}
@@ -1303,7 +1298,7 @@ evbuffer_remove_buffer(struct evbuffer *src, struct evbuffer *dst,
chain = chain->next;
}
- if (chain != src->first) {
+ if (nread) {
/* we can remove the chain */
struct evbuffer_chain **chp;
chp = evbuffer_free_trailing_empty_chains(dst);
@@ -1539,11 +1534,11 @@ evbuffer_find_eol_char(struct evbuffer_ptr *it)
return (-1);
}
-static inline size_t
+static inline int
evbuffer_strspn(
struct evbuffer_ptr *ptr, const char *chrset)
{
- size_t count = 0;
+ int count = 0;
struct evbuffer_chain *chain = ptr->internal_.chain;
size_t i = ptr->internal_.pos_in_chain;
@@ -1829,10 +1824,6 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
EVBUFFER_LOCK(buf);
- if (datlen == 0) {
- result = 0;
- goto done;
- }
if (buf->freeze_start) {
goto done;
}
@@ -1886,7 +1877,7 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
if ((tmp = evbuffer_chain_new(datlen)) == NULL)
goto done;
buf->first = tmp;
- if (buf->last_with_datap == &buf->first && chain->off)
+ if (buf->last_with_datap == &buf->first)
buf->last_with_datap = &tmp->next;
tmp->next = chain;
@@ -2236,13 +2227,11 @@ evbuffer_read_setup_vecs_(struct evbuffer *buf, ev_ssize_t howmuch,
so_far = 0;
/* Let firstchain be the first chain with any space on it */
firstchainp = buf->last_with_datap;
- EVUTIL_ASSERT(*firstchainp);
if (CHAIN_SPACE_LEN(*firstchainp) == 0) {
firstchainp = &(*firstchainp)->next;
}
chain = *firstchainp;
- EVUTIL_ASSERT(chain);
for (i = 0; i < n_vecs_avail && so_far < (size_t)howmuch; ++i) {
size_t avail = (size_t) CHAIN_SPACE_LEN(chain);
if (avail > (howmuch - so_far) && exact)
@@ -2476,7 +2465,7 @@ evbuffer_write_sendfile(struct evbuffer *buffer, evutil_socket_t dest_fd,
ev_off_t len = chain->off;
#elif defined(SENDFILE_IS_LINUX) || defined(SENDFILE_IS_SOLARIS)
ev_ssize_t res;
- off_t offset = chain->misalign;
+ ev_off_t offset = chain->misalign;
#endif
ASSERT_EVBUFFER_LOCKED(buffer);
@@ -3304,7 +3293,7 @@ evbuffer_add_file(struct evbuffer *buf, int fd, ev_off_t offset, ev_off_t length
return r;
}
-int
+void
evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg)
{
EVBUFFER_LOCK(buffer);
@@ -3315,15 +3304,10 @@ evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg)
if (cb) {
struct evbuffer_cb_entry *ent =
evbuffer_add_cb(buffer, NULL, cbarg);
- if (!ent) {
- EVBUFFER_UNLOCK(buffer);
- return -1;
- }
ent->cb.cb_obsolete = cb;
ent->flags |= EVBUFFER_CB_OBSOLETE;
}
EVBUFFER_UNLOCK(buffer);
- return 0;
}
struct evbuffer_cb_entry *
diff --git a/buffer_iocp.c b/buffer_iocp.c
index 2af0c49..2d76a90 100644
--- a/buffer_iocp.c
+++ b/buffer_iocp.c
@@ -44,7 +44,6 @@
#include "mm-internal.h"
#include <winsock2.h>
-#include <winerror.h>
#include <windows.h>
#include <stdio.h>
diff --git a/bufferevent-internal.h b/bufferevent-internal.h
index 87ab9ad..9960aef 100644
--- a/bufferevent-internal.h
+++ b/bufferevent-internal.h
@@ -306,13 +306,6 @@ extern const struct bufferevent_ops bufferevent_ops_pair;
#define BEV_IS_FILTER(bevp) ((bevp)->be_ops == &bufferevent_ops_filter)
#define BEV_IS_PAIR(bevp) ((bevp)->be_ops == &bufferevent_ops_pair)
-#if defined(EVENT__HAVE_OPENSSL)
-extern const struct bufferevent_ops bufferevent_ops_openssl;
-#define BEV_IS_OPENSSL(bevp) ((bevp)->be_ops == &bufferevent_ops_openssl)
-#else
-#define BEV_IS_OPENSSL(bevp) 0
-#endif
-
#ifdef _WIN32
extern const struct bufferevent_ops bufferevent_ops_async;
#define BEV_IS_ASYNC(bevp) ((bevp)->be_ops == &bufferevent_ops_async)
@@ -321,16 +314,13 @@ extern const struct bufferevent_ops bufferevent_ops_async;
#endif
/** Initialize the shared parts of a bufferevent. */
-EVENT2_EXPORT_SYMBOL
int bufferevent_init_common_(struct bufferevent_private *, struct event_base *, const struct bufferevent_ops *, enum bufferevent_options options);
/** For internal use: temporarily stop all reads on bufev, until the conditions
* in 'what' are over. */
-EVENT2_EXPORT_SYMBOL
void bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
/** For internal use: clear the conditions 'what' on bufev, and re-enable
* reading if there are no conditions left. */
-EVENT2_EXPORT_SYMBOL
void bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
/** For internal use: temporarily stop all writes on bufev, until the conditions
@@ -357,19 +347,16 @@ void bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend
@return 0 if successful, or -1 if an error occurred
@see bufferevent_disable()
*/
-EVENT2_EXPORT_SYMBOL
int bufferevent_disable_hard_(struct bufferevent *bufev, short event);
/** Internal: Set up locking on a bufferevent. If lock is set, use it.
* Otherwise, use a new lock. */
-EVENT2_EXPORT_SYMBOL
int bufferevent_enable_locking_(struct bufferevent *bufev, void *lock);
/** Internal: backwards compat macro for the now public function
* Increment the reference count on bufev. */
#define bufferevent_incref_(bufev) bufferevent_incref(bufev)
/** Internal: Lock bufev and increase its reference count.
* unlocking it otherwise. */
-EVENT2_EXPORT_SYMBOL
void bufferevent_incref_and_lock_(struct bufferevent *bufev);
/** Internal: backwards compat macro for the now public function
* Decrement the reference count on bufev. Returns 1 if it freed
@@ -378,21 +365,17 @@ void bufferevent_incref_and_lock_(struct bufferevent *bufev);
/** Internal: Drop the reference count on bufev, freeing as necessary, and
* unlocking it otherwise. Returns 1 if it freed the bufferevent. */
-EVENT2_EXPORT_SYMBOL
int bufferevent_decref_and_unlock_(struct bufferevent *bufev);
/** Internal: If callbacks are deferred and we have a read callback, schedule
* a readcb. Otherwise just run the readcb. Ignores watermarks. */
-EVENT2_EXPORT_SYMBOL
void bufferevent_run_readcb_(struct bufferevent *bufev, int options);
/** Internal: If callbacks are deferred and we have a write callback, schedule
* a writecb. Otherwise just run the writecb. Ignores watermarks. */
-EVENT2_EXPORT_SYMBOL
void bufferevent_run_writecb_(struct bufferevent *bufev, int options);
/** Internal: If callbacks are deferred and we have an eventcb, schedule
* it to run with events "what". Otherwise just run the eventcb.
* See bufferevent_trigger_event for meaning of "options". */
-EVENT2_EXPORT_SYMBOL
void bufferevent_run_eventcb_(struct bufferevent *bufev, short what, int options);
/** Internal: Run or schedule (if deferred or options contain
@@ -416,7 +399,6 @@ bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options
/** Internal: Add the event 'ev' with timeout tv, unless tv is set to 0, in
* which case add ev with no timeout. */
-EVENT2_EXPORT_SYMBOL
int bufferevent_add_event_(struct event *ev, const struct timeval *tv);
/* =========
@@ -426,33 +408,19 @@ int bufferevent_add_event_(struct event *ev, const struct timeval *tv);
/** Internal use: Set up the ev_read and ev_write callbacks so that
* the other "generic_timeout" functions will work on it. Call this from
* the constructor function. */
-EVENT2_EXPORT_SYMBOL
void bufferevent_init_generic_timeout_cbs_(struct bufferevent *bev);
/** Internal use: Add or delete the generic timeout events as appropriate.
* (If an event is enabled and a timeout is set, we add the event. Otherwise
* we delete it.) Call this from anything that changes the timeout values,
* that enabled EV_READ or EV_WRITE, or that disables EV_READ or EV_WRITE. */
-EVENT2_EXPORT_SYMBOL
int bufferevent_generic_adj_timeouts_(struct bufferevent *bev);
-EVENT2_EXPORT_SYMBOL
int bufferevent_generic_adj_existing_timeouts_(struct bufferevent *bev);
-EVENT2_EXPORT_SYMBOL
enum bufferevent_options bufferevent_get_options_(struct bufferevent *bev);
-EVENT2_EXPORT_SYMBOL
const struct sockaddr*
bufferevent_socket_get_conn_address_(struct bufferevent *bev);
-EVENT2_EXPORT_SYMBOL
-void
-bufferevent_socket_set_conn_address_fd_(struct bufferevent *bev, evutil_socket_t fd);
-
-EVENT2_EXPORT_SYMBOL
-void
-bufferevent_socket_set_conn_address_(struct bufferevent *bev, struct sockaddr *addr, size_t addrlen);
-
-
/** Internal use: We have just successfully read data into an inbuf, so
* reset the read timeout (if any). */
#define BEV_RESET_GENERIC_READ_TIMEOUT(bev) \
@@ -497,15 +465,11 @@ bufferevent_socket_set_conn_address_(struct bufferevent *bev, struct sockaddr *a
/* ==== For rate-limiting. */
-EVENT2_EXPORT_SYMBOL
int bufferevent_decrement_write_buckets_(struct bufferevent_private *bev,
ev_ssize_t bytes);
-EVENT2_EXPORT_SYMBOL
int bufferevent_decrement_read_buckets_(struct bufferevent_private *bev,
ev_ssize_t bytes);
-EVENT2_EXPORT_SYMBOL
ev_ssize_t bufferevent_get_read_max_(struct bufferevent_private *bev);
-EVENT2_EXPORT_SYMBOL
ev_ssize_t bufferevent_get_write_max_(struct bufferevent_private *bev);
int bufferevent_ratelim_init_(struct bufferevent_private *bev);
diff --git a/bufferevent.c b/bufferevent.c
index 08c0486..490b598 100644
--- a/bufferevent.c
+++ b/bufferevent.c
@@ -66,7 +66,8 @@ static void bufferevent_finalize_cb_(struct event_callback *evcb, void *arg_);
void
bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what)
{
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
BEV_LOCK(bufev);
if (!bufev_private->read_suspended)
bufev->be_ops->disable(bufev, EV_READ);
@@ -77,7 +78,8 @@ bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags w
void
bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what)
{
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
BEV_LOCK(bufev);
bufev_private->read_suspended &= ~what;
if (!bufev_private->read_suspended && (bufev->enabled & EV_READ))
@@ -88,7 +90,8 @@ bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags
void
bufferevent_suspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what)
{
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
BEV_LOCK(bufev);
if (!bufev_private->write_suspended)
bufev->be_ops->disable(bufev, EV_WRITE);
@@ -99,7 +102,8 @@ bufferevent_suspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags
void
bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what)
{
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
BEV_LOCK(bufev);
bufev_private->write_suspended &= ~what;
if (!bufev_private->write_suspended && (bufev->enabled & EV_WRITE))
@@ -107,28 +111,6 @@ bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend_flag
BEV_UNLOCK(bufev);
}
-/**
- * Sometimes bufferevent's implementation can overrun high watermarks
- * (one of examples is openssl) and in this case if the read callback
- * will not handle enough data do over condition above the read
- * callback will never be called again (due to suspend above).
- *
- * To avoid this we are scheduling read callback again here, but only
- * from the user callback to avoid multiple scheduling:
- * - when the data had been added to it
- * - when the data had been drained from it (user specified read callback)
- */
-static void bufferevent_inbuf_wm_check(struct bufferevent *bev)
-{
- if (!bev->wm_read.high)
- return;
- if (!(bev->enabled & EV_READ))
- return;
- if (evbuffer_get_length(bev->input) < bev->wm_read.high)
- return;
-
- bufferevent_trigger(bev, EV_READ, BEV_OPT_DEFER_CALLBACKS);
-}
/* Callback to implement watermarks on the input buffer. Only enabled
* if the watermark is set. */
@@ -165,7 +147,6 @@ bufferevent_run_deferred_callbacks_locked(struct event_callback *cb, void *arg)
if (bufev_private->readcb_pending && bufev->readcb) {
bufev_private->readcb_pending = 0;
bufev->readcb(bufev, bufev->cbarg);
- bufferevent_inbuf_wm_check(bufev);
}
if (bufev_private->writecb_pending && bufev->writecb) {
bufev_private->writecb_pending = 0;
@@ -206,7 +187,6 @@ bufferevent_run_deferred_callbacks_unlocked(struct event_callback *cb, void *arg
void *cbarg = bufev->cbarg;
bufev_private->readcb_pending = 0;
UNLOCKED(readcb(bufev, cbarg));
- bufferevent_inbuf_wm_check(bufev);
}
if (bufev_private->writecb_pending && bufev->writecb) {
bufferevent_data_cb writecb = bufev->writecb;
@@ -241,7 +221,8 @@ void
bufferevent_run_readcb_(struct bufferevent *bufev, int options)
{
/* Requires that we hold the lock and a reference */
- struct bufferevent_private *p = BEV_UPCAST(bufev);
+ struct bufferevent_private *p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
if (bufev->readcb == NULL)
return;
if ((p->options|options) & BEV_OPT_DEFER_CALLBACKS) {
@@ -249,7 +230,6 @@ bufferevent_run_readcb_(struct bufferevent *bufev, int options)
SCHEDULE_DEFERRED(p);
} else {
bufev->readcb(bufev, bufev->cbarg);
- bufferevent_inbuf_wm_check(bufev);
}
}
@@ -257,7 +237,8 @@ void
bufferevent_run_writecb_(struct bufferevent *bufev, int options)
{
/* Requires that we hold the lock and a reference */
- struct bufferevent_private *p = BEV_UPCAST(bufev);
+ struct bufferevent_private *p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
if (bufev->writecb == NULL)
return;
if ((p->options|options) & BEV_OPT_DEFER_CALLBACKS) {
@@ -285,7 +266,8 @@ void
bufferevent_run_eventcb_(struct bufferevent *bufev, short what, int options)
{
/* Requires that we hold the lock and a reference */
- struct bufferevent_private *p = BEV_UPCAST(bufev);
+ struct bufferevent_private *p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
if (bufev->errorcb == NULL)
return;
if ((p->options|options) & BEV_OPT_DEFER_CALLBACKS) {
@@ -315,12 +297,14 @@ bufferevent_init_common_(struct bufferevent_private *bufev_private,
if (!bufev->input) {
if ((bufev->input = evbuffer_new()) == NULL)
- goto err;
+ return -1;
}
if (!bufev->output) {
- if ((bufev->output = evbuffer_new()) == NULL)
- goto err;
+ if ((bufev->output = evbuffer_new()) == NULL) {
+ evbuffer_free(bufev->input);
+ return -1;
+ }
}
bufev_private->refcnt = 1;
@@ -332,8 +316,7 @@ bufferevent_init_common_(struct bufferevent_private *bufev_private,
bufev->be_ops = ops;
- if (bufferevent_ratelim_init_(bufev_private))
- goto err;
+ bufferevent_ratelim_init_(bufev_private);
/*
* Set to EV_WRITE so that using bufferevent_write is going to
@@ -344,14 +327,20 @@ bufferevent_init_common_(struct bufferevent_private *bufev_private,
#ifndef EVENT__DISABLE_THREAD_SUPPORT
if (options & BEV_OPT_THREADSAFE) {
- if (bufferevent_enable_locking_(bufev, NULL) < 0)
- goto err;
+ if (bufferevent_enable_locking_(bufev, NULL) < 0) {
+ /* cleanup */
+ evbuffer_free(bufev->input);
+ evbuffer_free(bufev->output);
+ bufev->input = NULL;
+ bufev->output = NULL;
+ return -1;
+ }
}
#endif
if ((options & (BEV_OPT_DEFER_CALLBACKS|BEV_OPT_UNLOCK_CALLBACKS))
== BEV_OPT_UNLOCK_CALLBACKS) {
event_warnx("UNLOCK_CALLBACKS requires DEFER_CALLBACKS");
- goto err;
+ return -1;
}
if (options & BEV_OPT_UNLOCK_CALLBACKS)
event_deferred_cb_init_(
@@ -372,17 +361,6 @@ bufferevent_init_common_(struct bufferevent_private *bufev_private,
evbuffer_set_parent_(bufev->output, bufev);
return 0;
-
-err:
- if (bufev->input) {
- evbuffer_free(bufev->input);
- bufev->input = NULL;
- }
- if (bufev->output) {
- evbuffer_free(bufev->output);
- bufev->output = NULL;
- }
- return -1;
}
void
@@ -481,7 +459,8 @@ bufferevent_read_buffer(struct bufferevent *bufev, struct evbuffer *buf)
int
bufferevent_enable(struct bufferevent *bufev, short event)
{
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
short impl_events = event;
int r = 0;
@@ -495,8 +474,6 @@ bufferevent_enable(struct bufferevent *bufev, short event)
if (impl_events && bufev->be_ops->enable(bufev, impl_events) < 0)
r = -1;
- if (r)
- event_debug(("%s: cannot enable 0x%hx on %p", __func__, event, bufev));
bufferevent_decref_and_unlock_(bufev);
return r;
@@ -556,7 +533,8 @@ int
bufferevent_disable_hard_(struct bufferevent *bufev, short event)
{
int r = 0;
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
BEV_LOCK(bufev);
bufev->enabled &= ~event;
@@ -579,8 +557,6 @@ bufferevent_disable(struct bufferevent *bufev, short event)
if (bufev->be_ops->disable(bufev, event) < 0)
r = -1;
- if (r)
- event_debug(("%s: cannot disable 0x%hx on %p", __func__, event, bufev));
BEV_UNLOCK(bufev);
return r;
@@ -594,7 +570,8 @@ void
bufferevent_setwatermark(struct bufferevent *bufev, short events,
size_t lowmark, size_t highmark)
{
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
BEV_LOCK(bufev);
if (events & EV_WRITE) {
@@ -679,7 +656,8 @@ bufferevent_flush(struct bufferevent *bufev,
void
bufferevent_incref_and_lock_(struct bufferevent *bufev)
{
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ BEV_UPCAST(bufev);
BEV_LOCK(bufev);
++bufev_private->refcnt;
}
@@ -705,7 +683,8 @@ bufferevent_transfer_lock_ownership_(struct bufferevent *donor,
int
bufferevent_decref_and_unlock_(struct bufferevent *bufev)
{
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
int n_cbs = 0;
#define MAX_CBS 16
struct event_callback *cbs[MAX_CBS];
@@ -748,7 +727,8 @@ bufferevent_finalize_cb_(struct event_callback *evcb, void *arg_)
{
struct bufferevent *bufev = arg_;
struct bufferevent *underlying;
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
BEV_LOCK(bufev);
underlying = bufferevent_get_underlying(bufev);
@@ -814,7 +794,8 @@ bufferevent_free(struct bufferevent *bufev)
void
bufferevent_incref(struct bufferevent *bufev)
{
- struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
/* XXX: now that this function is public, we might want to
* - return the count from this function
@@ -870,8 +851,6 @@ bufferevent_setfd(struct bufferevent *bev, evutil_socket_t fd)
BEV_LOCK(bev);
if (bev->be_ops->ctrl)
res = bev->be_ops->ctrl(bev, BEV_CTRL_SET_FD, &d);
- if (res)
- event_debug(("%s: cannot set fd for %p to "EV_SOCK_FMT, __func__, bev, fd));
BEV_UNLOCK(bev);
return res;
}
@@ -885,8 +864,6 @@ bufferevent_getfd(struct bufferevent *bev)
BEV_LOCK(bev);
if (bev->be_ops->ctrl)
res = bev->be_ops->ctrl(bev, BEV_CTRL_GET_FD, &d);
- if (res)
- event_debug(("%s: cannot get fd for %p", __func__, bev));
BEV_UNLOCK(bev);
return (res<0) ? -1 : d.fd;
}
@@ -894,7 +871,8 @@ bufferevent_getfd(struct bufferevent *bev)
enum bufferevent_options
bufferevent_get_options_(struct bufferevent *bev)
{
- struct bufferevent_private *bev_p = BEV_UPCAST(bev);
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
enum bufferevent_options options;
BEV_LOCK(bev);
@@ -970,7 +948,8 @@ int
bufferevent_generic_adj_timeouts_(struct bufferevent *bev)
{
const short enabled = bev->enabled;
- struct bufferevent_private *bev_p = BEV_UPCAST(bev);
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
int r1=0, r2=0;
if ((enabled & EV_READ) && !bev_p->read_suspended &&
evutil_timerisset(&bev->timeout_read))
diff --git a/bufferevent_async.c b/bufferevent_async.c
index 40c7c5e..6395e57 100644
--- a/bufferevent_async.c
+++ b/bufferevent_async.c
@@ -46,7 +46,6 @@
#ifdef _WIN32
#include <winsock2.h>
-#include <winerror.h>
#include <ws2tcpip.h>
#endif
@@ -101,32 +100,11 @@ const struct bufferevent_ops bufferevent_ops_async = {
be_async_ctrl,
};
-static inline void
-be_async_run_eventcb(struct bufferevent *bev, short what, int options)
-{ bufferevent_run_eventcb_(bev, what, options|BEV_TRIG_DEFER_CALLBACKS); }
-
-static inline void
-be_async_trigger_nolock(struct bufferevent *bev, short what, int options)
-{ bufferevent_trigger_nolock_(bev, what, options|BEV_TRIG_DEFER_CALLBACKS); }
-
-static inline int
-fatal_error(int err)
-{
- switch (err) {
- /* We may have already associated this fd with a port.
- * Let's hope it's this port, and that the error code
- * for doing this neer changes. */
- case ERROR_INVALID_PARAMETER:
- return 0;
- }
- return 1;
-}
-
static inline struct bufferevent_async *
upcast(struct bufferevent *bev)
{
struct bufferevent_async *bev_a;
- if (!BEV_IS_ASYNC(bev))
+ if (bev->be_ops != &bufferevent_ops_async)
return NULL;
bev_a = EVUTIL_UPCAST(bev, struct bufferevent_async, bev.bev);
return bev_a;
@@ -239,7 +217,7 @@ bev_async_consider_writing(struct bufferevent_async *beva)
&beva->write_overlapped)) {
bufferevent_decref_(bev);
beva->ok = 0;
- be_async_run_eventcb(bev, BEV_EVENT_ERROR, 0);
+ bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
} else {
beva->write_in_progress = at_most;
bufferevent_decrement_write_buckets_(&beva->bev, at_most);
@@ -292,7 +270,7 @@ bev_async_consider_reading(struct bufferevent_async *beva)
bufferevent_incref_(bev);
if (evbuffer_launch_read_(bev->input, at_most, &beva->read_overlapped)) {
beva->ok = 0;
- be_async_run_eventcb(bev, BEV_EVENT_ERROR, 0);
+ bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
bufferevent_decref_(bev);
} else {
beva->read_in_progress = at_most;
@@ -403,10 +381,10 @@ be_async_destruct(struct bufferevent *bev)
bev_async_del_write(bev_async);
fd = evbuffer_overlapped_get_fd_(bev->input);
- if (fd != (evutil_socket_t)EVUTIL_INVALID_SOCKET &&
+ if (fd != (evutil_socket_t)INVALID_SOCKET &&
(bev_p->options & BEV_OPT_CLOSE_ON_FREE)) {
evutil_closesocket(fd);
- evbuffer_overlapped_set_fd_(bev->input, EVUTIL_INVALID_SOCKET);
+ evbuffer_overlapped_set_fd_(bev->input, INVALID_SOCKET);
}
}
@@ -450,7 +428,8 @@ connect_complete(struct event_overlapped *eo, ev_uintptr_t key,
else
bev_async_set_wsa_error(bev, eo);
- be_async_run_eventcb(bev, ok ? BEV_EVENT_CONNECTED : BEV_EVENT_ERROR, 0);
+ bufferevent_run_eventcb_(bev,
+ ok? BEV_EVENT_CONNECTED : BEV_EVENT_ERROR, 0);
event_base_del_virtual_(bev->ev_base);
@@ -480,16 +459,16 @@ read_complete(struct event_overlapped *eo, ev_uintptr_t key,
if (bev_a->ok) {
if (ok && nbytes) {
BEV_RESET_GENERIC_READ_TIMEOUT(bev);
- be_async_trigger_nolock(bev, EV_READ, 0);
+ bufferevent_trigger_nolock_(bev, EV_READ, 0);
bev_async_consider_reading(bev_a);
} else if (!ok) {
what |= BEV_EVENT_ERROR;
bev_a->ok = 0;
- be_async_run_eventcb(bev, what, 0);
+ bufferevent_run_eventcb_(bev, what, 0);
} else if (!nbytes) {
what |= BEV_EVENT_EOF;
bev_a->ok = 0;
- be_async_run_eventcb(bev, what, 0);
+ bufferevent_run_eventcb_(bev, what, 0);
}
}
@@ -523,16 +502,16 @@ write_complete(struct event_overlapped *eo, ev_uintptr_t key,
if (bev_a->ok) {
if (ok && nbytes) {
BEV_RESET_GENERIC_WRITE_TIMEOUT(bev);
- be_async_trigger_nolock(bev, EV_WRITE, 0);
+ bufferevent_trigger_nolock_(bev, EV_WRITE, 0);
bev_async_consider_writing(bev_a);
} else if (!ok) {
what |= BEV_EVENT_ERROR;
bev_a->ok = 0;
- be_async_run_eventcb(bev, what, 0);
+ bufferevent_run_eventcb_(bev, what, 0);
} else if (!nbytes) {
what |= BEV_EVENT_EOF;
bev_a->ok = 0;
- be_async_run_eventcb(bev, what, 0);
+ bufferevent_run_eventcb_(bev, what, 0);
}
}
@@ -553,7 +532,11 @@ bufferevent_async_new_(struct event_base *base,
return NULL;
if (fd >= 0 && event_iocp_port_associate_(iocp, fd, 1)<0) {
- if (fatal_error(GetLastError()))
+ int err = GetLastError();
+ /* We may have alrady associated this fd with a port.
+ * Let's hope it's this port, and that the error code
+ * for doing this neer changes. */
+ if (err != ERROR_INVALID_PARAMETER)
return NULL;
}
@@ -597,6 +580,7 @@ bufferevent_async_set_connected_(struct bufferevent *bev)
{
struct bufferevent_async *bev_async = upcast(bev);
bev_async->ok = 1;
+ bufferevent_init_generic_timeout_cbs_(bev);
/* Now's a good time to consider reading/writing */
be_async_enable(bev, bev->enabled);
}
@@ -670,29 +654,25 @@ be_async_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
data->fd = evbuffer_overlapped_get_fd_(bev->input);
return 0;
case BEV_CTRL_SET_FD: {
- struct bufferevent_async *bev_a = upcast(bev);
struct event_iocp_port *iocp;
if (data->fd == evbuffer_overlapped_get_fd_(bev->input))
return 0;
if (!(iocp = event_base_get_iocp_(bev->ev_base)))
return -1;
- if (event_iocp_port_associate_(iocp, data->fd, 1) < 0) {
- if (fatal_error(GetLastError()))
- return -1;
- }
+ if (event_iocp_port_associate_(iocp, data->fd, 1) < 0)
+ return -1;
evbuffer_overlapped_set_fd_(bev->input, data->fd);
evbuffer_overlapped_set_fd_(bev->output, data->fd);
- bev_a->ok = data->fd >= 0;
return 0;
}
case BEV_CTRL_CANCEL_ALL: {
struct bufferevent_async *bev_a = upcast(bev);
evutil_socket_t fd = evbuffer_overlapped_get_fd_(bev->input);
- if (fd != (evutil_socket_t)EVUTIL_INVALID_SOCKET &&
+ if (fd != (evutil_socket_t)INVALID_SOCKET &&
(bev_a->bev.options & BEV_OPT_CLOSE_ON_FREE)) {
closesocket(fd);
- evbuffer_overlapped_set_fd_(bev->input, EVUTIL_INVALID_SOCKET);
+ evbuffer_overlapped_set_fd_(bev->input, INVALID_SOCKET);
}
bev_a->ok = 0;
return 0;
diff --git a/bufferevent_filter.c b/bufferevent_filter.c
index a7bdedd..d47f945 100644
--- a/bufferevent_filter.c
+++ b/bufferevent_filter.c
@@ -118,11 +118,11 @@ static inline struct bufferevent_filtered *
upcast(struct bufferevent *bev)
{
struct bufferevent_filtered *bev_f;
- if (!BEV_IS_FILTER(bev))
+ if (bev->be_ops != &bufferevent_ops_filter)
return NULL;
bev_f = (void*)( ((char*)bev) -
evutil_offsetof(struct bufferevent_filtered, bev.bev));
- EVUTIL_ASSERT(BEV_IS_FILTER(&bev_f->bev.bev));
+ EVUTIL_ASSERT(bev_f->bev.bev.be_ops == &bufferevent_ops_filter);
return bev_f;
}
@@ -160,7 +160,7 @@ be_null_filter(struct evbuffer *src, struct evbuffer *dst, ev_ssize_t lim,
enum bufferevent_flush_mode state, void *ctx)
{
(void)state;
- if (evbuffer_remove_buffer(src, dst, lim) >= 0)
+ if (evbuffer_remove_buffer(src, dst, lim) == 0)
return BEV_OK;
else
return BEV_ERROR;
@@ -605,7 +605,6 @@ be_filter_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
data->ptr = bevf->underlying;
return 0;
case BEV_CTRL_SET_FD:
- case BEV_CTRL_GET_FD:
bevf = upcast(bev);
if (bevf->underlying &&
@@ -613,10 +612,9 @@ be_filter_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
bevf->underlying->be_ops->ctrl) {
return (bevf->underlying->be_ops->ctrl)(bevf->underlying, op, data);
}
- EVUTIL_FALLTHROUGH;
+ case BEV_CTRL_GET_FD:
case BEV_CTRL_CANCEL_ALL:
- EVUTIL_FALLTHROUGH;
default:
return -1;
}
diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c
index b51b834..da3963a 100644
--- a/bufferevent_openssl.c
+++ b/bufferevent_openssl.c
@@ -63,6 +63,7 @@
#include "bufferevent-internal.h"
#include "log-internal.h"
+#include <openssl/bio.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "openssl-compat.h"
@@ -154,7 +155,7 @@ bio_bufferevent_read(BIO *b, char *out, int outlen)
return r;
}
-/* Called to write data into the BIO */
+/* Called to write data info the BIO */
static int
bio_bufferevent_write(BIO *b, const char *in, int inlen)
{
@@ -250,7 +251,7 @@ BIO_s_bufferevent(void)
/* Create a new BIO to wrap communication around a bufferevent. If close_flag
* is true, the bufferevent will be freed when the BIO is closed. */
static BIO *
-BIO_new_bufferevent(struct bufferevent *bufferevent)
+BIO_new_bufferevent(struct bufferevent *bufferevent, int close_flag)
{
BIO *result;
if (!bufferevent)
@@ -259,9 +260,7 @@ BIO_new_bufferevent(struct bufferevent *bufferevent)
return NULL;
BIO_set_init(result, 1);
BIO_set_data(result, bufferevent);
- /* We don't tell the BIO to close the bufferevent; we do it ourselves on
- * be_openssl_destruct() */
- BIO_set_shutdown(result, 0);
+ BIO_set_shutdown(result, close_flag ? 1 : 0);
return result;
}
@@ -355,11 +354,11 @@ static inline struct bufferevent_openssl *
upcast(struct bufferevent *bev)
{
struct bufferevent_openssl *bev_o;
- if (!BEV_IS_OPENSSL(bev))
+ if (bev->be_ops != &bufferevent_ops_openssl)
return NULL;
bev_o = (void*)( ((char*)bev) -
evutil_offsetof(struct bufferevent_openssl, bev.bev));
- EVUTIL_ASSERT(BEV_IS_OPENSSL(&bev_o->bev.bev));
+ EVUTIL_ASSERT(bev_o->bev.bev.be_ops == &bufferevent_ops_openssl);
return bev_o;
}
@@ -511,15 +510,12 @@ conn_closed(struct bufferevent_openssl *bev_ssl, int when, int errcode, int ret)
/* IO error; possibly a dirty shutdown. */
if ((ret == 0 || ret == -1) && ERR_peek_error() == 0)
dirty_shutdown = 1;
- put_error(bev_ssl, errcode);
break;
case SSL_ERROR_SSL:
/* Protocol error. */
- put_error(bev_ssl, errcode);
break;
case SSL_ERROR_WANT_X509_LOOKUP:
/* XXXX handle this. */
- put_error(bev_ssl, errcode);
break;
case SSL_ERROR_NONE:
case SSL_ERROR_WANT_READ:
@@ -807,7 +803,7 @@ consider_reading(struct bufferevent_openssl *bev_ssl)
if (bev_ssl->bev.read_suspended)
break;
-
+
/* Read all pending data. This won't hit the network
* again, and will (most importantly) put us in a state
* where we don't need to read anything else until the
@@ -967,8 +963,8 @@ be_openssl_writeeventcb(evutil_socket_t fd, short what, void *ptr)
bufferevent_decref_and_unlock_(&bev_ssl->bev.bev);
}
-static evutil_socket_t
-be_openssl_auto_fd(struct bufferevent_openssl *bev_ssl, evutil_socket_t fd)
+static int
+be_openssl_auto_fd(struct bufferevent_openssl *bev_ssl, int fd)
{
if (!bev_ssl->underlying) {
struct bufferevent *bev = &bev_ssl->bev.bev;
@@ -1034,7 +1030,7 @@ do_handshake(struct bufferevent_openssl *bev_ssl)
decrement_buckets(bev_ssl);
if (r==1) {
- evutil_socket_t fd = event_get_fd(&bev_ssl->bev.bev.ev_read);
+ int fd = event_get_fd(&bev_ssl->bev.bev.ev_read);
/* We're done! */
bev_ssl->state = BUFFEREVENT_SSL_OPEN;
set_open_callbacks(bev_ssl, fd); /* XXXX handle failure */
@@ -1232,7 +1228,7 @@ be_openssl_destruct(struct bufferevent *bev)
if (bev_ssl->bev.options & BEV_OPT_CLOSE_ON_FREE) {
if (! bev_ssl->underlying) {
- evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
+ evutil_socket_t fd = -1;
BIO *bio = SSL_get_wbio(bev_ssl->ssl);
if (bio)
fd = BIO_get_fd(bio, NULL);
@@ -1265,21 +1261,17 @@ be_openssl_flush(struct bufferevent *bufev,
static int
be_openssl_set_fd(struct bufferevent_openssl *bev_ssl,
- enum bufferevent_ssl_state state, evutil_socket_t fd)
+ enum bufferevent_ssl_state state, int fd)
{
bev_ssl->state = state;
switch (state) {
case BUFFEREVENT_SSL_ACCEPTING:
- if (!SSL_clear(bev_ssl->ssl))
- return -1;
SSL_set_accept_state(bev_ssl->ssl);
if (set_handshake_callbacks(bev_ssl, fd) < 0)
return -1;
break;
case BUFFEREVENT_SSL_CONNECTING:
- if (!SSL_clear(bev_ssl->ssl))
- return -1;
SSL_set_connect_state(bev_ssl->ssl);
if (set_handshake_callbacks(bev_ssl, fd) < 0)
return -1;
@@ -1304,11 +1296,11 @@ be_openssl_ctrl(struct bufferevent *bev,
case BEV_CTRL_SET_FD:
if (!bev_ssl->underlying) {
BIO *bio;
- bio = BIO_new_socket((int)data->fd, 0);
+ bio = BIO_new_socket(data->fd, 0);
SSL_set_bio(bev_ssl->ssl, bio, bio);
} else {
BIO *bio;
- if (!(bio = BIO_new_bufferevent(bev_ssl->underlying)))
+ if (!(bio = BIO_new_bufferevent(bev_ssl->underlying, 0)))
return -1;
SSL_set_bio(bev_ssl->ssl, bio, bio);
}
@@ -1351,9 +1343,8 @@ bufferevent_openssl_new_impl(struct event_base *base,
struct bufferevent_private *bev_p = NULL;
int tmp_options = options & ~BEV_OPT_THREADSAFE;
- /* Only one can be set. */
if (underlying != NULL && fd >= 0)
- goto err;
+ return NULL; /* Only one can be set. */
if (!(bev_ssl = mm_calloc(1, sizeof(struct bufferevent_openssl))))
goto err;
@@ -1401,12 +1392,8 @@ bufferevent_openssl_new_impl(struct event_base *base,
return &bev_ssl->bev.bev;
err:
- if (options & BEV_OPT_CLOSE_ON_FREE)
- SSL_free(ssl);
- if (bev_ssl) {
- bev_ssl->ssl = NULL;
+ if (bev_ssl)
bufferevent_free(&bev_ssl->bev.bev);
- }
return NULL;
}
@@ -1417,24 +1404,19 @@ bufferevent_openssl_filter_new(struct event_base *base,
enum bufferevent_ssl_state state,
int options)
{
+ /* We don't tell the BIO to close the bufferevent; we do it ourselves
+ * on be_openssl_destruct */
+ int close_flag = 0; /* options & BEV_OPT_CLOSE_ON_FREE; */
BIO *bio;
- struct bufferevent *bev;
-
if (!underlying)
- goto err;
- if (!(bio = BIO_new_bufferevent(underlying)))
- goto err;
+ return NULL;
+ if (!(bio = BIO_new_bufferevent(underlying, close_flag)))
+ return NULL;
SSL_set_bio(ssl, bio, bio);
- bev = bufferevent_openssl_new_impl(
+ return bufferevent_openssl_new_impl(
base, underlying, -1, ssl, state, options);
- return bev;
-
-err:
- if (options & BEV_OPT_CLOSE_ON_FREE)
- SSL_free(ssl);
- return NULL;
}
struct bufferevent *
@@ -1461,14 +1443,14 @@ bufferevent_openssl_socket_new(struct event_base *base,
} else {
/* We specified an fd different from that of the SSL.
This is probably an error on our part. Fail. */
- goto err;
+ return NULL;
}
- BIO_set_close(bio, 0);
+ (void) BIO_set_close(bio, 0);
} else {
/* The SSL isn't configured with a BIO with an fd. */
if (fd >= 0) {
/* ... and we have an fd we want to use. */
- bio = BIO_new_socket((int)fd, 0);
+ bio = BIO_new_socket(fd, 0);
SSL_set_bio(ssl, bio, bio);
} else {
/* Leave the fd unset. */
@@ -1477,11 +1459,6 @@ bufferevent_openssl_socket_new(struct event_base *base,
return bufferevent_openssl_new_impl(
base, NULL, fd, ssl, state, options);
-
-err:
- if (options & BEV_OPT_CLOSE_ON_FREE)
- SSL_free(ssl);
- return NULL;
}
int
diff --git a/bufferevent_pair.c b/bufferevent_pair.c
index f88cd75..1e93f57 100644
--- a/bufferevent_pair.c
+++ b/bufferevent_pair.c
@@ -56,10 +56,10 @@ static inline struct bufferevent_pair *
upcast(struct bufferevent *bev)
{
struct bufferevent_pair *bev_p;
- if (!BEV_IS_PAIR(bev))
+ if (bev->be_ops != &bufferevent_ops_pair)
return NULL;
bev_p = EVUTIL_UPCAST(bev, struct bufferevent_pair, bev.bev);
- EVUTIL_ASSERT(BEV_IS_PAIR(&bev_p->bev.bev));
+ EVUTIL_ASSERT(bev_p->bev.bev.be_ops == &bufferevent_ops_pair);
return bev_p;
}
diff --git a/bufferevent_ratelim.c b/bufferevent_ratelim.c
index 2587496..bde1920 100644
--- a/bufferevent_ratelim.c
+++ b/bufferevent_ratelim.c
@@ -560,7 +560,8 @@ int
bufferevent_set_rate_limit(struct bufferevent *bev,
struct ev_token_bucket_cfg *cfg)
{
- struct bufferevent_private *bevp = BEV_UPCAST(bev);
+ struct bufferevent_private *bevp =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
int r = -1;
struct bufferevent_rate_limit *rlim;
struct timeval now;
@@ -736,7 +737,8 @@ bufferevent_add_to_rate_limit_group(struct bufferevent *bev,
struct bufferevent_rate_limit_group *g)
{
int wsuspend, rsuspend;
- struct bufferevent_private *bevp = BEV_UPCAST(bev);
+ struct bufferevent_private *bevp =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
BEV_LOCK(bev);
if (!bevp->rate_limiting) {
@@ -787,7 +789,8 @@ int
bufferevent_remove_from_rate_limit_group_internal_(struct bufferevent *bev,
int unsuspend)
{
- struct bufferevent_private *bevp = BEV_UPCAST(bev);
+ struct bufferevent_private *bevp =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
BEV_LOCK(bev);
if (bevp->rate_limiting && bevp->rate_limiting->group) {
struct bufferevent_rate_limit_group *g =
diff --git a/bufferevent_sock.c b/bufferevent_sock.c
index f275b02..93aedb3 100644
--- a/bufferevent_sock.c
+++ b/bufferevent_sock.c
@@ -99,28 +99,24 @@ const struct bufferevent_ops bufferevent_ops_socket = {
const struct sockaddr*
bufferevent_socket_get_conn_address_(struct bufferevent *bev)
{
- struct bufferevent_private *bev_p = BEV_UPCAST(bev);
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+
return (struct sockaddr *)&bev_p->conn_address;
}
-
-void
-bufferevent_socket_set_conn_address_fd_(struct bufferevent *bev,
- evutil_socket_t fd)
+static void
+bufferevent_socket_set_conn_address_fd(struct bufferevent_private *bev_p, int fd)
{
- struct bufferevent_private *bev_p = BEV_UPCAST(bev);
-
socklen_t len = sizeof(bev_p->conn_address);
struct sockaddr *addr = (struct sockaddr *)&bev_p->conn_address;
if (addr->sa_family != AF_UNSPEC)
getpeername(fd, addr, &len);
}
-
-void
-bufferevent_socket_set_conn_address_(struct bufferevent *bev,
+static void
+bufferevent_socket_set_conn_address(struct bufferevent_private *bev_p,
struct sockaddr *addr, size_t addrlen)
{
- struct bufferevent_private *bev_p = BEV_UPCAST(bev);
EVUTIL_ASSERT(addrlen <= sizeof(bev_p->conn_address));
memcpy(&bev_p->conn_address, addr, addrlen);
}
@@ -131,7 +127,8 @@ bufferevent_socket_outbuf_cb(struct evbuffer *buf,
void *arg)
{
struct bufferevent *bufev = arg;
- struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
if (cbinfo->n_added &&
(bufev->enabled & EV_WRITE) &&
@@ -149,7 +146,8 @@ static void
bufferevent_readcb(evutil_socket_t fd, short event, void *arg)
{
struct bufferevent *bufev = arg;
- struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
struct evbuffer *input;
int res = 0;
short what = BEV_EVENT_READING;
@@ -230,7 +228,8 @@ static void
bufferevent_writecb(evutil_socket_t fd, short event, void *arg)
{
struct bufferevent *bufev = arg;
- struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
int res = 0;
short what = BEV_EVENT_WRITING;
int connected = 0;
@@ -265,7 +264,7 @@ bufferevent_writecb(evutil_socket_t fd, short event, void *arg)
goto done;
} else {
connected = 1;
- bufferevent_socket_set_conn_address_fd_(bufev, fd);
+ bufferevent_socket_set_conn_address_fd(bufev_p, fd);
#ifdef _WIN32
if (BEV_IS_ASYNC(bufev)) {
event_del(&bufev->ev_write);
@@ -380,7 +379,8 @@ int
bufferevent_socket_connect(struct bufferevent *bev,
const struct sockaddr *sa, int socklen)
{
- struct bufferevent_private *bufev_p = BEV_UPCAST(bev);
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
evutil_socket_t fd;
int r = 0;
@@ -389,6 +389,9 @@ bufferevent_socket_connect(struct bufferevent *bev,
bufferevent_incref_and_lock_(bev);
+ if (!bufev_p)
+ goto done;
+
fd = bufferevent_getfd(bev);
if (fd < 0) {
if (!sa)
@@ -396,7 +399,7 @@ bufferevent_socket_connect(struct bufferevent *bev,
fd = evutil_socket_(sa->sa_family,
SOCK_STREAM|EVUTIL_SOCK_NONBLOCK, 0);
if (fd < 0)
- goto freesock;
+ goto done;
ownfd = 1;
}
if (sa) {
@@ -446,8 +449,10 @@ bufferevent_socket_connect(struct bufferevent *bev,
goto done;
freesock:
+ bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
if (ownfd)
evutil_closesocket(fd);
+ /* do something about the error? */
done:
bufferevent_decref_and_unlock_(bev);
return result;
@@ -458,7 +463,8 @@ bufferevent_connect_getaddrinfo_cb(int result, struct evutil_addrinfo *ai,
void *arg)
{
struct bufferevent *bev = arg;
- struct bufferevent_private *bev_p = BEV_UPCAST(bev);
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
int r;
BEV_LOCK(bev);
@@ -482,10 +488,10 @@ bufferevent_connect_getaddrinfo_cb(int result, struct evutil_addrinfo *ai,
}
/* XXX use the other addrinfos? */
- bufferevent_socket_set_conn_address_(bev, ai->ai_addr, (int)ai->ai_addrlen);
+ /* XXX use this return value */
+ bufferevent_socket_set_conn_address(bev_p, ai->ai_addr, (int)ai->ai_addrlen);
r = bufferevent_socket_connect(bev, ai->ai_addr, (int)ai->ai_addrlen);
- if (r < 0)
- bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
+ (void)r;
bufferevent_decref_and_unlock_(bev);
evutil_freeaddrinfo(ai);
}
@@ -496,7 +502,8 @@ bufferevent_socket_connect_hostname(struct bufferevent *bev,
{
char portbuf[10];
struct evutil_addrinfo hint;
- struct bufferevent_private *bev_p = BEV_UPCAST(bev);
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
if (family != AF_INET && family != AF_INET6 && family != AF_UNSPEC)
return -1;
@@ -528,7 +535,8 @@ int
bufferevent_socket_get_dns_error(struct bufferevent *bev)
{
int rv;
- struct bufferevent_private *bev_p = BEV_UPCAST(bev);
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
BEV_LOCK(bev);
rv = bev_p->dns_error;
@@ -579,7 +587,8 @@ be_socket_enable(struct bufferevent *bufev, short event)
static int
be_socket_disable(struct bufferevent *bufev, short event)
{
- struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
if (event & EV_READ) {
if (event_del(&bufev->ev_read) == -1)
return -1;
@@ -595,9 +604,10 @@ be_socket_disable(struct bufferevent *bufev, short event)
static void
be_socket_destruct(struct bufferevent *bufev)
{
- struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
evutil_socket_t fd;
- EVUTIL_ASSERT(BEV_IS_SOCKET(bufev));
+ EVUTIL_ASSERT(bufev->be_ops == &bufferevent_ops_socket);
fd = event_get_fd(&bufev->ev_read);
@@ -618,10 +628,11 @@ be_socket_flush(struct bufferevent *bev, short iotype,
static void
be_socket_setfd(struct bufferevent *bufev, evutil_socket_t fd)
{
- struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
BEV_LOCK(bufev);
- EVUTIL_ASSERT(BEV_IS_SOCKET(bufev));
+ EVUTIL_ASSERT(bufev->be_ops == &bufferevent_ops_socket);
event_del(&bufev->ev_read);
event_del(&bufev->ev_write);
@@ -647,10 +658,11 @@ int
bufferevent_priority_set(struct bufferevent *bufev, int priority)
{
int r = -1;
- struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
BEV_LOCK(bufev);
- if (!BEV_IS_SOCKET(bufev))
+ if (bufev->be_ops != &bufferevent_ops_socket)
goto done;
if (event_priority_set(&bufev->ev_read, priority) == -1)
@@ -673,7 +685,7 @@ bufferevent_base_set(struct event_base *base, struct bufferevent *bufev)
int res = -1;
BEV_LOCK(bufev);
- if (!BEV_IS_SOCKET(bufev))
+ if (bufev->be_ops != &bufferevent_ops_socket)
goto done;
bufev->ev_base = base;
diff --git a/cmake/AddCompilerFlags.cmake b/cmake/AddCompilerFlags.cmake
deleted file mode 100644
index 9dc21d0..0000000
--- a/cmake/AddCompilerFlags.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-include(CheckCCompilerFlag)
-
-macro(add_compiler_flags)
- foreach(flag ${ARGN})
- string(REGEX REPLACE "[-.+/:= ]" "_" _flag_esc "${flag}")
-
- check_c_compiler_flag("${flag}" check_c_compiler_flag_${_flag_esc})
-
- if (check_c_compiler_flag_${_flag_esc})
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
- endif()
- endforeach()
-endmacro()
diff --git a/cmake/AddEventLibrary.cmake b/cmake/AddEventLibrary.cmake
deleted file mode 100644
index 352c86b..0000000
--- a/cmake/AddEventLibrary.cmake
+++ /dev/null
@@ -1,163 +0,0 @@
-include(CMakeParseArguments)
-
-set(LIBEVENT_SHARED_LIBRARIES "")
-set(LIBEVENT_STATIC_LIBRARIES "")
-
-macro(set_event_shared_lib_flags LIB_NAME)
- set_target_properties("${LIB_NAME}_shared" PROPERTIES
- COMPILE_FLAGS ${ARGN})
- set_target_properties("${LIB_NAME}_shared" PROPERTIES
- LINK_FLAGS ${ARGN})
-endmacro()
-
-macro(generate_pkgconfig LIB_NAME)
- set(prefix ${CMAKE_INSTALL_PREFIX})
- set(exec_prefix ${CMAKE_INSTALL_PREFIX})
- set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
- set(includedir ${CMAKE_INSTALL_PREFIX}/include)
-
- set(VERSION ${EVENT_ABI_LIBVERSION})
-
- set(LIBS "")
- foreach (LIB ${LIB_PLATFORM})
- set(LIBS "${LIBS} -L${LIB}")
- endforeach()
-
- set(OPENSSL_LIBS "")
- foreach(LIB ${OPENSSL_LIBRARIES})
- set(OPENSSL_LIBS "${OPENSSL_LIBS} -L${LIB}")
- endforeach()
-
- configure_file("lib${LIB_NAME}.pc.in" "lib${LIB_NAME}.pc" @ONLY)
- install(
- FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${LIB_NAME}.pc"
- DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig"
- )
-endmacro()
-
-
-# Global variables that it uses:
-# - EVENT_ABI_LIBVERSION
-# - EVENT_ABI_LIBVERSION_CURRENT
-# - EVENT_ABI_LIBVERSION_REVISION
-# - EVENT_ABI_LIBVERSION_AGE
-# - EVENT_PACKAGE_RELEASE
-# - CMAKE_THREAD_LIBS_INIT LIB_PLATFORM
-# - OPENSSL_LIBRARIES
-# - HDR_PUBLIC
-# - EVENT_INSTALL_INCLUDE_DIR
-# - EVENT_SHARED_FLAGS
-# - EVENT_LIBRARY_STATIC
-# - EVENT_LIBRARY_SHARED
-#
-# Exported variables:
-# - LIBEVENT_SHARED_LIBRARIES
-# - LIBEVENT_STATIC_LIBRARIES
-macro(add_event_library LIB_NAME)
- cmake_parse_arguments(LIB
- "" # Options
- "VERSION" # One val
- "SOURCES;LIBRARIES" # Multi val
- ${ARGN}
- )
-
- set(ADD_EVENT_LIBRARY_TARGETS)
- set(ADD_EVENT_LIBRARY_INTERFACE)
-
- if (${EVENT_LIBRARY_STATIC})
- add_library("${LIB_NAME}_static" STATIC ${LIB_SOURCES})
- set_target_properties("${LIB_NAME}_static" PROPERTIES
- OUTPUT_NAME "${LIB_NAME}"
- CLEAN_DIRECT_OUTPUT 1)
- set_target_properties(
- "${LIB_NAME}_static" PROPERTIES
- PUBLIC_HEADER "${HDR_PUBLIC}")
-
- list(APPEND LIBEVENT_STATIC_LIBRARIES "${LIB_NAME}_static")
- list(APPEND ADD_EVENT_LIBRARY_TARGETS "${LIB_NAME}_static")
-
- set(ADD_EVENT_LIBRARY_INTERFACE "${LIB_NAME}_static")
- endif()
-
- if (${EVENT_LIBRARY_SHARED})
- add_library("${LIB_NAME}_shared" SHARED ${LIB_SOURCES})
-
- target_link_libraries("${LIB_NAME}_shared"
- ${CMAKE_THREAD_LIBS_INIT}
- ${LIB_PLATFORM}
- ${LIB_LIBRARIES})
-
- if (EVENT_SHARED_FLAGS)
- set_event_shared_lib_flags("${LIB_NAME}" "${EVENT_SHARED_FLAGS}")
- endif()
-
- if (WIN32)
- set_target_properties(
- "${LIB_NAME}_shared" PROPERTIES
- OUTPUT_NAME "${LIB_NAME}"
- SOVERSION ${EVENT_ABI_LIBVERSION})
- elseif (APPLE)
- math(EXPR COMPATIBILITY_VERSION "${EVENT_ABI_LIBVERSION_CURRENT}+1")
- math(EXPR CURRENT_MINUS_AGE "${EVENT_ABI_LIBVERSION_CURRENT}-${EVENT_ABI_LIBVERSION_AGE}")
- set_target_properties(
- "${LIB_NAME}_shared" PROPERTIES
- OUTPUT_NAME "${LIB_NAME}-${EVENT_PACKAGE_RELEASE}.${CURRENT_MINUS_AGE}"
- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
- LINK_FLAGS "-compatibility_version ${COMPATIBILITY_VERSION} -current_version ${COMPATIBILITY_VERSION}.${EVENT_ABI_LIBVERSION_REVISION}")
- else()
- math(EXPR CURRENT_MINUS_AGE "${EVENT_ABI_LIBVERSION_CURRENT}-${EVENT_ABI_LIBVERSION_AGE}")
- set_target_properties(
- "${LIB_NAME}_shared" PROPERTIES
- OUTPUT_NAME "${LIB_NAME}-${EVENT_PACKAGE_RELEASE}"
- VERSION "${CURRENT_MINUS_AGE}.${EVENT_ABI_LIBVERSION_AGE}.${EVENT_ABI_LIBVERSION_REVISION}"
- SOVERSION "${CURRENT_MINUS_AGE}")
- endif()
-
- set_target_properties(
- "${LIB_NAME}_shared" PROPERTIES
- PUBLIC_HEADER "${HDR_PUBLIC}"
- CLEAN_DIRECT_OUTPUT 1)
-
- if (NOT WIN32)
- set(LIB_LINK_NAME
- "${CMAKE_SHARED_LIBRARY_PREFIX}${LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-
- add_custom_command(TARGET ${LIB_NAME}_shared
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E create_symlink
- "$<TARGET_FILE_NAME:${LIB_NAME}_shared>"
- "${LIB_LINK_NAME}"
- WORKING_DIRECTORY "lib")
- endif()
-
- list(APPEND LIBEVENT_SHARED_LIBRARIES "${LIB_NAME}_shared")
- list(APPEND ADD_EVENT_LIBRARY_TARGETS "${LIB_NAME}_shared")
-
- set(ADD_EVENT_LIBRARY_INTERFACE "${LIB_NAME}_shared")
- endif()
-
- export(TARGETS ${ADD_EVENT_LIBRARY_TARGETS}
- FILE "${PROJECT_BINARY_DIR}/LibeventTargets.cmake"
- APPEND
- )
-
- install(TARGETS ${ADD_EVENT_LIBRARY_TARGETS}
- EXPORT LibeventTargets
- LIBRARY DESTINATION "lib" COMPONENT lib
- ARCHIVE DESTINATION "lib" COMPONENT lib
- RUNTIME DESTINATION "lib" COMPONENT lib
- PUBLIC_HEADER DESTINATION "include/event2"
- COMPONENT dev
- )
- if (NOT WIN32 AND ${EVENT_LIBRARY_SHARED})
- install(FILES
- "$<TARGET_FILE_DIR:${LIB_NAME}_shared>/${LIB_LINK_NAME}"
- DESTINATION "lib"
- COMPONENT lib)
- endif()
-
- add_library(${LIB_NAME} INTERFACE)
- target_link_libraries(${LIB_NAME} INTERFACE ${ADD_EVENT_LIBRARY_INTERFACE})
-
- generate_pkgconfig("${LIB_NAME}")
-endmacro()
diff --git a/cmake/COPYING-CMAKE-SCRIPTS b/cmake/COPYING-CMAKE-SCRIPTS
deleted file mode 100644
index ab3c4d2..0000000
--- a/cmake/COPYING-CMAKE-SCRIPTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/cmake/CheckConstExists.cmake b/cmake/CheckConstExists.cmake
deleted file mode 100644
index de07458..0000000
--- a/cmake/CheckConstExists.cmake
+++ /dev/null
@@ -1,25 +0,0 @@
-include(CheckCSourceCompiles)
-
-macro(check_const_exists CONST FILES VARIABLE)
- if (NOT DEFINED ${VARIABLE})
- set(check_const_exists_source "")
- foreach(file ${FILES})
- set(check_const_exists_source
- "${check_const_exists_source}
- #include <${file}>")
- endforeach()
- set(check_const_exists_source
- "${check_const_exists_source}
- int main() { (void)${CONST}; return 0; }")
-
- check_c_source_compiles("${check_const_exists_source}" ${VARIABLE})
-
- if (${${VARIABLE}})
- set(${VARIABLE} 1 CACHE INTERNAL "Have const ${CONST}")
- message(STATUS "Looking for ${CONST} - found")
- else()
- set(${VARIABLE} 0 CACHE INTERNAL "Have const ${CONST}")
- message(STATUS "Looking for ${CONST} - not found")
- endif()
- endif()
-endmacro(check_const_exists)
diff --git a/cmake/CheckFileOffsetBits.c b/cmake/CheckFileOffsetBits.c
deleted file mode 100644
index d948fec..0000000
--- a/cmake/CheckFileOffsetBits.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <sys/types.h>
-
-#define KB ((off_t)1024)
-#define MB ((off_t)1024 * KB)
-#define GB ((off_t)1024 * MB)
-#define TB ((off_t)1024 * GB)
-int t2[(((64 * GB -1) % 671088649) == 268434537)
- && (((TB - (64 * GB -1) + 255) % 1792151290) == 305159546)? 1: -1];
-
-int main()
-{
- ;
- return 0;
-}
diff --git a/cmake/CheckFileOffsetBits.cmake b/cmake/CheckFileOffsetBits.cmake
deleted file mode 100644
index 1253440..0000000
--- a/cmake/CheckFileOffsetBits.cmake
+++ /dev/null
@@ -1,43 +0,0 @@
-# - Check if _FILE_OFFSET_BITS macro needed for large files
-# CHECK_FILE_OFFSET_BITS ()
-#
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# Copyright (c) 2009, Michihiro NAKAJIMA
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-#INCLUDE(CheckCSourceCompiles)
-
-GET_FILENAME_COMPONENT(_selfdir_CheckFileOffsetBits
- "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-MACRO (CHECK_FILE_OFFSET_BITS)
- IF(NOT DEFINED _FILE_OFFSET_BITS)
- MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files")
- TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64
- ${CMAKE_CURRENT_BINARY_DIR}
- ${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
- IF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
- TRY_COMPILE(__WITH_FILE_OFFSET_BITS_64
- ${CMAKE_CURRENT_BINARY_DIR}
- ${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_FILE_OFFSET_BITS=64)
- ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
-
- IF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
- SET(_FILE_OFFSET_BITS 64 CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
- MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - needed")
- ELSE(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
- SET(_FILE_OFFSET_BITS "" CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
- MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - not needed")
- ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
- ENDIF(NOT DEFINED _FILE_OFFSET_BITS)
-
-ENDMACRO (CHECK_FILE_OFFSET_BITS)
diff --git a/cmake/CheckFunctionExistsEx.c b/cmake/CheckFunctionExistsEx.c
deleted file mode 100644
index 224e340..0000000
--- a/cmake/CheckFunctionExistsEx.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifdef CHECK_FUNCTION_EXISTS
-
-#ifdef __cplusplus
-extern "C"
-#endif
- char
- CHECK_FUNCTION_EXISTS(void);
-#ifdef __CLASSIC_C__
-int main()
-{
- int ac;
- char* av[];
-#else
-int main(int ac, char* av[])
-{
-#endif
- CHECK_FUNCTION_EXISTS();
- if (ac > 1000) {
- return *av[0];
- }
- return 0;
-}
-
-#else /* CHECK_FUNCTION_EXISTS */
-
-#error "CHECK_FUNCTION_EXISTS has to specify the function"
-
-#endif /* CHECK_FUNCTION_EXISTS */
diff --git a/cmake/CheckFunctionExistsEx.cmake b/cmake/CheckFunctionExistsEx.cmake
deleted file mode 100644
index 78bc2ec..0000000
--- a/cmake/CheckFunctionExistsEx.cmake
+++ /dev/null
@@ -1,69 +0,0 @@
-# - Check if a C function can be linked
-# CHECK_FUNCTION_EXISTS(<function> <variable>)
-#
-# Check that the <function> is provided by libraries on the system and
-# store the result in a <variable>. This does not verify that any
-# system header file declares the function, only that it can be found
-# at link time (considure using CheckSymbolExists).
-#
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
-
-#=============================================================================
-# Copyright 2002-2011 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-MACRO(CHECK_FUNCTION_EXISTS_EX FUNCTION VARIABLE)
- IF(${VARIABLE} MATCHES "^${VARIABLE}$")
- SET(MACRO_CHECK_FUNCTION_DEFINITIONS
- "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
- MESSAGE(STATUS "Looking for ${FUNCTION}")
- IF(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- ELSE(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_FUNCTION_EXISTS_ADD_INCLUDES
- "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_FUNCTION_EXISTS_ADD_INCLUDES)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- TRY_COMPILE(${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${PROJECT_SOURCE_DIR}/cmake/CheckFunctionExistsEx.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
- "${CHECK_FUNCTION_EXISTS_ADD_INCLUDES}"
- OUTPUT_VARIABLE OUTPUT)
- IF(${VARIABLE})
- SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
- MESSAGE(STATUS "Looking for ${FUNCTION} - found")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the function ${FUNCTION} exists passed with the following output:\n"
- "${OUTPUT}\n\n")
- ELSE(${VARIABLE})
- MESSAGE(STATUS "Looking for ${FUNCTION} - not found")
- SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the function ${FUNCTION} exists failed with the following output:\n"
- "${OUTPUT}\n\n")
- ENDIF(${VARIABLE})
- ENDIF()
-ENDMACRO(CHECK_FUNCTION_EXISTS_EX)
diff --git a/cmake/CheckFunctionKeywords.cmake b/cmake/CheckFunctionKeywords.cmake
deleted file mode 100644
index 3d968b8..0000000
--- a/cmake/CheckFunctionKeywords.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-include(CheckCSourceCompiles)
-
-macro(check_function_keywords _wordlist)
- set(${_result} "")
- foreach(flag ${_wordlist})
- string(REGEX REPLACE "[-+/ ()]" "_" flagname "${flag}")
- string(TOUPPER "${flagname}" flagname)
- set(have_flag "HAVE_${flagname}")
- check_c_source_compiles("${flag} void func(); void func() { } int main() { func(); return 0; }" ${have_flag})
- if(${have_flag} AND NOT ${_result})
- set(${_result} "${flag}")
- endif(${have_flag} AND NOT ${_result})
- endforeach(flag)
-endmacro(check_function_keywords)
diff --git a/cmake/CheckPrototypeDefinition.c.in b/cmake/CheckPrototypeDefinition.c.in
deleted file mode 100644
index a97344a..0000000
--- a/cmake/CheckPrototypeDefinition.c.in
+++ /dev/null
@@ -1,29 +0,0 @@
-@CHECK_PROTOTYPE_DEFINITION_HEADER@
-
-static void cmakeRequireSymbol(int dummy, ...) {
- (void) dummy;
-}
-
-static void checkSymbol(void) {
-#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@
- cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@);
-#endif
-}
-
-@CHECK_PROTOTYPE_DEFINITION_PROTO@ {
- return @CHECK_PROTOTYPE_DEFINITION_RETURN@;
-}
-
-#ifdef __CLASSIC_C__
-int main() {
- int ac;
- char*av[];
-#else
-int main(int ac, char *av[]) {
-#endif
- checkSymbol();
- if (ac > 1000) {
- return *av[0];
- }
- return 0;
-}
diff --git a/cmake/CheckPrototypeDefinition.cmake b/cmake/CheckPrototypeDefinition.cmake
deleted file mode 100644
index 940d1ff..0000000
--- a/cmake/CheckPrototypeDefinition.cmake
+++ /dev/null
@@ -1,82 +0,0 @@
-# - Check if the protoype we expect is correct.
-# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)
-#
-# FUNCTION - The name of the function (used to check if prototype exists)
-# PROTOTYPE- The prototype to check.
-# RETURN - The return value of the function.
-# HEADER - The header files required.
-# VARIABLE - The variable to store the result.
-#
-# Example:
-#
-# check_prototype_definition(getpwent_r
-# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
-# "NULL"
-# "unistd.h;pwd.h"
-# SOLARIS_GETPWENT_R)
-#
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
-
-
-function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
- if (${_VARIABLE} MATCHES "^${_VARIABLE}$")
- set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
-
- set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
- if (CMAKE_REQUIRED_LIBRARIES)
- set(CHECK_PROTOTYPE_DEFINITION_LIBS
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- else(CMAKE_REQUIRED_LIBRARIES)
- set(CHECK_PROTOTYPE_DEFINITION_LIBS)
- endif(CMAKE_REQUIRED_LIBRARIES)
- if (CMAKE_REQUIRED_INCLUDES)
- set(CMAKE_SYMBOL_EXISTS_INCLUDES
- "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- else(CMAKE_REQUIRED_INCLUDES)
- set(CMAKE_SYMBOL_EXISTS_INCLUDES)
- endif(CMAKE_REQUIRED_INCLUDES)
-
- foreach(_FILE ${_HEADER})
- set(CHECK_PROTOTYPE_DEFINITION_HEADER
- "${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
- endforeach(_FILE)
-
- set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
- set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
- set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
-
- configure_file("${PROJECT_SOURCE_DIR}/cmake/CheckPrototypeDefinition.c.in"
- "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
-
- file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)
-
- try_compile(${_VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
- "${CHECK_PROTOTYPE_DEFINITION_LIBS}"
- "${CMAKE_SYMBOL_EXISTS_INCLUDES}"
- OUTPUT_VARIABLE OUTPUT)
-
- if (${_VARIABLE})
- set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
- message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
- "${OUTPUT}\n\n")
- else (${_VARIABLE})
- message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
- set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
- "${OUTPUT}\n\n${_SOURCE}\n\n")
- endif (${_VARIABLE})
- endif()
-endfunction(CHECK_PROTOTYPE_DEFINITION)
diff --git a/cmake/CheckWorkingKqueue.cmake b/cmake/CheckWorkingKqueue.cmake
deleted file mode 100644
index f22f011..0000000
--- a/cmake/CheckWorkingKqueue.cmake
+++ /dev/null
@@ -1,52 +0,0 @@
-include(CheckCSourceRuns)
-
-check_c_source_runs(
-"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/event.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-int
-main(int argc, char **argv)
-{
- int kq;
- int n;
- int fd[2];
- struct kevent ev;
- struct timespec ts;
- char buf[80000];
-
- if (pipe(fd) == -1)
- exit(1);
- if (fcntl(fd[1], F_SETFL, O_NONBLOCK) == -1)
- exit(1);
-
- while ((n = write(fd[1], buf, sizeof(buf))) == sizeof(buf))
- ;
-
- if ((kq = kqueue()) == -1)
- exit(1);
-
- memset(&ev, 0, sizeof(ev));
- ev.ident = fd[1];
- ev.filter = EVFILT_WRITE;
- ev.flags = EV_ADD | EV_ENABLE;
- n = kevent(kq, &ev, 1, NULL, 0, NULL);
- if (n == -1)
- exit(1);
-
- read(fd[0], buf, sizeof(buf));
-
- ts.tv_sec = 0;
- ts.tv_nsec = 0;
- n = kevent(kq, NULL, 0, &ev, 1, &ts);
- if (n == -1 || n == 0)
- exit(1);
-
- exit(0);
-}
-
-" EVENT__HAVE_WORKING_KQUEUE)
diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake
deleted file mode 100644
index eba85b3..0000000
--- a/cmake/CodeCoverage.cmake
+++ /dev/null
@@ -1,165 +0,0 @@
-#
-# Boost Software License - Version 1.0 - August 17th, 2003
-#
-# Permission is hereby granted, free of charge, to any person or organization
-# obtaining a copy of the software and accompanying documentation covered by
-# this license (the "Software") to use, reproduce, display, distribute,
-# execute, and transmit the Software, and to prepare derivative works of the
-# Software, and to permit third-parties to whom the Software is furnished to
-# do so, all subject to the following:
-#
-# The copyright notices in the Software and this entire statement, including
-# the above license grant, this restriction and the following disclaimer,
-# must be included in all copies of the Software, in whole or in part, and
-# all derivative works of the Software, unless such copies or derivative
-# works are solely in the form of machine-executable object code generated by
-# a source language processor.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-# SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-# FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-#
-# 2012-01-31, Lars Bilke
-# - Enable Code Coverage
-#
-# 2013-09-17, Joakim Söderberg
-# - Added support for Clang.
-# - Some additional usage instructions.
-#
-# 2016-11-02, Azat Khuzhin
-# - Adopt for C compiler only (libevent)
-#
-# USAGE:
-# 1. Copy this file into your cmake modules path.
-#
-# 2. Add the following line to your CMakeLists.txt:
-# INCLUDE(CodeCoverage)
-#
-# 3. Set compiler flags to turn off optimization and enable coverage:
-# SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-# SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-#
-# 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
-# which runs your test executable and produces a lcov code coverage report:
-# Example:
-# SETUP_TARGET_FOR_COVERAGE(
-# my_coverage_target # Name for custom target.
-# test_driver # Name of the test driver executable that runs the tests.
-# # NOTE! This should always have a ZERO as exit code
-# # otherwise the coverage generation will not complete.
-# coverage # Name of output directory.
-# )
-#
-# 4. Build a Debug build:
-# cmake -DCMAKE_BUILD_TYPE=Debug ..
-# make
-# make my_coverage_target
-#
-#
-
-# Check prereqs
-FIND_PROGRAM( GCOV_PATH gcov )
-FIND_PROGRAM( LCOV_PATH lcov )
-FIND_PROGRAM( GENHTML_PATH genhtml )
-FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
-
-IF(NOT GCOV_PATH)
- MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
-ENDIF() # NOT GCOV_PATH
-
-IF(NOT CMAKE_COMPILER_IS_GNUCC)
- # Clang version 3.0.0 and greater now supports gcov as well.
- MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")
-
- IF(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
- MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
- ENDIF()
-ENDIF() # NOT CMAKE_COMPILER_IS_GNUCC
-
-IF ( NOT CMAKE_BUILD_TYPE STREQUAL "Debug" )
- MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
-ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
-
-
-# Param _targetname The name of new the custom make target
-# Param _testrunner The name of the target which runs the tests.
-# MUST return ZERO always, even on errors.
-# If not, no coverage report will be created!
-# Param _outputname lcov output is generated as _outputname.info
-# HTML report is generated in _outputname/index.html
-# Optional fourth parameter is passed as arguments to _testrunner
-# Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
-
- IF(NOT LCOV_PATH)
- MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
- ENDIF() # NOT LCOV_PATH
-
- IF(NOT GENHTML_PATH)
- MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
- ENDIF() # NOT GENHTML_PATH
-
- # Setup target
- ADD_CUSTOM_TARGET(${_targetname}
-
- # Cleanup lcov
- ${LCOV_PATH} --directory . --zerocounters
-
- # Run tests
- COMMAND ${_testrunner} ${ARGV3}
-
- # Capturing lcov counters and generating report
- COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
- COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
- COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
- COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
-
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
- )
-
- # Show info where to find the report
- ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
- COMMAND ;
- COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
- )
-
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
-
-# Param _targetname The name of new the custom make target
-# Param _testrunner The name of the target which runs the tests
-# Param _outputname cobertura output is generated as _outputname.xml
-# Optional fourth parameter is passed as arguments to _testrunner
-# Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
-
- IF(NOT PYTHON_EXECUTABLE)
- MESSAGE(FATAL_ERROR "Python not found! Aborting...")
- ENDIF() # NOT PYTHON_EXECUTABLE
-
- IF(NOT GCOVR_PATH)
- MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
- ENDIF() # NOT GCOVR_PATH
-
- ADD_CUSTOM_TARGET(${_targetname}
-
- # Run tests
- ${_testrunner} ${ARGV3}
-
- # Running gcovr
- COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- COMMENT "Running gcovr to produce Cobertura code coverage report."
- )
-
- # Show info where to find the report
- ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
- COMMAND ;
- COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
- )
-
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
diff --git a/cmake/Copyright.txt b/cmake/Copyright.txt
deleted file mode 100644
index 813124f..0000000
--- a/cmake/Copyright.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-CMake - Cross Platform Makefile Generator
-Copyright 2000-2013 Kitware, Inc.
-Copyright 2000-2011 Insight Software Consortium
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-* Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-* Neither the names of Kitware, Inc., the Insight Software Consortium,
- nor the names of their contributors may be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-------------------------------------------------------------------------------
-
-The above copyright and license notice applies to distributions of
-CMake in source and binary form. Some source files contain additional
-notices of original copyright by their contributors; see each source
-for details. Third-party software packages supplied with CMake under
-compatible licenses provide their own copyright notices documented in
-corresponding subdirectories.
-
-------------------------------------------------------------------------------
-
-CMake was initially developed by Kitware with the following sponsorship:
-
- * National Library of Medicine at the National Institutes of Health
- as part of the Insight Segmentation and Registration Toolkit (ITK).
-
- * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
- Visualization Initiative.
-
- * National Alliance for Medical Image Computing (NAMIC) is funded by the
- National Institutes of Health through the NIH Roadmap for Medical Research,
- Grant U54 EB005149.
-
- * Kitware, Inc. \ No newline at end of file
diff --git a/cmake/FindGit.cmake b/cmake/FindGit.cmake
deleted file mode 100644
index 2abbfe4..0000000
--- a/cmake/FindGit.cmake
+++ /dev/null
@@ -1,45 +0,0 @@
-# The module defines the following variables:
-# GIT_EXECUTABLE - path to git command line client
-# GIT_FOUND - true if the command line client was found
-# Example usage:
-# find_package(Git)
-# if(GIT_FOUND)
-# message("git found: ${GIT_EXECUTABLE}")
-# endif()
-
-#=============================================================================
-# Copyright 2010 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# Look for 'git' or 'eg' (easy git)
-set(git_names git eg)
-
-# Prefer .cmd variants on Windows unless running in a Makefile
-# in the MSYS shell.
-if(WIN32)
- if(NOT CMAKE_GENERATOR MATCHES "MSYS")
- set(git_names git.cmd git eg.cmd eg)
- endif()
-endif()
-
-find_program(GIT_EXECUTABLE
- NAMES ${git_names}
- DOC "git command line client")
-
-mark_as_advanced(GIT_EXECUTABLE)
-
-# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
-# all listed variables are TRUE
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE)
-
diff --git a/cmake/LibeventConfig.cmake.in b/cmake/LibeventConfig.cmake.in
deleted file mode 100644
index 5422336..0000000
--- a/cmake/LibeventConfig.cmake.in
+++ /dev/null
@@ -1,18 +0,0 @@
-# - Config file for the Libevent package
-# It defines the following variables
-# LIBEVENT_INCLUDE_DIRS - include directories
-# LIBEVENT_STATIC_LIBRARIES - libraries to link against (archive/static)
-# LIBEVENT_SHARED_LIBRARIES - libraries to link against (shared)
-
-# Get the path of the current file.
-get_filename_component(LIBEVENT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-# Set the include directories.
-set(LIBEVENT_INCLUDE_DIRS "@EVENT_INSTALL_INCLUDE_DIR@")
-
-# Include the project Targets file, this contains definitions for IMPORTED targets.
-include(${LIBEVENT_CMAKE_DIR}/LibeventTargets.cmake)
-
-# IMPORTED targets from LibeventTargets.cmake
-set(LIBEVENT_STATIC_LIBRARIES "@LIBEVENT_STATIC_LIBRARIES@")
-set(LIBEVENT_SHARED_LIBRARIES "@LIBEVENT_SHARED_LIBRARIES@")
diff --git a/cmake/LibeventConfigBuildTree.cmake.in b/cmake/LibeventConfigBuildTree.cmake.in
deleted file mode 100644
index 02edef3..0000000
--- a/cmake/LibeventConfigBuildTree.cmake.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# - Config file for the Libevent package
-# It defines the following variables
-# LIBEVENT_INCLUDE_DIRS - include directories for FooBar
-# LIBEVENT_LIBRARIES - libraries to link against
-
-# Get the path of the current file.
-get_filename_component(LIBEVENT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-# Set the include directories.
-set(LIBEVENT_INCLUDE_DIRS "@EVENT__INCLUDE_DIRS@")
-
-# Include the project Targets file, this contains definitions for IMPORTED targets.
-include(${LIBEVENT_CMAKE_DIR}/LibeventTargets.cmake)
-
-# IMPORTED targets from LibeventTargets.cmake
-set(LIBEVENT_LIBRARIES event event_core event_extra)
-
diff --git a/cmake/LibeventConfigVersion.cmake.in b/cmake/LibeventConfigVersion.cmake.in
deleted file mode 100644
index 56371a8..0000000
--- a/cmake/LibeventConfigVersion.cmake.in
+++ /dev/null
@@ -1,11 +0,0 @@
-set(PACKAGE_VERSION "@EVENT_PACKAGE_VERSION@")
-
-# Check whether the requested PACKAGE_FIND_VERSION is compatible
-if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
-else()
- set(PACKAGE_VERSION_COMPATIBLE TRUE)
- if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
- set(PACKAGE_VERSION_EXACT TRUE)
- endif()
-endif()
diff --git a/cmake/VersionViaGit.cmake b/cmake/VersionViaGit.cmake
deleted file mode 100644
index 504980a..0000000
--- a/cmake/VersionViaGit.cmake
+++ /dev/null
@@ -1,64 +0,0 @@
-# This module defines the following variables utilizing
-# git to determine the parent tag. And if found the macro
-# will attempt to parse them in the github tag fomat
-#
-# Useful for auto-versioning in our CMakeLists
-#
-# EVENT_GIT___VERSION_MAJOR - Major version.
-# EVENT_GIT___VERSION_MINOR - Minor version
-# EVENT_GIT___VERSION_STAGE - Stage version
-#
-# Example usage:
-#
-# event_fuzzy_version_from_git()
-# message("Libvent major=${EVENT_GIT___VERSION_MAJOR}")
-# message(" minor=${EVENT_GIT___VERSION_MINOR}")
-# message(" patch=${EVENT_GIT___VERSION_PATCH}")
-# message(" stage=${EVENT_GIT___VERSION_STAGE}")
-# endif()
-
-include(FindGit)
-
-macro(event_fuzzy_version_from_git)
- # set our defaults.
- set(EVENT_GIT___VERSION_MAJOR 2)
- set(EVENT_GIT___VERSION_MINOR 1)
- set(EVENT_GIT___VERSION_PATCH 11)
- set(EVENT_GIT___VERSION_STAGE "stable")
-
- find_package(Git)
-
- if (GIT_FOUND)
- execute_process(
- COMMAND
- ${GIT_EXECUTABLE} describe --abbrev=0
- WORKING_DIRECTORY
- ${PROJECT_SOURCE_DIR}
- RESULT_VARIABLE
- GITRET
- OUTPUT_VARIABLE
- GITVERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-
- string(REGEX REPLACE "[\\._-]" ";" VERSION_LIST "${GITVERSION}")
- list(LENGTH VERSION_LIST VERSION_LIST_LENGTH)
-
- if ((GITRET EQUAL 0) AND (VERSION_LIST_LENGTH EQUAL 5))
- list(GET VERSION_LIST 1 _MAJOR)
- list(GET VERSION_LIST 2 _MINOR)
- list(GET VERSION_LIST 3 _PATCH)
- list(GET VERSION_LIST 4 _STAGE)
-
- set(_DEFAULT_VERSION "${EVENT_GIT___VERSION_MAJOR}.${EVENT_GIT___VERSION_MINOR}.${EVENT_GIT___VERSION_PATCH}-${EVENT_GIT___VERSION_STAGE}")
- set(_GIT_VERSION "${_MAJOR}.${_MINOR}.${_PATCH}-${_STAGE}")
-
- if (${_DEFAULT_VERSION} VERSION_LESS ${_GIT_VERSION})
- set(EVENT_GIT___VERSION_MAJOR ${_MAJOR})
- set(EVENT_GIT___VERSION_MINOR ${_MINOR})
- set(EVENT_GIT___VERSION_PATCH ${_PATCH})
- set(EVENT_GIT___VERSION_STAGE ${_STAGE})
- endif()
- endif()
- endif()
-endmacro()
diff --git a/compile b/compile
index 99e5052..a85b723 100755
--- a/compile
+++ b/compile
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2018-03-07.03; # UTC
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -255,8 +255,7 @@ EOF
echo "compile $scriptversion"
exit $?
;;
- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
- icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
@@ -340,9 +339,9 @@ exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
diff --git a/config.guess b/config.guess
index 256083a..6c32c86 100755
--- a/config.guess
+++ b/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2018 Free Software Foundation, Inc.
+# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2018-03-08'
+timestamp='2014-11-04'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2018-03-08'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <https://www.gnu.org/licenses/>.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2018-03-08'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
#
# Please send patches to <config-patches@gnu.org>.
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
-Options:
+Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2018 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > "$dummy.c" ;
+ ,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
- if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-case "$UNAME_SYSTEM" in
+case "${UNAME_SYSTEM}" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
- eval "$set_cc_for_build"
- cat <<-EOF > "$dummy.c"
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
@@ -149,20 +149,13 @@ Linux|GNU|GNU/*)
LIBC=gnu
#endif
EOF
- eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
-
- # If ldd exists, use it to detect musl libc.
- if command -v ldd >/dev/null && \
- ldd --version 2>&1 | grep -q ^musl
- then
- LIBC=musl
- fi
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
;;
esac
# Note: order is significant - the case branches are not exclusive.
-case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -175,31 +168,21 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
- "/sbin/$sysctl" 2>/dev/null || \
- "/usr/sbin/$sysctl" 2>/dev/null || \
- echo unknown)`
- case "$UNAME_MACHINE_ARCH" in
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
- earmv*)
- arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
- endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
- machine="${arch}${endian}"-unknown
- ;;
- *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently (or will in the future) and ABI.
- case "$UNAME_MACHINE_ARCH" in
- earm*)
- os=netbsdelf
- ;;
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval "$set_cc_for_build"
+ eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@@ -214,67 +197,44 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
os=netbsd
;;
esac
- # Determine ABI tags.
- case "$UNAME_MACHINE_ARCH" in
- earm*)
- expr='s/^earmv[0-9]/-eabi/;s/eb$//'
- abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
- ;;
- esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
- case "$UNAME_VERSION" in
+ case "${UNAME_VERSION}" in
Debian*)
release='-gnu'
;;
*)
- release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "$machine-${os}${release}${abi}"
+ echo "${machine}-${os}${release}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
- exit ;;
- *:LibertyBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
- echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
- exit ;;
- *:MidnightBSD:*:*)
- echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
- echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
- echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
- echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
- *:Sortix:*:*)
- echo "$UNAME_MACHINE"-unknown-sortix
- exit ;;
- *:Redox:*:*)
- echo "$UNAME_MACHINE"-unknown-redox
- exit ;;
- mips:OSF1:*.*)
- echo mips-dec-osf1
- exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -291,54 +251,63 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
- UNAME_MACHINE=alpha ;;
+ UNAME_MACHINE="alpha" ;;
"EV4.5 (21064)")
- UNAME_MACHINE=alpha ;;
+ UNAME_MACHINE="alpha" ;;
"LCA4 (21066/21068)")
- UNAME_MACHINE=alpha ;;
+ UNAME_MACHINE="alpha" ;;
"EV5 (21164)")
- UNAME_MACHINE=alphaev5 ;;
+ UNAME_MACHINE="alphaev5" ;;
"EV5.6 (21164A)")
- UNAME_MACHINE=alphaev56 ;;
+ UNAME_MACHINE="alphaev56" ;;
"EV5.6 (21164PC)")
- UNAME_MACHINE=alphapca56 ;;
+ UNAME_MACHINE="alphapca56" ;;
"EV5.7 (21164PC)")
- UNAME_MACHINE=alphapca57 ;;
+ UNAME_MACHINE="alphapca57" ;;
"EV6 (21264)")
- UNAME_MACHINE=alphaev6 ;;
+ UNAME_MACHINE="alphaev6" ;;
"EV6.7 (21264A)")
- UNAME_MACHINE=alphaev67 ;;
+ UNAME_MACHINE="alphaev67" ;;
"EV6.8CB (21264C)")
- UNAME_MACHINE=alphaev68 ;;
+ UNAME_MACHINE="alphaev68" ;;
"EV6.8AL (21264B)")
- UNAME_MACHINE=alphaev68 ;;
+ UNAME_MACHINE="alphaev68" ;;
"EV6.8CX (21264D)")
- UNAME_MACHINE=alphaev68 ;;
+ UNAME_MACHINE="alphaev68" ;;
"EV6.9A (21264/EV69A)")
- UNAME_MACHINE=alphaev69 ;;
+ UNAME_MACHINE="alphaev69" ;;
"EV7 (21364)")
- UNAME_MACHINE=alphaev7 ;;
+ UNAME_MACHINE="alphaev7" ;;
"EV7.9 (21364A)")
- UNAME_MACHINE=alphaev79 ;;
+ UNAME_MACHINE="alphaev79" ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
- echo "$UNAME_MACHINE"-unknown-amigaos
+ echo ${UNAME_MACHINE}-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
- echo "$UNAME_MACHINE"-unknown-morphos
+ echo ${UNAME_MACHINE}-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@@ -350,7 +319,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix"$UNAME_RELEASE"
+ echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
@@ -377,38 +346,38 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
- echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux"$UNAME_RELEASE"
+ echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval "$set_cc_for_build"
- SUN_ARCH=i386
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
- SUN_ARCH=x86_64
+ SUN_ARCH="x86_64"
fi
fi
- echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
@@ -417,25 +386,25 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit ;;
sun3*:SunOS:*:*)
- echo m68k-sun-sunos"$UNAME_RELEASE"
+ echo m68k-sun-sunos${UNAME_RELEASE}
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
- echo m68k-sun-sunos"$UNAME_RELEASE"
+ echo m68k-sun-sunos${UNAME_RELEASE}
;;
sun4)
- echo sparc-sun-sunos"$UNAME_RELEASE"
+ echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
exit ;;
aushp:SunOS:*:*)
- echo sparc-auspex-sunos"$UNAME_RELEASE"
+ echo sparc-auspex-sunos${UNAME_RELEASE}
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
@@ -446,44 +415,44 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint"$UNAME_RELEASE"
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint"$UNAME_RELEASE"
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint"$UNAME_RELEASE"
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint"$UNAME_RELEASE"
+ echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint"$UNAME_RELEASE"
+ echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint"$UNAME_RELEASE"
+ echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
m68k:machten:*:*)
- echo m68k-apple-machten"$UNAME_RELEASE"
+ echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
powerpc:machten:*:*)
- echo powerpc-apple-machten"$UNAME_RELEASE"
+ echo powerpc-apple-machten${UNAME_RELEASE}
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix"$UNAME_RELEASE"
+ echo mips-dec-ultrix${UNAME_RELEASE}
exit ;;
VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix"$UNAME_RELEASE"
+ echo vax-dec-ultrix${UNAME_RELEASE}
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix"$UNAME_RELEASE"
+ echo clipper-intergraph-clix${UNAME_RELEASE}
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval "$set_cc_for_build"
- sed 's/^ //' << EOF > "$dummy.c"
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
@@ -492,23 +461,23 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
- $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
- dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
{ echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos"$UNAME_RELEASE"
+ echo mips-mips-riscos${UNAME_RELEASE}
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
@@ -534,17 +503,17 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
- if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
- [ "$TARGET_BINARY_INTERFACE"x = x ]
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
then
- echo m88k-dg-dgux"$UNAME_RELEASE"
+ echo m88k-dg-dgux${UNAME_RELEASE}
else
- echo m88k-dg-dguxbcs"$UNAME_RELEASE"
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else
- echo i586-dg-dgux"$UNAME_RELEASE"
+ echo i586-dg-dgux${UNAME_RELEASE}
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
@@ -561,7 +530,7 @@ EOF
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
- echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
@@ -573,14 +542,14 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
- echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval "$set_cc_for_build"
- sed 's/^ //' << EOF > "$dummy.c"
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
main()
@@ -591,7 +560,7 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
then
echo "$SYSTEM_NAME"
else
@@ -605,7 +574,7 @@ EOF
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -614,18 +583,18 @@ EOF
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
- IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
- echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
- ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
@@ -640,28 +609,28 @@ EOF
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
- case "$UNAME_MACHINE" in
- 9000/31?) HP_ARCH=m68000 ;;
- 9000/[34]??) HP_ARCH=m68k ;;
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "$sc_cpu_version" in
- 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
- 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
- case "$sc_kernel_bits" in
- 32) HP_ARCH=hppa2.0n ;;
- 64) HP_ARCH=hppa2.0w ;;
- '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
fi
- if [ "$HP_ARCH" = "" ]; then
- eval "$set_cc_for_build"
- sed 's/^ //' << EOF > "$dummy.c"
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -694,13 +663,13 @@ EOF
exit (0);
}
EOF
- (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ "$HP_ARCH" = hppa2.0w ]
+ if [ ${HP_ARCH} = "hppa2.0w" ]
then
- eval "$set_cc_for_build"
+ eval $set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -711,23 +680,23 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
- HP_ARCH=hppa2.0w
+ HP_ARCH="hppa2.0w"
else
- HP_ARCH=hppa64
+ HP_ARCH="hppa64"
fi
fi
- echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit ;;
ia64:HP-UX:*:*)
- HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux"$HPUX_REV"
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
exit ;;
3050*:HI-UX:*:*)
- eval "$set_cc_for_build"
- sed 's/^ //' << EOF > "$dummy.c"
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
main ()
@@ -752,11 +721,11 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
@@ -765,7 +734,7 @@ EOF
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
@@ -773,9 +742,9 @@ EOF
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
- echo "$UNAME_MACHINE"-unknown-osf1mk
+ echo ${UNAME_MACHINE}-unknown-osf1mk
else
- echo "$UNAME_MACHINE"-unknown-osf1
+ echo ${UNAME_MACHINE}-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
@@ -800,109 +769,127 @@ EOF
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
- echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
- echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
- FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit ;;
sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi"$UNAME_RELEASE"
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:BSD/OS:*:*)
- echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
- case "$UNAME_PROCESSOR" in
+ case ${UNAME_PROCESSOR} in
amd64)
- UNAME_PROCESSOR=x86_64 ;;
- i386)
- UNAME_PROCESSOR=i586 ;;
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
- echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
i*:CYGWIN*:*)
- echo "$UNAME_MACHINE"-pc-cygwin
+ echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW64*:*)
- echo "$UNAME_MACHINE"-pc-mingw64
+ echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
*:MINGW*:*)
- echo "$UNAME_MACHINE"-pc-mingw32
+ echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
*:MSYS*:*)
- echo "$UNAME_MACHINE"-pc-msys
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
- echo "$UNAME_MACHINE"-pc-pw32
+ echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:*)
- case "$UNAME_MACHINE" in
+ case ${UNAME_MACHINE} in
x86)
- echo i586-pc-interix"$UNAME_RELEASE"
+ echo i586-pc-interix${UNAME_RELEASE}
exit ;;
authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix"$UNAME_RELEASE"
+ echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
- echo ia64-unknown-interix"$UNAME_RELEASE"
+ echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
i*:UWIN*:*)
- echo "$UNAME_MACHINE"-pc-uwin
+ echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
*:GNU:*:*)
# the GNU system
- echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
- echo "$UNAME_MACHINE"-pc-minix
+ echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -915,64 +902,58 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
- eval "$set_cc_for_build"
+ eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
- exit ;;
- e2k:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
- k1om:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
- eval "$set_cc_for_build"
- sed 's/^ //' << EOF > "$dummy.c"
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
@@ -986,70 +967,64 @@ EOF
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
- test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- mips64el:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
openrisc*:Linux:*:*)
- echo or1k-unknown-linux-"$LIBC"
+ echo or1k-unknown-linux-${LIBC}
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-"$LIBC"
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-"$LIBC"
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
- PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
- *) echo hppa-unknown-linux-"$LIBC" ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-"$LIBC"
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-"$LIBC"
+ echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-"$LIBC"
+ echo powerpc64le-unknown-linux-${LIBC}
exit ;;
ppcle:Linux:*:*)
- echo powerpcle-unknown-linux-"$LIBC"
- exit ;;
- riscv32:Linux:*:* | riscv64:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1063,34 +1038,34 @@ EOF
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
- echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
- echo "$UNAME_MACHINE"-pc-os2-emx
+ echo ${UNAME_MACHINE}-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
- echo "$UNAME_MACHINE"-unknown-stop
+ echo ${UNAME_MACHINE}-unknown-stop
exit ;;
i*86:atheos:*:*)
- echo "$UNAME_MACHINE"-unknown-atheos
+ echo ${UNAME_MACHINE}-unknown-atheos
exit ;;
i*86:syllable:*:*)
- echo "$UNAME_MACHINE"-pc-syllable
+ echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos"$UNAME_RELEASE"
+ echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
- echo "$UNAME_MACHINE"-pc-msdosdjgpp
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit ;;
- i*86:*:4.*:*)
- UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
else
- echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
exit ;;
i*86:*:5:[678]*)
@@ -1100,12 +1075,12 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1115,9 +1090,9 @@ EOF
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
- echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
- echo "$UNAME_MACHINE"-pc-sysv32
+ echo ${UNAME_MACHINE}-pc-sysv32
fi
exit ;;
pc:*:*:*)
@@ -1125,7 +1100,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configure will decide that
+ # prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@@ -1137,9 +1112,9 @@ EOF
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
@@ -1159,9 +1134,9 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
@@ -1170,28 +1145,28 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos"$UNAME_RELEASE"
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos"$UNAME_RELEASE"
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
exit ;;
rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos"$UNAME_RELEASE"
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos"$UNAME_RELEASE"
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv"$UNAME_RELEASE"
+ echo mips-dde-sysv${UNAME_RELEASE}
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
@@ -1202,7 +1177,7 @@ EOF
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo "$UNAME_MACHINE"-sni-sysv4
+ echo ${UNAME_MACHINE}-sni-sysv4
else
echo ns32k-sni-sysv
fi
@@ -1222,23 +1197,23 @@ EOF
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
- echo "$UNAME_MACHINE"-stratus-vos
+ echo ${UNAME_MACHINE}-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
- echo m68k-apple-aux"$UNAME_RELEASE"
+ echo m68k-apple-aux${UNAME_RELEASE}
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv"$UNAME_RELEASE"
+ echo mips-nec-sysv${UNAME_RELEASE}
else
- echo mips-unknown-sysv"$UNAME_RELEASE"
+ echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
@@ -1257,56 +1232,46 @@ EOF
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux"$UNAME_RELEASE"
+ echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux"$UNAME_RELEASE"
+ echo sx5-nec-superux${UNAME_RELEASE}
exit ;;
SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux"$UNAME_RELEASE"
+ echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux"$UNAME_RELEASE"
+ echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux"$UNAME_RELEASE"
+ echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux"$UNAME_RELEASE"
- exit ;;
- SX-ACE:SUPER-UX:*:*)
- echo sxace-nec-superux"$UNAME_RELEASE"
+ echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody"$UNAME_RELEASE"
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
*:Rhapsody:*:*)
- echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval "$set_cc_for_build"
+ eval $set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
- if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
- # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
- if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_PPC >/dev/null
- then
- UNAME_PROCESSOR=powerpc
- fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -1317,33 +1282,27 @@ EOF
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
- echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = x86; then
+ if test "$UNAME_PROCESSOR" = "x86"; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-*:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk"$UNAME_RELEASE"
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk"$UNAME_RELEASE"
- exit ;;
- NSR-*:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk"$UNAME_RELEASE"
+ echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSV-*:NONSTOP_KERNEL:*:*)
- echo nsv-tandem-nsk"$UNAME_RELEASE"
- exit ;;
- NSX-*:NONSTOP_KERNEL:*:*)
- echo nsx-tandem-nsk"$UNAME_RELEASE"
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
@@ -1352,18 +1311,18 @@ EOF
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
- echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = 386; then
+ if test "$cputype" = "386"; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
fi
- echo "$UNAME_MACHINE"-unknown-plan9
+ echo ${UNAME_MACHINE}-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
@@ -1384,14 +1343,14 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux"$UNAME_RELEASE"
+ echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
- echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "$UNAME_MACHINE" in
+ case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
@@ -1400,48 +1359,34 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
i*86:rdos:*:*)
- echo "$UNAME_MACHINE"-pc-rdos
+ echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
- echo "$UNAME_MACHINE"-pc-aros
+ echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
- echo "$UNAME_MACHINE"-unknown-esx
- exit ;;
- amd64:Isilon\ OneFS:*:*)
- echo x86_64-unknown-onefs
+ echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac
-echo "$0: unable to guess system type" >&2
-
-case "$UNAME_MACHINE:$UNAME_SYSTEM" in
- mips:Linux | mips64:Linux)
- # If we got here on MIPS GNU/Linux, output extra information.
- cat >&2 <<EOF
-
-NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
-the system type. Please install a C compiler and try again.
-EOF
- ;;
-esac
-
cat >&2 <<EOF
+$0: unable to guess system type
-This script (version $timestamp), has failed to recognize the
-operating system you are using. If your script is old, overwrite *all*
-copies of config.guess and config.sub with the latest versions from:
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
- https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
- https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-If $0 has already been updated, send the following data and any
-information you think might be pertinent to config-patches@gnu.org to
-provide the necessary information to handle your system.
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
config.guess timestamp = $timestamp
@@ -1460,16 +1405,16 @@ hostinfo = `(hostinfo) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-UNAME_MACHINE = "$UNAME_MACHINE"
-UNAME_RELEASE = "$UNAME_RELEASE"
-UNAME_SYSTEM = "$UNAME_SYSTEM"
-UNAME_VERSION = "$UNAME_VERSION"
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
EOF
exit 1
# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/config.h.in b/config.h.in
index 122aecf..1c35289 100644
--- a/config.h.in
+++ b/config.h.in
@@ -15,9 +15,6 @@
/* Define to 1 if you have the `arc4random' function. */
#undef HAVE_ARC4RANDOM
-/* Define to 1 if you have the `arc4random_addrandom' function. */
-#undef HAVE_ARC4RANDOM_ADDRANDOM
-
/* Define to 1 if you have the `arc4random_buf' function. */
#undef HAVE_ARC4RANDOM_BUF
@@ -61,6 +58,9 @@
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
+/* Define to 1 if you have ERR_remove_thread_stat(). */
+#undef HAVE_ERR_REMOVE_THREAD_STATE
+
/* Define to 1 if you have the `eventfd' function. */
#undef HAVE_EVENTFD
@@ -163,9 +163,6 @@
/* Define if the system has openssl */
#undef HAVE_OPENSSL
-/* Define to 1 if you have the <openssl/ssl.h> header file. */
-#undef HAVE_OPENSSL_SSL_H
-
/* Define to 1 if you have the `pipe' function. */
#undef HAVE_PIPE
@@ -262,9 +259,6 @@
/* Define to 1 if `s6_addr32' is a member of `struct in6_addr'. */
#undef HAVE_STRUCT_IN6_ADDR_S6_ADDR32
-/* Define to 1 if the system has the type `struct linger'. */
-#undef HAVE_STRUCT_LINGER
-
/* Define to 1 if the system has the type `struct sockaddr_in6'. */
#undef HAVE_STRUCT_SOCKADDR_IN6
@@ -283,8 +277,8 @@
/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
#undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
-/* Define to 1 if the system has the type `struct sockaddr_un'. */
-#undef HAVE_STRUCT_SOCKADDR_UN
+/* Define to 1 if the system has the type `struct so_linger'. */
+#undef HAVE_STRUCT_SO_LINGER
/* Define to 1 if you have the `sysctl' function. */
#undef HAVE_SYSCTL
@@ -343,9 +337,6 @@
/* Define to 1 if you have the <sys/uio.h> header file. */
#undef HAVE_SYS_UIO_H
-/* Define to 1 if you have the <sys/un.h> header file. */
-#undef HAVE_SYS_UN_H
-
/* Define to 1 if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
@@ -397,18 +388,15 @@
/* Define to 1 if you have the `vasprintf' function. */
#undef HAVE_VASPRINTF
+/* Define if waitpid() supports WNOWAIT */
+#undef HAVE_WAITPID_WITH_WNOWAIT
+
/* Define if kqueue works correctly with pipes */
#undef HAVE_WORKING_KQUEUE
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
-/* Define to 1 if compiler have __FUNCTION__ */
-#undef HAVE___FUNCTION__
-
-/* Define to 1 if compiler have __func__ */
-#undef HAVE___func__
-
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
@@ -461,9 +449,6 @@
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
-/* The size of `time_t', as computed by sizeof. */
-#undef SIZEOF_TIME_T
-
/* The size of `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
@@ -519,6 +504,9 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
+/* Define to appropriate substitue if compiler doesnt have __func__ */
+#undef __func__
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
diff --git a/config.sub b/config.sub
index 9ccf09a..7ffe373 100755
--- a/config.sub
+++ b/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2018 Free Software Foundation, Inc.
+# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2018-03-08'
+timestamp='2014-12-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2018-03-08'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <https://www.gnu.org/licenses/>.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -33,7 +33,7 @@ timestamp='2018-03-08'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -53,11 +53,12 @@ timestamp='2018-03-08'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
Canonicalize a configuration name.
-Options:
+Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -67,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2018 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -94,7 +95,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
- echo "$1"
+ echo $1
exit ;;
* )
@@ -112,24 +113,24 @@ esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
- kopensolaris*-gnu* | cloudabi*-eabi* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
- basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
- basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
- basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
- if [ "$basic_machine" != "$1" ]
- then os=`echo "$1" | sed 's/.*-/-/'`
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
@@ -178,44 +179,44 @@ case $os in
;;
-sco6)
os=-sco5v6
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
@@ -227,7 +228,10 @@ case $os in
os=-lynxos
;;
-ptx*)
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
@@ -251,16 +255,15 @@ case $basic_machine in
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
- | ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
- | e2k | epiphany \
- | fido | fr30 | frv | ft32 \
+ | epiphany \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
- | i370 | i860 | i960 | ia16 | ia64 \
+ | i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
@@ -296,14 +299,13 @@ case $basic_machine in
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
- | pdp10 | pj | pjl \
+ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
- | pru \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -312,7 +314,7 @@ case $basic_machine in
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
- | wasm32 \
+ | we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
@@ -333,7 +335,7 @@ case $basic_machine in
basic_machine=$basic_machine-unknown
os=-none
;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
@@ -362,7 +364,7 @@ case $basic_machine in
;;
# Object if more than one company name word.
*-*-*)
- echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
@@ -374,18 +376,17 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
- | ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
- | e2k-* | elxsi-* \
+ | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
- | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
@@ -426,15 +427,13 @@ case $basic_machine in
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- | pru-* \
| pyramid-* \
- | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
@@ -443,7 +442,6 @@ case $basic_machine in
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
- | wasm32-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -457,7 +455,7 @@ case $basic_machine in
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
- basic_machine=i386-pc
+ basic_machine=i386-unknown
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
@@ -491,7 +489,7 @@ case $basic_machine in
basic_machine=x86_64-pc
;;
amd64-*)
- basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
@@ -520,9 +518,6 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
- asmjs)
- basic_machine=asmjs-unknown
- ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -536,7 +531,7 @@ case $basic_machine in
os=-linux
;;
blackfin-*)
- basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
@@ -544,13 +539,13 @@ case $basic_machine in
os=-cnk
;;
c54x-*)
- basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
- basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
- basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
@@ -639,18 +634,10 @@ case $basic_machine in
basic_machine=rs6000-bull
os=-bosx
;;
- dpx2*)
+ dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
- e500v[12])
- basic_machine=powerpc-unknown
- os=$os"spe"
- ;;
- e500v[12]-*)
- basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=$os"spe"
- ;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@@ -740,6 +727,9 @@ case $basic_machine in
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
+ hppa-next)
+ os=-nextstep3
+ ;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
@@ -752,26 +742,26 @@ case $basic_machine in
basic_machine=i370-ibm
;;
i*86v32)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
- vsta)
+ i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
@@ -790,16 +780,19 @@ case $basic_machine in
os=-sysv
;;
leon-*|leon[3-9]-*)
- basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
- basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
@@ -831,10 +824,10 @@ case $basic_machine in
os=-mint
;;
mips3*-*)
- basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
- basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
@@ -853,7 +846,7 @@ case $basic_machine in
os=-msdos
;;
ms1-*)
- basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
@@ -895,7 +888,7 @@ case $basic_machine in
basic_machine=v70-nec
os=-sysv
;;
- next | m*-next)
+ next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
@@ -940,12 +933,6 @@ case $basic_machine in
nsr-tandem)
basic_machine=nsr-tandem
;;
- nsv-tandem)
- basic_machine=nsv-tandem
- ;;
- nsx-tandem)
- basic_machine=nsx-tandem
- ;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
@@ -978,7 +965,7 @@ case $basic_machine in
os=-linux
;;
parisc-*)
- basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
@@ -994,7 +981,7 @@ case $basic_machine in
basic_machine=i386-pc
;;
pc98-*)
- basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
@@ -1009,16 +996,16 @@ case $basic_machine in
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
- basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
@@ -1028,23 +1015,23 @@ case $basic_machine in
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle)
+ ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppc64le | powerpc64little)
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
@@ -1098,10 +1085,17 @@ case $basic_machine in
sequent)
basic_machine=i386-sequent
;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
sh5el)
basic_machine=sh5le-unknown
;;
- simso-wrs)
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -1120,7 +1114,7 @@ case $basic_machine in
os=-sysv4
;;
strongarm-* | thumb-*)
- basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
@@ -1242,9 +1236,6 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
- x64)
- basic_machine=x86_64-pc
- ;;
xbox)
basic_machine=i686-pc
os=-mingw32
@@ -1253,12 +1244,20 @@ case $basic_machine in
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
- basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
none)
basic_machine=none-none
os=-none
@@ -1287,6 +1286,10 @@ case $basic_machine in
vax)
basic_machine=vax-dec
;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
pdp11)
basic_machine=pdp11-dec
;;
@@ -1296,6 +1299,9 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
cydra)
basic_machine=cydra-cydrome
;;
@@ -1315,7 +1321,7 @@ case $basic_machine in
# Make sure to match an already-canonicalized machine name.
;;
*)
- echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
@@ -1323,10 +1329,10 @@ esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
- basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
- basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
@@ -1337,8 +1343,8 @@ esac
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases that might get confused
- # with valid system types.
+ # First match some system type aliases
+ # that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
@@ -1349,48 +1355,45 @@ case $os in
-solaris)
os=-solaris2
;;
+ -svr4*)
+ os=-sysv4
+ ;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
- # es1800 is here to avoid being matched by es* (a different OS)
- -es1800*)
- os=-ose
- ;;
- # Now accept the basic system types.
+ # First accept the basic system types.
# The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
+ # Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* | -cloudabi* | -sortix* \
+ | -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \
- | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -windiss* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
- | -midnightbsd*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1407,12 +1410,12 @@ case $os in
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
- -sim | -xray | -os68k* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* \
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
- os=`echo "$os" | sed -e 's|mac|macos|'`
+ os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
@@ -1421,10 +1424,10 @@ case $os in
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
- os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
- os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
@@ -1435,6 +1438,12 @@ case $os in
-wince*)
os=-wince
;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
-utek*)
os=-bsd
;;
@@ -1459,7 +1468,7 @@ case $os in
-nova*)
os=-rtmk-nova
;;
- -ns2)
+ -ns2 )
os=-nextstep2
;;
-nsk*)
@@ -1481,7 +1490,7 @@ case $os in
-oss*)
os=-sysv3
;;
- -svr4*)
+ -svr4)
os=-sysv4
;;
-svr3)
@@ -1496,38 +1505,32 @@ case $os in
-ose*)
os=-ose
;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
+ -aros*)
+ os=-aros
+ ;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
- -pikeos*)
- # Until real need of OS specific support for
- # particular features comes up, bare metal
- # configurations are quite functional.
- case $basic_machine in
- arm*)
- os=-eabi
- ;;
- *)
- os=-elf
- ;;
- esac
- ;;
-nacl*)
;;
- -ios)
- ;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
@@ -1617,12 +1620,12 @@ case $basic_machine in
sparc-* | *-sun)
os=-sunos4.1.1
;;
- pru-*)
- os=-elf
- ;;
*-be)
os=-beos
;;
+ *-haiku)
+ os=-haiku
+ ;;
*-ibm)
os=-aix
;;
@@ -1662,7 +1665,7 @@ case $basic_machine in
m88k-omron*)
os=-luna
;;
- *-next)
+ *-next )
os=-nextstep
;;
*-sequent)
@@ -1677,6 +1680,9 @@ case $basic_machine in
i370-*)
os=-mvs
;;
+ *-next)
+ os=-nextstep3
+ ;;
*-gould)
os=-sysv
;;
@@ -1786,15 +1792,15 @@ case $basic_machine in
vendor=stratus
;;
esac
- basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
-echo "$basic_machine$os"
+echo $basic_machine$os
exit
# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/configure b/configure
index d5e286a..5b76c6d 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libevent 2.1.11-stable.
+# Generated by GNU Autoconf 2.69 for libevent 2.1.8-stable.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libevent'
PACKAGE_TARNAME='libevent'
-PACKAGE_VERSION='2.1.11-stable'
-PACKAGE_STRING='libevent 2.1.11-stable'
+PACKAGE_VERSION='2.1.8-stable'
+PACKAGE_STRING='libevent 2.1.8-stable'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -662,8 +662,6 @@ STRLCPY_IMPL_FALSE
STRLCPY_IMPL_TRUE
BUILD_WITH_NO_UNDEFINED_FALSE
BUILD_WITH_NO_UNDEFINED_TRUE
-BUILD_MIDIPIX_FALSE
-BUILD_MIDIPIX_TRUE
BUILD_CYGWIN_FALSE
BUILD_CYGWIN_TRUE
BUILD_WIN32_FALSE
@@ -722,6 +720,7 @@ am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
+am__quote
am__include
DEPDIR
OBJEXT
@@ -795,8 +794,7 @@ PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
-SHELL
-am__quote'
+SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
@@ -1374,7 +1372,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libevent 2.1.11-stable to adapt to many kinds of systems.
+\`configure' configures libevent 2.1.8-stable to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1444,7 +1442,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libevent 2.1.11-stable:";;
+ short | recursive ) echo "Configuration of libevent 2.1.8-stable:";;
esac
cat <<\_ACEOF
@@ -1575,7 +1573,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libevent configure 2.1.11-stable
+libevent configure 2.1.8-stable
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2280,7 +2278,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libevent $as_me 2.1.11-stable, which was
+It was created by libevent $as_me 2.1.8-stable, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2632,7 +2630,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-am__api_version='1.16'
+am__api_version='1.15'
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -3147,7 +3145,7 @@ fi
# Define the identity of the package.
PACKAGE='libevent'
- VERSION='2.1.11-stable'
+ VERSION='2.1.8-stable'
cat >>confdefs.h <<_ACEOF
@@ -3177,8 +3175,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
-# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'
# We need awk for the "check" target (and possibly the TAP driver). The
@@ -3229,7 +3227,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <https://www.gnu.org/software/coreutils/>.
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -3282,7 +3280,7 @@ AM_BACKSLASH='\'
ac_config_headers="$ac_config_headers config.h evconfig-private.h:evconfig-private.h.in"
-$as_echo "#define NUMERIC_VERSION 0x02010b00" >>confdefs.h
+$as_echo "#define NUMERIC_VERSION 0x02010800" >>confdefs.h
if test "$prefix" = "NONE"; then
@@ -3294,45 +3292,45 @@ DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
-$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
-cat > confinc.mk << 'END'
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
am__doit:
- @echo this is the am__doit target >confinc.out
+ @echo this is the am__doit target
.PHONY: am__doit
END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
-# BSD make does it like this.
-echo '.include "confinc.mk" # ignored' > confmf.BSD
-# Other make implementations (GNU, Solaris 10, AIX) do it like this.
-echo 'include confinc.mk # ignored' > confmf.GNU
-_am_result=no
-for s in GNU BSD; do
- { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
- (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- case $?:`cat confinc.out 2>/dev/null` in #(
- '0:this is the am__doit target') :
- case $s in #(
- BSD) :
- am__include='.include' am__quote='"' ;; #(
- *) :
- am__include='include' am__quote='' ;;
-esac ;; #(
- *) :
- ;;
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
esac
- if test "$am__include" != "#"; then
- _am_result="yes ($s style)"
- break
- fi
-done
-rm -f confinc.* confmf.*
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
-$as_echo "${_am_result}" >&6; }
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
# Check whether --enable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then :
@@ -5138,8 +5136,8 @@ esac
-macro_version='2.4.6.42-b88ce'
-macro_revision='2.4.6.42'
+macro_version='2.4.6'
+macro_revision='2.4.6'
@@ -6589,29 +6587,13 @@ esac
fi
: ${AR=ar}
+: ${AR_FLAGS=cru}
-# Use ARFLAGS variable as AR's operation code to sync the variable naming with
-# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
-# higher priority because thats what people were doing historically (setting
-# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
-# variable obsoleted/removed.
-
-test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
-lt_ar_flags=$AR_FLAGS
-
-
-
-
-
-
-# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
-# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
-
@@ -7060,7 +7042,7 @@ for ac_symprfx in "" "_"; do
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Fake it for dumpbin and say T for any non-static function,
# D for any global variable and I for any imported variable.
- # Also find C++ and __fastcall symbols from MSVC++ or ICC,
+ # Also find C++ and __fastcall symbols from MSVC++,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK '"\
" {last_section=section; section=\$ 3};"\
@@ -8329,8 +8311,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
- echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
- $AR $AR_FLAGS libconftest.a conftest.o 2>&5
+ echo "$AR cru libconftest.a conftest.o" >&5
+ $AR cru libconftest.a conftest.o 2>&5
echo "$RANLIB libconftest.a" >&5
$RANLIB libconftest.a 2>&5
cat > conftest.c << _LT_EOF
@@ -8726,8 +8708,8 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a '.a' archive for static linking (except MSVC and
-# ICC, which need '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
libext=a
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -9654,15 +9636,15 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++ or Intel C++ Compiler.
+ # Microsoft Visual C++.
if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
openbsd* | bitrig*)
@@ -9826,7 +9808,6 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
enable_shared_with_static_runtimes=yes
- file_list_spec='@'
;;
interix[3-9]*)
@@ -10044,7 +10025,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -10311,12 +10292,12 @@ fi
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++ or Intel C++ Compiler.
+ # Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
case $cc_basename in
- cl* | icl*)
- # Native MSVC or ICC
+ cl*)
+ # Native MSVC
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
always_export_symbols=yes
@@ -10357,7 +10338,7 @@ fi
fi'
;;
*)
- # Assume MSVC and ICC wrapper
+ # Assume MSVC wrapper
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
# Tell ltmain to make .lib files, not .a files.
@@ -10681,7 +10662,6 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
emximp -o $lib $output_objdir/$libname.def'
old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
enable_shared_with_static_runtimes=yes
- file_list_spec='@'
;;
osf3*)
@@ -11389,8 +11369,8 @@ cygwin* | mingw* | pw32* | cegcc*)
dynamic_linker='Win32 ld.exe'
;;
- *,cl* | *,icl*)
- # Native MSVC or ICC
+ *,cl*)
+ # Native MSVC
libname_spec='$name'
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
library_names_spec='$libname.dll.lib'
@@ -11446,7 +11426,7 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
*)
- # Assume MSVC and ICC wrapper
+ # Assume MSVC wrapper
library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
@@ -12625,41 +12605,30 @@ striplib=
old_striplib=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -z "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-else
- if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- old_striplib="$STRIP --strip-debug"
- striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- else
- case $host_os in
- darwin*)
- # FIXME - insert some real tests, host_os isn't really good enough
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- ;;
- freebsd*)
- if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
- old_striplib="$STRIP --strip-debug"
- striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- ;;
- *)
+ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- ;;
- esac
- fi
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
fi
@@ -13088,32 +13057,6 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MIDIPIX" >&5
-$as_echo_n "checking for MIDIPIX... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
-#ifndef __midipix__
-die horribly
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- midipix=true; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- midipix=false; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN" >&5
$as_echo_n "checking for CYGWIN... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13654,23 +13597,6 @@ fi
done
;;
esac
- CPPFLAGS_SAVE=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $OPENSSL_INCS"
- for ac_header in openssl/ssl.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_OPENSSL_SSL_H 1
-_ACEOF
-
-else
- have_openssl=no
-fi
-
-done
-
- CPPFLAGS=$CPPFLAGS_SAVE
case "$have_openssl" in
@@ -13701,7 +13627,6 @@ for ac_header in \
netinet/in.h \
netinet/in6.h \
netinet/tcp.h \
- sys/un.h \
poll.h \
port.h \
stdarg.h \
@@ -13967,15 +13892,7 @@ else
BUILD_CYGWIN_FALSE=
fi
- if test x$midipix = xtrue; then
- BUILD_MIDIPIX_TRUE=
- BUILD_MIDIPIX_FALSE='#'
-else
- BUILD_MIDIPIX_TRUE='#'
- BUILD_MIDIPIX_FALSE=
-fi
-
- if test x$bwin32 = xtrue || test x$cygwin = xtrue || test x$midipix = xtrue; then
+ if test x$bwin32 = xtrue || test x$cygwin = xtrue; then
BUILD_WITH_NO_UNDEFINED_TRUE=
BUILD_WITH_NO_UNDEFINED_FALSE='#'
else
@@ -14206,7 +14123,6 @@ for ac_func in \
accept4 \
arc4random \
arc4random_buf \
- arc4random_addrandom \
eventfd \
epoll_create1 \
fcntl \
@@ -14429,7 +14345,7 @@ $as_echo_n "checking for F_SETFD in fcntl.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#define _GNU_SOURCE 1
+#define _GNU_SOURCE
#include <fcntl.h>
#ifdef F_SETFD
yes
@@ -14538,12 +14454,6 @@ $as_echo "no" >&6; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
#include <sys/types.h>
#include <sys/time.h>
#include <sys/event.h>
@@ -14559,7 +14469,7 @@ main(int argc, char **argv)
int fd[2];
struct kevent ev;
struct timespec ts;
- char buf[80000];
+ char buf[8000];
if (pipe(fd) == -1)
exit(1);
@@ -14703,6 +14613,45 @@ else
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking waitpid support WNOWAIT" >&5
+$as_echo_n "checking waitpid support WNOWAIT... " >&6; }
+if test "$cross_compiling" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <stdlib.h>
+
+int
+main(int argc, char** argv)
+{
+ pid_t pid;
+ int status;
+ if ((pid = fork()) == 0) _exit(0);
+ _exit(waitpid(pid, &status, WNOWAIT) == -1);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_WAITPID_WITH_WNOWAIT 1" >>confdefs.h
+
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+
haveeventports=no
for ac_func in port_create
do :
@@ -15112,41 +15061,8 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
-$as_echo_n "checking size of time_t... " >&6; }
-if ${ac_cv_sizeof_time_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_time_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (time_t)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_time_t=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
-$as_echo "$ac_cv_sizeof_time_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
-_ACEOF
-
-
-ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "#define _GNU_SOURCE 1
+ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "#define _GNU_SOURCE
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -15154,9 +15070,6 @@ ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "#de
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -15184,7 +15097,7 @@ _ACEOF
fi
-ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "#define _GNU_SOURCE 1
+ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "#define _GNU_SOURCE
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -15192,9 +15105,6 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_i
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -15222,7 +15132,7 @@ _ACEOF
fi
-ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#define _GNU_SOURCE 1
+ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "#define _GNU_SOURCE
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -15230,47 +15140,6 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef _WIN32
-#define WIN32_WINNT 0x400
-#define _WIN32_WINNT 0x400
-#define WIN32_LEAN_AND_MEAN
-#if defined(_MSC_VER) && (_MSC_VER < 1300)
-#include <winsock.h>
-#else
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#endif
-#endif
-
-"
-if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_UN 1
-_ACEOF
-
-
-fi
-ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "#define _GNU_SOURCE 1
-#include <sys/types.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETINET_IN6_H
-#include <netinet/in6.h>
-#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -15298,7 +15167,7 @@ _ACEOF
fi
-ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#define _GNU_SOURCE 1
+ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#define _GNU_SOURCE
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -15306,9 +15175,6 @@ ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#de
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -15336,7 +15202,7 @@ _ACEOF
fi
-ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#define _GNU_SOURCE 1
+ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#define _GNU_SOURCE
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -15344,9 +15210,6 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockad
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -15563,19 +15426,19 @@ _ACEOF
fi
-ac_fn_c_check_type "$LINENO" "struct linger" "ac_cv_type_struct_linger" "
+ac_fn_c_check_type "$LINENO" "struct so_linger" "ac_cv_type_struct_so_linger" "
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
"
-if test "x$ac_cv_type_struct_linger" = xyes; then :
+if test "x$ac_cv_type_struct_so_linger" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_LINGER 1
+#define HAVE_STRUCT_SO_LINGER 1
_ACEOF
-
+#define HAVE_SO_LINGER
fi
@@ -15585,11 +15448,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
- #ifdef _WIN32
- #include <ws2tcpip.h>
- #else
#include <sys/socket.h>
- #endif
int
main ()
{
@@ -15611,7 +15470,6 @@ $as_echo "#define socklen_t unsigned int" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# __func__/__FUNCTION__ is not a macros in general
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __func__" >&5
$as_echo_n "checking whether our compiler supports __func__... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15626,21 +15484,14 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE___func__ 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __FUNCTION__" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __FUNCTION__" >&5
$as_echo_n "checking whether our compiler supports __FUNCTION__... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -15652,19 +15503,23 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+$as_echo "#define __func__ __FUNCTION__" >>confdefs.h
+
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
+$as_echo "#define __func__ __FILE__" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
# check if we can compile with pthreads
have_pthreads=no
if test x$bwin32 != xtrue && test "$enable_thread_support" != "no"; then
@@ -16106,6 +15961,66 @@ else
OPENSSL_FALSE=
fi
+if test "x$enable_openssl" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ERR_remove_thread_state" >&5
+$as_echo_n "checking for library containing ERR_remove_thread_state... " >&6; }
+if ${ac_cv_search_ERR_remove_thread_state+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ERR_remove_thread_state ();
+int
+main ()
+{
+return ERR_remove_thread_state ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' crypto eay32; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_ERR_remove_thread_state=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_ERR_remove_thread_state+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_ERR_remove_thread_state+:} false; then :
+
+else
+ ac_cv_search_ERR_remove_thread_state=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ERR_remove_thread_state" >&5
+$as_echo "$ac_cv_search_ERR_remove_thread_state" >&6; }
+ac_res=$ac_cv_search_ERR_remove_thread_state
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "#define HAVE_ERR_REMOVE_THREAD_STATE 1" >>confdefs.h
+
+fi
+
+fi
# Add some more warnings which we use in development but not in the
# released versions. (Some relevant gcc versions can't handle these.)
@@ -16195,8 +16110,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- # -W is the same as -Wextra
- CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast"
+ CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch"
if test x$enable_gcc_warnings = xyes; then
CFLAGS="$CFLAGS -Werror"
fi
@@ -16229,7 +16143,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# for minheap-internal.h related code.
CFLAGS="$CFLAGS -Wno-unused-function"
- # clang on macosx emits warnings for each directory specified which
+ # clang on macosx emits warnigns for each directory specified which
# isn't "used" generating a lot of build noise (typically 3 warnings
# per file
case "$host_os" in
@@ -16491,10 +16405,6 @@ if test -z "${BUILD_CYGWIN_TRUE}" && test -z "${BUILD_CYGWIN_FALSE}"; then
as_fn_error $? "conditional \"BUILD_CYGWIN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${BUILD_MIDIPIX_TRUE}" && test -z "${BUILD_MIDIPIX_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_MIDIPIX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${BUILD_WITH_NO_UNDEFINED_TRUE}" && test -z "${BUILD_WITH_NO_UNDEFINED_FALSE}"; then
as_fn_error $? "conditional \"BUILD_WITH_NO_UNDEFINED\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16944,7 +16854,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libevent $as_me 2.1.11-stable, which was
+This file was extended by libevent $as_me 2.1.8-stable, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17010,7 +16920,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libevent config.status 2.1.11-stable
+libevent config.status 2.1.8-stable
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -17129,7 +17039,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
-AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
# The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -17181,7 +17091,6 @@ want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
-lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
@@ -17310,6 +17219,7 @@ want_nocaseglob \
DLLTOOL \
sharedlib_from_linklib_cmd \
AR \
+AR_FLAGS \
archiver_list_spec \
STRIP \
RANLIB \
@@ -18031,35 +17941,29 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- # TODO: see whether this extra hack can be removed once we start
- # requiring Autoconf 2.70 or later.
- case $CONFIG_FILES in #(
- *\'*) :
- eval set x "$CONFIG_FILES" ;; #(
- *) :
- set x $CONFIG_FILES ;; #(
- *) :
- ;;
-esac
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
shift
- # Used to flag and report bootstrapping failures.
- am_rc=0
- for am_mf
+ for mf
do
# Strip MF so we end up with the name of the file.
- am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile which includes
- # dependency-tracking related rules and includes.
- # Grep'ing the whole file directly is not great: AIX grep has a line
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
- || continue
- am_dirpart=`$as_dirname -- "$am_mf" ||
-$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$am_mf" : 'X\(//\)[^/]' \| \
- X"$am_mf" : 'X\(//\)$' \| \
- X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$am_mf" |
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -18077,48 +17981,53 @@ $as_echo X"$am_mf" |
q
}
s/.*/./; q'`
- am_filepart=`$as_basename -- "$am_mf" ||
-$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
- X"$am_mf" : 'X\(//\)$' \| \
- X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$am_mf" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
- /^X\/\(\/\/\)$/{
+ /^X\(\/\/\)[^/].*/{
s//\1/
q
}
- /^X\/\(\/\).*/{
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
- { echo "$as_me:$LINENO: cd "$am_dirpart" \
- && sed -e '/# am--include-marker/d' "$am_filepart" \
- | $MAKE -f - am--depfiles" >&5
- (cd "$am_dirpart" \
- && sed -e '/# am--include-marker/d' "$am_filepart" \
- | $MAKE -f - am--depfiles) >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } || am_rc=$?
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
done
- if test $am_rc -ne 0; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "Something went wrong bootstrapping makefile fragments
- for automatic dependency tracking. Try re-running configure with the
- '--disable-dependency-tracking' option to at least be able to build
- the package (albeit without support for automatic dependency tracking).
-See \`config.log' for more details" "$LINENO" 5; }
- fi
- { am_dirpart=; unset am_dirpart;}
- { am_filepart=; unset am_filepart;}
- { am_mf=; unset am_mf;}
- { am_rc=; unset am_rc;}
- rm -f conftest-deps.mk
}
;;
"libtool":C)
@@ -18280,11 +18189,8 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
# The archiver.
AR=$lt_AR
-# Flags to create an archive (by configure).
-lt_ar_flags=$lt_ar_flags
-
# Flags to create an archive.
-AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
+AR_FLAGS=$lt_AR_FLAGS
# How to feed a file listing to the archiver.
archiver_list_spec=$lt_archiver_list_spec
diff --git a/configure.ac b/configure.ac
index 298d3ab..7528d37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,8 +5,8 @@ dnl See LICENSE for copying information.
dnl
dnl Original version Dug Song <dugsong@monkey.org>
-AC_INIT(libevent,2.1.11-stable)
-AC_PREREQ(2.62)
+AC_INIT(libevent,2.1.8-stable)
+AC_PREREQ(2.59)
AC_CONFIG_SRCDIR(event.c)
AC_CONFIG_MACRO_DIR([m4])
@@ -14,7 +14,7 @@ AM_INIT_AUTOMAKE
dnl AM_SILENT_RULES req. automake 1.11. [no] defaults V=1
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_HEADERS(config.h evconfig-private.h:evconfig-private.h.in)
-AC_DEFINE(NUMERIC_VERSION, 0x02010b00, [Numeric representation of the version])
+AC_DEFINE(NUMERIC_VERSION, 0x02010800, [Numeric representation of the version])
dnl Initialize prefix.
if test "$prefix" = "NONE"; then
@@ -160,19 +160,6 @@ die horribly
bwin32=false; AC_MSG_RESULT(no),
)
-dnl - check if the macro __midipix__ is defined on this compiler.
-dnl - (this is how we check for a midipix version of GCC)
-AC_MSG_CHECKING(for MIDIPIX)
-AC_TRY_COMPILE(,
- [
-#ifndef __midipix__
-die horribly
-#endif
- ],
- midipix=true; AC_MSG_RESULT(yes),
- midipix=false; AC_MSG_RESULT(no),
-)
-
dnl - check if the macro __CYGWIN__ is defined on this compiler.
dnl - (this is how we check for a cygwin version of GCC)
AC_MSG_CHECKING(for CYGWIN)
@@ -230,7 +217,6 @@ AC_CHECK_HEADERS([ \
netinet/in.h \
netinet/in6.h \
netinet/tcp.h \
- sys/un.h \
poll.h \
port.h \
stdarg.h \
@@ -340,8 +326,7 @@ fi
AM_CONDITIONAL(BUILD_WIN32, test x$bwin32 = xtrue)
AM_CONDITIONAL(BUILD_CYGWIN, test x$cygwin = xtrue)
-AM_CONDITIONAL(BUILD_MIDIPIX, test x$midipix = xtrue)
-AM_CONDITIONAL(BUILD_WITH_NO_UNDEFINED, test x$bwin32 = xtrue || test x$cygwin = xtrue || test x$midipix = xtrue)
+AM_CONDITIONAL(BUILD_WITH_NO_UNDEFINED, test x$bwin32 = xtrue || test x$cygwin = xtrue)
if test x$bwin32 = xtrue; then
AC_SEARCH_LIBS([getservbyname],[ws2_32])
@@ -357,7 +342,6 @@ AC_CHECK_FUNCS([ \
accept4 \
arc4random \
arc4random_buf \
- arc4random_addrandom \
eventfd \
epoll_create1 \
fcntl \
@@ -479,7 +463,7 @@ fi
AC_MSG_CHECKING(for F_SETFD in fcntl.h)
AC_EGREP_CPP(yes,
[
-#define _GNU_SOURCE 1
+#define _GNU_SOURCE
#include <fcntl.h>
#ifdef F_SETFD
yes
@@ -518,12 +502,6 @@ if test "x$ac_cv_header_sys_event_h" = "xyes"; then
if test "x$havekqueue" = "xyes" ; then
AC_MSG_CHECKING(for working kqueue)
AC_TRY_RUN(
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
#include <sys/types.h>
#include <sys/time.h>
#include <sys/event.h>
@@ -539,7 +517,7 @@ main(int argc, char **argv)
int fd[[2]];
struct kevent ev;
struct timespec ts;
- char buf[[80000]];
+ char buf[[8000]];
if (pipe(fd) == -1)
exit(1);
@@ -621,6 +599,26 @@ main(int argc, char **argv)
fi
AM_CONDITIONAL(EPOLL_BACKEND, [test "x$haveepoll" = "xyes"])
+AC_MSG_CHECKING(waitpid support WNOWAIT)
+AC_TRY_RUN(
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <stdlib.h>
+
+int
+main(int argc, char** argv)
+{
+ pid_t pid;
+ int status;
+ if ((pid = fork()) == 0) _exit(0);
+ _exit(waitpid(pid, &status, WNOWAIT) == -1);
+}, [AC_MSG_RESULT(yes)
+AC_DEFINE(HAVE_WAITPID_WITH_WNOWAIT, 1,
+[Define if waitpid() supports WNOWAIT])
+], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
+
+
haveeventports=no
AC_CHECK_FUNCS(port_create, [haveeventports=yes], )
if test "x$haveeventports" = "xyes" ; then
@@ -665,10 +663,9 @@ AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(size_t)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(off_t)
-AC_CHECK_SIZEOF(time_t)
-AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, struct sockaddr_un, sa_family_t, struct addrinfo, struct sockaddr_storage], , ,
-[#define _GNU_SOURCE 1
+AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t, struct addrinfo, struct sockaddr_storage], , ,
+[#define _GNU_SOURCE
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -676,9 +673,6 @@ AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, struct sockaddr_un, sa_fam
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -721,7 +715,8 @@ AC_CHECK_MEMBERS([struct in6_addr.s6_addr32, struct in6_addr.s6_addr16, struct s
#endif
])
-AC_CHECK_TYPES([struct linger],,,
+AC_CHECK_TYPES([struct so_linger],
+[#define HAVE_SO_LINGER], ,
[
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@@ -731,11 +726,7 @@ AC_CHECK_TYPES([struct linger],,,
AC_MSG_CHECKING([for socklen_t])
AC_TRY_COMPILE([
#include <sys/types.h>
- #ifdef _WIN32
- #include <ws2tcpip.h>
- #else
- #include <sys/socket.h>
- #endif],
+ #include <sys/socket.h>],
[socklen_t x;],
AC_MSG_RESULT([yes]),
[AC_MSG_RESULT([no])
@@ -743,23 +734,21 @@ AC_TRY_COMPILE([
[Define to unsigned int if you dont have it])]
)
-# __func__/__FUNCTION__ is not a macros in general
AC_MSG_CHECKING([whether our compiler supports __func__])
AC_TRY_COMPILE([],
- [ const char *cp = __func__; ],
- [ AC_DEFINE(HAVE___func__, 1, [Define to 1 if compiler have __func__])
- AC_MSG_RESULT([yes])
- ],
- AC_MSG_RESULT([no])
-)
-AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
-AC_TRY_COMPILE([],
- [ const char *cp = __FUNCTION__; ],
- [ AC_DEFINE(HAVE___FUNCTION__, 1, [Define to 1 if compiler have __FUNCTION__])
- AC_MSG_RESULT([yes])
- ],
- AC_MSG_RESULT([no])
-)
+ [ const char *cp = __func__; ],
+ AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
+ AC_TRY_COMPILE([],
+ [ const char *cp = __FUNCTION__; ],
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(__func__, __FUNCTION__,
+ [Define to appropriate substitue if compiler doesnt have __func__]),
+ AC_MSG_RESULT([no])
+ AC_DEFINE(__func__, __FILE__,
+ [Define to appropriate substitue if compiler doesnt have __func__])))
+
# check if we can compile with pthreads
have_pthreads=no
@@ -802,6 +791,10 @@ fi
# check if we have and should use openssl
AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
+if test "x$enable_openssl" = "xyes"; then
+ AC_SEARCH_LIBS([ERR_remove_thread_state], [crypto eay32],
+ [AC_DEFINE(HAVE_ERR_REMOVE_THREAD_STATE, 1, [Define to 1 if you have ERR_remove_thread_stat().])])
+fi
# Add some more warnings which we use in development but not in the
# released versions. (Some relevant gcc versions can't handle these.)
@@ -827,8 +820,7 @@ if test x$enable_gcc_warnings != xno && test "$GCC" = "yes"; then
#error
#endif])], have_clang=yes, have_clang=no)
- # -W is the same as -Wextra
- CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast"
+ CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch"
if test x$enable_gcc_warnings = xyes; then
CFLAGS="$CFLAGS -Werror"
fi
@@ -861,7 +853,7 @@ if test x$enable_gcc_warnings != xno && test "$GCC" = "yes"; then
# for minheap-internal.h related code.
CFLAGS="$CFLAGS -Wno-unused-function"
- # clang on macosx emits warnings for each directory specified which
+ # clang on macosx emits warnigns for each directory specified which
# isn't "used" generating a lot of build noise (typically 3 warnings
# per file
case "$host_os" in
diff --git a/defer-internal.h b/defer-internal.h
index d6f80a1..e3c7d7d 100644
--- a/defer-internal.h
+++ b/defer-internal.h
@@ -46,7 +46,6 @@ typedef void (*deferred_cb_fn)(struct event_callback *, void *);
@param cb The function to run when the struct event_callback executes.
@param arg The function's second argument.
*/
-EVENT2_EXPORT_SYMBOL
void event_deferred_cb_init_(struct event_callback *, ev_uint8_t, deferred_cb_fn, void *);
/**
Change the priority of a non-pending event_callback.
@@ -55,14 +54,12 @@ void event_deferred_cb_set_priority_(struct event_callback *, ev_uint8_t);
/**
Cancel a struct event_callback if it is currently scheduled in an event_base.
*/
-EVENT2_EXPORT_SYMBOL
void event_deferred_cb_cancel_(struct event_base *, struct event_callback *);
/**
Activate a struct event_callback if it is not currently scheduled in an event_base.
Return true if it was not previously scheduled.
*/
-EVENT2_EXPORT_SYMBOL
int event_deferred_cb_schedule_(struct event_base *, struct event_callback *);
#ifdef __cplusplus
diff --git a/depcomp b/depcomp
index 65cbf70..fc98710 100755
--- a/depcomp
+++ b/depcomp
@@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@ scriptversion=2018-03-07.03; # UTC
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -783,9 +783,9 @@ exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
diff --git a/epoll.c b/epoll.c
index a0df0d2..bf730b2 100644
--- a/epoll.c
+++ b/epoll.c
@@ -401,14 +401,11 @@ epoll_nochangelist_del(struct event_base *base, evutil_socket_t fd,
ch.old_events = old;
ch.read_change = ch.write_change = ch.close_change = 0;
if (events & EV_WRITE)
- ch.write_change = EV_CHANGE_DEL |
- (events & EV_ET);
+ ch.write_change = EV_CHANGE_DEL;
if (events & EV_READ)
- ch.read_change = EV_CHANGE_DEL |
- (events & EV_ET);
+ ch.read_change = EV_CHANGE_DEL;
if (events & EV_CLOSED)
- ch.close_change = EV_CHANGE_DEL |
- (events & EV_ET);
+ ch.close_change = EV_CHANGE_DEL;
return epoll_apply_one_change(base, base->evbase, &ch);
}
diff --git a/epolltable-internal.h b/epolltable-internal.h
index 73c2e36..da30e09 100644
--- a/epolltable-internal.h
+++ b/epolltable-internal.h
@@ -34,7 +34,7 @@
Note also that this table is a little sparse, since ADD+DEL is
nonsensical ("xxx" in the list below.)
- Note also that we are shifting old_events by only 5 bits, since
+ Note also also that we are shifting old_events by only 5 bits, since
EV_READ is 2 and EV_WRITE is 4.
The table was auto-generated with a python script, according to this
diff --git a/evbuffer-internal.h b/evbuffer-internal.h
index d09b4f1..cf4bddc 100644
--- a/evbuffer-internal.h
+++ b/evbuffer-internal.h
@@ -92,7 +92,7 @@ struct evbuffer {
* If the buffer has no chains, it is NULL.
*
* The last_with_datap pointer points at _whatever 'next' pointer_
- * pointing at the last_with_data chain. If the last_with_data chain
+ * points at the last_with_datap chain. If the last_with_data chain
* is the first chain, or it is NULL, then the last_with_datap pointer
* is &buf->first.
*/
diff --git a/evconfig-private.h b/evconfig-private.h
index 31e6100..f6b08e3 100644
--- a/evconfig-private.h
+++ b/evconfig-private.h
@@ -46,11 +46,4 @@
/* #undef _POSIX_SOURCE */
#endif
-/* Enable POSIX.2 extensions on QNX for getopt */
-#ifdef __QNX__
-# ifndef __EXT_POSIX2
-# define __EXT_POSIX2
-# endif
-#endif
-
#endif
diff --git a/evconfig-private.h.cmake b/evconfig-private.h.cmake
deleted file mode 100644
index 1adf9c0..0000000
--- a/evconfig-private.h.cmake
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#ifndef EVCONFIG_PRIVATE_H_INCLUDED_
-#define EVCONFIG_PRIVATE_H_INCLUDED_
-
-/* Enable extensions on AIX 3, Interix. */
-#cmakedefine _ALL_SOURCE
-
-/* Enable GNU extensions on systems that have them. */
-#cmakedefine _GNU_SOURCE 1
-
-/* Enable threading extensions on Solaris. */
-#cmakedefine _POSIX_PTHREAD_SEMANTICS 1
-
-/* Enable extensions on HP NonStop. */
-#cmakedefine _TANDEM_SOURCE 1
-
-/* Enable general extensions on Solaris. */
-#cmakedefine __EXTENSIONS__
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#cmakedefine _FILE_OFFSET_BITS 1
-/* Define for large files, on AIX-style hosts. */
-#cmakedefine _LARGE_FILES 1
-
-/* Define to 1 if on MINIX. */
-#cmakedefine _MINIX 1
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-#cmakedefine _POSIX_1_SOURCE 1
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#cmakedefine _POSIX_SOURCE 1
-
-/* Enable POSIX.2 extensions on QNX for getopt */
-#ifdef __QNX__
-#cmakedefine __EXT_POSIX2 1
-#endif
-
-#endif
diff --git a/evconfig-private.h.in b/evconfig-private.h.in
index 8cd6478..7b3dfdb 100644
--- a/evconfig-private.h.in
+++ b/evconfig-private.h.in
@@ -45,11 +45,4 @@
#undef _POSIX_SOURCE
#endif
-/* Enable POSIX.2 extensions on QNX for getopt */
-#ifdef __QNX__
-# ifndef __EXT_POSIX2
-# define __EXT_POSIX2
-# endif
-#endif
-
#endif
diff --git a/evdns.c b/evdns.c
index de3848a..e9dbc35 100644
--- a/evdns.c
+++ b/evdns.c
@@ -77,7 +77,6 @@
#include <stdarg.h>
#ifdef _WIN32
#include <winsock2.h>
-#include <winerror.h>
#include <ws2tcpip.h>
#ifndef _WIN32_IE
#define _WIN32_IE 0x400
@@ -347,9 +346,6 @@ struct evdns_base {
struct timeval global_getaddrinfo_allow_skew;
- int so_rcvbuf;
- int so_sndbuf;
-
int getaddrinfo_ipv4_timeouts;
int getaddrinfo_ipv6_timeouts;
int getaddrinfo_ipv4_answered;
@@ -867,19 +863,6 @@ reply_schedule_callback(struct request *const req, u32 ttl, u32 err, struct repl
&d->deferred);
}
-
-#define _QR_MASK 0x8000U
-#define _OP_MASK 0x7800U
-#define _AA_MASK 0x0400U
-#define _TC_MASK 0x0200U
-#define _RD_MASK 0x0100U
-#define _RA_MASK 0x0080U
-#define _Z_MASK 0x0040U
-#define _AD_MASK 0x0020U
-#define _CD_MASK 0x0010U
-#define _RCODE_MASK 0x000fU
-#define _Z_MASK_DEPRECATED 0x0070U
-
/* this processes a parsed reply packet */
static void
reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply) {
@@ -893,12 +876,12 @@ reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply)
ASSERT_LOCKED(req->base);
ASSERT_VALID_REQUEST(req);
- if (flags & (_RCODE_MASK | _TC_MASK) || !reply || !reply->have_answer) {
+ if (flags & 0x020f || !reply || !reply->have_answer) {
/* there was an error */
- if (flags & _TC_MASK) {
+ if (flags & 0x0200) {
error = DNS_ERR_TRUNCATED;
- } else if (flags & _RCODE_MASK) {
- u16 error_code = (flags & _RCODE_MASK) - 1;
+ } else if (flags & 0x000f) {
+ u16 error_code = (flags & 0x000f) - 1;
if (error_code > 4) {
error = DNS_ERR_UNKNOWN;
} else {
@@ -1063,8 +1046,8 @@ reply_parse(struct evdns_base *base, u8 *packet, int length) {
memset(&reply, 0, sizeof(reply));
/* If it's not an answer, it doesn't correspond to any request. */
- if (!(flags & _QR_MASK)) return -1; /* must be an answer */
- if ((flags & (_RCODE_MASK|_TC_MASK)) && (flags & (_RCODE_MASK|_TC_MASK)) != DNS_ERR_NOTEXIST) {
+ if (!(flags & 0x8000)) return -1; /* must be an answer */
+ if ((flags & 0x020f) && (flags & 0x020f) != DNS_ERR_NOTEXIST) {
/* there was an error and it's not NXDOMAIN */
goto err;
}
@@ -1253,8 +1236,8 @@ request_parse(u8 *packet, int length, struct evdns_server_port *port, struct soc
(void)additional;
(void)authority;
- if (flags & _QR_MASK) return -1; /* Must not be an answer. */
- flags &= (_RD_MASK|_CD_MASK); /* Only RD and CD get preserved. */
+ if (flags & 0x8000) return -1; /* Must not be an answer. */
+ flags &= 0x0110; /* Only RD and CD get preserved. */
server_req = mm_malloc(sizeof(struct server_request));
if (server_req == NULL) return -1;
@@ -1294,7 +1277,7 @@ request_parse(u8 *packet, int length, struct evdns_server_port *port, struct soc
port->refcnt++;
/* Only standard queries are supported. */
- if (flags & _OP_MASK) {
+ if (flags & 0x7800) {
evdns_server_request_respond(&(server_req->base), DNS_ERR_NOTIMPL);
return -1;
}
@@ -1303,12 +1286,14 @@ request_parse(u8 *packet, int length, struct evdns_server_port *port, struct soc
return 0;
err:
- if (server_req->base.questions) {
- for (i = 0; i < server_req->base.nquestions; ++i)
- mm_free(server_req->base.questions[i]);
- mm_free(server_req->base.questions);
+ if (server_req) {
+ if (server_req->base.questions) {
+ for (i = 0; i < server_req->base.nquestions; ++i)
+ mm_free(server_req->base.questions[i]);
+ mm_free(server_req->base.questions);
+ }
+ mm_free(server_req);
}
- mm_free(server_req);
return -1;
#undef SKIP_NAME
@@ -1766,7 +1751,6 @@ evdns_close_server_port(struct evdns_server_port *port)
server_port_free(port);
} else {
port->closing = 1;
- EVDNS_UNLOCK(port);
}
}
@@ -1920,7 +1904,7 @@ evdns_server_request_format_response(struct server_request *req, int err)
/* Set response bit and error code; copy OPCODE and RD fields from
* question; copy RA and AA if set by caller. */
flags = req->base.flags;
- flags |= (_QR_MASK | err);
+ flags |= (0x8000 | err);
dnslabel_table_init(&table);
APPEND16(req->trans_id);
@@ -2281,11 +2265,10 @@ evdns_request_transmit(struct request *req) {
nameserver_write_waiting(req->ns, 1);
return 1;
case 2:
- /* failed to transmit the request entirely. we can fallthrough since
- * we'll set a timeout, which will time out, and make us retransmit the
- * request anyway. */
+ /* failed to transmit the request entirely. */
retcode = 1;
- EVUTIL_FALLTHROUGH;
+ /* fall through: we'll set a timeout, which will time out,
+ * and make us retransmit the request anyway. */
default:
/* all ok */
log(EVDNS_LOG_DEBUG,
@@ -2542,23 +2525,6 @@ evdns_nameserver_add_impl_(struct evdns_base *base, const struct sockaddr *addre
}
}
- if (base->so_rcvbuf) {
- if (setsockopt(ns->socket, SOL_SOCKET, SO_RCVBUF,
- (void *)&base->so_rcvbuf, sizeof(base->so_rcvbuf))) {
- log(EVDNS_LOG_WARN, "Couldn't set SO_RCVBUF to %i", base->so_rcvbuf);
- err = -SO_RCVBUF;
- goto out2;
- }
- }
- if (base->so_sndbuf) {
- if (setsockopt(ns->socket, SOL_SOCKET, SO_SNDBUF,
- (void *)&base->so_sndbuf, sizeof(base->so_sndbuf))) {
- log(EVDNS_LOG_WARN, "Couldn't set SO_SNDBUF to %i", base->so_sndbuf);
- err = -SO_SNDBUF;
- goto out2;
- }
- }
-
memcpy(&ns->address, address, addrlen);
ns->addrlen = addrlen;
ns->state = 1;
@@ -3347,16 +3313,10 @@ search_request_finished(struct evdns_request *const handle) {
static void
evdns_resolv_set_defaults(struct evdns_base *base, int flags) {
- int add_default = flags & DNS_OPTION_NAMESERVERS;
- if (flags & DNS_OPTION_NAMESERVERS_NO_DEFAULT)
- add_default = 0;
-
/* if the file isn't found then we assume a local resolver */
ASSERT_LOCKED(base);
- if (flags & DNS_OPTION_SEARCH)
- search_set_from_hostname(base);
- if (add_default)
- evdns_base_nameserver_ip_add(base, "127.0.0.1");
+ if (flags & DNS_OPTION_SEARCH) search_set_from_hostname(base);
+ if (flags & DNS_OPTION_NAMESERVERS) evdns_base_nameserver_ip_add(base,"127.0.0.1");
}
#ifndef EVENT__HAVE_STRTOK_R
@@ -3552,16 +3512,6 @@ evdns_base_set_option_impl(struct evdns_base *base,
val);
memcpy(&base->global_nameserver_probe_initial_timeout, &tv,
sizeof(tv));
- } else if (str_matches_option(option, "so-rcvbuf:")) {
- int buf = strtoint(val);
- if (!(flags & DNS_OPTION_MISC)) return 0;
- log(EVDNS_LOG_DEBUG, "Setting SO_RCVBUF to %s", val);
- base->so_rcvbuf = buf;
- } else if (str_matches_option(option, "so-sndbuf:")) {
- int buf = strtoint(val);
- if (!(flags & DNS_OPTION_MISC)) return 0;
- log(EVDNS_LOG_DEBUG, "Setting SO_SNDBUF to %s", val);
- base->so_sndbuf = buf;
}
return 0;
}
@@ -3662,14 +3612,9 @@ evdns_base_resolv_conf_parse_impl(struct evdns_base *base, int flags, const char
char *resolv;
char *start;
int err = 0;
- int add_default;
log(EVDNS_LOG_DEBUG, "Parsing resolv.conf file %s", filename);
- add_default = flags & DNS_OPTION_NAMESERVERS;
- if (flags & DNS_OPTION_NAMESERVERS_NO_DEFAULT)
- add_default = 0;
-
if (flags & DNS_OPTION_HOSTSFILE) {
char *fname = evdns_get_default_hosts_filename();
evdns_base_load_hosts(base, fname);
@@ -3677,11 +3622,6 @@ evdns_base_resolv_conf_parse_impl(struct evdns_base *base, int flags, const char
mm_free(fname);
}
- if (!filename) {
- evdns_resolv_set_defaults(base, flags);
- return 1;
- }
-
if ((err = evutil_read_file_(filename, &resolv, &n, 0)) < 0) {
if (err == -1) {
/* No file. */
@@ -3705,7 +3645,7 @@ evdns_base_resolv_conf_parse_impl(struct evdns_base *base, int flags, const char
}
}
- if (!base->server_head && add_default) {
+ if (!base->server_head && (flags & DNS_OPTION_NAMESERVERS)) {
/* no nameservers were configured. */
evdns_base_nameserver_ip_add(base, "127.0.0.1");
err = 6;
@@ -4006,12 +3946,7 @@ evdns_base_new(struct event_base *event_base, int flags)
TAILQ_INIT(&base->hostsdb);
-#define EVDNS_BASE_ALL_FLAGS ( \
- EVDNS_BASE_INITIALIZE_NAMESERVERS | \
- EVDNS_BASE_DISABLE_WHEN_INACTIVE | \
- EVDNS_BASE_NAMESERVERS_NO_DEFAULT | \
- 0)
-
+#define EVDNS_BASE_ALL_FLAGS (0x8001)
if (flags & ~EVDNS_BASE_ALL_FLAGS) {
flags = EVDNS_BASE_INITIALIZE_NAMESERVERS;
log(EVDNS_LOG_WARN,
@@ -4022,15 +3957,10 @@ evdns_base_new(struct event_base *event_base, int flags)
if (flags & EVDNS_BASE_INITIALIZE_NAMESERVERS) {
int r;
- int opts = DNS_OPTIONS_ALL;
- if (flags & EVDNS_BASE_NAMESERVERS_NO_DEFAULT) {
- opts |= DNS_OPTION_NAMESERVERS_NO_DEFAULT;
- }
-
#ifdef _WIN32
r = evdns_base_config_windows_nameservers(base);
#else
- r = evdns_base_resolv_conf_parse(base, opts, "/etc/resolv.conf");
+ r = evdns_base_resolv_conf_parse(base, DNS_OPTIONS_ALL, "/etc/resolv.conf");
#endif
if (r == -1) {
evdns_base_free_and_unlock(base, 0);
@@ -4706,7 +4636,6 @@ evdns_getaddrinfo(struct evdns_base *dns_base,
int err;
int port = 0;
int want_cname = 0;
- int started = 0;
if (!dns_base) {
dns_base = current_base;
@@ -4785,8 +4714,6 @@ evdns_getaddrinfo(struct evdns_base *dns_base,
* launching those requests. (XXX we don't do that yet.)
*/
- EVDNS_LOCK(dns_base);
-
if (hints.ai_family != PF_INET6) {
log(EVDNS_LOG_DEBUG, "Sending request for %s on ipv4 as %p",
nodename, &data->ipv4_request);
@@ -4813,11 +4740,7 @@ evdns_getaddrinfo(struct evdns_base *dns_base,
evtimer_assign(&data->timeout, dns_base->event_base,
evdns_getaddrinfo_timeout_cb, data);
- started = (data->ipv4_request.r || data->ipv6_request.r);
-
- EVDNS_UNLOCK(dns_base);
-
- if (started) {
+ if (data->ipv4_request.r || data->ipv6_request.r) {
return data;
} else {
mm_free(data);
diff --git a/event-config.h.cmake b/event-config.h.cmake
deleted file mode 100644
index 498ab1e..0000000
--- a/event-config.h.cmake
+++ /dev/null
@@ -1,507 +0,0 @@
-/* event-config.h
- *
- * This file was generated by cmake when the makefiles were generated.
- *
- * DO NOT EDIT THIS FILE.
- *
- * Do not rely on macros in this file existing in later versions.
- */
-#ifndef EVENT2_EVENT_CONFIG_H_INCLUDED_
-#define EVENT2_EVENT_CONFIG_H_INCLUDED_
-
-/* Numeric representation of the version */
-#define EVENT__NUMERIC_VERSION @EVENT_NUMERIC_VERSION@
-#define EVENT__PACKAGE_VERSION "@EVENT_PACKAGE_VERSION@"
-
-#define EVENT__VERSION_MAJOR @EVENT_VERSION_MAJOR@
-#define EVENT__VERSION_MINOR @EVENT_VERSION_MINOR@
-#define EVENT__VERSION_PATCH @EVENT_VERSION_PATCH@
-
-/* Version number of package */
-#define EVENT__VERSION "@EVENT_VERSION@"
-
-/* Name of package */
-#define EVENT__PACKAGE "libevent"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define EVENT__PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define EVENT__PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define EVENT__PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define EVENT__PACKAGE_TARNAME ""
-
-/* Define if libevent should build without support for a debug mode */
-#cmakedefine EVENT__DISABLE_DEBUG_MODE 1
-
-/* Define if libevent should not allow replacing the mm functions */
-#cmakedefine EVENT__DISABLE_MM_REPLACEMENT 1
-
-/* Define if libevent should not be compiled with thread support */
-#cmakedefine EVENT__DISABLE_THREAD_SUPPORT 1
-
-/* Define to 1 if you have the `accept4' function. */
-#cmakedefine EVENT__HAVE_ACCEPT4 1
-
-/* Define to 1 if you have the `arc4random' function. */
-#cmakedefine EVENT__HAVE_ARC4RANDOM 1
-
-/* Define to 1 if you have the `arc4random_buf' function. */
-#cmakedefine EVENT__HAVE_ARC4RANDOM_BUF 1
-
-/* Define to 1 if you have the `arc4random_addrandom' function. */
-#cmakedefine EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1
-
-/* Define if clock_gettime is available in libc */
-#cmakedefine EVENT__DNS_USE_CPU_CLOCK_FOR_ID 1
-
-/* Define is no secure id variant is available */
-#cmakedefine EVENT__DNS_USE_GETTIMEOFDAY_FOR_ID 1
-#cmakedefine EVENT__DNS_USE_FTIME_FOR_ID 1
-
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#cmakedefine EVENT__HAVE_ARPA_INET_H 1
-
-/* Define to 1 if you have the `clock_gettime' function. */
-#cmakedefine EVENT__HAVE_CLOCK_GETTIME 1
-
-/* Define to 1 if you have the declaration of `CTL_KERN'. */
-#define EVENT__HAVE_DECL_CTL_KERN @EVENT__HAVE_DECL_CTL_KERN@
-
-/* Define to 1 if you have the declaration of `KERN_ARND'. */
-#define EVENT__HAVE_DECL_KERN_ARND @EVENT__HAVE_DECL_KERN_ARND@
-
-/* Define to 1 if you have the declaration of `KERN_RANDOM'. */
-#define EVENT__HAVE_DECL_KERN_RANDOM @EVENT__HAVE_DECL_KERN_RANDOM@
-
-/* Define to 1 if you have the declaration of `RANDOM_UUID'. */
-#define EVENT__HAVE_DECL_RANDOM_UUID @EVENT__HAVE_DECL_RANDOM_UUID@
-
-/* Define if /dev/poll is available */
-#cmakedefine EVENT__HAVE_DEVPOLL 1
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#cmakedefine EVENT__HAVE_NETDB_H 1
-
-/* Define to 1 if fd_mask type is defined */
-#cmakedefine EVENT__HAVE_FD_MASK 1
-
-/* Define to 1 if the <sys/queue.h> header file defines TAILQ_FOREACH. */
-#cmakedefine EVENT__HAVE_TAILQFOREACH 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#cmakedefine EVENT__HAVE_DLFCN_H 1
-
-/* Define if your system supports the epoll system calls */
-#cmakedefine EVENT__HAVE_EPOLL 1
-
-/* Define to 1 if you have the `epoll_create1' function. */
-#cmakedefine EVENT__HAVE_EPOLL_CREATE1 1
-
-/* Define to 1 if you have the `epoll_ctl' function. */
-#cmakedefine EVENT__HAVE_EPOLL_CTL 1
-
-/* Define to 1 if you have the `eventfd' function. */
-#cmakedefine EVENT__HAVE_EVENTFD 1
-
-/* Define if your system supports event ports */
-#cmakedefine EVENT__HAVE_EVENT_PORTS 1
-
-/* Define to 1 if you have the `fcntl' function. */
-#cmakedefine EVENT__HAVE_FCNTL 1
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#cmakedefine EVENT__HAVE_FCNTL_H 1
-
-/* Define to 1 if you have the `getaddrinfo' function. */
-#cmakedefine EVENT__HAVE_GETADDRINFO 1
-
-/* Define to 1 if you have the `getegid' function. */
-#cmakedefine EVENT__HAVE_GETEGID 1
-
-/* Define to 1 if you have the `geteuid' function. */
-#cmakedefine EVENT__HAVE_GETEUID 1
-
-/* TODO: Check for different gethostname argument counts. CheckPrototypeDefinition.cmake can be used. */
-/* Define this if you have any gethostbyname_r() */
-#cmakedefine EVENT__HAVE_GETHOSTBYNAME_R 1
-
-/* Define this if gethostbyname_r takes 3 arguments */
-#cmakedefine EVENT__HAVE_GETHOSTBYNAME_R_3_ARG 1
-
-/* Define this if gethostbyname_r takes 5 arguments */
-#cmakedefine EVENT__HAVE_GETHOSTBYNAME_R_5_ARG 1
-
-/* Define this if gethostbyname_r takes 6 arguments */
-#cmakedefine EVENT__HAVE_GETHOSTBYNAME_R_6_ARG 1
-
-/* Define to 1 if you have the `getifaddrs' function. */
-#cmakedefine EVENT__HAVE_GETIFADDRS 1
-
-/* Define to 1 if you have the `getnameinfo' function. */
-#cmakedefine EVENT__HAVE_GETNAMEINFO 1
-
-/* Define to 1 if you have the `getprotobynumber' function. */
-#cmakedefine EVENT__HAVE_GETPROTOBYNUMBER 1
-
-/* Define to 1 if you have the `getservbyname' function. */
-#cmakedefine EVENT__HAVE_GETSERVBYNAME 1
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#cmakedefine EVENT__HAVE_GETTIMEOFDAY 1
-
-/* Define to 1 if you have the <ifaddrs.h> header file. */
-#cmakedefine EVENT__HAVE_IFADDRS_H 1
-
-/* Define to 1 if you have the `inet_ntop' function. */
-#cmakedefine EVENT__HAVE_INET_NTOP 1
-
-/* Define to 1 if you have the `inet_pton' function. */
-#cmakedefine EVENT__HAVE_INET_PTON 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#cmakedefine EVENT__HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `issetugid' function. */
-#cmakedefine EVENT__HAVE_ISSETUGID 1
-
-/* Define to 1 if you have the `kqueue' function. */
-#cmakedefine EVENT__HAVE_KQUEUE 1
-
-/* Define if the system has zlib */
-#cmakedefine EVENT__HAVE_LIBZ 1
-
-/* Define to 1 if you have the `mach_absolute_time' function. */
-#cmakedefine EVENT__HAVE_MACH_ABSOLUTE_TIME 1
-
-/* Define to 1 if you have the <mach/mach_time.h> header file. */
-#cmakedefine EVENT__HAVE_MACH_MACH_TIME_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#cmakedefine EVENT__HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `mmap' function. */
-#cmakedefine EVENT__HAVE_MMAP 1
-
-/* Define to 1 if you have the `nanosleep' function. */
-#cmakedefine EVENT__HAVE_NANOSLEEP 1
-
-/* Define to 1 if you have the `usleep' function. */
-#cmakedefine EVENT__HAVE_USLEEP 1
-
-/* Define to 1 if you have the <netinet/in6.h> header file. */
-#cmakedefine EVENT__HAVE_NETINET_IN6_H 1
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#cmakedefine EVENT__HAVE_NETINET_IN_H 1
-
-/* Define to 1 if you have the <netinet/tcp.h> header file. */
-#cmakedefine EVENT__HAVE_NETINET_TCP_H 1
-
-/* Define to 1 if you have the <sys/un.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_UN_H 1
-
-/* Define to 1 if you have the <afunix.h> header file. */
-#cmakedefine EVENT__HAVE_AFUNIX_H 1
-
-/* Define if the system has openssl */
-#cmakedefine EVENT__HAVE_OPENSSL 1
-
-/* Define to 1 if you have the `pipe' function. */
-#cmakedefine EVENT__HAVE_PIPE 1
-
-/* Define to 1 if you have the `pipe2' function. */
-#cmakedefine EVENT__HAVE_PIPE2 1
-
-/* Define to 1 if you have the `poll' function. */
-#cmakedefine EVENT__HAVE_POLL 1
-
-/* Define to 1 if you have the <poll.h> header file. */
-#cmakedefine EVENT__HAVE_POLL_H 1
-
-/* Define to 1 if you have the `port_create' function. */
-#cmakedefine EVENT__HAVE_PORT_CREATE 1
-
-/* Define to 1 if you have the <port.h> header file. */
-#cmakedefine EVENT__HAVE_PORT_H 1
-
-/* Define if we have pthreads on this system */
-#cmakedefine EVENT__HAVE_PTHREADS 1
-
-/* Define to 1 if you have the `putenv' function. */
-#cmakedefine EVENT__HAVE_PUTENV 1
-
-/* Define to 1 if the system has the type `sa_family_t'. */
-#cmakedefine EVENT__HAVE_SA_FAMILY_T 1
-
-/* Define to 1 if you have the `select' function. */
-#cmakedefine EVENT__HAVE_SELECT 1
-
-/* Define to 1 if you have the `setenv' function. */
-#cmakedefine EVENT__HAVE_SETENV 1
-
-/* Define if F_SETFD is defined in <fcntl.h> */
-#cmakedefine EVENT__HAVE_SETFD 1
-
-/* Define to 1 if you have the `setrlimit' function. */
-#cmakedefine EVENT__HAVE_SETRLIMIT 1
-
-/* Define to 1 if you have the `sendfile' function. */
-#cmakedefine EVENT__HAVE_SENDFILE 1
-
-/* Define to 1 if you have the `sigaction' function. */
-#cmakedefine EVENT__HAVE_SIGACTION 1
-
-/* Define to 1 if you have the `signal' function. */
-#cmakedefine EVENT__HAVE_SIGNAL 1
-
-/* Define to 1 if you have the `splice' function. */
-#cmakedefine EVENT__HAVE_SPLICE 1
-
-/* Define to 1 if you have the <stdarg.h> header file. */
-#cmakedefine EVENT__HAVE_STDARG_H 1
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#cmakedefine EVENT__HAVE_STDDEF_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine EVENT__HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine EVENT__HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#cmakedefine EVENT__HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#cmakedefine EVENT__HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strlcpy' function. */
-#cmakedefine EVENT__HAVE_STRLCPY 1
-
-/* Define to 1 if you have the `strsep' function. */
-#cmakedefine EVENT__HAVE_STRSEP 1
-
-/* Define to 1 if you have the `strtok_r' function. */
-#cmakedefine EVENT__HAVE_STRTOK_R 1
-
-/* Define to 1 if you have the `strtoll' function. */
-#cmakedefine EVENT__HAVE_STRTOLL 1
-
-/* Define to 1 if the system has the type `struct addrinfo'. */
-#cmakedefine EVENT__HAVE_STRUCT_ADDRINFO 1
-
-/* Define to 1 if the system has the type `struct in6_addr'. */
-#cmakedefine EVENT__HAVE_STRUCT_IN6_ADDR 1
-
-/* Define to 1 if `s6_addr16' is member of `struct in6_addr'. */
-#cmakedefine EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1
-
-/* Define to 1 if `s6_addr32' is member of `struct in6_addr'. */
-#cmakedefine EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1
-
-/* Define to 1 if the system has the type `struct sockaddr_in6'. */
-#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_IN6 1
-
-/* Define to 1 if `sin6_len' is member of `struct sockaddr_in6'. */
-#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1
-
-/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */
-#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
-
-/* Define to 1 if the system has the type `struct sockaddr_un'. */
-#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_UN 1
-
-/* Define to 1 if the system has the type `struct sockaddr_storage'. */
-#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1
-
-/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
-#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
-
-/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
-#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
-
-/* Define to 1 if the system has the type `struct linger'. */
-#cmakedefine EVENT__HAVE_STRUCT_LINGER 1
-
-/* Define to 1 if you have the `sysctl' function. */
-#cmakedefine EVENT__HAVE_SYSCTL 1
-
-/* Define to 1 if you have the <sys/epoll.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_EPOLL_H 1
-
-/* Define to 1 if you have the <sys/eventfd.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_EVENTFD_H 1
-
-/* Define to 1 if you have the <sys/event.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_EVENT_H 1
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_IOCTL_H 1
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_MMAN_H 1
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_PARAM_H 1
-
-/* Define to 1 if you have the <sys/queue.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_QUEUE_H 1
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_RESOURCE_H 1
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_SELECT_H 1
-
-/* Define to 1 if you have the <sys/sendfile.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_SENDFILE_H 1
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_SOCKET_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/sysctl.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_SYSCTL_H 1
-
-/* Define to 1 if you have the <sys/timerfd.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_TIMERFD_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <sys/uio.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_UIO_H 1
-
-/* Define to 1 if you have the <sys/wait.h> header file. */
-#cmakedefine EVENT__HAVE_SYS_WAIT_H 1
-
-/* Define to 1 if you have the <errno.h> header file. */
-#cmakedefine EVENT__HAVE_ERRNO_H 1
-
-/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
-#cmakedefine EVENT__HAVE_TAILQFOREACH 1
-
-/* Define if timeradd is defined in <sys/time.h> */
-#cmakedefine EVENT__HAVE_TIMERADD 1
-
-/* Define if timerclear is defined in <sys/time.h> */
-#cmakedefine EVENT__HAVE_TIMERCLEAR 1
-
-/* Define if timercmp is defined in <sys/time.h> */
-#cmakedefine EVENT__HAVE_TIMERCMP 1
-
-
-/* Define to 1 if you have the `timerfd_create' function. */
-#cmakedefine EVENT__HAVE_TIMERFD_CREATE 1
-
-/* Define if timerisset is defined in <sys/time.h> */
-#cmakedefine EVENT__HAVE_TIMERISSET 1
-
-/* Define to 1 if the system has the type `uint8_t'. */
-#cmakedefine EVENT__HAVE_UINT8_T 1
-
-/* Define to 1 if the system has the type `uint16_t'. */
-#cmakedefine EVENT__HAVE_UINT16_T 1
-
-/* Define to 1 if the system has the type `uint32_t'. */
-#cmakedefine EVENT__HAVE_UINT32_T 1
-
-/* Define to 1 if the system has the type `uint64_t'. */
-#cmakedefine EVENT__HAVE_UINT64_T 1
-
-/* Define to 1 if the system has the type `uintptr_t'. */
-#cmakedefine EVENT__HAVE_UINTPTR_T 1
-
-/* Define to 1 if you have the `umask' function. */
-#cmakedefine EVENT__HAVE_UMASK 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#cmakedefine EVENT__HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the `unsetenv' function. */
-#cmakedefine EVENT__HAVE_UNSETENV 1
-
-/* Define to 1 if you have the `vasprintf' function. */
-#cmakedefine EVENT__HAVE_VASPRINTF 1
-
-/* Define if kqueue works correctly with pipes */
-#cmakedefine EVENT__HAVE_WORKING_KQUEUE 1
-
-#ifdef __USE_UNUSED_DEFINITIONS__
-/* Define to necessary symbol if this constant uses a non-standard name on your system. */
-/* XXX: Hello, this isn't even used, nor is it defined anywhere... - Ellzey */
-#define EVENT__PTHREAD_CREATE_JOINABLE ${EVENT__PTHREAD_CREATE_JOINABLE}
-#endif
-
-/* The size of `pthread_t', as computed by sizeof. */
-#define EVENT__SIZEOF_PTHREAD_T @EVENT__SIZEOF_PTHREAD_T@
-
-/* The size of a `int', as computed by sizeof. */
-#define EVENT__SIZEOF_INT @EVENT__SIZEOF_INT@
-
-/* The size of a `long', as computed by sizeof. */
-#define EVENT__SIZEOF_LONG @EVENT__SIZEOF_LONG@
-
-/* The size of a `long long', as computed by sizeof. */
-#define EVENT__SIZEOF_LONG_LONG @EVENT__SIZEOF_LONG_LONG@
-
-/* The size of `off_t', as computed by sizeof. */
-#define EVENT__SIZEOF_OFF_T @EVENT__SIZEOF_OFF_T@
-
-#define EVENT__SIZEOF_SSIZE_T @EVENT__SIZEOF_SSIZE_T@
-
-
-/* The size of a `short', as computed by sizeof. */
-#define EVENT__SIZEOF_SHORT @EVENT__SIZEOF_SHORT@
-
-/* The size of `size_t', as computed by sizeof. */
-#define EVENT__SIZEOF_SIZE_T @EVENT__SIZEOF_SIZE_T@
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#cmakedefine EVENT__TIME_WITH_SYS_TIME 1
-
-/* The size of `socklen_t', as computed by sizeof. */
-#define EVENT__SIZEOF_SOCKLEN_T @EVENT__SIZEOF_SOCKLEN_T@
-
-/* The size of 'void *', as computer by sizeof */
-#define EVENT__SIZEOF_VOID_P @EVENT__SIZEOF_VOID_P@
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-/* why not c++?
- *
- * and are we really expected to use EVENT__inline everywhere,
- * shouldn't we just do:
- * ifdef EVENT__inline
- * define inline EVENT__inline
- *
- * - Ellzey
- */
-
-#define EVENT__inline @EVENT__inline@
-#endif
-
-#cmakedefine EVENT__HAVE___func__ 1
-#cmakedefine EVENT__HAVE___FUNCTION__ 1
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#define EVENT__size_t @EVENT__size_t@
-
-/* Define to unsigned int if you dont have it */
-#define EVENT__socklen_t @EVENT__socklen_t@
-
-/* Define to `int' if <sys/types.h> does not define. */
-#define EVENT__ssize_t @EVENT__ssize_t@
-
-#endif /* \EVENT2_EVENT_CONFIG_H_INCLUDED_ */
diff --git a/event-internal.h b/event-internal.h
index 92941b7..66dcfc3 100644
--- a/event-internal.h
+++ b/event-internal.h
@@ -219,7 +219,7 @@ struct event_base {
/** Function pointers used to describe the backend that this event_base
* uses for signals */
const struct eventop *evsigsel;
- /** Data to implement the common signal handler code. */
+ /** Data to implement the common signal handelr code. */
struct evsig_info sig;
/** Number of virtual events */
@@ -368,10 +368,6 @@ struct event_config {
};
/* Internal use only: Functions that might be missing from <sys/queue.h> */
-#ifndef LIST_END
-#define LIST_END(head) NULL
-#endif
-
#ifndef TAILQ_FIRST
#define TAILQ_FIRST(head) ((head)->tqh_first)
#endif
@@ -425,19 +421,16 @@ int event_del_nolock_(struct event *ev, int blocking);
int event_remove_timer_nolock_(struct event *ev);
void event_active_nolock_(struct event *ev, int res, short count);
-EVENT2_EXPORT_SYMBOL
int event_callback_activate_(struct event_base *, struct event_callback *);
int event_callback_activate_nolock_(struct event_base *, struct event_callback *);
int event_callback_cancel_(struct event_base *base,
struct event_callback *evcb);
void event_callback_finalize_nolock_(struct event_base *base, unsigned flags, struct event_callback *evcb, void (*cb)(struct event_callback *, void *));
-EVENT2_EXPORT_SYMBOL
void event_callback_finalize_(struct event_base *base, unsigned flags, struct event_callback *evcb, void (*cb)(struct event_callback *, void *));
int event_callback_finalize_many_(struct event_base *base, int n_cbs, struct event_callback **evcb, void (*cb)(struct event_callback *, void *));
-EVENT2_EXPORT_SYMBOL
void event_active_later_(struct event *ev, int res);
void event_active_later_nolock_(struct event *ev, int res);
int event_callback_activate_later_nolock_(struct event_base *base,
@@ -448,7 +441,6 @@ void event_callback_init_(struct event_base *base,
struct event_callback *cb);
/* FIXME document. */
-EVENT2_EXPORT_SYMBOL
void event_base_add_virtual_(struct event_base *base);
void event_base_del_virtual_(struct event_base *base);
@@ -458,7 +450,6 @@ void event_base_del_virtual_(struct event_base *base);
Returns on success; aborts on failure.
*/
-EVENT2_EXPORT_SYMBOL
void event_base_assert_ok_(struct event_base *base);
void event_base_assert_ok_nolock_(struct event_base *base);
diff --git a/event.c b/event.c
index b2ad341..503003e 100644
--- a/event.c
+++ b/event.c
@@ -52,9 +52,6 @@
#include <string.h>
#include <time.h>
#include <limits.h>
-#ifdef EVENT__HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
#include "event2/event.h"
#include "event2/event_struct.h"
@@ -126,7 +123,6 @@ static const struct eventop *eventops[] = {
};
/* Global state; deprecated */
-EVENT2_EXPORT_SYMBOL
struct event_base *event_global_current_base_ = NULL;
#define current_base event_global_current_base_
@@ -232,169 +228,133 @@ HT_PROTOTYPE(event_debug_map, event_debug_entry, node, hash_debug_entry,
HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
eq_debug_entry, 0.5, mm_malloc, mm_realloc, mm_free)
-/* record that ev is now setup (that is, ready for an add) */
-static void event_debug_note_setup_(const struct event *ev)
-{
- struct event_debug_entry *dent, find;
-
- if (!event_debug_mode_on_)
- goto out;
-
- find.ptr = ev;
- EVLOCK_LOCK(event_debug_map_lock_, 0);
- dent = HT_FIND(event_debug_map, &global_debug_map, &find);
- if (dent) {
- dent->added = 0;
- } else {
- dent = mm_malloc(sizeof(*dent));
- if (!dent)
- event_err(1,
- "Out of memory in debugging code");
- dent->ptr = ev;
- dent->added = 0;
- HT_INSERT(event_debug_map, &global_debug_map, dent);
- }
- EVLOCK_UNLOCK(event_debug_map_lock_, 0);
-
-out:
- event_debug_mode_too_late = 1;
-}
-/* record that ev is no longer setup */
-static void event_debug_note_teardown_(const struct event *ev)
-{
- struct event_debug_entry *dent, find;
-
- if (!event_debug_mode_on_)
- goto out;
-
- find.ptr = ev;
- EVLOCK_LOCK(event_debug_map_lock_, 0);
- dent = HT_REMOVE(event_debug_map, &global_debug_map, &find);
- if (dent)
- mm_free(dent);
- EVLOCK_UNLOCK(event_debug_map_lock_, 0);
-
-out:
- event_debug_mode_too_late = 1;
-}
+/* Macro: record that ev is now setup (that is, ready for an add) */
+#define event_debug_note_setup_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
+ if (dent) { \
+ dent->added = 0; \
+ } else { \
+ dent = mm_malloc(sizeof(*dent)); \
+ if (!dent) \
+ event_err(1, \
+ "Out of memory in debugging code"); \
+ dent->ptr = (ev); \
+ dent->added = 0; \
+ HT_INSERT(event_debug_map, &global_debug_map, dent); \
+ } \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ event_debug_mode_too_late = 1; \
+ } while (0)
+/* Macro: record that ev is no longer setup */
+#define event_debug_note_teardown_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_REMOVE(event_debug_map, &global_debug_map, &find); \
+ if (dent) \
+ mm_free(dent); \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ event_debug_mode_too_late = 1; \
+ } while (0)
/* Macro: record that ev is now added */
-static void event_debug_note_add_(const struct event *ev)
-{
- struct event_debug_entry *dent,find;
-
- if (!event_debug_mode_on_)
- goto out;
-
- find.ptr = ev;
- EVLOCK_LOCK(event_debug_map_lock_, 0);
- dent = HT_FIND(event_debug_map, &global_debug_map, &find);
- if (dent) {
- dent->added = 1;
- } else {
- event_errx(EVENT_ERR_ABORT_,
- "%s: noting an add on a non-setup event %p"
- " (events: 0x%x, fd: "EV_SOCK_FMT
- ", flags: 0x%x)",
- __func__, ev, ev->ev_events,
- EV_SOCK_ARG(ev->ev_fd), ev->ev_flags);
- }
- EVLOCK_UNLOCK(event_debug_map_lock_, 0);
-
-out:
- event_debug_mode_too_late = 1;
-}
-/* record that ev is no longer added */
-static void event_debug_note_del_(const struct event *ev)
-{
- struct event_debug_entry *dent, find;
-
- if (!event_debug_mode_on_)
- goto out;
-
- find.ptr = ev;
- EVLOCK_LOCK(event_debug_map_lock_, 0);
- dent = HT_FIND(event_debug_map, &global_debug_map, &find);
- if (dent) {
- dent->added = 0;
- } else {
- event_errx(EVENT_ERR_ABORT_,
- "%s: noting a del on a non-setup event %p"
- " (events: 0x%x, fd: "EV_SOCK_FMT
- ", flags: 0x%x)",
- __func__, ev, ev->ev_events,
- EV_SOCK_ARG(ev->ev_fd), ev->ev_flags);
- }
- EVLOCK_UNLOCK(event_debug_map_lock_, 0);
-
-out:
- event_debug_mode_too_late = 1;
-}
-/* assert that ev is setup (i.e., okay to add or inspect) */
-static void event_debug_assert_is_setup_(const struct event *ev)
-{
- struct event_debug_entry *dent, find;
-
- if (!event_debug_mode_on_)
- return;
-
- find.ptr = ev;
- EVLOCK_LOCK(event_debug_map_lock_, 0);
- dent = HT_FIND(event_debug_map, &global_debug_map, &find);
- if (!dent) {
- event_errx(EVENT_ERR_ABORT_,
- "%s called on a non-initialized event %p"
- " (events: 0x%x, fd: "EV_SOCK_FMT
- ", flags: 0x%x)",
- __func__, ev, ev->ev_events,
- EV_SOCK_ARG(ev->ev_fd), ev->ev_flags);
- }
- EVLOCK_UNLOCK(event_debug_map_lock_, 0);
-}
-/* assert that ev is not added (i.e., okay to tear down or set up again) */
-static void event_debug_assert_not_added_(const struct event *ev)
-{
- struct event_debug_entry *dent, find;
-
- if (!event_debug_mode_on_)
- return;
-
- find.ptr = ev;
- EVLOCK_LOCK(event_debug_map_lock_, 0);
- dent = HT_FIND(event_debug_map, &global_debug_map, &find);
- if (dent && dent->added) {
- event_errx(EVENT_ERR_ABORT_,
- "%s called on an already added event %p"
- " (events: 0x%x, fd: "EV_SOCK_FMT", "
- "flags: 0x%x)",
- __func__, ev, ev->ev_events,
- EV_SOCK_ARG(ev->ev_fd), ev->ev_flags);
- }
- EVLOCK_UNLOCK(event_debug_map_lock_, 0);
-}
-static void event_debug_assert_socket_nonblocking_(evutil_socket_t fd)
-{
- if (!event_debug_mode_on_)
- return;
- if (fd < 0)
- return;
-
-#ifndef _WIN32
- {
- int flags;
- if ((flags = fcntl(fd, F_GETFL, NULL)) >= 0) {
- EVUTIL_ASSERT(flags & O_NONBLOCK);
- }
- }
-#endif
-}
+#define event_debug_note_add_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
+ if (dent) { \
+ dent->added = 1; \
+ } else { \
+ event_errx(EVENT_ERR_ABORT_, \
+ "%s: noting an add on a non-setup event %p" \
+ " (events: 0x%x, fd: "EV_SOCK_FMT \
+ ", flags: 0x%x)", \
+ __func__, (ev), (ev)->ev_events, \
+ EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
+ } \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ event_debug_mode_too_late = 1; \
+ } while (0)
+/* Macro: record that ev is no longer added */
+#define event_debug_note_del_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
+ if (dent) { \
+ dent->added = 0; \
+ } else { \
+ event_errx(EVENT_ERR_ABORT_, \
+ "%s: noting a del on a non-setup event %p" \
+ " (events: 0x%x, fd: "EV_SOCK_FMT \
+ ", flags: 0x%x)", \
+ __func__, (ev), (ev)->ev_events, \
+ EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
+ } \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ event_debug_mode_too_late = 1; \
+ } while (0)
+/* Macro: assert that ev is setup (i.e., okay to add or inspect) */
+#define event_debug_assert_is_setup_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
+ if (!dent) { \
+ event_errx(EVENT_ERR_ABORT_, \
+ "%s called on a non-initialized event %p" \
+ " (events: 0x%x, fd: "EV_SOCK_FMT\
+ ", flags: 0x%x)", \
+ __func__, (ev), (ev)->ev_events, \
+ EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
+ } \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ } while (0)
+/* Macro: assert that ev is not added (i.e., okay to tear down or set
+ * up again) */
+#define event_debug_assert_not_added_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
+ if (dent && dent->added) { \
+ event_errx(EVENT_ERR_ABORT_, \
+ "%s called on an already added event %p" \
+ " (events: 0x%x, fd: "EV_SOCK_FMT", " \
+ "flags: 0x%x)", \
+ __func__, (ev), (ev)->ev_events, \
+ EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
+ } \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ } while (0)
#else
-static void event_debug_note_setup_(const struct event *ev) { (void)ev; }
-static void event_debug_note_teardown_(const struct event *ev) { (void)ev; }
-static void event_debug_note_add_(const struct event *ev) { (void)ev; }
-static void event_debug_note_del_(const struct event *ev) { (void)ev; }
-static void event_debug_assert_is_setup_(const struct event *ev) { (void)ev; }
-static void event_debug_assert_not_added_(const struct event *ev) { (void)ev; }
-static void event_debug_assert_socket_nonblocking_(evutil_socket_t fd) { (void)fd; }
+#define event_debug_note_setup_(ev) \
+ ((void)0)
+#define event_debug_note_teardown_(ev) \
+ ((void)0)
+#define event_debug_note_add_(ev) \
+ ((void)0)
+#define event_debug_note_del_(ev) \
+ ((void)0)
+#define event_debug_assert_is_setup_(ev) \
+ ((void)0)
+#define event_debug_assert_not_added_(ev) \
+ ((void)0)
#endif
#define EVENT_BASE_ASSERT_LOCKED(base) \
@@ -630,9 +590,7 @@ event_base_new_with_config(const struct event_config *cfg)
int flags;
if (should_check_environment && !precise_time) {
precise_time = evutil_getenv_("EVENT_PRECISE_TIMER") != NULL;
- if (precise_time) {
- base->flags |= EVENT_BASE_FLAG_PRECISE_TIMER;
- }
+ base->flags |= EVENT_BASE_FLAG_PRECISE_TIMER;
}
flags = precise_time ? EV_MONOT_PRECISE : 0;
evutil_configure_monotonic_time_(&base->monotonic_timer, flags);
@@ -904,7 +862,6 @@ event_base_free_(struct event_base *base, int run_finalizers)
* A simple case is bufferevent with underlying (i.e. filters).
*/
int i = event_base_free_queues_(base, run_finalizers);
- event_debug(("%s: %d events freed", __func__, i));
if (!i) {
break;
}
@@ -987,12 +944,6 @@ event_reinit(struct event_base *base)
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
- if (base->running_loop) {
- event_warnx("%s: forked from the event_loop.", __func__);
- res = -1;
- goto done;
- }
-
evsel = base->evsel;
/* check if this event mechanism requires reinit on the backend */
@@ -1689,12 +1640,10 @@ event_process_active_single_queue(struct event_base *base,
break;
case EV_CLOSURE_EVENT: {
void (*evcb_callback)(evutil_socket_t, short, void *);
- short res;
EVUTIL_ASSERT(ev != NULL);
evcb_callback = *ev->ev_callback;
- res = ev->ev_res;
EVBASE_RELEASE_LOCK(base, th_base_lock);
- evcb_callback(ev->ev_fd, res, ev->ev_arg);
+ evcb_callback(ev->ev_fd, ev->ev_res, ev->ev_arg);
}
break;
case EV_CLOSURE_CB_SELF: {
@@ -2120,8 +2069,6 @@ event_assign(struct event *ev, struct event_base *base, evutil_socket_t fd, shor
if (arg == &event_self_cbarg_ptr_)
arg = ev;
- if (!(events & EV_SIGNAL))
- event_debug_assert_socket_nonblocking_(fd);
event_debug_assert_not_added_(ev);
ev->ev_base = base;
@@ -2772,16 +2719,17 @@ static int
event_del_(struct event *ev, int blocking)
{
int res;
- struct event_base *base = ev->ev_base;
- if (EVUTIL_FAILURE_CHECK(!base)) {
+ if (EVUTIL_FAILURE_CHECK(!ev->ev_base)) {
event_warnx("%s: event has no event_base set.", __func__);
return -1;
}
- EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock);
+
res = event_del_nolock_(ev, blocking);
- EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock);
return (res);
}
@@ -2831,7 +2779,21 @@ event_del_nolock_(struct event *ev, int blocking)
}
}
+ /* If the main thread is currently executing this event's callback,
+ * and we are not the main thread, then we want to wait until the
+ * callback is done before we start removing the event. That way,
+ * when this function returns, it will be safe to free the
+ * user-supplied argument. */
base = ev->ev_base;
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (blocking != EVENT_DEL_NOBLOCK &&
+ base->current_event == event_to_event_callback(ev) &&
+ !EVBASE_IN_THREAD(base) &&
+ (blocking == EVENT_DEL_BLOCK || !(ev->ev_events & EV_FINALIZE))) {
+ ++base->current_event_waiters;
+ EVTHREAD_COND_WAIT(base->current_event_cond, base->th_base_lock);
+ }
+#endif
EVUTIL_ASSERT(!(ev->ev_flags & ~EVLIST_ALL));
@@ -2870,10 +2832,6 @@ event_del_nolock_(struct event *ev, int blocking)
notify = 1;
res = 0;
}
- /* If we do not have events, let's notify event base so it can
- * exit without waiting */
- if (!event_haveevents(base) && !N_ACTIVE_CALLBACKS(base))
- notify = 1;
}
/* if we are not in the right thread, we need to wake up the loop */
@@ -2882,21 +2840,6 @@ event_del_nolock_(struct event *ev, int blocking)
event_debug_note_del_(ev);
- /* If the main thread is currently executing this event's callback,
- * and we are not the main thread, then we want to wait until the
- * callback is done before returning. That way, when this function
- * returns, it will be safe to free the user-supplied argument.
- */
-#ifndef EVENT__DISABLE_THREAD_SUPPORT
- if (blocking != EVENT_DEL_NOBLOCK &&
- base->current_event == event_to_event_callback(ev) &&
- !EVBASE_IN_THREAD(base) &&
- (blocking == EVENT_DEL_BLOCK || !(ev->ev_events & EV_FINALIZE))) {
- ++base->current_event_waiters;
- EVTHREAD_COND_WAIT(base->current_event_cond, base->th_base_lock);
- }
-#endif
-
return (res);
}
@@ -3017,7 +2960,6 @@ event_callback_activate_nolock_(struct event_base *base,
switch (evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)) {
default:
EVUTIL_ASSERT(0);
- EVUTIL_FALLTHROUGH;
case EVLIST_ACTIVE_LATER:
event_queue_remove_active_later(base, evcb);
r = 0;
@@ -3206,6 +3148,10 @@ timeout_process(struct event_base *base)
}
}
+#if (EVLIST_INTERNAL >> 4) != 1
+#error "Mismatch for value of EVLIST_INTERNAL"
+#endif
+
#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
@@ -3213,13 +3159,13 @@ timeout_process(struct event_base *base)
#define MAX_EVENT_COUNT(var, v) var = MAX(var, v)
/* These are a fancy way to spell
- if (~flags & EVLIST_INTERNAL)
+ if (flags & EVLIST_INTERNAL)
base->event_count--/++;
*/
#define DECR_EVENT_COUNT(base,flags) \
- ((base)->event_count -= !((flags) & EVLIST_INTERNAL))
+ ((base)->event_count -= (~((flags) >> 4) & 1))
#define INCR_EVENT_COUNT(base,flags) do { \
- ((base)->event_count += !((flags) & EVLIST_INTERNAL)); \
+ ((base)->event_count += (~((flags) >> 4) & 1)); \
MAX_EVENT_COUNT((base)->event_count_max, (base)->event_count); \
} while (0)
@@ -3751,14 +3697,13 @@ dump_inserted_event_fn(const struct event_base *base, const struct event *e, voi
if (! (e->ev_flags & (EVLIST_INSERTED|EVLIST_TIMEOUT)))
return 0;
- fprintf(output, " %p [%s "EV_SOCK_FMT"]%s%s%s%s%s%s%s",
+ fprintf(output, " %p [%s "EV_SOCK_FMT"]%s%s%s%s%s%s",
(void*)e, gloss, EV_SOCK_ARG(e->ev_fd),
(e->ev_events&EV_READ)?" Read":"",
(e->ev_events&EV_WRITE)?" Write":"",
(e->ev_events&EV_CLOSED)?" EOF":"",
(e->ev_events&EV_SIGNAL)?" Signal":"",
(e->ev_events&EV_PERSIST)?" Persist":"",
- (e->ev_events&EV_ET)?" ET":"",
(e->ev_flags&EVLIST_INTERNAL)?" Internal":"");
if (e->ev_flags & EVLIST_TIMEOUT) {
struct timeval tv;
@@ -3829,35 +3774,7 @@ void
event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events)
{
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
-
- /* Activate any non timer events */
- if (!(events & EV_TIMEOUT)) {
- evmap_io_active_(base, fd, events & (EV_READ|EV_WRITE|EV_CLOSED));
- } else {
- /* If we want to activate timer events, loop and activate each event with
- * the same fd in both the timeheap and common timeouts list */
- int i;
- unsigned u;
- struct event *ev;
-
- for (u = 0; u < base->timeheap.n; ++u) {
- ev = base->timeheap.p[u];
- if (ev->ev_fd == fd) {
- event_active_nolock_(ev, EV_TIMEOUT, 1);
- }
- }
-
- for (i = 0; i < base->n_common_timeouts; ++i) {
- struct common_timeout_list *ctl = base->common_timeout_queues[i];
- TAILQ_FOREACH(ev, &ctl->events,
- ev_timeout_pos.ev_next_with_common_timeout) {
- if (ev->ev_fd == fd) {
- event_active_nolock_(ev, EV_TIMEOUT, 1);
- }
- }
- }
- }
-
+ evmap_io_active_(base, fd, events & (EV_READ|EV_WRITE|EV_CLOSED));
EVBASE_RELEASE_LOCK(base, th_base_lock);
}
diff --git a/event_iocp.c b/event_iocp.c
index 6b2a2e1..a9902fb 100644
--- a/event_iocp.c
+++ b/event_iocp.c
@@ -151,7 +151,7 @@ init_extension_functions(struct win32_extension_fns *ext)
const GUID connectex = WSAID_CONNECTEX;
const GUID getacceptexsockaddrs = WSAID_GETACCEPTEXSOCKADDRS;
SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
- if (s == EVUTIL_INVALID_SOCKET)
+ if (s == INVALID_SOCKET)
return;
ext->AcceptEx = get_extension_function(s, &acceptex);
ext->ConnectEx = get_extension_function(s, &connectex);
diff --git a/event_rpcgen.py b/event_rpcgen.py
index 0911ca2..9baf730 100755
--- a/event_rpcgen.py
+++ b/event_rpcgen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
#
# Copyright (c) 2005-2007 Niels Provos <provos@citi.umich.edu>
# Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -36,10 +36,10 @@ QUIETLY = 0
def declare(s):
if not QUIETLY:
- print(s)
+ print s
def TranslateList(mylist, mydict):
- return [x % mydict for x in mylist]
+ return map(lambda x: x % mydict, mylist)
# Exception class for parse errors
class RpcGenError(Exception):
@@ -57,7 +57,7 @@ class Struct:
declare(' Created struct: %s' % name)
def AddEntry(self, entry):
- if entry.Tag() in self._tags:
+ if self._tags.has_key(entry.Tag()):
raise RpcGenError(
'Entry "%s" duplicates tag number %d from "%s" '
'around line %d' % (entry.Name(), entry.Tag(),
@@ -78,7 +78,7 @@ class Struct:
def PrintIndented(self, file, ident, code):
"""Takes an array, add indentation to each entry and prints it."""
for entry in code:
- file.write('%s%s\n' % (ident, entry))
+ print >>file, '%s%s' % (ident, entry)
class StructCCode(Struct):
""" Knows how to generate C code for a struct """
@@ -88,19 +88,20 @@ class StructCCode(Struct):
def PrintTags(self, file):
"""Prints the tag definitions for a structure."""
- file.write('/* Tag definition for %s */\n' % self._name)
- file.write('enum %s_ {\n' % self._name.lower())
+ print >>file, '/* Tag definition for %s */' % self._name
+ print >>file, 'enum %s_ {' % self._name.lower()
for entry in self._entries:
- file.write(' %s=%d,\n' % (self.EntryTagName(entry), entry.Tag()))
- file.write(' %s_MAX_TAGS\n' % (self._name.upper()))
- file.write('};\n\n')
+ print >>file, ' %s=%d,' % (self.EntryTagName(entry),
+ entry.Tag())
+ print >>file, ' %s_MAX_TAGS' % (self._name.upper())
+ print >>file, '};\n'
def PrintForwardDeclaration(self, file):
- file.write('struct %s;\n' % self._name)
+ print >>file, 'struct %s;' % self._name
def PrintDeclaration(self, file):
- file.write('/* Structure declaration for %s */\n' % self._name)
- file.write('struct %s_access_ {\n' % self._name)
+ print >>file, '/* Structure declaration for %s */' % self._name
+ print >>file, 'struct %s_access_ {' % self._name
for entry in self._entries:
dcl = entry.AssignDeclaration('(*%s_assign)' % entry.Name())
dcl.extend(
@@ -109,19 +110,20 @@ class StructCCode(Struct):
dcl.extend(
entry.AddDeclaration('(*%s_add)' % entry.Name()))
self.PrintIndented(file, ' ', dcl)
- file.write('};\n\n')
+ print >>file, '};\n'
- file.write('struct %s {\n' % self._name)
- file.write(' struct %s_access_ *base;\n\n' % self._name)
+ print >>file, 'struct %s {' % self._name
+ print >>file, ' struct %s_access_ *base;\n' % self._name
for entry in self._entries:
dcl = entry.Declaration()
self.PrintIndented(file, ' ', dcl)
- file.write('\n')
+ print >>file, ''
for entry in self._entries:
- file.write(' ev_uint8_t %s_set;\n' % entry.Name())
- file.write('};\n\n')
+ print >>file, ' ev_uint8_t %s_set;' % entry.Name()
+ print >>file, '};\n'
- file.write("""struct %(name)s *%(name)s_new(void);
+ print >>file, \
+"""struct %(name)s *%(name)s_new(void);
struct %(name)s *%(name)s_new_with_arg(void *);
void %(name)s_free(struct %(name)s *);
void %(name)s_clear(struct %(name)s *);
@@ -131,7 +133,7 @@ int %(name)s_complete(struct %(name)s *);
void evtag_marshal_%(name)s(struct evbuffer *, ev_uint32_t,
const struct %(name)s *);
int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t,
- struct %(name)s *);\n""" % { 'name' : self._name })
+ struct %(name)s *);""" % { 'name' : self._name }
# Write a setting function of every variable
@@ -144,21 +146,22 @@ int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t,
self.PrintIndented(file, '', entry.AddDeclaration(
entry.AddFuncName()))
- file.write('/* --- %s done --- */\n\n' % self._name)
+ print >>file, '/* --- %s done --- */\n' % self._name
def PrintCode(self, file):
- file.write(('/*\n'
+ print >>file, ('/*\n'
' * Implementation of %s\n'
- ' */\n\n') % self._name)
+ ' */\n') % self._name
- file.write('static struct %(name)s_access_ %(name)s_base__ = {\n' % \
- { 'name' : self._name })
+ print >>file, \
+ 'static struct %(name)s_access_ %(name)s_base__ = {' % \
+ { 'name' : self._name }
for entry in self._entries:
self.PrintIndented(file, ' ', entry.CodeBase())
- file.write('};\n\n')
+ print >>file, '};\n'
# Creation
- file.write((
+ print >>file, (
'struct %(name)s *\n'
'%(name)s_new(void)\n'
'{\n'
@@ -173,77 +176,77 @@ int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t,
' event_warn("%%s: malloc", __func__);\n'
' return (NULL);\n'
' }\n'
- ' tmp->base = &%(name)s_base__;\n\n') % { 'name' : self._name })
+ ' tmp->base = &%(name)s_base__;\n') % { 'name' : self._name }
for entry in self._entries:
self.PrintIndented(file, ' ', entry.CodeInitialize('tmp'))
- file.write(' tmp->%s_set = 0;\n\n' % entry.Name())
+ print >>file, ' tmp->%s_set = 0;\n' % entry.Name()
- file.write((
+ print >>file, (
' return (tmp);\n'
- '}\n\n'))
+ '}\n')
# Adding
for entry in self._entries:
if entry.Array():
self.PrintIndented(file, '', entry.CodeAdd())
- file.write('\n')
+ print >>file, ''
# Assigning
for entry in self._entries:
self.PrintIndented(file, '', entry.CodeAssign())
- file.write('\n')
+ print >>file, ''
# Getting
for entry in self._entries:
self.PrintIndented(file, '', entry.CodeGet())
- file.write('\n')
+ print >>file, ''
# Clearing
- file.write(( 'void\n'
+ print >>file, ( 'void\n'
'%(name)s_clear(struct %(name)s *tmp)\n'
'{'
- '\n') % { 'name' : self._name })
+ ) % { 'name' : self._name }
for entry in self._entries:
self.PrintIndented(file, ' ', entry.CodeClear('tmp'))
- file.write('}\n\n')
+ print >>file, '}\n'
# Freeing
- file.write(( 'void\n'
+ print >>file, ( 'void\n'
'%(name)s_free(struct %(name)s *tmp)\n'
'{'
- '\n') % { 'name' : self._name })
+ ) % { 'name' : self._name }
for entry in self._entries:
self.PrintIndented(file, ' ', entry.CodeFree('tmp'))
- file.write((' free(tmp);\n'
- '}\n\n'))
+ print >>file, (' free(tmp);\n'
+ '}\n')
# Marshaling
- file.write(('void\n'
+ print >>file, ('void\n'
'%(name)s_marshal(struct evbuffer *evbuf, '
'const struct %(name)s *tmp)'
- '{\n') % { 'name' : self._name })
+ '{') % { 'name' : self._name }
for entry in self._entries:
indent = ' '
# Optional entries do not have to be set
if entry.Optional():
indent += ' '
- file.write(' if (tmp->%s_set) {\n' % entry.Name())
+ print >>file, ' if (tmp->%s_set) {' % entry.Name()
self.PrintIndented(
file, indent,
entry.CodeMarshal('evbuf', self.EntryTagName(entry),
entry.GetVarName('tmp'),
entry.GetVarLen('tmp')))
if entry.Optional():
- file.write(' }\n')
+ print >>file, ' }'
- file.write('}\n\n')
+ print >>file, '}\n'
# Unmarshaling
- file.write(('int\n'
+ print >>file, ('int\n'
'%(name)s_unmarshal(struct %(name)s *tmp, '
' struct evbuffer *evbuf)\n'
'{\n'
@@ -252,14 +255,14 @@ int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t,
' if (evtag_peek(evbuf, &tag) == -1)\n'
' return (-1);\n'
' switch (tag) {\n'
- '\n') % { 'name' : self._name })
+ ) % { 'name' : self._name }
for entry in self._entries:
- file.write(' case %s:\n' % self.EntryTagName(entry))
+ print >>file, ' case %s:\n' % self.EntryTagName(entry)
if not entry.Array():
- file.write((
+ print >>file, (
' if (tmp->%s_set)\n'
' return (-1);'
- '\n') % (entry.Name()))
+ ) % (entry.Name())
self.PrintIndented(
file, ' ',
@@ -268,26 +271,26 @@ int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t,
entry.GetVarName('tmp'),
entry.GetVarLen('tmp')))
- file.write(( ' tmp->%s_set = 1;\n' % entry.Name() +
- ' break;\n' ))
- file.write(( ' default:\n'
+ print >>file, ( ' tmp->%s_set = 1;\n' % entry.Name() +
+ ' break;\n' )
+ print >>file, ( ' default:\n'
' return -1;\n'
' }\n'
- ' }\n\n' ))
+ ' }\n' )
# Check if it was decoded completely
- file.write(( ' if (%(name)s_complete(tmp) == -1)\n'
+ print >>file, ( ' if (%(name)s_complete(tmp) == -1)\n'
' return (-1);'
- '\n') % { 'name' : self._name })
+ ) % { 'name' : self._name }
# Successfully decoded
- file.write(( ' return (0);\n'
- '}\n\n'))
+ print >>file, ( ' return (0);\n'
+ '}\n')
# Checking if a structure has all the required data
- file.write((
+ print >>file, (
'int\n'
'%(name)s_complete(struct %(name)s *msg)\n'
- '{\n' ) % { 'name' : self._name })
+ '{' ) % { 'name' : self._name }
for entry in self._entries:
if not entry.Optional():
code = [
@@ -300,12 +303,12 @@ int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t,
self.PrintIndented(
file, ' ',
entry.CodeComplete('msg', entry.GetVarName('msg')))
- file.write((
+ print >>file, (
' return (0);\n'
- '}\n\n' ))
+ '}\n' )
# Complete message unmarshaling
- file.write((
+ print >>file, (
'int\n'
'evtag_unmarshal_%(name)s(struct evbuffer *evbuf, '
'ev_uint32_t need_tag, struct %(name)s *msg)\n'
@@ -327,10 +330,10 @@ int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t,
' error:\n'
' evbuffer_free(tmp);\n'
' return (res);\n'
- '}\n\n' ) % { 'name' : self._name })
+ '}\n' ) % { 'name' : self._name }
# Complete message marshaling
- file.write((
+ print >>file, (
'void\n'
'evtag_marshal_%(name)s(struct evbuffer *evbuf, ev_uint32_t tag, '
'const struct %(name)s *msg)\n'
@@ -340,7 +343,7 @@ int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t,
' %(name)s_marshal(buf_, msg);\n'
' evtag_marshal_buffer(evbuf, tag, buf_);\n '
' evbuffer_free(buf_);\n'
- '}\n\n' ) % { 'name' : self._name })
+ '}\n' ) % { 'name' : self._name }
class Entry:
def __init__(self, type, name, tag):
@@ -417,7 +420,7 @@ class Entry:
"optaddarg" :
self._optaddarg and ", const %s value" % self._ctype or ""
}
- for (k, v) in list(extradict.items()):
+ for (k, v) in extradict.items():
mapping[k] = v
return mapping
@@ -1124,7 +1127,7 @@ class EntryArray(Entry):
codearrayassign = self._entry.CodeArrayAssign(
'msg->%(name)s_data[off]' % self.GetTranslation(), 'value')
- code += [' ' + x for x in codearrayassign]
+ code += map(lambda x: ' ' + x, codearrayassign)
code += TranslateList([
' }',
@@ -1165,7 +1168,7 @@ class EntryArray(Entry):
code = TranslateList(code, self.GetTranslation())
- code += [' ' + x for x in codearrayadd]
+ code += map(lambda x: ' ' + x, codearrayadd)
code += TranslateList([
' msg->%(name)s_set = 1;',
@@ -1193,7 +1196,7 @@ class EntryArray(Entry):
code = TranslateList(code, translate)
- code += [' ' + x for x in tmp]
+ code += map(lambda x: ' ' + x, tmp)
code += [
' }',
@@ -1258,7 +1261,7 @@ class EntryArray(Entry):
code = TranslateList(code, translate)
if codearrayfree:
- code += [' ' + x for x in codearrayfree]
+ code += map(lambda x: ' ' + x, codearrayfree)
code += [
' }' ]
@@ -1582,14 +1585,8 @@ class CCodeGenerator:
'#include <event2/event.h>\n'
'#include <event2/buffer.h>\n'
'#include <event2/tag.h>\n\n'
- '#if defined(EVENT__HAVE___func__)\n'
- '# ifndef __func__\n'
- '# define __func__ __func__\n'
- '# endif\n'
- '#elif defined(EVENT__HAVE___FUNCTION__)\n'
- '# define __func__ __FUNCTION__\n'
- '#else\n'
- '# define __func__ __FILE__\n'
+ '#if defined(EVENT____func__) && !defined(__func__)\n'
+ '#define __func__ EVENT____func__\n'
'#endif\n\n'
)
@@ -1690,23 +1687,23 @@ class CommandLine:
declare('... creating "%s"' % header_file)
header_fp = open(header_file, 'w')
- header_fp.write(factory.HeaderPreamble(filename))
+ print >>header_fp, factory.HeaderPreamble(filename)
# Create forward declarations: allows other structs to reference
# each other
for entry in entities:
entry.PrintForwardDeclaration(header_fp)
- header_fp.write('\n')
+ print >>header_fp, ''
for entry in entities:
entry.PrintTags(header_fp)
entry.PrintDeclaration(header_fp)
- header_fp.write(factory.HeaderPostamble(filename))
+ print >>header_fp, factory.HeaderPostamble(filename)
header_fp.close()
declare('... creating "%s"' % impl_file)
impl_fp = open(impl_file, 'w')
- impl_fp.write(factory.BodyPreamble(filename, header_file))
+ print >>impl_fp, factory.BodyPreamble(filename, header_file)
for entry in entities:
entry.PrintCode(impl_fp)
impl_fp.close()
@@ -1716,16 +1713,16 @@ if __name__ == '__main__':
CommandLine(sys.argv).run()
sys.exit(0)
- except RpcGenError as e:
- sys.stderr.write(e)
+ except RpcGenError, e:
+ print >>sys.stderr, e
sys.exit(1)
- except EnvironmentError as e:
+ except EnvironmentError, e:
if e.filename and e.strerror:
- sys.stderr.write("%s: %s" % (e.filename, e.strerror))
+ print >>sys.stderr, "%s: %s" % (e.filename, e.strerror)
sys.exit(1)
elif e.strerror:
- sys.stderr.write(e.strerror)
+ print >> sys.stderr, e.strerror
sys.exit(1)
else:
raise
diff --git a/event_tagging.c b/event_tagging.c
index b021e8c..6459dfa 100644
--- a/event_tagging.c
+++ b/event_tagging.c
@@ -93,13 +93,9 @@
a final padding nibble with value 0 is appended.
*/
-EVENT2_EXPORT_SYMBOL
int evtag_decode_int(ev_uint32_t *pnumber, struct evbuffer *evbuf);
-EVENT2_EXPORT_SYMBOL
int evtag_decode_int64(ev_uint64_t *pnumber, struct evbuffer *evbuf);
-EVENT2_EXPORT_SYMBOL
int evtag_encode_tag(struct evbuffer *evbuf, ev_uint32_t tag);
-EVENT2_EXPORT_SYMBOL
int evtag_decode_tag(ev_uint32_t *ptag, struct evbuffer *evbuf);
void
diff --git a/evmap.c b/evmap.c
index ffc991f..3f76dd0 100644
--- a/evmap.c
+++ b/evmap.c
@@ -43,7 +43,6 @@
#include <unistd.h>
#endif
#include <errno.h>
-#include <limits.h>
#include <signal.h>
#include <string.h>
#include <time.h>
@@ -208,15 +207,9 @@ evmap_make_space(struct event_signal_map *map, int slot, int msize)
int nentries = map->nentries ? map->nentries : 32;
void **tmp;
- if (slot > INT_MAX / 2)
- return (-1);
-
while (nentries <= slot)
nentries <<= 1;
- if (nentries > INT_MAX / msize)
- return (-1);
-
tmp = (void **)mm_realloc(map->entries, nentries * msize);
if (tmp == NULL)
return (-1);
@@ -400,8 +393,7 @@ evmap_io_del_(struct event_base *base, evutil_socket_t fd, struct event *ev)
if (res) {
void *extra = ((char*)ctx) + sizeof(struct evmap_io);
- if (evsel->del(base, ev->ev_fd,
- old, (ev->ev_events & EV_ET) | res, extra) == -1) {
+ if (evsel->del(base, ev->ev_fd, old, res, extra) == -1) {
retval = -1;
} else {
retval = 1;
@@ -453,9 +445,6 @@ evmap_signal_add_(struct event_base *base, int sig, struct event *ev)
struct event_signal_map *map = &base->sigmap;
struct evmap_signal *ctx = NULL;
- if (sig < 0 || sig >= NSIG)
- return (-1);
-
if (sig >= map->nentries) {
if (evmap_make_space(
map, sig, sizeof(struct evmap_signal *)) == -1)
@@ -482,7 +471,7 @@ evmap_signal_del_(struct event_base *base, int sig, struct event *ev)
struct event_signal_map *map = &base->sigmap;
struct evmap_signal *ctx;
- if (sig < 0 || sig >= map->nentries)
+ if (sig >= map->nentries)
return (-1);
GET_SIGNAL_SLOT(ctx, map, sig, evmap_signal);
@@ -869,7 +858,6 @@ event_changelist_add_(struct event_base *base, evutil_socket_t fd, short old, sh
struct event_changelist *changelist = &base->changelist;
struct event_changelist_fdinfo *fdinfo = p;
struct event_change *change;
- ev_uint8_t evchange = EV_CHANGE_ADD | (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
event_changelist_check(base);
@@ -881,12 +869,18 @@ event_changelist_add_(struct event_base *base, evutil_socket_t fd, short old, sh
* since the delete might fail (because the fd had been closed since
* the last add, for instance. */
- if (events & (EV_READ|EV_SIGNAL))
- change->read_change = evchange;
- if (events & EV_WRITE)
- change->write_change = evchange;
- if (events & EV_CLOSED)
- change->close_change = evchange;
+ if (events & (EV_READ|EV_SIGNAL)) {
+ change->read_change = EV_CHANGE_ADD |
+ (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
+ }
+ if (events & EV_WRITE) {
+ change->write_change = EV_CHANGE_ADD |
+ (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
+ }
+ if (events & EV_CLOSED) {
+ change->close_change = EV_CHANGE_ADD |
+ (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
+ }
event_changelist_check(base);
return (0);
@@ -899,7 +893,6 @@ event_changelist_del_(struct event_base *base, evutil_socket_t fd, short old, sh
struct event_changelist *changelist = &base->changelist;
struct event_changelist_fdinfo *fdinfo = p;
struct event_change *change;
- ev_uint8_t del = EV_CHANGE_DEL | (events & EV_ET);
event_changelist_check(base);
change = event_changelist_get_or_construct(changelist, fd, old, fdinfo);
@@ -926,19 +919,19 @@ event_changelist_del_(struct event_base *base, evutil_socket_t fd, short old, sh
if (!(change->old_events & (EV_READ | EV_SIGNAL)))
change->read_change = 0;
else
- change->read_change = del;
+ change->read_change = EV_CHANGE_DEL;
}
if (events & EV_WRITE) {
if (!(change->old_events & EV_WRITE))
change->write_change = 0;
else
- change->write_change = del;
+ change->write_change = EV_CHANGE_DEL;
}
if (events & EV_CLOSED) {
if (!(change->old_events & EV_CLOSED))
change->close_change = 0;
else
- change->close_change = del;
+ change->close_change = EV_CHANGE_DEL;
}
event_changelist_check(base);
diff --git a/evrpc.c b/evrpc.c
index 4a60ca5..2443ab2 100644
--- a/evrpc.c
+++ b/evrpc.c
@@ -329,8 +329,7 @@ evrpc_request_cb(struct evhttp_request *req, void *arg)
return;
error:
- if (rpc_state)
- evrpc_reqstate_free_(rpc_state);
+ evrpc_reqstate_free_(rpc_state);
evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL);
return;
}
@@ -892,7 +891,8 @@ evrpc_reply_done(struct evhttp_request *req, void *arg)
* layer is going to free it. we need to
* request ownership explicitly
*/
- evhttp_request_own(req);
+ if (req != NULL)
+ evhttp_request_own(req);
evrpc_pause_request(pool, ctx,
evrpc_reply_done_closure);
diff --git a/evthread-internal.h b/evthread-internal.h
index 5fdf316..efdecf8 100644
--- a/evthread-internal.h
+++ b/evthread-internal.h
@@ -49,12 +49,9 @@ struct event_base;
#if ! defined(EVENT__DISABLE_THREAD_SUPPORT) && defined(EVTHREAD_EXPOSE_STRUCTS)
/* Global function pointers to lock-related functions. NULL if locking isn't
enabled. */
-EVENT2_EXPORT_SYMBOL
extern struct evthread_lock_callbacks evthread_lock_fns_;
-EVENT2_EXPORT_SYMBOL
extern struct evthread_condition_callbacks evthread_cond_fns_;
extern unsigned long (*evthread_id_fn_)(void);
-EVENT2_EXPORT_SYMBOL
extern int evthread_lock_debugging_enabled_;
/** Return the ID of the current thread, or 1 if threading isn't enabled. */
@@ -185,23 +182,14 @@ EVLOCK_TRY_LOCK_(void *lock)
#elif ! defined(EVENT__DISABLE_THREAD_SUPPORT)
unsigned long evthreadimpl_get_id_(void);
-EVENT2_EXPORT_SYMBOL
int evthreadimpl_is_lock_debugging_enabled_(void);
-EVENT2_EXPORT_SYMBOL
void *evthreadimpl_lock_alloc_(unsigned locktype);
-EVENT2_EXPORT_SYMBOL
void evthreadimpl_lock_free_(void *lock, unsigned locktype);
-EVENT2_EXPORT_SYMBOL
int evthreadimpl_lock_lock_(unsigned mode, void *lock);
-EVENT2_EXPORT_SYMBOL
int evthreadimpl_lock_unlock_(unsigned mode, void *lock);
-EVENT2_EXPORT_SYMBOL
void *evthreadimpl_cond_alloc_(unsigned condtype);
-EVENT2_EXPORT_SYMBOL
void evthreadimpl_cond_free_(void *cond);
-EVENT2_EXPORT_SYMBOL
int evthreadimpl_cond_signal_(void *cond, int broadcast);
-EVENT2_EXPORT_SYMBOL
int evthreadimpl_cond_wait_(void *cond, void *lock, const struct timeval *tv);
int evthreadimpl_locking_enabled_(void);
@@ -367,7 +355,6 @@ EVLOCK_TRY_LOCK_(void *lock)
EVLOCK_UNLOCK(lock1_tmplock_,mode1); \
} while (0)
-EVENT2_EXPORT_SYMBOL
int evthread_is_debug_lock_held_(void *lock);
void *evthread_debug_get_real_lock_(void *lock);
@@ -390,7 +377,6 @@ int evutil_global_setup_locks_(const int enable_locks);
int evutil_secure_rng_global_setup_locks_(const int enable_locks);
/** Return current evthread_lock_callbacks */
-EVENT2_EXPORT_SYMBOL
struct evthread_lock_callbacks *evthread_get_lock_callbacks(void);
/** Return current evthread_condition_callbacks */
struct evthread_condition_callbacks *evthread_get_condition_callbacks(void);
diff --git a/evthread.c b/evthread.c
index 3eac594..f3f1edd 100644
--- a/evthread.c
+++ b/evthread.c
@@ -46,7 +46,7 @@
#endif
#ifndef EVENT__DISABLE_DEBUG_MODE
-extern int event_debug_created_threadable_ctx_;
+extern int event_debug_created_threadable_ctx_;
extern int event_debug_mode_on_;
#endif
diff --git a/evutil.c b/evutil.c
index 3412c2a..1e8ef7b 100644
--- a/evutil.c
+++ b/evutil.c
@@ -29,7 +29,6 @@
#ifdef _WIN32
#include <winsock2.h>
-#include <winerror.h>
#include <ws2tcpip.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -387,17 +386,6 @@ evutil_make_listen_socket_reuseable_port(evutil_socket_t sock)
}
int
-evutil_make_listen_socket_ipv6only(evutil_socket_t sock)
-{
-#if defined(IPV6_V6ONLY)
- int one = 1;
- return setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void*) &one,
- (ev_socklen_t)sizeof(one));
-#endif
- return 0;
-}
-
-int
evutil_make_tcp_listen_socket_deferred(evutil_socket_t sock)
{
#if defined(EVENT__HAVE_NETINET_TCP_H) && defined(TCP_DEFER_ACCEPT)
@@ -607,56 +595,44 @@ evutil_socket_finished_connecting_(evutil_socket_t fd)
set by evutil_check_interfaces. */
static int have_checked_interfaces, had_ipv4_address, had_ipv6_address;
-/* True iff the IPv4 address 'addr', in host order, is in 127.0.0.0/8 */
-static inline int evutil_v4addr_is_localhost(ev_uint32_t addr)
-{ return addr>>24 == 127; }
-
-/* True iff the IPv4 address 'addr', in host order, is link-local
- * 169.254.0.0/16 (RFC3927) */
-static inline int evutil_v4addr_is_linklocal(ev_uint32_t addr)
-{ return ((addr & 0xffff0000U) == 0xa9fe0000U); }
-
-/* True iff the IPv4 address 'addr', in host order, is a class D
- * (multiclass) address. */
-static inline int evutil_v4addr_is_classd(ev_uint32_t addr)
-{ return ((addr>>24) & 0xf0) == 0xe0; }
-
-int
-evutil_v4addr_is_local_(const struct in_addr *in)
-{
- const ev_uint32_t addr = ntohl(in->s_addr);
- return addr == INADDR_ANY ||
- evutil_v4addr_is_localhost(addr) ||
- evutil_v4addr_is_linklocal(addr) ||
- evutil_v4addr_is_classd(addr);
-}
-int
-evutil_v6addr_is_local_(const struct in6_addr *in)
-{
- static const char ZEROES[] =
- "\x00\x00\x00\x00\x00\x00\x00\x00"
- "\x00\x00\x00\x00\x00\x00\x00\x00";
+/* Macro: True iff the IPv4 address 'addr', in host order, is in 127.0.0.0/8
+ */
+#define EVUTIL_V4ADDR_IS_LOCALHOST(addr) (((addr)>>24) == 127)
- const unsigned char *addr = (const unsigned char *)in->s6_addr;
- return !memcmp(addr, ZEROES, 8) ||
- ((addr[0] & 0xfe) == 0xfc) ||
- (addr[0] == 0xfe && (addr[1] & 0xc0) == 0x80) ||
- (addr[0] == 0xfe && (addr[1] & 0xc0) == 0xc0) ||
- (addr[0] == 0xff);
-}
+/* Macro: True iff the IPv4 address 'addr', in host order, is a class D
+ * (multiclass) address.
+ */
+#define EVUTIL_V4ADDR_IS_CLASSD(addr) ((((addr)>>24) & 0xf0) == 0xe0)
static void
evutil_found_ifaddr(const struct sockaddr *sa)
{
+ const char ZEROES[] = "\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00";
+
if (sa->sa_family == AF_INET) {
const struct sockaddr_in *sin = (struct sockaddr_in *)sa;
- if (!evutil_v4addr_is_local_(&sin->sin_addr)) {
+ ev_uint32_t addr = ntohl(sin->sin_addr.s_addr);
+ if (addr == 0 ||
+ EVUTIL_V4ADDR_IS_LOCALHOST(addr) ||
+ EVUTIL_V4ADDR_IS_CLASSD(addr)) {
+ /* Not actually a usable external address. */
+ } else {
event_debug(("Detected an IPv4 interface"));
had_ipv4_address = 1;
}
} else if (sa->sa_family == AF_INET6) {
const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
- if (!evutil_v6addr_is_local_(&sin6->sin6_addr)) {
+ const unsigned char *addr =
+ (unsigned char*)sin6->sin6_addr.s6_addr;
+ if (!memcmp(addr, ZEROES, 8) ||
+ ((addr[0] & 0xfe) == 0xfc) ||
+ (addr[0] == 0xfe && (addr[1] & 0xc0) == 0x80) ||
+ (addr[0] == 0xfe && (addr[1] & 0xc0) == 0xc0) ||
+ (addr[0] == 0xff)) {
+ /* This is a reserved, ipv4compat, ipv4map, loopback,
+ * link-local, multicast, or unspecified address. */
+ } else {
event_debug(("Detected an IPv6 interface"));
had_ipv6_address = 1;
}
@@ -751,7 +727,7 @@ done:
/* Test whether we have an ipv4 interface and an ipv6 interface. Return 0 if
* the test seemed successful. */
static int
-evutil_check_interfaces(void)
+evutil_check_interfaces(int force_recheck)
{
evutil_socket_t fd = -1;
struct sockaddr_in sin, sin_out;
@@ -759,12 +735,9 @@ evutil_check_interfaces(void)
ev_socklen_t sin_out_len = sizeof(sin_out);
ev_socklen_t sin6_out_len = sizeof(sin6_out);
int r;
- if (have_checked_interfaces)
+ if (have_checked_interfaces && !force_recheck)
return 0;
- /* From this point on we have done the ipv4/ipv6 interface check */
- have_checked_interfaces = 1;
-
if (evutil_check_ifaddrs() == 0) {
/* Use a nice sane interface, if this system has one. */
return 0;
@@ -1080,7 +1053,7 @@ evutil_getaddrinfo_common_(const char *nodename, const char *servname,
struct sockaddr_in sin;
memset(&sin, 0, sizeof(sin));
if (1==evutil_inet_pton(AF_INET, nodename, &sin.sin_addr)) {
- /* Got an ipv4 address. */
+ /* Got an ipv6 address. */
sin.sin_family = AF_INET;
sin.sin_port = htons(port);
*res = evutil_new_addrinfo_((struct sockaddr*)&sin,
@@ -1232,7 +1205,8 @@ evutil_adjust_hints_for_addrconfig_(struct evutil_addrinfo *hints)
return;
if (hints->ai_family != PF_UNSPEC)
return;
- evutil_check_interfaces();
+ if (!have_checked_interfaces)
+ evutil_check_interfaces(0);
if (had_ipv4_address && !had_ipv6_address) {
hints->ai_family = PF_INET;
} else if (!had_ipv4_address && had_ipv6_address) {
@@ -2619,7 +2593,7 @@ evutil_accept4_(evutil_socket_t sockfd, struct sockaddr *addr,
}
/* Internal function: Set fd[0] and fd[1] to a pair of fds such that writes on
- * fd[1] get read from fd[0]. Make both fds nonblocking and close-on-exec.
+ * fd[0] get read from fd[1]. Make both fds nonblocking and close-on-exec.
* Return 0 on success, -1 on failure.
*/
int
diff --git a/evutil_rand.c b/evutil_rand.c
index 8e9afda..76d0f4a 100644
--- a/evutil_rand.c
+++ b/evutil_rand.c
@@ -171,7 +171,9 @@ evutil_secure_rng_init(void)
int val;
ARC4_LOCK_();
- val = (!arc4_stir()) ? 0 : -1;
+ if (!arc4_seeded_ok)
+ arc4_stir();
+ val = arc4_seeded_ok ? 0 : -1;
ARC4_UNLOCK_();
return val;
}
@@ -190,14 +192,14 @@ evutil_secure_rng_get_bytes(void *buf, size_t n)
ev_arc4random_buf(buf, n);
}
-#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
void
evutil_secure_rng_add_bytes(const char *buf, size_t n)
{
+#if !defined(__BIONIC__) /* bionic and OpenBSD removed this; it's a no-op in their current implementation. */
arc4random_addrandom((unsigned char*)buf,
n>(size_t)INT_MAX ? INT_MAX : (int)n);
-}
#endif
+}
void
evutil_free_secure_rng_globals_(void)
diff --git a/evutil_time.c b/evutil_time.c
index c3a2358..00fd5fb 100644
--- a/evutil_time.c
+++ b/evutil_time.c
@@ -43,7 +43,7 @@
#ifndef EVENT__HAVE_GETTIMEOFDAY
#include <sys/timeb.h>
#endif
-#if !defined(EVENT__HAVE_NANOSLEEP) && !defined(EVENT__HAVE_USLEEP) && \
+#if !defined(EVENT__HAVE_NANOSLEEP) && !defined(EVENT_HAVE_USLEEP) && \
!defined(_WIN32)
#include <sys/select.h>
#endif
@@ -141,10 +141,7 @@ evutil_usleep_(const struct timeval *tv)
sleep(tv->tv_sec);
usleep(tv->tv_usec);
#else
- {
- struct timeval tv2 = *tv;
- select(0, NULL, NULL, NULL, &tv2);
- }
+ select(0, NULL, NULL, NULL, tv);
#endif
}
diff --git a/http-internal.h b/http-internal.h
index feaf436..4555517 100644
--- a/http-internal.h
+++ b/http-internal.h
@@ -18,6 +18,9 @@
#define HTTP_WRITE_TIMEOUT 50
#define HTTP_READ_TIMEOUT 50
+#define HTTP_PREFIX "http://"
+#define HTTP_DEFAULTPORT 80
+
enum message_read_status {
ALL_DATA_READ = 1,
MORE_DATA_EXPECTED = 0,
@@ -181,15 +184,12 @@ int evhttp_connection_connect_(struct evhttp_connection *);
enum evhttp_request_error;
/* notifies the current request that it failed; resets connection */
-EVENT2_EXPORT_SYMBOL
void evhttp_connection_fail_(struct evhttp_connection *,
enum evhttp_request_error error);
enum message_read_status;
-EVENT2_EXPORT_SYMBOL
enum message_read_status evhttp_parse_firstline_(struct evhttp_request *, struct evbuffer*);
-EVENT2_EXPORT_SYMBOL
enum message_read_status evhttp_parse_headers_(struct evhttp_request *, struct evbuffer*);
void evhttp_start_read_(struct evhttp_connection *);
@@ -199,8 +199,7 @@ void evhttp_start_write_(struct evhttp_connection *);
void evhttp_response_code_(struct evhttp_request *, int, const char *);
void evhttp_send_page_(struct evhttp_request *, struct evbuffer *);
-EVENT2_EXPORT_SYMBOL
int evhttp_decode_uri_internal(const char *uri, size_t length,
char *ret, int decode_plus);
-#endif /* HTTP_INTERNAL_H_INCLUDED_ */
+#endif /* _HTTP_H */
diff --git a/http.c b/http.c
index 5331602..f5a2ef9 100644
--- a/http.c
+++ b/http.c
@@ -51,16 +51,9 @@
#ifndef _WIN32
#include <sys/socket.h>
#include <sys/stat.h>
-#else /* _WIN32 */
+#else
#include <winsock2.h>
#include <ws2tcpip.h>
-#endif /* _WIN32 */
-
-#ifdef EVENT__HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-#ifdef EVENT__HAVE_AFUNIX_H
-#include <afunix.h>
#endif
#include <sys/queue.h>
@@ -85,7 +78,7 @@
#include <string.h>
#ifndef _WIN32
#include <syslog.h>
-#endif /* !_WIN32 */
+#endif
#include <signal.h>
#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
@@ -180,7 +173,6 @@ extern int debug;
static evutil_socket_t bind_socket_ai(struct evutil_addrinfo *, int reuse);
static evutil_socket_t bind_socket(const char *, ev_uint16_t, int reuse);
static void name_from_addr(struct sockaddr *, ev_socklen_t, char **, char **);
-static struct evhttp_uri *evhttp_uri_parse_authority(char *source_uri);
static int evhttp_associate_new_request_with_connection(
struct evhttp_connection *evcon);
static void evhttp_connection_start_detectclose(
@@ -376,15 +368,15 @@ evhttp_write_buffer(struct evhttp_connection *evcon,
evcon->cb_arg = arg;
/* Disable the read callback: we don't actually care about data;
- * we only care about close detection. (We don't disable reading --
- * EV_READ, since we *do* want to learn about any close events.) */
+ * we only care about close detection. (We don't disable reading,
+ * since we *do* want to learn about any close events.) */
bufferevent_setcb(evcon->bufev,
NULL, /*read*/
evhttp_write_cb,
evhttp_error_cb,
evcon);
- bufferevent_enable(evcon->bufev, EV_READ|EV_WRITE);
+ bufferevent_enable(evcon->bufev, EV_WRITE);
}
static void
@@ -1178,9 +1170,7 @@ static void
evhttp_deferred_read_cb(struct event_callback *cb, void *data)
{
struct evhttp_connection *evcon = data;
- struct bufferevent *bev = evcon->bufev;
- if (bev->readcb)
- (bev->readcb)(evcon->bufev, evcon);
+ evhttp_read_cb(evcon->bufev, evcon);
}
static void
@@ -1212,7 +1202,6 @@ void
evhttp_connection_free(struct evhttp_connection *evcon)
{
struct evhttp_request *req;
- int need_close = 0;
/* notify interested parties that this connection is going down */
if (evcon->fd != -1) {
@@ -1239,22 +1228,21 @@ evhttp_connection_free(struct evhttp_connection *evcon)
event_debug_unassign(&evcon->retry_ev);
}
+ if (evcon->bufev != NULL)
+ bufferevent_free(evcon->bufev);
+
event_deferred_cb_cancel_(get_deferred_queue(evcon),
&evcon->read_more_deferred_cb);
- if (evcon->bufev != NULL) {
- need_close =
- !(bufferevent_get_options_(evcon->bufev) & BEV_OPT_CLOSE_ON_FREE);
- if (evcon->fd == -1)
- evcon->fd = bufferevent_getfd(evcon->bufev);
-
- bufferevent_free(evcon->bufev);
- }
+ if (evcon->fd == -1)
+ evcon->fd = bufferevent_getfd(evcon->bufev);
if (evcon->fd != -1) {
+ bufferevent_disable(evcon->bufev, EV_READ|EV_WRITE);
shutdown(evcon->fd, EVUTIL_SHUT_WR);
- if (need_close)
+ if (!(bufferevent_get_options_(evcon->bufev) & BEV_OPT_CLOSE_ON_FREE)) {
evutil_closesocket(evcon->fd);
+ }
}
if (evcon->bind_address != NULL)
@@ -1299,8 +1287,6 @@ evhttp_request_dispatch(struct evhttp_connection* evcon)
if (req == NULL)
return;
- EVUTIL_ASSERT(req->kind == EVHTTP_REQUEST);
-
/* delete possible close detection events */
evhttp_connection_stop_detectclose(evcon);
@@ -1323,8 +1309,6 @@ evhttp_connection_reset_(struct evhttp_connection *evcon)
struct evbuffer *tmp;
int err;
- bufferevent_setcb(evcon->bufev, NULL, NULL, NULL, NULL);
-
/* XXXX This is not actually an optimal fix. Instead we ought to have
an API for "stop connecting", or use bufferevent_setfd to turn off
connecting. But for Libevent 2.0, this seems like a minimal change
@@ -1350,8 +1334,7 @@ evhttp_connection_reset_(struct evhttp_connection *evcon)
evutil_closesocket(evcon->fd);
evcon->fd = -1;
}
- err = bufferevent_setfd(evcon->bufev, -1);
- EVUTIL_ASSERT(!err && "setfd");
+ bufferevent_setfd(evcon->bufev, -1);
/* we need to clean up any buffered data */
tmp = bufferevent_get_output(evcon->bufev);
@@ -1370,6 +1353,7 @@ static void
evhttp_connection_start_detectclose(struct evhttp_connection *evcon)
{
evcon->flags |= EVHTTP_CON_CLOSEDETECT;
+
bufferevent_enable(evcon->bufev, EV_READ);
}
@@ -1377,6 +1361,7 @@ static void
evhttp_connection_stop_detectclose(struct evhttp_connection *evcon)
{
evcon->flags &= ~EVHTTP_CON_CLOSEDETECT;
+
bufferevent_disable(evcon->bufev, EV_READ);
}
@@ -1541,14 +1526,6 @@ evhttp_error_cb(struct bufferevent *bufev, short what, void *arg)
return;
}
- if (what & BEV_EVENT_READING &&
- evcon->flags & EVHTTP_CON_READ_ON_WRITE_ERROR &&
- evbuffer_get_length(bufferevent_get_input(bufev))) {
- event_deferred_cb_schedule_(get_deferred_queue(evcon),
- &evcon->read_more_deferred_cb);
- return;
- }
-
evhttp_connection_fail_(evcon, EVREQ_HTTP_EOF);
} else if (what == BEV_EVENT_CONNECTED) {
} else {
@@ -1706,9 +1683,8 @@ evhttp_parse_response_line(struct evhttp_request *req, char *line)
/* Parse the first line of a HTTP request */
static int
-evhttp_parse_request_line(struct evhttp_request *req, char *line, size_t len)
+evhttp_parse_request_line(struct evhttp_request *req, char *line)
{
- char *eos = line + len;
char *method;
char *uri;
char *version;
@@ -1717,24 +1693,16 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line, size_t len)
size_t method_len;
enum evhttp_cmd_type type;
- while (eos > line && *(eos-1) == ' ') {
- *(eos-1) = '\0';
- --eos;
- --len;
- }
- if (len < strlen("GET / HTTP/1.0"))
- return -1;
-
/* Parse the request line */
method = strsep(&line, " ");
- if (!line)
- return -1;
- uri = line;
- version = strrchr(uri, ' ');
- if (!version || uri == version)
- return -1;
- *version = '\0';
- version++;
+ if (line == NULL)
+ return (-1);
+ uri = strsep(&line, " ");
+ if (line == NULL)
+ return (-1);
+ version = strsep(&line, " ");
+ if (line != NULL)
+ return (-1);
method_len = (uri - method) - 1;
type = EVHTTP_REQ_UNKNOWN_;
@@ -1854,22 +1822,16 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line, size_t len)
req->type = type;
if (evhttp_parse_http_version(version, req) < 0)
- return -1;
+ return (-1);
if ((req->uri = mm_strdup(uri)) == NULL) {
event_debug(("%s: mm_strdup", __func__));
- return -1;
+ return (-1);
}
- if (type == EVHTTP_REQ_CONNECT) {
- if ((req->uri_elems = evhttp_uri_parse_authority(req->uri)) == NULL) {
- return -1;
- }
- } else {
- if ((req->uri_elems = evhttp_uri_parse_with_flags(req->uri,
- EVHTTP_URI_NONCONFORMANT)) == NULL) {
- return -1;
- }
+ if ((req->uri_elems = evhttp_uri_parse_with_flags(req->uri,
+ EVHTTP_URI_NONCONFORMANT)) == NULL) {
+ return -1;
}
/* If we have an absolute-URI, check to see if it is an http request
@@ -1883,7 +1845,7 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line, size_t len)
!evhttp_find_vhost(req->evcon->http_server, NULL, hostname))
req->flags |= EVHTTP_PROXY_REQUEST;
- return 0;
+ return (0);
}
const char *
@@ -2018,9 +1980,9 @@ evhttp_parse_firstline_(struct evhttp_request *req, struct evbuffer *buffer)
char *line;
enum message_read_status status = ALL_DATA_READ;
- size_t len;
+ size_t line_length;
/* XXX try */
- line = evbuffer_readln(buffer, &len, EVBUFFER_EOL_CRLF);
+ line = evbuffer_readln(buffer, &line_length, EVBUFFER_EOL_CRLF);
if (line == NULL) {
if (req->evcon != NULL &&
evbuffer_get_length(buffer) > req->evcon->max_headers_size)
@@ -2029,16 +1991,17 @@ evhttp_parse_firstline_(struct evhttp_request *req, struct evbuffer *buffer)
return (MORE_DATA_EXPECTED);
}
- if (req->evcon != NULL && len > req->evcon->max_headers_size) {
+ if (req->evcon != NULL &&
+ line_length > req->evcon->max_headers_size) {
mm_free(line);
return (DATA_TOO_LONG);
}
- req->headers_size = len;
+ req->headers_size = line_length;
switch (req->kind) {
case EVHTTP_REQUEST:
- if (evhttp_parse_request_line(req, line, len) == -1)
+ if (evhttp_parse_request_line(req, line) == -1)
status = DATA_CORRUPTED;
break;
case EVHTTP_RESPONSE:
@@ -2091,12 +2054,12 @@ evhttp_parse_headers_(struct evhttp_request *req, struct evbuffer* buffer)
enum message_read_status status = MORE_DATA_EXPECTED;
struct evkeyvalq* headers = req->input_headers;
- size_t len;
- while ((line = evbuffer_readln(buffer, &len, EVBUFFER_EOL_CRLF))
+ size_t line_length;
+ while ((line = evbuffer_readln(buffer, &line_length, EVBUFFER_EOL_CRLF))
!= NULL) {
char *skey, *svalue;
- req->headers_size += len;
+ req->headers_size += line_length;
if (req->evcon != NULL &&
req->headers_size > req->evcon->max_headers_size) {
@@ -2160,7 +2123,11 @@ evhttp_get_body_length(struct evhttp_request *req)
req->ntoread = -1;
else if (content_length == NULL &&
evutil_ascii_strcasecmp(connection, "Close") != 0) {
- req->ntoread = 0;
+ /* Bad combination, we don't know when it will end */
+ event_warnx("%s: we got no content length, but the "
+ "server wants to keep the connection open: %s.",
+ __func__, connection);
+ return (-1);
} else if (content_length == NULL) {
req->ntoread = -1;
} else {
@@ -2188,15 +2155,16 @@ evhttp_method_may_have_body(enum evhttp_cmd_type type)
case EVHTTP_REQ_POST:
case EVHTTP_REQ_PUT:
case EVHTTP_REQ_PATCH:
-
+ return 1;
+ case EVHTTP_REQ_TRACE:
+ return 0;
+ /* XXX May any of the below methods have a body? */
case EVHTTP_REQ_GET:
+ case EVHTTP_REQ_HEAD:
case EVHTTP_REQ_DELETE:
case EVHTTP_REQ_OPTIONS:
case EVHTTP_REQ_CONNECT:
- return 1;
-
- case EVHTTP_REQ_TRACE:
- case EVHTTP_REQ_HEAD:
+ return 0;
default:
return 0;
}
@@ -2576,11 +2544,9 @@ evhttp_connection_connect_(struct evhttp_connection *evcon)
return (-1);
}
- if (bufferevent_setfd(evcon->bufev, evcon->fd))
- return (-1);
+ bufferevent_setfd(evcon->bufev, evcon->fd);
} else {
- if (bufferevent_setfd(evcon->bufev, -1))
- return (-1);
+ bufferevent_setfd(evcon->bufev, -1);
}
/* Set up a callback for successful connection setup */
@@ -2596,8 +2562,7 @@ evhttp_connection_connect_(struct evhttp_connection *evcon)
bufferevent_set_timeouts(evcon->bufev, &evcon->timeout, &evcon->timeout);
}
/* make sure that we get a write callback */
- if (bufferevent_enable(evcon->bufev, EV_WRITE))
- return (-1);
+ bufferevent_enable(evcon->bufev, EV_WRITE);
evcon->state = EVCON_CONNECTING;
@@ -2663,10 +2628,6 @@ evhttp_make_request(struct evhttp_connection *evcon,
TAILQ_INSERT_TAIL(&evcon->requests, req, next);
- /* We do not want to conflict with retry_ev */
- if (evcon->retry_cnt)
- return (0);
-
/* If the connection object is not connected; make it so */
if (!evhttp_connected(evcon)) {
int res = evhttp_connection_connect_(evcon);
@@ -2677,7 +2638,7 @@ evhttp_make_request(struct evhttp_connection *evcon,
if (res != 0)
TAILQ_REMOVE(&evcon->requests, req, next);
- return (res);
+ return res;
}
/*
@@ -2859,10 +2820,6 @@ evhttp_send_reply_start(struct evhttp_request *req, int code,
const char *reason)
{
evhttp_response_code_(req, code, reason);
-
- if (req->evcon == NULL)
- return;
-
if (evhttp_find_header(req->output_headers, "Content-Length") == NULL &&
REQ_VERSION_ATLEAST(req, 1, 1) &&
evhttp_response_needs_body(req)) {
@@ -3102,15 +3059,16 @@ evhttp_uriencode(const char *uri, ev_ssize_t len, int space_as_plus)
{
struct evbuffer *buf = evbuffer_new();
const char *p, *end;
- char *result = NULL;
+ char *result;
- if (!buf) {
- goto out;
+ if (buf == NULL) {
+ return (NULL);
}
+
if (len >= 0) {
if (uri + len < uri) {
- goto out;
+ return (NULL);
}
end = uri + len;
@@ -3119,11 +3077,11 @@ evhttp_uriencode(const char *uri, ev_ssize_t len, int space_as_plus)
if (slen >= EV_SSIZE_MAX) {
/* we don't want to mix signed and unsigned */
- goto out;
+ return (NULL);
}
if (uri + slen < uri) {
- goto out;
+ return (NULL);
}
end = uri + slen;
@@ -3145,10 +3103,9 @@ evhttp_uriencode(const char *uri, ev_ssize_t len, int space_as_plus)
if (result)
evbuffer_remove(buf, result, evbuffer_get_length(buf));
-out:
- if (buf)
- evbuffer_free(buf);
- return result;
+ evbuffer_free(buf);
+
+ return (result);
}
char *
@@ -3459,8 +3416,6 @@ evhttp_handle_request(struct evhttp_request *req, void *arg)
/* we have a new request on which the user needs to take action */
req->userdone = 0;
- bufferevent_disable(req->evcon->bufev, EV_READ);
-
if (req->type == 0 || req->uri == NULL) {
evhttp_send_error(req, req->response_code, NULL);
return;
@@ -3548,16 +3503,13 @@ evhttp_bind_socket_with_handle(struct evhttp *http, const char *address, ev_uint
{
evutil_socket_t fd;
struct evhttp_bound_socket *bound;
- int serrno;
if ((fd = bind_socket(address, port, 1 /*reuse*/)) == -1)
return (NULL);
if (listen(fd, 128) == -1) {
- serrno = EVUTIL_SOCKET_ERROR();
event_sock_warn(fd, "%s: listen", __func__);
evutil_closesocket(fd);
- EVUTIL_SET_SOCKET_ERROR(serrno);
return (NULL);
}
@@ -4217,13 +4169,6 @@ evhttp_get_request_connection(
char *hostname = NULL, *portname = NULL;
struct bufferevent* bev = NULL;
-#ifdef EVENT__HAVE_STRUCT_SOCKADDR_UN
- if (sa->sa_family == AF_UNIX) {
- struct sockaddr_un *sa_un = (struct sockaddr_un *)sa;
- sa_un->sun_path[0] = '\0';
- }
-#endif
-
name_from_addr(sa, salen, &hostname, &portname);
if (hostname == NULL || portname == NULL) {
if (hostname) mm_free(hostname);
@@ -4255,19 +4200,11 @@ evhttp_get_request_connection(
evcon->fd = fd;
- if (bufferevent_setfd(evcon->bufev, fd))
- goto err;
- if (bufferevent_enable(evcon->bufev, EV_READ))
- goto err;
- if (bufferevent_disable(evcon->bufev, EV_WRITE))
- goto err;
- bufferevent_socket_set_conn_address_(evcon->bufev, sa, salen);
+ bufferevent_enable(evcon->bufev, EV_READ);
+ bufferevent_disable(evcon->bufev, EV_WRITE);
+ bufferevent_setfd(evcon->bufev, fd);
return (evcon);
-
-err:
- evhttp_connection_free(evcon);
- return (NULL);
}
static int
@@ -4884,36 +4821,6 @@ err:
return NULL;
}
-static struct evhttp_uri *
-evhttp_uri_parse_authority(char *source_uri)
-{
- struct evhttp_uri *uri = mm_calloc(1, sizeof(struct evhttp_uri));
- char *end;
-
- if (uri == NULL) {
- event_warn("%s: calloc", __func__);
- goto err;
- }
- uri->port = -1;
- uri->flags = 0;
-
- end = end_of_authority(source_uri);
- if (parse_authority(uri, source_uri, end) < 0)
- goto err;
-
- uri->path = mm_strdup("");
- if (uri->path == NULL) {
- event_warn("%s: strdup", __func__);
- goto err;
- }
-
- return uri;
-err:
- if (uri)
- evhttp_uri_free(uri);
- return NULL;
-}
-
void
evhttp_uri_free(struct evhttp_uri *uri)
{
diff --git a/include/event2/buffer_compat.h b/include/event2/buffer_compat.h
index 0ce1025..24f828c 100644
--- a/include/event2/buffer_compat.h
+++ b/include/event2/buffer_compat.h
@@ -90,10 +90,9 @@ typedef void (*evbuffer_cb)(struct evbuffer *buffer, size_t old_len, size_t new_
@param cb the callback function to invoke when the evbuffer is modified,
or NULL to remove all callbacks.
@param cbarg an argument to be provided to the callback function
- @return 0 if successful, or -1 on error
*/
EVENT2_EXPORT_SYMBOL
-int evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg);
+void evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg);
/**
diff --git a/include/event2/bufferevent.h b/include/event2/bufferevent.h
index 48cd153..825918e 100644
--- a/include/event2/bufferevent.h
+++ b/include/event2/bufferevent.h
@@ -491,7 +491,7 @@ short bufferevent_get_enabled(struct bufferevent *bufev);
(In other words, if reading or writing is disabled, or if the
bufferevent's read or write operation has been suspended because
- there's no data to write, or not enough bandwidth, or so on, the
+ there's no data to write, or not enough banwidth, or so on, the
timeout isn't active. The timeout only becomes active when we we're
willing to actually read or write.)
@@ -518,9 +518,6 @@ int bufferevent_set_timeouts(struct bufferevent *bufev,
On input, a bufferevent does not invoke the user read callback unless
there is at least low watermark data in the buffer. If the read buffer
is beyond the high watermark, the bufferevent stops reading from the network.
- But be aware that bufferevent input/read buffer can overrun high watermark
- limit (typical example is openssl bufferevent), so you should not relay in
- this.
On output, the user write callback is invoked whenever the buffered data
falls below the low watermark. Filters that write to this bufev will try
@@ -569,7 +566,7 @@ void bufferevent_unlock(struct bufferevent *bufev);
/**
* Public interface to manually increase the reference count of a bufferevent
* this is useful in situations where a user may reference the bufferevent
- * somewhere else (unknown to libevent)
+ * somewhere eles (unknown to libevent)
*
* @param bufev the bufferevent to increase the refcount on
*
@@ -802,7 +799,7 @@ void ev_token_bucket_cfg_free(struct ev_token_bucket_cfg *cfg);
They are: socket-based bufferevents (normal and IOCP-based), and SSL-based
bufferevents.
- Return 0 on success, -1 on failure.
+ Return 0 on sucess, -1 on failure.
*/
EVENT2_EXPORT_SYMBOL
int bufferevent_set_rate_limit(struct bufferevent *bev,
@@ -853,7 +850,7 @@ int bufferevent_rate_limit_group_set_cfg(
The default min-share is currently 64 bytes.
- Returns 0 on success, -1 on failure.
+ Returns 0 on success, -1 on faulre.
*/
EVENT2_EXPORT_SYMBOL
int bufferevent_rate_limit_group_set_min_share(
diff --git a/include/event2/bufferevent_compat.h b/include/event2/bufferevent_compat.h
index a5a3c72..6548204 100644
--- a/include/event2/bufferevent_compat.h
+++ b/include/event2/bufferevent_compat.h
@@ -28,8 +28,6 @@
#ifndef EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_
#define EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_
-#include <event2/visibility.h>
-
#define evbuffercb bufferevent_data_cb
#define everrorcb bufferevent_event_cb
@@ -74,7 +72,6 @@
error occurred
@see bufferevent_base_set(), bufferevent_free()
*/
-EVENT2_EXPORT_SYMBOL
struct bufferevent *bufferevent_new(evutil_socket_t fd,
evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg);
@@ -86,7 +83,6 @@ struct bufferevent *bufferevent_new(evutil_socket_t fd,
@param timeout_read the read timeout
@param timeout_write the write timeout
*/
-EVENT2_EXPORT_SYMBOL
void bufferevent_settimeout(struct bufferevent *bufev,
int timeout_read, int timeout_write);
diff --git a/include/event2/dns.h b/include/event2/dns.h
index 13ce027..17cd86a 100644
--- a/include/event2/dns.h
+++ b/include/event2/dns.h
@@ -179,39 +179,11 @@ extern "C" {
#define DNS_QUERY_NO_SEARCH 1
-/* Allow searching */
#define DNS_OPTION_SEARCH 1
-/* Parse "nameserver" and add default if no such section */
#define DNS_OPTION_NAMESERVERS 2
-/* Parse additional options like:
- * - timeout:
- * - getaddrinfo-allow-skew:
- * - max-timeouts:
- * - max-inflight:
- * - attempts:
- * - randomize-case:
- * - initial-probe-timeout:
- */
#define DNS_OPTION_MISC 4
-/* Load hosts file (i.e. "/etc/hosts") */
#define DNS_OPTION_HOSTSFILE 8
-/**
- * All above:
- * - DNS_OPTION_SEARCH
- * - DNS_OPTION_NAMESERVERS
- * - DNS_OPTION_MISC
- * - DNS_OPTION_HOSTSFILE
- */
-#define DNS_OPTIONS_ALL ( \
- DNS_OPTION_SEARCH | \
- DNS_OPTION_NAMESERVERS | \
- DNS_OPTION_MISC | \
- DNS_OPTION_HOSTSFILE | \
- 0 \
-)
-/* Do not "default" nameserver (i.e. "127.0.0.1:53") if there is no nameservers
- * in resolv.conf, (iff DNS_OPTION_NAMESERVERS is set) */
-#define DNS_OPTION_NAMESERVERS_NO_DEFAULT 16
+#define DNS_OPTIONS_ALL 15
/* Obsolete name for DNS_QUERY_NO_SEARCH */
#define DNS_NO_SEARCH DNS_QUERY_NO_SEARCH
@@ -236,10 +208,6 @@ struct event_base;
/** Flag for evdns_base_new: Do not prevent the libevent event loop from
* exiting when we have no active dns requests. */
#define EVDNS_BASE_DISABLE_WHEN_INACTIVE 0x8000
-/** Flag for evdns_base_new: If EVDNS_BASE_INITIALIZE_NAMESERVERS isset, do not
- * add default nameserver if there are no nameservers in resolv.conf
- * @see DNS_OPTION_NAMESERVERS_NO_DEFAULT */
-#define EVDNS_BASE_NAMESERVERS_NO_DEFAULT 0x10000
/**
Initialize the asynchronous DNS library.
@@ -250,7 +218,7 @@ struct event_base;
@param event_base the event base to associate the dns client with
@param flags any of EVDNS_BASE_INITIALIZE_NAMESERVERS|
- EVDNS_BASE_DISABLE_WHEN_INACTIVE|EVDNS_BASE_NAMESERVERS_NO_DEFAULT
+ EVDNS_BASE_DISABLE_WHEN_INACTIVE
@return evdns_base object if successful, or NULL if an error occurred.
@see evdns_base_free()
*/
@@ -455,8 +423,7 @@ void evdns_cancel_request(struct evdns_base *base, struct evdns_request *req);
The currently available configuration options are:
ndots, timeout, max-timeouts, max-inflight, attempts, randomize-case,
- bind-to, initial-probe-timeout, getaddrinfo-allow-skew,
- so-rcvbuf, so-sndbuf.
+ bind-to, initial-probe-timeout, getaddrinfo-allow-skew.
In versions before Libevent 2.0.3-alpha, the option name needed to end with
a colon.
@@ -486,7 +453,7 @@ int evdns_base_set_option(struct evdns_base *base, const char *option, const cha
@param base the evdns_base to which to apply this operation
@param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC|
- DNS_OPTION_HOSTSFILE|DNS_OPTIONS_ALL|DNS_OPTION_NAMESERVERS_NO_DEFAULT
+ DNS_OPTION_HOSTSFILE|DNS_OPTIONS_ALL
@param filename the path to the resolv.conf file
@return 0 if successful, or various positive error codes if an error
occurred (see above)
@@ -511,7 +478,6 @@ int evdns_base_resolv_conf_parse(struct evdns_base *base, int flags, const char
EVENT2_EXPORT_SYMBOL
int evdns_base_load_hosts(struct evdns_base *base, const char *hosts_fname);
-#if defined(EVENT_IN_DOXYGEN_) || defined(_WIN32)
/**
Obtain nameserver information using the Windows API.
@@ -522,6 +488,7 @@ int evdns_base_load_hosts(struct evdns_base *base, const char *hosts_fname);
@return 0 if successful, or -1 if an error occurred
@see evdns_resolv_conf_parse()
*/
+#ifdef _WIN32
EVENT2_EXPORT_SYMBOL
int evdns_base_config_windows_nameservers(struct evdns_base *);
#define EVDNS_BASE_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED
@@ -648,8 +615,7 @@ typedef void (*evdns_request_callback_fn_type)(struct evdns_server_request *, vo
@param callback A function to invoke whenever we get a DNS request
on the socket.
@param user_data Data to pass to the callback.
- @return an evdns_server_port structure for this server port or NULL if
- an error occurred.
+ @return an evdns_server_port structure for this server port.
*/
EVENT2_EXPORT_SYMBOL
struct evdns_server_port *evdns_add_server_port_with_base(struct event_base *base, evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data);
diff --git a/include/event2/dns_compat.h b/include/event2/dns_compat.h
index a58c4b2..965fd65 100644
--- a/include/event2/dns_compat.h
+++ b/include/event2/dns_compat.h
@@ -49,7 +49,6 @@ extern "C" {
/* For int types. */
#include <event2/util.h>
-#include <event2/visibility.h>
/**
Initialize the asynchronous DNS library.
@@ -67,7 +66,6 @@ extern "C" {
@return 0 if successful, or -1 if an error occurred
@see evdns_shutdown()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_init(void);
struct evdns_base;
@@ -78,7 +76,6 @@ struct evdns_base;
@deprecated This function is deprecated because use of the global
evdns_base is error-prone.
*/
-EVENT2_EXPORT_SYMBOL
struct evdns_base *evdns_get_global_base(void);
/**
@@ -96,7 +93,6 @@ struct evdns_base *evdns_get_global_base(void);
active requests will return DNS_ERR_SHUTDOWN.
@see evdns_init()
*/
-EVENT2_EXPORT_SYMBOL
void evdns_shutdown(int fail_requests);
/**
@@ -113,7 +109,6 @@ void evdns_shutdown(int fail_requests);
@return 0 if successful, or -1 if an error occurred
@see evdns_nameserver_ip_add()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_nameserver_add(unsigned long int address);
/**
@@ -131,7 +126,6 @@ int evdns_nameserver_add(unsigned long int address);
@return the number of configured nameservers
@see evdns_nameserver_add()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_count_nameservers(void);
/**
@@ -146,7 +140,6 @@ int evdns_count_nameservers(void);
@return 0 if successful, or -1 if an error occurred
@see evdns_resume()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_clear_nameservers_and_suspend(void);
/**
@@ -162,7 +155,6 @@ int evdns_clear_nameservers_and_suspend(void);
@return 0 if successful, or -1 if an error occurred
@see evdns_clear_nameservers_and_suspend()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_resume(void);
/**
@@ -178,7 +170,6 @@ int evdns_resume(void);
@return 0 if successful, or -1 if an error occurred
@see evdns_nameserver_add()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_nameserver_ip_add(const char *ip_as_string);
/**
@@ -195,7 +186,6 @@ int evdns_nameserver_ip_add(const char *ip_as_string);
@return 0 if successful, or -1 if an error occurred
@see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback, void *ptr);
/**
@@ -208,7 +198,6 @@ int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback
@return 0 if successful, or -1 if an error occurred
@see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_resolve_ipv6(const char *name, int flags, evdns_callback_type callback, void *ptr);
struct in_addr;
@@ -228,7 +217,6 @@ struct in6_addr;
@return 0 if successful, or -1 if an error occurred
@see evdns_resolve_reverse_ipv6()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr);
/**
@@ -245,7 +233,6 @@ int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_ty
@return 0 if successful, or -1 if an error occurred
@see evdns_resolve_reverse_ipv6()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr);
/**
@@ -264,7 +251,6 @@ int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callb
@param flags Ignored.
@return 0 if successful, or -1 if an error occurred
*/
-EVENT2_EXPORT_SYMBOL
int evdns_set_option(const char *option, const char *val, int flags);
/**
@@ -292,7 +278,6 @@ int evdns_set_option(const char *option, const char *val, int flags);
occurred (see above)
@see resolv.conf(3), evdns_config_windows_nameservers()
*/
-EVENT2_EXPORT_SYMBOL
int evdns_resolv_conf_parse(int flags, const char *const filename);
/**
@@ -302,7 +287,6 @@ int evdns_resolv_conf_parse(int flags, const char *const filename);
caller to specify which evdns_base it applies to. The recommended
function is evdns_base_search_clear().
*/
-EVENT2_EXPORT_SYMBOL
void evdns_search_clear(void);
/**
@@ -314,7 +298,6 @@ void evdns_search_clear(void);
@param domain the domain to be added to the search list
*/
-EVENT2_EXPORT_SYMBOL
void evdns_search_add(const char *domain);
/**
@@ -329,7 +312,6 @@ void evdns_search_add(const char *domain);
@param ndots the new ndots parameter
*/
-EVENT2_EXPORT_SYMBOL
void evdns_search_ndots_set(const int ndots);
/**
@@ -340,13 +322,9 @@ void evdns_search_ndots_set(const int ndots);
function is evdns_add_server_port_with_base().
*/
-EVENT2_EXPORT_SYMBOL
-struct evdns_server_port *
-evdns_add_server_port(evutil_socket_t socket, int flags,
- evdns_request_callback_fn_type callback, void *user_data);
+struct evdns_server_port *evdns_add_server_port(evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data);
#ifdef _WIN32
-EVENT2_EXPORT_SYMBOL
int evdns_config_windows_nameservers(void);
#define EVDNS_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED
#endif
diff --git a/include/event2/event.h b/include/event2/event.h
index a6b6144..6e0a4f0 100644
--- a/include/event2/event.h
+++ b/include/event2/event.h
@@ -232,7 +232,7 @@ struct event_base
*
* Generally, you can create events with event_new(), then make them
* pending with event_add(). As your event_base runs, it will run the
- * callbacks of an events whose conditions are triggered. When you no
+ * callbacks of an events whose conditions are triggered. When you
* longer want the event, free it with event_free().
*
* In more depth:
@@ -285,7 +285,7 @@ struct event
* There are many options that can be used to alter the behavior and
* implementation of an event_base. To avoid having to pass them all in a
* complex many-argument constructor, we provide an abstract data type
- * where you set up configuration information before passing it to
+ * wrhere you set up configation information before passing it to
* event_base_new_with_config().
*
* @see event_config_new(), event_config_free(), event_base_new_with_config(),
@@ -632,7 +632,7 @@ int event_config_set_num_cpus_hint(struct event_config *cfg, int cpus);
/**
* Record an interval and/or a number of callbacks after which the event base
* should check for new events. By default, the event base will run as many
- * events are as activated at the highest activated priority before checking
+ * events are as activated at the higest activated priority before checking
* for new events. If you configure it by setting max_interval, it will check
* the time after each callback, and not allow more than max_interval to
* elapse before checking for new events. If you configure it by setting
@@ -692,7 +692,10 @@ EVENT2_EXPORT_SYMBOL
void event_base_free(struct event_base *);
/**
- As event_base_free, but do not run finalizers.
+ As event_free, but do not run finalizers.
+
+ THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ BECOMES STABLE.
*/
EVENT2_EXPORT_SYMBOL
void event_base_free_nofinalize(struct event_base *);
@@ -941,6 +944,9 @@ int event_base_got_break(struct event_base *);
* To use this option safely, you may need to use event_finalize() or
* event_free_finalize() in order to safely tear down an event in a
* multithreaded application. See those functions for more information.
+ *
+ * THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ * BECOMES STABLE.
**/
#define EV_FINALIZE 0x40
/**
@@ -957,13 +963,11 @@ int event_base_got_break(struct event_base *);
/**
@name evtimer_* macros
- Aliases for working with one-shot timer events
- If you need EV_PERSIST timer use event_*() functions.
- */
+ Aliases for working with one-shot timer events */
/**@{*/
#define evtimer_assign(ev, b, cb, arg) \
event_assign((ev), (b), -1, 0, (cb), (arg))
-#define evtimer_new(b, cb, arg) event_new((b), -1, 0, (cb), (arg))
+#define evtimer_new(b, cb, arg) event_new((b), -1, 0, (cb), (arg))
#define evtimer_add(ev, tv) event_add((ev), (tv))
#define evtimer_del(ev) event_del(ev)
#define evtimer_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv))
@@ -987,20 +991,6 @@ int event_base_got_break(struct event_base *);
/**@}*/
/**
- @name evuser_* macros
-
- Aliases for working with user-triggered events
- If you need EV_PERSIST event use event_*() functions.
- */
-/**@{*/
-#define evuser_new(b, cb, arg) event_new((b), -1, 0, (cb), (arg))
-#define evuser_del(ev) event_del(ev)
-#define evuser_pending(ev, tv) event_pending((ev), 0, (tv))
-#define evuser_initialized(ev) event_initialized(ev)
-#define evuser_trigger(ev) event_active((ev), 0, 0)
-/**@}*/
-
-/**
A callback function for an event.
It receives three arguments:
@@ -1039,7 +1029,7 @@ EVENT2_EXPORT_SYMBOL
void *event_self_cbarg(void);
/**
- Allocate and assign a new event structure, ready to be added.
+ Allocate and asssign a new event structure, ready to be added.
The function event_new() returns a new event that can be used in
future calls to event_add() and event_del(). The fd and events
@@ -1065,10 +1055,10 @@ void *event_self_cbarg(void);
The EV_TIMEOUT flag has no effect here.
It is okay to have multiple events all listening on the same fds; but
- they must either all be edge-triggered, or all not be edge triggered.
+ they must either all be edge-triggered, or all not be edge triggerd.
When the event becomes active, the event loop will run the provided
- callback function, with three arguments. The first will be the provided
+ callbuck function, with three arguments. The first will be the provided
fd value. The second will be a bitfield of the events that triggered:
EV_READ, EV_WRITE, or EV_SIGNAL. Here the EV_TIMEOUT flag indicates
that a timeout occurred, and EV_ET indicates that an edge-triggered
@@ -1083,7 +1073,7 @@ void *event_self_cbarg(void);
@param callback_arg an argument to be passed to the callback function
@return a newly allocated struct event that must later be freed with
- event_free() or NULL if an error occurred.
+ event_free().
@see event_free(), event_add(), event_del(), event_assign()
*/
EVENT2_EXPORT_SYMBOL
@@ -1134,14 +1124,18 @@ int event_assign(struct event *, struct event_base *, evutil_socket_t, short, ev
/**
Deallocate a struct event * returned by event_new().
- If the event is pending or active, this function makes it non-pending
- and non-active first.
+ If the event is pending or active, first make it non-pending and
+ non-active.
*/
EVENT2_EXPORT_SYMBOL
void event_free(struct event *);
/**
* Callback type for event_finalize and event_free_finalize().
+ *
+ * THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ * BECOMES STABLE.
+ *
**/
typedef void (*event_finalize_callback_fn)(struct event *, void *);
/**
@@ -1169,10 +1163,13 @@ typedef void (*event_finalize_callback_fn)(struct event *, void *);
event_finalize() does not.
A finalizer callback must not make events pending or active. It must not
- add events, activate events, or attempt to "resuscitate" the event being
+ add events, activate events, or attempt to "resucitate" the event being
finalized in any way.
- @return 0 on success, -1 on failure.
+ THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ BECOMES STABLE.
+
+ @return 0 on succes, -1 on failure.
*/
/**@{*/
EVENT2_EXPORT_SYMBOL
@@ -1202,7 +1199,7 @@ int event_free_finalize(unsigned, struct event *, event_finalize_callback_fn);
@param arg an argument to be passed to the callback function
@param timeout the maximum amount of time to wait for the event. NULL
makes an EV_READ/EV_WRITE event make forever; NULL makes an
- EV_TIMEOUT event success immediately.
+ EV_TIMEOUT event succees immediately.
@return 0 if successful, or -1 if an error occurred
*/
EVENT2_EXPORT_SYMBOL
@@ -1213,7 +1210,7 @@ int event_base_once(struct event_base *, evutil_socket_t, short, event_callback_
The function event_add() schedules the execution of the event 'ev' when the
condition specified by event_assign() or event_new() occurs, or when the time
- specified in timeout has elapsed. If a timeout is NULL, no timeout
+ specified in timeout has elapesed. If atimeout is NULL, no timeout
occurs and the function will only be
called if a matching event occurs. The event in the
ev argument must be already initialized by event_assign() or event_new()
@@ -1239,7 +1236,7 @@ int event_add(struct event *ev, const struct timeval *timeout);
leaves the event otherwise pending.
@param ev an event struct initialized via event_assign() or event_new()
- @return 0 on success, or -1 if an error occurred.
+ @return 0 on success, or -1 if an error occurrect.
*/
EVENT2_EXPORT_SYMBOL
int event_remove_timer(struct event *ev);
@@ -1262,6 +1259,9 @@ int event_del(struct event *);
As event_del(), but never blocks while the event's callback is running
in another thread, even if the event was constructed without the
EV_FINALIZE flag.
+
+ THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ BECOMES STABLE.
*/
EVENT2_EXPORT_SYMBOL
int event_del_noblock(struct event *ev);
@@ -1269,6 +1269,9 @@ int event_del_noblock(struct event *ev);
As event_del(), but always blocks while the event's callback is running
in another thread, even if the event was constructed with the
EV_FINALIZE flag.
+
+ THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ BECOMES STABLE.
*/
EVENT2_EXPORT_SYMBOL
int event_del_block(struct event *ev);
@@ -1321,7 +1324,7 @@ struct event *event_base_get_running_event(struct event_base *base);
The event_initialized() function can be used to check if an event has been
initialized.
- Warning: This function is only useful for distinguishing a zeroed-out
+ Warning: This function is only useful for distinguishing a a zeroed-out
piece of memory from an initialized event, it can easily be confused by
uninitialized memory. Thus, it should ONLY be used to distinguish an
initialized event from zero.
@@ -1528,7 +1531,7 @@ const struct timeval *event_base_init_common_timeout(struct event_base *base,
Note also that if you are going to call this function, you should do so
before any call to any Libevent function that does allocation.
- Otherwise, those functions will allocate their memory using malloc(), but
+ Otherwise, those funtions will allocate their memory using malloc(), but
then later free it using your provided free_fn.
@param malloc_fn A replacement for malloc.
@@ -1567,7 +1570,7 @@ void event_base_dump_events(struct event_base *, FILE *);
@param base the event_base on which to activate the events.
@param fd An fd to active events on.
- @param events One or more of EV_{READ,WRITE,TIMEOUT}.
+ @param events One or more of EV_{READ,WRITE}.
*/
EVENT2_EXPORT_SYMBOL
void event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events);
@@ -1624,7 +1627,7 @@ int event_base_foreach_event(struct event_base *base, event_base_foreach_event_c
cached time.
Generally, this value will only be cached while actually
- processing event callbacks, and may be very inaccurate if your
+ processing event callbacks, and may be very inaccuate if your
callbacks take a long time to execute.
Returns 0 on success, negative on failure.
diff --git a/include/event2/http.h b/include/event2/http.h
index 2a41303..8fb5642 100644
--- a/include/event2/http.h
+++ b/include/event2/http.h
@@ -78,8 +78,7 @@ struct evdns_base;
* Create a new HTTP server.
*
* @param base (optional) the event base to receive the HTTP events
- * @return a pointer to a newly initialized evhttp server structure or NULL
- * on error
+ * @return a pointer to a newly initialized evhttp server structure
* @see evhttp_free()
*/
EVENT2_EXPORT_SYMBOL
@@ -517,8 +516,7 @@ enum evhttp_request_kind { EVHTTP_REQUEST, EVHTTP_RESPONSE };
* when the connection closes. It must have no fd set on it.
* @param address the address to which to connect
* @param port the port to connect to
- * @return an evhttp_connection object that can be used for making requests or
- * NULL on error
+ * @return an evhttp_connection object that can be used for making requests
*/
EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evhttp_connection_base_bufferevent_new(
@@ -638,8 +636,7 @@ void evhttp_request_free(struct evhttp_request *req);
* specified host name resolution will block.
* @param address the address to which to connect
* @param port the port to connect to
- * @return an evhttp_connection object that can be used for making requests or
- * NULL on error
+ * @return an evhttp_connection object that can be used for making requests
*/
EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evhttp_connection_base_new(
@@ -930,14 +927,14 @@ char *evhttp_uriencode(const char *str, ev_ssize_t size, int space_to_plus);
/**
Helper function to sort of decode a URI-encoded string. Unlike
- evhttp_uridecode, it decodes all plus characters that appear
+ evhttp_get_decoded_uri, it decodes all plus characters that appear
_after_ the first question mark character, but no plusses that occur
before. This is not a good way to decode URIs in whole or in part.
The returned string must be freed by the caller
@deprecated This function is deprecated; you probably want to use
- evhttp_uridecode instead.
+ evhttp_get_decoded_uri instead.
@param uri an encoded URI
@return a newly allocated unencoded URI or NULL on failure
diff --git a/include/event2/http_compat.h b/include/event2/http_compat.h
index 794a581..43c2c43 100644
--- a/include/event2/http_compat.h
+++ b/include/event2/http_compat.h
@@ -56,10 +56,8 @@ extern "C" {
*
* @param address the address to which the HTTP server should be bound
* @param port the port number on which the HTTP server should listen
- * @return a pointer to a newly initialized evhttp server structure
- * or NULL on error
+ * @return an struct evhttp object
*/
-EVENT2_EXPORT_SYMBOL
struct evhttp *evhttp_start(const char *address, ev_uint16_t port);
/**
@@ -69,7 +67,6 @@ struct evhttp *evhttp_start(const char *address, ev_uint16_t port);
*
* @deprecated It does not allow an event base to be specified
*/
-EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evhttp_connection_new(
const char *address, ev_uint16_t port);
@@ -79,7 +76,6 @@ struct evhttp_connection *evhttp_connection_new(
*
* @deprecated XXXX Why?
*/
-EVENT2_EXPORT_SYMBOL
void evhttp_connection_set_base(struct evhttp_connection *evcon,
struct event_base *base);
diff --git a/include/event2/listener.h b/include/event2/listener.h
index 789a27c..84b4da0 100644
--- a/include/event2/listener.h
+++ b/include/event2/listener.h
@@ -97,18 +97,6 @@ typedef void (*evconnlistener_errorcb)(struct evconnlistener *, void *);
* This is only available on Linux and kernel 3.9+
*/
#define LEV_OPT_REUSEABLE_PORT (1u<<7)
-/** Flag: Indicates that the listener wants to work only in IPv6 socket.
- *
- * According to RFC3493 and most Linux distributions, default value is to
- * work in IPv4-mapped mode. If there is a requirement to bind same port
- * on same ip addresses but different handlers for both IPv4 and IPv6,
- * it is required to set IPV6_V6ONLY socket option to be sure that the
- * code works as expected without affected by bindv6only sysctl setting in
- * system.
- *
- * This socket option also supported by Windows.
- */
-#define LEV_OPT_BIND_IPV6ONLY (1u<<8)
/**
Allocate a new evconnlistener object to listen for incoming TCP connections
diff --git a/include/event2/rpc.h b/include/event2/rpc.h
index 1bc31d5..dd43df2 100644
--- a/include/event2/rpc.h
+++ b/include/event2/rpc.h
@@ -27,10 +27,6 @@
#ifndef EVENT2_RPC_H_INCLUDED_
#define EVENT2_RPC_H_INCLUDED_
-/* For int types. */
-#include <event2/util.h>
-#include <event2/visibility.h>
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -182,7 +178,6 @@ EVRPC_STRUCT(rpcname) { \
struct evhttp_request* http_req; \
struct evbuffer* rpc_data; \
}; \
-EVENT2_EXPORT_SYMBOL \
int evrpc_send_request_##rpcname(struct evrpc_pool *, \
struct reqstruct *, struct rplystruct *, \
void (*)(struct evrpc_status *, \
@@ -192,7 +187,6 @@ int evrpc_send_request_##rpcname(struct evrpc_pool *, \
struct evrpc_pool;
/** use EVRPC_GENERATE instead */
-EVENT2_EXPORT_SYMBOL
struct evrpc_request_wrapper *evrpc_make_request_ctx(
struct evrpc_pool *pool, void *request, void *reply,
const char *rpcname,
@@ -263,13 +257,10 @@ struct evrpc_request_wrapper *evrpc_make_request_ctx(
#define EVRPC_REQUEST_HTTP(rpc_req) (rpc_req)->http_req
/** completes the server response to an rpc request */
-EVENT2_EXPORT_SYMBOL
void evrpc_request_done(struct evrpc_req_generic *req);
/** accessors for request and reply */
-EVENT2_EXPORT_SYMBOL
void *evrpc_get_request(struct evrpc_req_generic *req);
-EVENT2_EXPORT_SYMBOL
void *evrpc_get_reply(struct evrpc_req_generic *req);
/** Creates the reply to an RPC request
@@ -294,10 +285,9 @@ struct evhttp;
/** Creates a new rpc base from which RPC requests can be received
*
* @param server a pointer to an existing HTTP server
- * @return a newly allocated evrpc_base struct or NULL if an error occurred
+ * @return a newly allocated evrpc_base struct
* @see evrpc_free()
*/
-EVENT2_EXPORT_SYMBOL
struct evrpc_base *evrpc_init(struct evhttp *server);
/**
@@ -308,7 +298,6 @@ struct evrpc_base *evrpc_init(struct evhttp *server);
* @param base the evrpc_base object to be freed
* @see evrpc_init
*/
-EVENT2_EXPORT_SYMBOL
void evrpc_free(struct evrpc_base *base);
/** register RPCs with the HTTP Server
@@ -330,10 +319,10 @@ void evrpc_free(struct evrpc_base *base);
#define EVRPC_REGISTER(base, name, request, reply, callback, cbarg) \
evrpc_register_generic(base, #name, \
(void (*)(struct evrpc_req_generic *, void *))callback, cbarg, \
- (void *(*)(void *))request##_new_with_arg, NULL, \
+ (void *(*)(void *))request##_new, NULL, \
(void (*)(void *))request##_free, \
(int (*)(void *, struct evbuffer *))request##_unmarshal, \
- (void *(*)(void *))reply##_new_with_arg, NULL, \
+ (void *(*)(void *))reply##_new, NULL, \
(void (*)(void *))reply##_free, \
(int (*)(void *))reply##_complete, \
(void (*)(struct evbuffer *, void *))reply##_marshal)
@@ -345,7 +334,6 @@ void evrpc_free(struct evrpc_base *base);
@see EVRPC_REGISTER()
*/
-EVENT2_EXPORT_SYMBOL
int evrpc_register_rpc(struct evrpc_base *, struct evrpc *,
void (*)(struct evrpc_req_generic*, void *), void *);
@@ -359,7 +347,6 @@ int evrpc_register_rpc(struct evrpc_base *, struct evrpc *,
*/
#define EVRPC_UNREGISTER(base, name) evrpc_unregister_rpc((base), #name)
-EVENT2_EXPORT_SYMBOL
int evrpc_unregister_rpc(struct evrpc_base *base, const char *name);
/*
@@ -398,7 +385,6 @@ struct evrpc_status;
@returns 0 on success, -1 otherwise.
@see EVRPC_MAKE_REQUEST(), EVRPC_MAKE_CTX()
*/
-EVENT2_EXPORT_SYMBOL
int evrpc_make_request(struct evrpc_request_wrapper *ctx);
/** creates an rpc connection pool
@@ -408,18 +394,15 @@ int evrpc_make_request(struct evrpc_request_wrapper *ctx);
*
* @param base a pointer to an struct event_based object; can be left NULL
* in singled-threaded applications
- * @return a newly allocated struct evrpc_pool object or NULL if an error
- * occurred
+ * @return a newly allocated struct evrpc_pool object
* @see evrpc_pool_free()
*/
-EVENT2_EXPORT_SYMBOL
struct evrpc_pool *evrpc_pool_new(struct event_base *base);
/** frees an rpc connection pool
*
* @param pool a pointer to an evrpc_pool allocated via evrpc_pool_new()
* @see evrpc_pool_new()
*/
-EVENT2_EXPORT_SYMBOL
void evrpc_pool_free(struct evrpc_pool *pool);
/**
@@ -430,7 +413,6 @@ void evrpc_pool_free(struct evrpc_pool *pool);
* @param pool the pool to which to add the connection
* @param evcon the connection to add to the pool.
*/
-EVENT2_EXPORT_SYMBOL
void evrpc_pool_add_connection(struct evrpc_pool *pool,
struct evhttp_connection *evcon);
@@ -442,7 +424,6 @@ void evrpc_pool_add_connection(struct evrpc_pool *pool,
* @param pool the pool from which to remove the connection
* @param evcon the connection to remove from the pool.
*/
-EVENT2_EXPORT_SYMBOL
void evrpc_pool_remove_connection(struct evrpc_pool *pool,
struct evhttp_connection *evcon);
@@ -461,7 +442,6 @@ void evrpc_pool_remove_connection(struct evrpc_pool *pool,
* @param timeout_in_secs the number of seconds after which a request should
* timeout and a failure be returned to the callback.
*/
-EVENT2_EXPORT_SYMBOL
void evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs);
/**
@@ -509,7 +489,6 @@ enum EVRPC_HOOK_RESULT {
* @return a handle to the hook so it can be removed later
* @see evrpc_remove_hook()
*/
-EVENT2_EXPORT_SYMBOL
void *evrpc_add_hook(void *vbase,
enum EVRPC_HOOK_TYPE hook_type,
int (*cb)(void *, struct evhttp_request *, struct evbuffer *, void *),
@@ -523,7 +502,6 @@ void *evrpc_add_hook(void *vbase,
* @return 1 on success or 0 on failure
* @see evrpc_add_hook()
*/
-EVENT2_EXPORT_SYMBOL
int evrpc_remove_hook(void *vbase,
enum EVRPC_HOOK_TYPE hook_type,
void *handle);
@@ -533,8 +511,8 @@ int evrpc_remove_hook(void *vbase,
* @param vbase a pointer to either struct evrpc_base or struct evrpc_pool
* @param ctx the context pointer provided to the original hook call
*/
-EVENT2_EXPORT_SYMBOL
-int evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res);
+int
+evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res);
/** adds meta data to request
*
@@ -547,7 +525,6 @@ int evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res);
* @param data the data to be associated with the key
* @param data_size the size of the data
*/
-EVENT2_EXPORT_SYMBOL
void evrpc_hook_add_meta(void *ctx, const char *key,
const void *data, size_t data_size);
@@ -561,7 +538,6 @@ void evrpc_hook_add_meta(void *ctx, const char *key,
* @param data_size pointer to the size of the data
* @return 0 on success or -1 on failure
*/
-EVENT2_EXPORT_SYMBOL
int evrpc_hook_find_meta(void *ctx, const char *key,
void **data, size_t *data_size);
@@ -569,10 +545,8 @@ int evrpc_hook_find_meta(void *ctx, const char *key,
* returns the connection object associated with the request
*
* @param ctx the context provided to the hook call
- * @return a pointer to the evhttp_connection object or NULL if an error
- * occurred
+ * @return a pointer to the evhttp_connection object
*/
-EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evrpc_hook_get_connection(void *ctx);
/**
@@ -582,7 +556,6 @@ struct evhttp_connection *evrpc_hook_get_connection(void *ctx);
@see EVRPC_MAKE_REQUEST()
*/
-EVENT2_EXPORT_SYMBOL
int evrpc_send_request_generic(struct evrpc_pool *pool,
void *request, void *reply,
void (*cb)(struct evrpc_status *, void *, void *, void *),
@@ -599,8 +572,8 @@ int evrpc_send_request_generic(struct evrpc_pool *pool,
@see EVRPC_REGISTER()
*/
-EVENT2_EXPORT_SYMBOL
-int evrpc_register_generic(struct evrpc_base *base, const char *name,
+int
+evrpc_register_generic(struct evrpc_base *base, const char *name,
void (*callback)(struct evrpc_req_generic *, void *), void *cbarg,
void *(*req_new)(void *), void *req_new_arg, void (*req_free)(void *),
int (*req_unmarshal)(void *, struct evbuffer *),
@@ -609,12 +582,9 @@ int evrpc_register_generic(struct evrpc_base *base, const char *name,
void (*rpl_marshal)(struct evbuffer *, void *));
/** accessors for obscure and undocumented functionality */
-EVENT2_EXPORT_SYMBOL
struct evrpc_pool* evrpc_request_get_pool(struct evrpc_request_wrapper *ctx);
-EVENT2_EXPORT_SYMBOL
void evrpc_request_set_pool(struct evrpc_request_wrapper *ctx,
struct evrpc_pool *pool);
-EVENT2_EXPORT_SYMBOL
void evrpc_request_set_cb(struct evrpc_request_wrapper *ctx,
void (*cb)(struct evrpc_status*, void *request, void *reply, void *arg),
void *cb_arg);
diff --git a/include/event2/rpc_struct.h b/include/event2/rpc_struct.h
index f3cb460..8f691f4 100644
--- a/include/event2/rpc_struct.h
+++ b/include/event2/rpc_struct.h
@@ -38,16 +38,6 @@ extern "C" {
*/
-/* Fix so that people don't have to run with <sys/queue.h> */
-#ifndef TAILQ_ENTRY
-#define EVENT_DEFINED_TQENTRY_
-#define TAILQ_ENTRY(type) \
-struct { \
- struct type *tqe_next; /* next element */ \
- struct type **tqe_prev; /* address of previous next element */ \
-}
-#endif /* !TAILQ_ENTRY */
-
/**
* provides information about the completed RPC request.
*/
@@ -103,10 +93,6 @@ struct evrpc {
struct evrpc_base *base;
};
-#ifdef EVENT_DEFINED_TQENTRY_
-#undef TAILQ_ENTRY
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/include/event2/util.h b/include/event2/util.h
index e6df628..dd4bbb6 100644
--- a/include/event2/util.h
+++ b/include/event2/util.h
@@ -58,6 +58,9 @@ extern "C" {
#endif
#include <stdarg.h>
#ifdef EVENT__HAVE_NETDB_H
+#if !defined(_GNU_SOURCE)
+#define _GNU_SOURCE
+#endif
#include <netdb.h>
#endif
@@ -256,7 +259,6 @@ extern "C" {
#define EV_INT32_MAX INT32_MAX
#define EV_INT32_MIN INT32_MIN
#define EV_UINT16_MAX UINT16_MAX
-#define EV_INT16_MIN INT16_MIN
#define EV_INT16_MAX INT16_MAX
#define EV_UINT8_MAX UINT8_MAX
#define EV_INT8_MAX INT8_MAX
@@ -423,18 +425,6 @@ int evutil_make_listen_socket_reuseable(evutil_socket_t sock);
EVENT2_EXPORT_SYMBOL
int evutil_make_listen_socket_reuseable_port(evutil_socket_t sock);
-/** Set ipv6 only bind socket option to make listener work only in ipv6 sockets.
-
- According to RFC3493 and most Linux distributions, default value for the
- sockets is to work in IPv4-mapped mode. In IPv4-mapped mode, it is not possible
- to bind same port from different IPv4 and IPv6 handlers.
-
- @param sock The socket to make in ipv6only working mode
- @return 0 on success, -1 on failure
- */
-EVENT2_EXPORT_SYMBOL
-int evutil_make_listen_socket_ipv6only(evutil_socket_t sock);
-
/** Do platform-specific operations as needed to close a socket upon a
successful execution of one of the exec*() functions.
@@ -448,8 +438,7 @@ int evutil_make_socket_closeonexec(evutil_socket_t sock);
socket() or accept().
@param sock The socket to be closed
- @return 0 on success (whether the operation is supported or not),
- -1 on failure
+ @return 0 on success, -1 on failure
*/
EVENT2_EXPORT_SYMBOL
int evutil_closesocket(evutil_socket_t sock);
@@ -481,7 +470,6 @@ int evutil_socket_geterror(evutil_socket_t sock);
/** Convert a socket error to a string. */
EVENT2_EXPORT_SYMBOL
const char *evutil_socket_error_to_string(int errcode);
-#define EVUTIL_INVALID_SOCKET INVALID_SOCKET
#elif defined(EVENT_IN_DOXYGEN_)
/**
@name Socket error functions
@@ -505,16 +493,14 @@ const char *evutil_socket_error_to_string(int errcode);
#define evutil_socket_geterror(sock) ...
/** Convert a socket error to a string. */
#define evutil_socket_error_to_string(errcode) ...
-#define EVUTIL_INVALID_SOCKET -1
/**@}*/
-#else /** !EVENT_IN_DOXYGEN_ && !_WIN32 */
+#else
#define EVUTIL_SOCKET_ERROR() (errno)
#define EVUTIL_SET_SOCKET_ERROR(errcode) \
do { errno = (errcode); } while (0)
#define evutil_socket_geterror(sock) (errno)
#define evutil_socket_error_to_string(errcode) (strerror(errcode))
-#define EVUTIL_INVALID_SOCKET -1
-#endif /** !_WIN32 */
+#endif
/**
@@ -856,7 +842,6 @@ int evutil_secure_rng_init(void);
EVENT2_EXPORT_SYMBOL
int evutil_secure_rng_set_urandom_device_file(char *fname);
-#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
/** Seed the random number generator with extra random bytes.
You should almost never need to call this function; it should be
@@ -873,7 +858,6 @@ int evutil_secure_rng_set_urandom_device_file(char *fname);
*/
EVENT2_EXPORT_SYMBOL
void evutil_secure_rng_add_bytes(const char *dat, size_t datlen);
-#endif
#ifdef __cplusplus
}
diff --git a/include/event2/visibility.h b/include/event2/visibility.h
index 006bbf0..fb16dbe 100644
--- a/include/event2/visibility.h
+++ b/include/event2/visibility.h
@@ -29,39 +29,22 @@
#include <event2/event-config.h>
-#if defined(event_shared_EXPORTS) || \
- defined(event_extra_shared_EXPORTS) || \
- defined(event_core_shared_EXPORTS) || \
- defined(event_pthreads_shared_EXPORTS) || \
- defined(event_openssl_shared_EXPORTS)
-
+#if defined(event_EXPORTS) || defined(event_extra_EXPORTS) || defined(event_core_EXPORTS)
# if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
# define EVENT2_EXPORT_SYMBOL __global
# elif defined __GNUC__
# define EVENT2_EXPORT_SYMBOL __attribute__ ((visibility("default")))
# elif defined(_MSC_VER)
-# define EVENT2_EXPORT_SYMBOL __declspec(dllexport)
+# define EVENT2_EXPORT_SYMBOL extern __declspec(dllexport)
# else
# define EVENT2_EXPORT_SYMBOL /* unknown compiler */
# endif
-
-#else /* event_*_EXPORTS */
-
-# define EVENT2_EXPORT_SYMBOL
-
-#endif /* event_*_EXPORTS */
-
-/** We need to dllimport event_debug_logging_mask_ into event_extra */
-#if defined(_MSC_VER)
-# if defined(event_core_shared_EXPORTS) /** from core export */
-# define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllexport)
-# elif defined(event_extra_shared_EXPORTS) || /** from extra import */ \
- defined(EVENT_VISIBILITY_WANT_DLLIMPORT)
-# define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllimport)
+#else
+# if defined(EVENT__NEED_DLLIMPORT) && defined(_MSC_VER) && !defined(EVENT_BUILDING_REGRESS_TEST)
+# define EVENT2_EXPORT_SYMBOL extern __declspec(dllimport)
+# else
+# define EVENT2_EXPORT_SYMBOL
# endif
-#endif /* _MSC_VER */
-#if !defined(EVENT2_CORE_EXPORT_SYMBOL)
-# define EVENT2_CORE_EXPORT_SYMBOL EVENT2_EXPORT_SYMBOL
#endif
#endif /* EVENT2_VISIBILITY_H_INCLUDED_ */
diff --git a/include/include.am b/include/include.am
index aaa2042..9aad2db 100644
--- a/include/include.am
+++ b/include/include.am
@@ -1,4 +1,4 @@
-# include/include.am for libevent
+# include/Makefile.am for libevent
# Copyright 2000-2007 Niels Provos
# Copyright 2007-2012 Niels Provos and Nick Mathewson
#
@@ -11,6 +11,7 @@ EVENT2_EXPORT = \
include/event2/buffer_compat.h \
include/event2/bufferevent.h \
include/event2/bufferevent_compat.h \
+ include/event2/bufferevent_ssl.h \
include/event2/bufferevent_struct.h \
include/event2/dns.h \
include/event2/dns_compat.h \
@@ -32,10 +33,6 @@ EVENT2_EXPORT = \
include/event2/util.h \
include/event2/visibility.h
-if OPENSSL
-EVENT2_EXPORT += include/event2/bufferevent_ssl.h
-endif
-
## Without the nobase_ prefixing, Automake would strip "include/event2/" from
## the source header filename to derive the installed header filename.
## With nobase_ the installed path is $(includedir)/include/event2/ev*.h.
diff --git a/install-sh b/install-sh
index 8175c64..0b0fdcb 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2018-03-11.20; # UTC
+scriptversion=2013-12-25.23; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -271,18 +271,15 @@ do
fi
dst=$dst_arg
- # If destination is a directory, append the input filename.
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
- dstbase=`basename "$src"`
- case $dst in
- */) dst=$dst$dstbase;;
- *) dst=$dst/$dstbase;;
- esac
+ dst=$dstdir/`basename "$src"`
dstdir_status=0
else
dstdir=`dirname "$dst"`
@@ -291,11 +288,6 @@ do
fi
fi
- case $dstdir in
- */) dstdirslash=$dstdir;;
- *) dstdirslash=$dstdir/;;
- esac
-
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
@@ -332,43 +324,34 @@ do
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
- # Note that $RANDOM variable is not portable (e.g. dash); Use it
- # here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
- trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- # Because "mkdir -p" follows existing symlinks and we likely work
- # directly in world-writeable /tmp, make sure that the '$tmpdir'
- # directory is successfully created first before we actually test
- # 'mkdir -p' feature.
if (umask $mkdir_umask &&
- $mkdirprog $mkdir_mode "$tmpdir" &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- test_tmpdir="$tmpdir/a"
- ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
- $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
- rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
@@ -444,8 +427,8 @@ do
else
# Make a couple of temp file names in the proper directory.
- dsttmp=${dstdirslash}_inst.$$_
- rmtmp=${dstdirslash}_rm.$$_
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
@@ -510,9 +493,9 @@ do
done
# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
diff --git a/iocp-internal.h b/iocp-internal.h
index 21e0e0a..93dbe2b 100644
--- a/iocp-internal.h
+++ b/iocp-internal.h
@@ -92,7 +92,6 @@ struct event_iocp_port {
HANDLE *shutdownSemaphore;
};
-EVENT2_EXPORT_SYMBOL
const struct win32_extension_fns *event_get_win32_extension_fns_(void);
#else
/* Dummy definition so we can test-compile more things on unix. */
@@ -107,14 +106,12 @@ struct event_overlapped {
@param cb The callback that should be invoked once the IO operation has
finished.
*/
-EVENT2_EXPORT_SYMBOL
void event_overlapped_init_(struct event_overlapped *, iocp_callback cb);
/** Allocate and return a new evbuffer that supports overlapped IO on a given
socket. The socket must be associated with an IO completion port using
event_iocp_port_associate_.
*/
-EVENT2_EXPORT_SYMBOL
struct evbuffer *evbuffer_overlapped_new_(evutil_socket_t fd);
/** XXXX Document (nickm) */
@@ -134,7 +131,6 @@ void evbuffer_overlapped_set_fd_(struct evbuffer *buf, evutil_socket_t fd);
@param ol Overlapped object with associated completion callback.
@return 0 on success, -1 on error.
*/
-EVENT2_EXPORT_SYMBOL
int evbuffer_launch_read_(struct evbuffer *buf, size_t n, struct event_overlapped *ol);
/** Start writing data from the start of an evbuffer.
@@ -149,26 +145,21 @@ int evbuffer_launch_read_(struct evbuffer *buf, size_t n, struct event_overlappe
@param ol Overlapped object with associated completion callback.
@return 0 on success, -1 on error.
*/
-EVENT2_EXPORT_SYMBOL
int evbuffer_launch_write_(struct evbuffer *buf, ev_ssize_t n, struct event_overlapped *ol);
/** XXX document */
-EVENT2_EXPORT_SYMBOL
void evbuffer_commit_read_(struct evbuffer *, ev_ssize_t);
-EVENT2_EXPORT_SYMBOL
void evbuffer_commit_write_(struct evbuffer *, ev_ssize_t);
/** Create an IOCP, and launch its worker threads. Internal use only.
This interface is unstable, and will change.
*/
-EVENT2_EXPORT_SYMBOL
struct event_iocp_port *event_iocp_port_launch_(int n_cpus);
/** Associate a file descriptor with an iocp, such that overlapped IO on the
fd will happen on one of the iocp's worker threads.
*/
-EVENT2_EXPORT_SYMBOL
int event_iocp_port_associate_(struct event_iocp_port *port, evutil_socket_t fd,
ev_uintptr_t key);
@@ -178,27 +169,22 @@ int event_iocp_port_associate_(struct event_iocp_port *port, evutil_socket_t fd,
0. Otherwise, return -1. If you get a -1 return value, it is safe to call
this function again.
*/
-EVENT2_EXPORT_SYMBOL
int event_iocp_shutdown_(struct event_iocp_port *port, long waitMsec);
/* FIXME document. */
-EVENT2_EXPORT_SYMBOL
int event_iocp_activate_overlapped_(struct event_iocp_port *port,
struct event_overlapped *o,
ev_uintptr_t key, ev_uint32_t n_bytes);
struct event_base;
/* FIXME document. */
-EVENT2_EXPORT_SYMBOL
struct event_iocp_port *event_base_get_iocp_(struct event_base *base);
/* FIXME document. */
-EVENT2_EXPORT_SYMBOL
int event_base_start_iocp_(struct event_base *base, int n_cpus);
void event_base_stop_iocp_(struct event_base *base);
/* FIXME document. */
-EVENT2_EXPORT_SYMBOL
struct bufferevent *bufferevent_async_new_(struct event_base *base,
evutil_socket_t fd, int options);
diff --git a/kqueue.c b/kqueue.c
index d08f512..a959c58 100644
--- a/kqueue.c
+++ b/kqueue.c
@@ -37,7 +37,6 @@
#endif
#include <sys/queue.h>
#include <sys/event.h>
-#include <limits.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -63,7 +62,6 @@
#include "log-internal.h"
#include "evmap-internal.h"
#include "event2/thread.h"
-#include "event2/util.h"
#include "evthread-internal.h"
#include "changelist-internal.h"
@@ -209,17 +207,9 @@ kq_build_changes_list(const struct event_changelist *changelist,
struct event_change *in_ch = &changelist->changes[i];
struct kevent *out_ch;
if (n_changes >= kqop->changes_size - 1) {
- int newsize;
+ int newsize = kqop->changes_size * 2;
struct kevent *newchanges;
- if (kqop->changes_size > INT_MAX / 2 ||
- (size_t)kqop->changes_size * 2 > EV_SIZE_MAX /
- sizeof(struct kevent)) {
- event_warnx("%s: int overflow", __func__);
- return (-1);
- }
-
- newsize = kqop->changes_size * 2;
newchanges = mm_realloc(kqop->changes,
newsize * sizeof(struct kevent));
if (newchanges == NULL) {
diff --git a/listener.c b/listener.c
index f5c00c9..2862d32 100644
--- a/listener.c
+++ b/listener.c
@@ -35,7 +35,6 @@
#define _WIN32_WINNT 0x0403
#endif
#include <winsock2.h>
-#include <winerror.h>
#include <ws2tcpip.h>
#include <mswsock.h>
#endif
@@ -246,11 +245,6 @@ evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb,
goto err;
}
- if (flags & LEV_OPT_BIND_IPV6ONLY) {
- if (evutil_make_listen_socket_ipv6only(fd) < 0)
- goto err;
- }
-
if (sa) {
if (bind(fd, sa, socklen)<0)
goto err;
@@ -427,14 +421,11 @@ listener_read_cb(evutil_socket_t fd, short what, void *p)
if (lev->refcnt == 1) {
int freed = listener_decref_and_unlock(lev);
EVUTIL_ASSERT(freed);
+
+ evutil_closesocket(new_fd);
return;
}
--lev->refcnt;
- if (!lev->enabled) {
- /* the callback could have disabled the listener */
- UNLOCK(lev);
- return;
- }
}
err = evutil_socket_geterror(fd);
if (EVUTIL_ERR_ACCEPT_RETRIABLE(err)) {
@@ -513,7 +504,7 @@ new_accepting_socket(struct evconnlistener_iocp *lev, int family)
return NULL;
event_overlapped_init_(&res->overlapped, accepted_socket_cb);
- res->s = EVUTIL_INVALID_SOCKET;
+ res->s = INVALID_SOCKET;
res->lev = lev;
res->buflen = buflen;
res->family = family;
@@ -531,7 +522,7 @@ static void
free_and_unlock_accepting_socket(struct accepting_socket *as)
{
/* requires lock. */
- if (as->s != EVUTIL_INVALID_SOCKET)
+ if (as->s != INVALID_SOCKET)
closesocket(as->s);
LeaveCriticalSection(&as->lock);
@@ -551,7 +542,7 @@ start_accepting(struct accepting_socket *as)
if (!as->lev->base.enabled)
return 0;
- if (s == EVUTIL_INVALID_SOCKET) {
+ if (s == INVALID_SOCKET) {
error = WSAGetLastError();
goto report_err;
}
@@ -598,7 +589,7 @@ stop_accepting(struct accepting_socket *as)
{
/* requires lock. */
SOCKET s = as->s;
- as->s = EVUTIL_INVALID_SOCKET;
+ as->s = INVALID_SOCKET;
closesocket(s);
}
@@ -640,7 +631,7 @@ accepted_socket_invoke_user_cb(struct event_callback *dcb, void *arg)
&socklen_remote);
sock = as->s;
cb = lev->cb;
- as->s = EVUTIL_INVALID_SOCKET;
+ as->s = INVALID_SOCKET;
/* We need to call this so getsockname, getpeername, and
* shutdown work correctly on the accepted socket. */
@@ -688,7 +679,7 @@ accepted_socket_cb(struct event_overlapped *o, ev_uintptr_t key, ev_ssize_t n, i
free_and_unlock_accepting_socket(as);
listener_decref_and_unlock(lev);
return;
- } else if (as->s == EVUTIL_INVALID_SOCKET) {
+ } else if (as->s == INVALID_SOCKET) {
/* This is okay; we were disabled by iocp_listener_disable. */
LeaveCriticalSection(&as->lock);
} else {
@@ -726,7 +717,7 @@ iocp_listener_enable(struct evconnlistener *lev)
if (!as)
continue;
EnterCriticalSection(&as->lock);
- if (!as->free_on_cb && as->s == EVUTIL_INVALID_SOCKET)
+ if (!as->free_on_cb && as->s == INVALID_SOCKET)
start_accepting(as);
LeaveCriticalSection(&as->lock);
}
@@ -748,7 +739,7 @@ iocp_listener_disable_impl(struct evconnlistener *lev, int shutdown)
if (!as)
continue;
EnterCriticalSection(&as->lock);
- if (!as->free_on_cb && as->s != EVUTIL_INVALID_SOCKET) {
+ if (!as->free_on_cb && as->s != INVALID_SOCKET) {
if (shutdown)
as->free_on_cb = 1;
stop_accepting(as);
diff --git a/log-internal.h b/log-internal.h
index 2c31608..330478a 100644
--- a/log-internal.h
+++ b/log-internal.h
@@ -29,10 +29,6 @@
#include "event2/util.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#ifdef __GNUC__
#define EV_CHECK_FMT(a,b) __attribute__((format(printf, a, b)))
#define EV_NORETURN __attribute__((noreturn))
@@ -43,35 +39,32 @@ extern "C" {
#define EVENT_ERR_ABORT_ ((int)0xdeaddead)
+#define USE_GLOBAL_FOR_DEBUG_LOGGING
+
#if !defined(EVENT__DISABLE_DEBUG_MODE) || defined(USE_DEBUG)
#define EVENT_DEBUG_LOGGING_ENABLED
#endif
#ifdef EVENT_DEBUG_LOGGING_ENABLED
-EVENT2_CORE_EXPORT_SYMBOL extern ev_uint32_t event_debug_logging_mask_;
+#ifdef USE_GLOBAL_FOR_DEBUG_LOGGING
+extern ev_uint32_t event_debug_logging_mask_;
#define event_debug_get_logging_mask_() (event_debug_logging_mask_)
#else
+ev_uint32_t event_debug_get_logging_mask_(void);
+#endif
+#else
#define event_debug_get_logging_mask_() (0)
#endif
-EVENT2_EXPORT_SYMBOL
void event_err(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3) EV_NORETURN;
-EVENT2_EXPORT_SYMBOL
void event_warn(const char *fmt, ...) EV_CHECK_FMT(1,2);
-EVENT2_EXPORT_SYMBOL
void event_sock_err(int eval, evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(3,4) EV_NORETURN;
-EVENT2_EXPORT_SYMBOL
void event_sock_warn(evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(2,3);
-EVENT2_EXPORT_SYMBOL
void event_errx(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3) EV_NORETURN;
-EVENT2_EXPORT_SYMBOL
void event_warnx(const char *fmt, ...) EV_CHECK_FMT(1,2);
-EVENT2_EXPORT_SYMBOL
void event_msgx(const char *fmt, ...) EV_CHECK_FMT(1,2);
-EVENT2_EXPORT_SYMBOL
void event_debugx_(const char *fmt, ...) EV_CHECK_FMT(1,2);
-EVENT2_EXPORT_SYMBOL
void event_logv_(int severity, const char *errstr, const char *fmt, va_list ap)
EV_CHECK_FMT(3,0);
@@ -87,8 +80,4 @@ void event_logv_(int severity, const char *errstr, const char *fmt, va_list ap)
#undef EV_CHECK_FMT
-#ifdef __cplusplus
-}
#endif
-
-#endif /* LOG_INTERNAL_H_INCLUDED_ */
diff --git a/log.c b/log.c
index a9debb8..e8ae9fd 100644
--- a/log.c
+++ b/log.c
@@ -69,7 +69,16 @@ static event_fatal_cb fatal_fn = NULL;
#define DEFAULT_MASK 0
#endif
-EVENT2_EXPORT_SYMBOL ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK;
+#ifdef USE_GLOBAL_FOR_DEBUG_LOGGING
+ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK;
+#else
+static ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK;
+ev_uint32_t
+event_debug_get_logging_mask_(void)
+{
+ return event_debug_logging_mask_;
+}
+#endif
#endif /* EVENT_DEBUG_LOGGING_ENABLED */
void
diff --git a/ltmain.sh b/ltmain.sh
index d3ab94d..0f0a2da 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,12 +1,12 @@
#! /bin/sh
## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
-## by inline-source v2018-07-24.06
+## by inline-source v2014-01-03.01
-# libtool (GNU libtool) 2.4.6.42-b88ce
+# libtool (GNU libtool) 2.4.6
# Provide generalized library-building support services.
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -31,8 +31,8 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION=2.4.6.42-b88ce
-package_revision=2.4.6.42
+VERSION=2.4.6
+package_revision=2.4.6
## ------ ##
@@ -64,25 +64,34 @@ package_revision=2.4.6.42
# libraries, which are installed to $pkgauxdir.
# Set a version string for this script.
-scriptversion=2018-07-24.06; # UTC
+scriptversion=2015-01-20.17; # UTC
# General shell script boiler plate, and helper functions.
# Written by Gary V. Vaughan, 2004
-# This is free software. There is NO warranty; not even for
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-#
-# Copyright (C) 2004-2018 Bootstrap Authors
-#
-# This file is dual licensed under the terms of the MIT license
-# <https://opensource.org/license/MIT>, and GPL version 3 or later
-# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
-# these licenses when using or redistributing this software or any of
-# the files within it. See the URLs above, or the file `LICENSE`
-# included in the Bootstrap distribution for the full license texts.
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program 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.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
-# Please report bugs or propose patches to:
-# <https://github.com/gnulib-modules/bootstrap/issues>
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
## ------ ##
@@ -131,6 +140,9 @@ do
fi"
done
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
# Make sure IFS has a sensible default
sp=' '
nl='
@@ -147,26 +159,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# func_unset VAR
-# --------------
-# Portably unset VAR.
-# In some shells, an 'unset VAR' statement leaves a non-zero return
-# status if VAR is already unset, which might be problematic if the
-# statement is used at the end of a function (thus poisoning its return
-# value) or when 'set -e' is active (causing even a spurious abort of
-# the script in this case).
-func_unset ()
-{
- { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
-}
-
-
-# Make sure CDPATH doesn't cause `cd` commands to output the target dir.
-func_unset CDPATH
-
-# Make sure ${,E,F}GREP behave sanely.
-func_unset GREP_OPTIONS
-
## ------------------------- ##
## Locate command utilities. ##
@@ -267,7 +259,7 @@ test -z "$SED" && {
rm -f conftest.in conftest.tmp conftest.nl conftest.out
}
- func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
+ func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
rm -f conftest.sed
SED=$func_path_progs_result
}
@@ -303,7 +295,7 @@ test -z "$GREP" && {
rm -f conftest.in conftest.tmp conftest.nl conftest.out
}
- func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
+ func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
GREP=$func_path_progs_result
}
@@ -588,16 +580,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then
{
$debug_cmd
- func_quote_arg pretty "$2"
- eval "$1+=\\ \$func_quote_arg_result"
+ func_quote_for_eval "$2"
+ eval "$1+=\\ \$func_quote_for_eval_result"
}'
else
func_append_quoted ()
{
$debug_cmd
- func_quote_arg pretty "$2"
- eval "$1=\$$1\\ \$func_quote_arg_result"
+ func_quote_for_eval "$2"
+ eval "$1=\$$1\\ \$func_quote_for_eval_result"
}
fi
@@ -1099,199 +1091,85 @@ func_relative_path ()
}
-# func_quote_portable EVAL ARG
-# ----------------------------
-# Internal function to portably implement func_quote_arg. Note that we still
-# keep attention to performance here so we as much as possible try to avoid
-# calling sed binary (so far O(N) complexity as long as func_append is O(1)).
-func_quote_portable ()
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+# i) func_quote_for_eval_result
+# double-quoted, suitable for a subsequent eval
+# ii) func_quote_for_eval_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified.
+func_quote_for_eval ()
{
$debug_cmd
- func_quote_portable_result=$2
-
- # one-time-loop (easy break)
- while true
- do
- if $1; then
- func_quote_portable_result=`$ECHO "$2" | $SED \
- -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
- break
- fi
-
- # Quote for eval.
- case $func_quote_portable_result in
+ func_quote_for_eval_unquoted_result=
+ func_quote_for_eval_result=
+ while test 0 -lt $#; do
+ case $1 in
*[\\\`\"\$]*)
- case $func_quote_portable_result in
- *[\[\*\?]*)
- func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
- | $SED "$sed_quote_subst"`
- break
- ;;
- esac
+ _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+ *)
+ _G_unquoted_arg=$1 ;;
+ esac
+ if test -n "$func_quote_for_eval_unquoted_result"; then
+ func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+ else
+ func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+ fi
- func_quote_portable_old_IFS=$IFS
- for _G_char in '\' '`' '"' '$'
- do
- # STATE($1) PREV($2) SEPARATOR($3)
- set start "" ""
- func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
- IFS=$_G_char
- for _G_part in $func_quote_portable_result
- do
- case $1 in
- quote)
- func_append func_quote_portable_result "$3$2"
- set quote "$_G_part" "\\$_G_char"
- ;;
- start)
- set first "" ""
- func_quote_portable_result=
- ;;
- first)
- set quote "$_G_part" ""
- ;;
- esac
- done
- done
- IFS=$func_quote_portable_old_IFS
+ case $_G_unquoted_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_quoted_arg=\"$_G_unquoted_arg\"
;;
- *) ;;
+ *)
+ _G_quoted_arg=$_G_unquoted_arg
+ ;;
esac
- break
- done
- func_quote_portable_unquoted_result=$func_quote_portable_result
- case $func_quote_portable_result in
- # double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and variable expansion
- # for a subsequent eval.
- # many bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- func_quote_portable_result=\"$func_quote_portable_result\"
- ;;
- esac
+ if test -n "$func_quote_for_eval_result"; then
+ func_append func_quote_for_eval_result " $_G_quoted_arg"
+ else
+ func_append func_quote_for_eval_result "$_G_quoted_arg"
+ fi
+ shift
+ done
}
-# func_quotefast_eval ARG
-# -----------------------
-# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
-# but optimized for speed. Result is stored in $func_quotefast_eval.
-if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
- printf -v _GL_test_printf_tilde %q '~'
- if test '\~' = "$_GL_test_printf_tilde"; then
- func_quotefast_eval ()
- {
- printf -v func_quotefast_eval_result %q "$1"
- }
- else
- # Broken older Bash implementations. Make those faster too if possible.
- func_quotefast_eval ()
- {
- case $1 in
- '~'*)
- func_quote_portable false "$1"
- func_quotefast_eval_result=$func_quote_portable_result
- ;;
- *)
- printf -v func_quotefast_eval_result %q "$1"
- ;;
- esac
- }
- fi
-else
- func_quotefast_eval ()
- {
- func_quote_portable false "$1"
- func_quotefast_eval_result=$func_quote_portable_result
- }
-fi
-
+# func_quote_for_expand ARG
+# -------------------------
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ $debug_cmd
-# func_quote_arg MODEs ARG
-# ------------------------
-# Quote one ARG to be evaled later. MODEs argument may contain zero or more
-# specifiers listed below separated by ',' character. This function returns two
-# values:
-# i) func_quote_arg_result
-# double-quoted (when needed), suitable for a subsequent eval
-# ii) func_quote_arg_unquoted_result
-# has all characters that are still active within double
-# quotes backslashified. Available only if 'unquoted' is specified.
-#
-# Available modes:
-# ----------------
-# 'eval' (default)
-# - escape shell special characters
-# 'expand'
-# - the same as 'eval'; but do not quote variable references
-# 'pretty'
-# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
-# be used later in func_quote to get output like: 'echo "a b"' instead
-# of 'echo a\ b'. This is slower than default on some shells.
-# 'unquoted'
-# - produce also $func_quote_arg_unquoted_result which does not contain
-# wrapping double-quotes.
-#
-# Examples for 'func_quote_arg pretty,unquoted string':
-#
-# string | *_result | *_unquoted_result
-# ------------+-----------------------+-------------------
-# " | \" | \"
-# a b | "a b" | a b
-# "a b" | "\"a b\"" | \"a b\"
-# * | "*" | *
-# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
-#
-# Examples for 'func_quote_arg pretty,unquoted,expand string':
-#
-# string | *_result | *_unquoted_result
-# --------------+---------------------+--------------------
-# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
-func_quote_arg ()
-{
- _G_quote_expand=false
- case ,$1, in
- *,expand,*)
- _G_quote_expand=:
- ;;
+ case $1 in
+ *[\\\`\"]*)
+ _G_arg=`$ECHO "$1" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ _G_arg=$1 ;;
esac
- case ,$1, in
- *,pretty,*|*,expand,*|*,unquoted,*)
- func_quote_portable $_G_quote_expand "$2"
- func_quote_arg_result=$func_quote_portable_result
- func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
- ;;
- *)
- # Faster quote-for-eval for some shells.
- func_quotefast_eval "$2"
- func_quote_arg_result=$func_quotefast_eval_result
+ case $_G_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_arg=\"$_G_arg\"
;;
esac
-}
-
-# func_quote MODEs ARGs...
-# ------------------------
-# Quote all ARGs to be evaled later and join them into single command. See
-# func_quote_arg's description for more info.
-func_quote ()
-{
- $debug_cmd
- _G_func_quote_mode=$1 ; shift
- func_quote_result=
- while test 0 -lt $#; do
- func_quote_arg "$_G_func_quote_mode" "$1"
- if test -n "$func_quote_result"; then
- func_append func_quote_result " $func_quote_arg_result"
- else
- func_append func_quote_result "$func_quote_arg_result"
- fi
- shift
- done
+ func_quote_for_expand_result=$_G_arg
}
@@ -1337,8 +1215,8 @@ func_show_eval ()
_G_cmd=$1
_G_fail_exp=${2-':'}
- func_quote_arg pretty,expand "$_G_cmd"
- eval "func_notquiet $func_quote_arg_result"
+ func_quote_for_expand "$_G_cmd"
+ eval "func_notquiet $func_quote_for_expand_result"
$opt_dry_run || {
eval "$_G_cmd"
@@ -1363,8 +1241,8 @@ func_show_eval_locale ()
_G_fail_exp=${2-':'}
$opt_quiet || {
- func_quote_arg expand,pretty "$_G_cmd"
- eval "func_echo $func_quote_arg_result"
+ func_quote_for_expand "$_G_cmd"
+ eval "func_echo $func_quote_for_expand_result"
}
$opt_dry_run || {
@@ -1491,26 +1369,30 @@ func_lt_ver ()
# End:
#! /bin/sh
+# Set a version string for this script.
+scriptversion=2014-01-07.03; # UTC
+
# A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010
-# This is free software. There is NO warranty; not even for
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-#
-# Copyright (C) 2010-2018 Bootstrap Authors
-#
-# This file is dual licensed under the terms of the MIT license
-# <https://opensource.org/license/MIT>, and GPL version 3 or later
-# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
-# these licenses when using or redistributing this software or any of
-# the files within it. See the URLs above, or the file `LICENSE`
-# included in the Bootstrap distribution for the full license texts.
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# Please report bugs or propose patches to:
-# <https://github.com/gnulib-modules/bootstrap/issues>
+# This program 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.
-# Set a version string for this script.
-scriptversion=2018-07-24.06; # UTC
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
## ------ ##
@@ -1533,7 +1415,7 @@ scriptversion=2018-07-24.06; # UTC
#
# In order for the '--version' option to work, you will need to have a
# suitably formatted comment like the one at the top of this file
-# starting with '# Written by ' and ending with '# Copyright'.
+# starting with '# Written by ' and ending with '# warranty; '.
#
# For '-h' and '--help' to work, you will also need a one line
# description of your script's purpose in a comment directly above the
@@ -1545,7 +1427,7 @@ scriptversion=2018-07-24.06; # UTC
# to display verbose messages only when your user has specified
# '--verbose'.
#
-# After sourcing this file, you can plug in processing for additional
+# After sourcing this file, you can plug processing for additional
# options by amending the variables from the 'Configuration' section
# below, and following the instructions in the 'Option parsing'
# section further down.
@@ -1594,8 +1476,8 @@ fatal_help="Try '\$progname --help' for more information."
## ------------------------- ##
# This section contains functions for adding, removing, and running hooks
-# in the main code. A hook is just a list of function names that can be
-# run in order later on.
+# to the main code. A hook is just a named list of of function, that can
+# be run in order later on.
# func_hookable FUNC_NAME
# -----------------------
@@ -1628,8 +1510,7 @@ func_add_hook ()
# func_remove_hook FUNC_NAME HOOK_FUNC
# ------------------------------------
-# Remove HOOK_FUNC from the list of hook functions to be called by
-# FUNC_NAME.
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
func_remove_hook ()
{
$debug_cmd
@@ -1638,28 +1519,10 @@ func_remove_hook ()
}
-# func_propagate_result FUNC_NAME_A FUNC_NAME_B
-# ---------------------------------------------
-# If the *_result variable of FUNC_NAME_A _is set_, assign its value to
-# *_result variable of FUNC_NAME_B.
-func_propagate_result ()
-{
- $debug_cmd
-
- func_propagate_result_result=:
- if eval "test \"\${${1}_result+set}\" = set"
- then
- eval "${2}_result=\$${1}_result"
- else
- func_propagate_result_result=false
- fi
-}
-
-
# func_run_hooks FUNC_NAME [ARG]...
# ---------------------------------
# Run all hook functions registered to FUNC_NAME.
-# It's assumed that the list of hook functions contains nothing more
+# It is assumed that the list of hook functions contains nothing more
# than a whitespace-delimited list of legal shell function names, and
# no effort is wasted trying to catch shell meta-characters or preserve
# whitespace.
@@ -1669,19 +1532,22 @@ func_run_hooks ()
case " $hookable_fns " in
*" $1 "*) ;;
- *) func_fatal_error "'$1' does not support hook functions." ;;
+ *) func_fatal_error "'$1' does not support hook funcions.n" ;;
esac
eval _G_hook_fns=\$$1_hooks; shift
for _G_hook in $_G_hook_fns; do
- func_unset "${_G_hook}_result"
- eval $_G_hook '${1+"$@"}'
- func_propagate_result $_G_hook func_run_hooks
- if $func_propagate_result_result; then
- eval set dummy "$func_run_hooks_result"; shift
- fi
+ eval $_G_hook '"$@"'
+
+ # store returned options list back into positional
+ # parameters for next 'cmd' execution.
+ eval _G_hook_result=\$${_G_hook}_result
+ eval set dummy "$_G_hook_result"; shift
done
+
+ func_quote_for_eval ${1+"$@"}
+ func_run_hooks_result=$func_quote_for_eval_result
}
@@ -1691,18 +1557,10 @@ func_run_hooks ()
## --------------- ##
# In order to add your own option parsing hooks, you must accept the
-# full positional parameter list from your hook function. You may remove
-# or edit any options that you action, and then pass back the remaining
-# unprocessed options in '<hooked_function_name>_result', escaped
-# suitably for 'eval'.
-#
-# The '<hooked_function_name>_result' variable is automatically unset
-# before your hook gets called; for best performance, only set the
-# *_result variable when necessary (i.e. don't call the 'func_quote'
-# function unnecessarily because it can be an expensive operation on some
-# machines).
-#
-# Like this:
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'. Like this:
#
# my_options_prep ()
# {
@@ -1712,8 +1570,9 @@ func_run_hooks ()
# usage_message=$usage_message'
# -s, --silent don'\''t print informational messages
# '
-# # No change in '$@' (ignored completely by this hook). Leave
-# # my_options_prep_result variable intact.
+#
+# func_quote_for_eval ${1+"$@"}
+# my_options_prep_result=$func_quote_for_eval_result
# }
# func_add_hook func_options_prep my_options_prep
#
@@ -1722,36 +1581,25 @@ func_run_hooks ()
# {
# $debug_cmd
#
-# args_changed=false
-#
-# # Note that, for efficiency, we parse as many options as we can
+# # Note that for efficiency, we parse as many options as we can
# # recognise in a loop before passing the remainder back to the
# # caller on the first unrecognised argument we encounter.
# while test $# -gt 0; do
# opt=$1; shift
# case $opt in
-# --silent|-s) opt_silent=:
-# args_changed=:
-# ;;
+# --silent|-s) opt_silent=: ;;
# # Separate non-argument short options:
# -s*) func_split_short_opt "$_G_opt"
# set dummy "$func_split_short_opt_name" \
# "-$func_split_short_opt_arg" ${1+"$@"}
# shift
-# args_changed=:
# ;;
-# *) # Make sure the first unrecognised option "$_G_opt"
-# # is added back to "$@" in case we need it later,
-# # if $args_changed was set to 'true'.
-# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+# *) set dummy "$_G_opt" "$*"; shift; break ;;
# esac
# done
#
-# # Only call 'func_quote' here if we processed at least one argument.
-# if $args_changed; then
-# func_quote eval ${1+"$@"}
-# my_silent_option_result=$func_quote_result
-# fi
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
# }
# func_add_hook func_parse_options my_silent_option
#
@@ -1762,26 +1610,17 @@ func_run_hooks ()
#
# $opt_silent && $opt_verbose && func_fatal_help "\
# '--silent' and '--verbose' options are mutually exclusive."
+#
+# func_quote_for_eval ${1+"$@"}
+# my_option_validation_result=$func_quote_for_eval_result
# }
# func_add_hook func_validate_options my_option_validation
#
-# You'll also need to manually amend $usage_message to reflect the extra
+# You'll alse need to manually amend $usage_message to reflect the extra
# options you parse. It's preferable to append if you can, so that
# multiple option parsing hooks can be added safely.
-# func_options_finish [ARG]...
-# ----------------------------
-# Finishing the option parse loop (call 'func_options' hooks ATM).
-func_options_finish ()
-{
- $debug_cmd
-
- func_run_hooks func_options ${1+"$@"}
- func_propagate_result func_run_hooks func_options_finish
-}
-
-
# func_options [ARG]...
# ---------------------
# All the functions called inside func_options are hookable. See the
@@ -1791,27 +1630,17 @@ func_options ()
{
$debug_cmd
- _G_options_quoted=false
+ func_options_prep ${1+"$@"}
+ eval func_parse_options \
+ ${func_options_prep_result+"$func_options_prep_result"}
+ eval func_validate_options \
+ ${func_parse_options_result+"$func_parse_options_result"}
- for my_func in options_prep parse_options validate_options options_finish
- do
- func_unset func_${my_func}_result
- func_unset func_run_hooks_result
- eval func_$my_func '${1+"$@"}'
- func_propagate_result func_$my_func func_options
- if $func_propagate_result_result; then
- eval set dummy "$func_options_result"; shift
- _G_options_quoted=:
- fi
- done
+ eval func_run_hooks func_options \
+ ${func_validate_options_result+"$func_validate_options_result"}
- $_G_options_quoted || {
- # As we (func_options) are top-level options-parser function and
- # nobody quoted "$@" for us yet, we need to do it explicitly for
- # caller.
- func_quote eval ${1+"$@"}
- func_options_result=$func_quote_result
- }
+ # save modified positional parameters for caller
+ func_options_result=$func_run_hooks_result
}
@@ -1820,8 +1649,9 @@ func_options ()
# All initialisations required before starting the option parse loop.
# Note that when calling hook functions, we pass through the list of
# positional parameters. If a hook function modifies that list, and
-# needs to propagate that back to rest of this script, then the complete
-# modified list must be put in 'func_run_hooks_result' before returning.
+# needs to propogate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning.
func_hookable func_options_prep
func_options_prep ()
{
@@ -1832,7 +1662,9 @@ func_options_prep ()
opt_warning_types=
func_run_hooks func_options_prep ${1+"$@"}
- func_propagate_result func_run_hooks func_options_prep
+
+ # save modified positional parameters for caller
+ func_options_prep_result=$func_run_hooks_result
}
@@ -1844,32 +1676,25 @@ func_parse_options ()
{
$debug_cmd
- _G_parse_options_requote=false
+ func_parse_options_result=
+
# this just eases exit handling
while test $# -gt 0; do
# Defer to hook functions for initial option parsing, so they
# get priority in the event of reusing an option name.
func_run_hooks func_parse_options ${1+"$@"}
- func_propagate_result func_run_hooks func_parse_options
- if $func_propagate_result_result; then
- eval set dummy "$func_parse_options_result"; shift
- # Even though we may have changed "$@", we passed the "$@" array
- # down into the hook and it quoted it for us (because we are in
- # this if-branch). No need to quote it again.
- _G_parse_options_requote=false
- fi
+
+ # Adjust func_parse_options positional parameters to match
+ eval set dummy "$func_run_hooks_result"; shift
# Break out of the loop if we already parsed every option.
test $# -gt 0 || break
- # We expect that one of the options parsed in this function matches
- # and thus we remove _G_opt from "$@" and need to re-quote.
- _G_match_parse_options=:
_G_opt=$1
shift
case $_G_opt in
--debug|-x) debug_cmd='set -x'
- func_echo "enabling shell trace mode" >&2
+ func_echo "enabling shell trace mode"
$debug_cmd
;;
@@ -1879,10 +1704,7 @@ func_parse_options ()
;;
--warnings|--warning|-W)
- if test $# = 0 && func_missing_arg $_G_opt; then
- _G_parse_options_requote=:
- break
- fi
+ test $# = 0 && func_missing_arg $_G_opt && break
case " $warning_categories $1" in
*" $1 "*)
# trailing space prevents matching last $1 above
@@ -1935,24 +1757,15 @@ func_parse_options ()
shift
;;
- --) _G_parse_options_requote=: ; break ;;
+ --) break ;;
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
- *) set dummy "$_G_opt" ${1+"$@"}; shift
- _G_match_parse_options=false
- break
- ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
esac
-
- if $_G_match_parse_options; then
- _G_parse_options_requote=:
- fi
done
- if $_G_parse_options_requote; then
- # save modified positional parameters for caller
- func_quote eval ${1+"$@"}
- func_parse_options_result=$func_quote_result
- fi
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
}
@@ -1969,10 +1782,12 @@ func_validate_options ()
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
func_run_hooks func_validate_options ${1+"$@"}
- func_propagate_result func_run_hooks func_validate_options
# Bail if the options were screwed!
$exit_cmd $EXIT_FAILURE
+
+ # save modified positional parameters for caller
+ func_validate_options_result=$func_run_hooks_result
}
@@ -2028,8 +1843,8 @@ func_missing_arg ()
# func_split_equals STRING
# ------------------------
-# Set func_split_equals_lhs and func_split_equals_rhs shell variables
-# after splitting STRING at the '=' sign.
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
test -z "$_G_HAVE_XSI_OPS" \
&& (eval 'x=a/b/c;
test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
@@ -2044,9 +1859,8 @@ then
func_split_equals_lhs=${1%%=*}
func_split_equals_rhs=${1#*=}
- if test "x$func_split_equals_lhs" = "x$1"; then
- func_split_equals_rhs=
- fi
+ test "x$func_split_equals_lhs" = "x$1" \
+ && func_split_equals_rhs=
}'
else
# ...otherwise fall back to using expr, which is often a shell builtin.
@@ -2124,44 +1938,31 @@ func_usage_message ()
# func_version
# ------------
# Echo version message to standard output and exit.
-# The version message is extracted from the calling file's header
-# comments, with leading '# ' stripped:
-# 1. First display the progname and version
-# 2. Followed by the header comment line matching /^# Written by /
-# 3. Then a blank line followed by the first following line matching
-# /^# Copyright /
-# 4. Immediately followed by any lines between the previous matches,
-# except lines preceding the intervening completely blank line.
-# For example, see the header comments of this file.
func_version ()
{
$debug_cmd
printf '%s\n' "$progname $scriptversion"
$SED -n '
- /^# Written by /!b
- s|^# ||; p; n
-
- :fwd2blnk
- /./ {
- n
- b fwd2blnk
+ /(C)/!b go
+ :more
+ /\./!{
+ N
+ s|\n# | |
+ b more
}
- p; n
-
- :holdwrnt
- s|^# ||
- s|^# *$||
- /^Copyright /!{
- /./H
- n
- b holdwrnt
+ :go
+ /^# Written by /,/# warranty; / {
+ s|^# ||
+ s|^# *$||
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+ p
}
-
- s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
- G
- s|\(\n\)\n*|\1|g
- p; q' < "$progpath"
+ /^# Written by / {
+ s|^# ||
+ p
+ }
+ /^warranty; /q' < "$progpath"
exit $?
}
@@ -2171,12 +1972,12 @@ func_version ()
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:
# Set a version string.
-scriptversion='(GNU libtool) 2.4.6.42-b88ce'
+scriptversion='(GNU libtool) 2.4.6'
# func_echo ARG...
@@ -2267,12 +2068,12 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
- version: $progname (GNU libtool) 2.4.6.42-b88ce
+ version: $progname (GNU libtool) 2.4.6
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
Report bugs to <bug-libtool@gnu.org>.
-GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+GNU libtool home page: <http://www.gnu.org/software/libtool/>.
General help using GNU software: <http://www.gnu.org/gethelp/>."
exit 0
}
@@ -2323,7 +2124,7 @@ fi
# a configuration failure hint, and exit.
func_fatal_configuration ()
{
- func_fatal_error ${1+"$@"} \
+ func__fatal_error ${1+"$@"} \
"See the $PACKAGE documentation for more information." \
"Fatal configuration error."
}
@@ -2469,8 +2270,6 @@ libtool_options_prep ()
nonopt=
preserve_args=
- _G_rc_lt_options_prep=:
-
# Shorthand for --mode=foo, only valid as the first argument
case $1 in
clean|clea|cle|cl)
@@ -2494,16 +2293,11 @@ libtool_options_prep ()
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
shift; set dummy --mode uninstall ${1+"$@"}; shift
;;
- *)
- _G_rc_lt_options_prep=false
- ;;
esac
- if $_G_rc_lt_options_prep; then
- # Pass back the list of options.
- func_quote eval ${1+"$@"}
- libtool_options_prep_result=$func_quote_result
- fi
+ # Pass back the list of options.
+ func_quote_for_eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_for_eval_result
}
func_add_hook func_options_prep libtool_options_prep
@@ -2515,12 +2309,9 @@ libtool_parse_options ()
{
$debug_cmd
- _G_rc_lt_parse_options=false
-
# Perform our own loop to consume as many options as possible in
# each iteration.
while test $# -gt 0; do
- _G_match_lt_parse_options=:
_G_opt=$1
shift
case $_G_opt in
@@ -2595,20 +2386,15 @@ libtool_parse_options ()
func_append preserve_args " $_G_opt"
;;
- # An option not handled by this hook function:
- *) set dummy "$_G_opt" ${1+"$@"} ; shift
- _G_match_lt_parse_options=false
- break
- ;;
+ # An option not handled by this hook function:
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
esac
- $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
done
- if $_G_rc_lt_parse_options; then
- # save modified positional parameters for caller
- func_quote eval ${1+"$@"}
- libtool_parse_options_result=$func_quote_result
- fi
+
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_for_eval_result
}
func_add_hook func_parse_options libtool_parse_options
@@ -2665,8 +2451,8 @@ libtool_validate_options ()
}
# Pass back the unparsed argument list
- func_quote eval ${1+"$@"}
- libtool_validate_options_result=$func_quote_result
+ func_quote_for_eval ${1+"$@"}
+ libtool_validate_options_result=$func_quote_for_eval_result
}
func_add_hook func_validate_options libtool_validate_options
@@ -3632,8 +3418,8 @@ func_mode_compile ()
esac
done
- func_quote_arg pretty "$libobj"
- test "X$libobj" != "X$func_quote_arg_result" \
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
&& $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
&& func_warning "libobj name '$libobj' may not contain shell special characters."
func_dirname_and_basename "$obj" "/" ""
@@ -3706,8 +3492,8 @@ compiler."
func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
srcfile=$func_to_tool_file_result
- func_quote_arg pretty "$srcfile"
- qsrcfile=$func_quote_arg_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
# Only build a PIC object if we are building libtool libraries.
if test yes = "$build_libtool_libs"; then
@@ -4310,8 +4096,8 @@ func_mode_install ()
case $nonopt in *shtool*) :;; *) false;; esac
then
# Aesthetically quote it.
- func_quote_arg pretty "$nonopt"
- install_prog="$func_quote_arg_result "
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
arg=$1
shift
else
@@ -4321,8 +4107,8 @@ func_mode_install ()
# The real first argument should be the name of the installation program.
# Aesthetically quote it.
- func_quote_arg pretty "$arg"
- func_append install_prog "$func_quote_arg_result"
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
install_shared_prog=$install_prog
case " $install_prog " in
*[\\\ /]cp\ *) install_cp=: ;;
@@ -4379,12 +4165,12 @@ func_mode_install ()
esac
# Aesthetically quote the argument.
- func_quote_arg pretty "$arg"
- func_append install_prog " $func_quote_arg_result"
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
if test -n "$arg2"; then
- func_quote_arg pretty "$arg2"
+ func_quote_for_eval "$arg2"
fi
- func_append install_shared_prog " $func_quote_arg_result"
+ func_append install_shared_prog " $func_quote_for_eval_result"
done
test -z "$install_prog" && \
@@ -4395,8 +4181,8 @@ func_mode_install ()
if test -n "$install_override_mode" && $no_mode; then
if $install_cp; then :; else
- func_quote_arg pretty "$install_override_mode"
- func_append install_shared_prog " -m $func_quote_arg_result"
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
fi
fi
@@ -4692,8 +4478,8 @@ func_mode_install ()
relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
$opt_quiet || {
- func_quote_arg expand,pretty "$relink_command"
- eval "func_echo $func_quote_arg_result"
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
}
if eval "$relink_command"; then :
else
@@ -5472,8 +5258,7 @@ else
if test \"\$libtool_execute_magic\" != \"$magic\"; then
file=\"\$0\""
- func_quote_arg pretty "$ECHO"
- qECHO=$func_quote_arg_result
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
$ECHO "\
# A function that is used when there is no print builtin or printf.
@@ -5483,7 +5268,7 @@ func_fallback_echo ()
\$1
_LTECHO_EOF'
}
- ECHO=$qECHO
+ ECHO=\"$qECHO\"
fi
# Very basic option parsing. These options are (a) specific to
@@ -6826,9 +6611,9 @@ func_mode_link ()
while test "$#" -gt 0; do
arg=$1
shift
- func_quote_arg pretty,unquoted "$arg"
- qarg=$func_quote_arg_unquoted_result
- func_append libtool_args " $func_quote_arg_result"
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
@@ -7426,9 +7211,9 @@ func_mode_link ()
save_ifs=$IFS; IFS=,
for flag in $args; do
IFS=$save_ifs
- func_quote_arg pretty "$flag"
- func_append arg " $func_quote_arg_result"
- func_append compiler_flags " $func_quote_arg_result"
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
done
IFS=$save_ifs
func_stripname ' ' '' "$arg"
@@ -7442,10 +7227,10 @@ func_mode_link ()
save_ifs=$IFS; IFS=,
for flag in $args; do
IFS=$save_ifs
- func_quote_arg pretty "$flag"
- func_append arg " $wl$func_quote_arg_result"
- func_append compiler_flags " $wl$func_quote_arg_result"
- func_append linker_flags " $func_quote_arg_result"
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
done
IFS=$save_ifs
func_stripname ' ' '' "$arg"
@@ -7469,8 +7254,8 @@ func_mode_link ()
# -msg_* for osf cc
-msg_*)
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
;;
# Flags to be passed through unchanged, with rationale:
@@ -7487,16 +7272,12 @@ func_mode_link ()
# -tp=* Portland pgcc target processor selection
# --sysroot=* for sysroot support
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
- # -specs=* GCC specs files
# -stdlib=* select c++ std lib with clang
- # -fsanitize=* Clang/GCC memory and address sanitizer
- # -fuse-ld=* Linker select flags for GCC
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
- -specs=*|-fsanitize=*|-fuse-ld=*)
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
func_append compile_command " $arg"
func_append finalize_command " $arg"
func_append compiler_flags " $arg"
@@ -7517,15 +7298,15 @@ func_mode_link ()
continue
else
# Otherwise treat like 'Some other compiler flag' below
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
fi
;;
# Some other compiler flag.
-* | +*)
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
;;
*.$objext)
@@ -7645,8 +7426,8 @@ func_mode_link ()
*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
;;
esac # arg
@@ -10152,8 +9933,8 @@ EOF
for cmd in $concat_cmds; do
IFS=$save_ifs
$opt_quiet || {
- func_quote_arg expand,pretty "$cmd"
- eval "func_echo $func_quote_arg_result"
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
}
$opt_dry_run || eval "$cmd" || {
lt_exit=$?
@@ -10246,8 +10027,8 @@ EOF
eval cmd=\"$cmd\"
IFS=$save_ifs
$opt_quiet || {
- func_quote_arg expand,pretty "$cmd"
- eval "func_echo $func_quote_arg_result"
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
}
$opt_dry_run || eval "$cmd" || {
lt_exit=$?
@@ -10721,13 +10502,12 @@ EOF
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
- func_quote_arg pretty "$var_value"
- relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
fi
done
- func_quote eval cd "`pwd`"
- func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)"
- relink_command=$func_quote_arg_unquoted_result
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
fi
# Only actually do things if not in dry run mode.
@@ -10967,15 +10747,13 @@ EOF
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
- func_quote_arg pretty,unquoted "$var_value"
- relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
fi
done
# Quote the link command for shipping.
- func_quote eval cd "`pwd`"
- relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- func_quote_arg pretty,unquoted "$relink_command"
- relink_command=$func_quote_arg_unquoted_result
+ relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
if test yes = "$hardcode_automatic"; then
relink_command=
fi
diff --git a/m4/libevent_openssl.m4 b/m4/libevent_openssl.m4
index 1981198..c204059 100644
--- a/m4/libevent_openssl.m4
+++ b/m4/libevent_openssl.m4
@@ -39,10 +39,6 @@ case "$enable_openssl" in
done
;;
esac
- CPPFLAGS_SAVE=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $OPENSSL_INCS"
- AC_CHECK_HEADERS([openssl/ssl.h], [], [have_openssl=no])
- CPPFLAGS=$CPPFLAGS_SAVE
AC_SUBST(OPENSSL_INCS)
AC_SUBST(OPENSSL_LIBS)
case "$have_openssl" in
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index b55a6e5..a3bc337 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,6 +1,6 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
-# Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is free software; the Free Software Foundation gives
@@ -219,8 +219,8 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a '.a' archive for static linking (except MSVC and
-# ICC, which need '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
libext=a
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -1042,8 +1042,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
- echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
- $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
@@ -1493,22 +1493,9 @@ need_locks=$enable_libtool_lock
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
+: ${AR_FLAGS=cru}
_LT_DECL([], [AR], [1], [The archiver])
-
-# Use ARFLAGS variable as AR's operation code to sync the variable naming with
-# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
-# higher priority because thats what people were doing historically (setting
-# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
-# variable obsoleted/removed.
-
-test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
-lt_ar_flags=$AR_FLAGS
-_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
-
-# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
-# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
-_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
- [Flags to create an archive])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
[lt_cv_ar_at_file=no
@@ -2220,35 +2207,26 @@ m4_defun([_LT_CMD_STRIPLIB],
striplib=
old_striplib=
AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -z "$STRIP"; then
- AC_MSG_RESULT([no])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
else
- if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- old_striplib="$STRIP --strip-debug"
- striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
- else
- case $host_os in
- darwin*)
- # FIXME - insert some real tests, host_os isn't really good enough
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
AC_MSG_RESULT([yes])
- ;;
- freebsd*)
- if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
- old_striplib="$STRIP --strip-debug"
- striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- ;;
- *)
+ else
AC_MSG_RESULT([no])
- ;;
- esac
- fi
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
fi
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
_LT_DECL([], [striplib], [1])
@@ -2587,8 +2565,8 @@ m4_if([$1], [],[
dynamic_linker='Win32 ld.exe'
;;
- *,cl* | *,icl*)
- # Native MSVC or ICC
+ *,cl*)
+ # Native MSVC
libname_spec='$name'
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
library_names_spec='$libname.dll.lib'
@@ -2644,7 +2622,7 @@ m4_if([$1], [],[
;;
*)
- # Assume MSVC and ICC wrapper
+ # Assume MSVC wrapper
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
@@ -4032,7 +4010,7 @@ for ac_symprfx in "" "_"; do
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Fake it for dumpbin and say T for any non-static function,
# D for any global variable and I for any imported variable.
- # Also find C++ and __fastcall symbols from MSVC++ or ICC,
+ # Also find C++ and __fastcall symbols from MSVC++,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK ['"\
" {last_section=section; section=\$ 3};"\
@@ -4941,7 +4919,7 @@ m4_if([$1], [CXX], [
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
@@ -4949,7 +4927,7 @@ m4_if([$1], [CXX], [
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
- cl* | icl*)
+ cl*)
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
;;
*)
@@ -5006,15 +4984,15 @@ dnl Note also adjust exclude_expsyms for C++ above.
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++ or Intel C++ Compiler.
+ # Microsoft Visual C++.
if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
openbsd* | bitrig*)
@@ -5178,7 +5156,6 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='@'
;;
interix[[3-9]]*)
@@ -5396,7 +5373,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -5579,12 +5556,12 @@ _LT_EOF
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++ or Intel C++ Compiler.
+ # Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
case $cc_basename in
- cl* | icl*)
- # Native MSVC or ICC
+ cl*)
+ # Native MSVC
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=yes
@@ -5625,7 +5602,7 @@ _LT_EOF
fi'
;;
*)
- # Assume MSVC and ICC wrapper
+ # Assume MSVC wrapper
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
# Tell ltmain to make .lib files, not .a files.
@@ -5884,7 +5861,6 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='@'
;;
osf3*)
@@ -6655,8 +6631,8 @@ if test yes != "$_lt_caught_CXX_error"; then
cygwin* | mingw* | pw32* | cegcc*)
case $GXX,$cc_basename in
- ,cl* | no,cl* | ,icl* | no,icl*)
- # Native MSVC or ICC
+ ,cl* | no,cl*)
+ # Native MSVC
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
@@ -6754,7 +6730,6 @@ if test yes != "$_lt_caught_CXX_error"; then
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='@'
;;
dgux*)
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 07421d9..94b0829 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -1,6 +1,6 @@
# Helper functions for option handling. -*- Autoconf -*-
#
-# Copyright (C) 2004-2005, 2007-2009, 2011-2018 Free Software
+# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index 3985c56..48bc934 100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1,6 +1,6 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007-2008, 2011-2018 Free Software
+# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index 86b2ad7..fa04b52 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -1,6 +1,6 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
-# Copyright (C) 2004, 2011-2018 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -9,15 +9,15 @@
# @configure_input@
-# serial 4221 ltversion.m4
+# serial 4179 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4.6.42-b88ce])
-m4_define([LT_PACKAGE_REVISION], [2.4.6.42])
+m4_define([LT_PACKAGE_VERSION], [2.4.6])
+m4_define([LT_PACKAGE_REVISION], [2.4.6])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.6.42-b88ce'
-macro_revision='2.4.6.42'
+[macro_version='2.4.6'
+macro_revision='2.4.6'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
index 54ea1c4..c6b26f8 100644
--- a/m4/lt~obsolete.m4
+++ b/m4/lt~obsolete.m4
@@ -1,6 +1,6 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007, 2009, 2011-2018 Free Software
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
# Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
diff --git a/make-event-config.sed b/make-event-config.sed
index 3dc404b..e31018a 100644
--- a/make-event-config.sed
+++ b/make-event-config.sed
@@ -18,10 +18,6 @@ $a\
\
#endif /* event2/event-config.h */
-/#\( *\)undef STDC_HEADERS\>/b
-/#\( *\)define STDC_HEADERS\>/b
-
-# Only rewrite symbols starting with capitals
-s/#\( *\)define \([A-Z]\)/#\1define EVENT__\2/
-s/#\( *\)undef \([A-Z]\)/#\1undef EVENT__\2/
-s/#\( *\)if\(n*\)def \([A-Z]\)/#\1if\2def EVENT__\2/
+s/#\( *\)define /#\1define EVENT__/
+s/#\( *\)undef /#\1undef EVENT__/
+s/#\( *\)if\(n*\)def /#\1if\2def EVENT__/
diff --git a/minheap-internal.h b/minheap-internal.h
index b3a0eb1..b3b6f1f 100644
--- a/minheap-internal.h
+++ b/minheap-internal.h
@@ -70,7 +70,7 @@ struct event* min_heap_top_(min_heap_t* s) { return s->n ? *s->p : 0; }
int min_heap_push_(min_heap_t* s, struct event* e)
{
- if (s->n == UINT32_MAX || min_heap_reserve_(s, s->n + 1))
+ if (min_heap_reserve_(s, s->n + 1))
return -1;
min_heap_shift_up_(s, s->n++, e);
return 0;
@@ -138,10 +138,6 @@ int min_heap_reserve_(min_heap_t* s, unsigned n)
unsigned a = s->a ? s->a * 2 : 8;
if (a < n)
a = n;
-#if (SIZE_MAX == UINT32_MAX)
- if (a > SIZE_MAX / sizeof *p)
- return -1;
-#endif
if (!(p = (struct event**)mm_realloc(s->p, a * sizeof *p)))
return -1;
s->p = p;
diff --git a/missing b/missing
index 625aeb1..f62bbae 100755
--- a/missing
+++ b/missing
@@ -1,9 +1,9 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2013-10-28.13; # UTC
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2018-03-07.03; # UTC
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@ else
exit $st
fi
-perl_URL=https://www.perl.org/
-flex_URL=https://github.com/westes/flex
-gnu_software_URL=https://www.gnu.org/software
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
program_details ()
{
@@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
exit $st
# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
diff --git a/mm-internal.h b/mm-internal.h
index 7a95c99..4ba6fce 100644
--- a/mm-internal.h
+++ b/mm-internal.h
@@ -43,7 +43,6 @@ extern "C" {
* On failure, set errno to ENOMEM and return NULL.
* If the argument sz is 0, simply return NULL.
*/
-EVENT2_EXPORT_SYMBOL
void *event_mm_malloc_(size_t sz);
/** Allocate memory initialized to zero.
@@ -54,7 +53,6 @@ void *event_mm_malloc_(size_t sz);
* set errno to ENOMEM and return NULL.
* If either arguments are 0, simply return NULL.
*/
-EVENT2_EXPORT_SYMBOL
void *event_mm_calloc_(size_t count, size_t size);
/** Duplicate a string.
@@ -65,12 +63,9 @@ void *event_mm_calloc_(size_t count, size_t size);
* occurs (or would occur) in the process.
* If the argument str is NULL, set errno to EINVAL and return NULL.
*/
-EVENT2_EXPORT_SYMBOL
char *event_mm_strdup_(const char *str);
-EVENT2_EXPORT_SYMBOL
void *event_mm_realloc_(void *p, size_t sz);
-EVENT2_EXPORT_SYMBOL
void event_mm_free_(void *p);
#define mm_malloc(sz) event_mm_malloc_(sz)
#define mm_calloc(count, size) event_mm_calloc_((count), (size))
diff --git a/openssl-compat.h b/openssl-compat.h
index 5d91ac6..69afc71 100644
--- a/openssl-compat.h
+++ b/openssl-compat.h
@@ -1,11 +1,7 @@
#ifndef OPENSSL_COMPAT_H
#define OPENSSL_COMPAT_H
-#include <openssl/bio.h>
-#include "util-internal.h"
-
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
- (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
{
@@ -34,11 +30,6 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
#define TLS_method SSLv23_method
-#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
- (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */
-
-#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
-#define BIO_get_init(b) (b)->init
-#endif
+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
#endif /* OPENSSL_COMPAT_H */
diff --git a/post_update.sh b/post_update.sh
deleted file mode 100755
index f3c4d69..0000000
--- a/post_update.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-# $1 Path to the new version.
-# $2 Path to the old version.
-
-cp -a -n $2/evconfig-private.h $1/
-cp -a -n $2/include/event2/event-config.h $1/include/event2/
-cp -a -n $2/include/event2/event-config-linux.h $1/include/event2/
-cp -a -n $2/include/event2/event-config-darwin.h $1/include/event2/
-cp -a -n $2/include/event2/event-config-bionic.h $1/include/event2/
diff --git a/sample/dns-example.c b/sample/dns-example.c
index 21a75de..fb70566 100644
--- a/sample/dns-example.c
+++ b/sample/dns-example.c
@@ -78,8 +78,6 @@ gai_callback(int err, struct evutil_addrinfo *ai, void *arg)
{
const char *name = arg;
int i;
- struct evutil_addrinfo *first_ai = ai;
-
if (err) {
printf("%s: %s\n", name, evutil_gai_strerror(err));
}
@@ -101,9 +99,6 @@ gai_callback(int err, struct evutil_addrinfo *ai, void *arg)
printf("[%d] %s: %s\n",i,name,buf);
}
}
-
- if (first_ai)
- evutil_freeaddrinfo(first_ai);
}
static void
@@ -159,19 +154,19 @@ main(int c, char **v) {
const char *ns;
};
struct options o;
- int opt;
+ char opt;
struct event_base *event_base = NULL;
struct evdns_base *evdns_base = NULL;
memset(&o, 0, sizeof(o));
-
+
if (c < 2) {
fprintf(stderr, "syntax: %s [-x] [-v] [-c resolv.conf] [-s ns] hostname\n", v[0]);
fprintf(stderr, "syntax: %s [-T]\n", v[0]);
return 1;
}
- while ((opt = getopt(c, v, "xvc:Ts:g")) != -1) {
+ while ((opt = getopt(c, v, "xvc:Ts:")) != -1) {
switch (opt) {
case 'x': o.reverse = 1; break;
case 'v': ++verbose; break;
@@ -257,8 +252,6 @@ main(int c, char **v) {
}
fflush(stdout);
event_base_dispatch(event_base);
- evdns_base_free(evdns_base, 1);
- event_base_free(event_base);
return 0;
}
diff --git a/sample/http-connect.c b/sample/http-connect.c
index af2c86a..a44d001 100644
--- a/sample/http-connect.c
+++ b/sample/http-connect.c
@@ -11,7 +11,6 @@
#define VERIFY(cond) do { \
if (!(cond)) { \
fprintf(stderr, "[error] %s\n", #cond); \
- exit(EXIT_FAILURE); \
} \
} while (0); \
@@ -27,11 +26,8 @@ static void get_cb(struct evhttp_request *req, void *arg)
{
ev_ssize_t len;
struct evbuffer *evbuf;
- struct evhttp_connection *evcon;
VERIFY(req);
- evcon = evhttp_request_get_connection(req);
- VERIFY(evcon);
evbuf = evhttp_request_get_input_buffer(req);
len = evbuffer_get_length(evbuf);
@@ -76,7 +72,7 @@ int main(int argc, const char **argv)
}
{
- VERIFY(proxy = evhttp_uri_parse(argv[1]));
+ proxy = evhttp_uri_parse(argv[1]);
VERIFY(evhttp_uri_get_host(proxy));
VERIFY(evhttp_uri_get_port(proxy) > 0);
}
diff --git a/sample/http-server.c b/sample/http-server.c
index cedb2af..579feea 100644
--- a/sample/http-server.c
+++ b/sample/http-server.c
@@ -20,39 +20,26 @@
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
-#include <getopt.h>
#include <io.h>
#include <fcntl.h>
#ifndef S_ISDIR
#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
#endif
-#else /* !_WIN32 */
+#else
#include <sys/stat.h>
#include <sys/socket.h>
+#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <dirent.h>
-#endif /* _WIN32 */
-#include <signal.h>
-
-#ifdef EVENT__HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-#ifdef EVENT__HAVE_AFUNIX_H
-#include <afunix.h>
#endif
#include <event2/event.h>
#include <event2/http.h>
-#include <event2/listener.h>
#include <event2/buffer.h>
#include <event2/util.h>
#include <event2/keyvalq_struct.h>
-#ifdef _WIN32
-#include <event2/thread.h>
-#endif /* _WIN32 */
-
#ifdef EVENT__HAVE_NETINET_IN_H
#include <netinet/in.h>
# ifdef _XOPEN_SOURCE_EXTENDED
@@ -76,7 +63,7 @@
#ifndef O_RDONLY
#define O_RDONLY _O_RDONLY
#endif
-#endif /* _WIN32 */
+#endif
char uri_root[512];
@@ -99,16 +86,6 @@ static const struct table_entry {
{ NULL, NULL },
};
-struct options
-{
- int port;
- int iocp;
- int verbose;
-
- int unlink;
- const char *unixsock;
-};
-
/* Try to guess a good content-type for 'path' */
static const char *
guess_content_type(const char *path)
@@ -344,159 +321,42 @@ done:
}
static void
-print_usage(FILE *out, const char *prog, int exit_code)
+syntax(void)
{
- fprintf(out, "Syntax: [ OPTS ] %s <docroot>\n", prog);
- fprintf(out, " -p - port\n");
- fprintf(out, " -U - bind to unix socket\n");
- fprintf(out, " -u - unlink unix socket before bind\n");
- fprintf(out, " -I - IOCP\n");
- fprintf(out, " -v - verbosity, enables libevent debug logging too\n");
- exit(exit_code);
-}
-static struct options
-parse_opts(int argc, char **argv)
-{
- struct options o;
- int opt;
-
- memset(&o, 0, sizeof(o));
-
- while ((opt = getopt(argc, argv, "hp:U:uIv")) != -1) {
- switch (opt) {
- case 'p': o.port = atoi(optarg); break;
- case 'U': o.unixsock = optarg; break;
- case 'u': o.unlink = 1; break;
- case 'I': o.iocp = 1; break;
- case 'v': ++o.verbose; break;
- case 'h': print_usage(stdout, argv[0], 0); break;
- default : fprintf(stderr, "Unknown option %c\n", opt); break;
- }
- }
-
- if (optind >= argc || (argc-optind) > 1) {
- print_usage(stdout, argv[0], 1);
- }
-
- return o;
-}
-
-static void
-do_term(int sig, short events, void *arg)
-{
- struct event_base *base = arg;
- event_base_loopbreak(base);
- fprintf(stderr, "Got %i, Terminating\n", sig);
-}
-
-static int
-display_listen_sock(struct evhttp_bound_socket *handle)
-{
- struct sockaddr_storage ss;
- evutil_socket_t fd;
- ev_socklen_t socklen = sizeof(ss);
- char addrbuf[128];
- void *inaddr;
- const char *addr;
- int got_port = -1;
-
- fd = evhttp_bound_socket_get_fd(handle);
- memset(&ss, 0, sizeof(ss));
- if (getsockname(fd, (struct sockaddr *)&ss, &socklen)) {
- perror("getsockname() failed");
- return 1;
- }
-
- if (ss.ss_family == AF_INET) {
- got_port = ntohs(((struct sockaddr_in*)&ss)->sin_port);
- inaddr = &((struct sockaddr_in*)&ss)->sin_addr;
- } else if (ss.ss_family == AF_INET6) {
- got_port = ntohs(((struct sockaddr_in6*)&ss)->sin6_port);
- inaddr = &((struct sockaddr_in6*)&ss)->sin6_addr;
- }
-#ifdef EVENT__HAVE_STRUCT_SOCKADDR_UN
- else if (ss.ss_family == AF_UNIX) {
- printf("Listening on <%s>\n", ((struct sockaddr_un*)&ss)->sun_path);
- return 0;
- }
-#endif
- else {
- fprintf(stderr, "Weird address family %d\n",
- ss.ss_family);
- return 1;
- }
-
- addr = evutil_inet_ntop(ss.ss_family, inaddr, addrbuf,
- sizeof(addrbuf));
- if (addr) {
- printf("Listening on %s:%d\n", addr, got_port);
- evutil_snprintf(uri_root, sizeof(uri_root),
- "http://%s:%d",addr,got_port);
- } else {
- fprintf(stderr, "evutil_inet_ntop failed\n");
- return 1;
- }
-
- return 0;
+ fprintf(stdout, "Syntax: http-server <docroot>\n");
}
int
main(int argc, char **argv)
{
- struct event_config *cfg = NULL;
- struct event_base *base = NULL;
- struct evhttp *http = NULL;
- struct evhttp_bound_socket *handle = NULL;
- struct evconnlistener *lev = NULL;
- struct event *term = NULL;
- struct options o = parse_opts(argc, argv);
- int ret = 0;
+ struct event_base *base;
+ struct evhttp *http;
+ struct evhttp_bound_socket *handle;
+ ev_uint16_t port = 0;
#ifdef _WIN32
- {
- WORD wVersionRequested;
- WSADATA wsaData;
- wVersionRequested = MAKEWORD(2, 2);
- WSAStartup(wVersionRequested, &wsaData);
- }
+ WSADATA WSAData;
+ WSAStartup(0x101, &WSAData);
#else
- if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
- ret = 1;
- goto err;
- }
-#endif
-
- setbuf(stdout, NULL);
- setbuf(stderr, NULL);
-
- /** Read env like in regress */
- if (o.verbose || getenv("EVENT_DEBUG_LOGGING_ALL"))
- event_enable_debug_logging(EVENT_DBG_ALL);
-
- cfg = event_config_new();
-#ifdef _WIN32
- if (o.iocp) {
-#ifdef EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED
- evthread_use_windows_threads();
- event_config_set_num_cpus_hint(cfg, 8);
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
+ return (1);
#endif
- event_config_set_flag(cfg, EVENT_BASE_FLAG_STARTUP_IOCP);
+ if (argc < 2) {
+ syntax();
+ return 1;
}
-#endif
- base = event_base_new_with_config(cfg);
+ base = event_base_new();
if (!base) {
fprintf(stderr, "Couldn't create an event_base: exiting\n");
- ret = 1;
+ return 1;
}
- event_config_free(cfg);
- cfg = NULL;
/* Create a new evhttp object to handle requests. */
http = evhttp_new(base);
if (!http) {
fprintf(stderr, "couldn't create evhttp. Exiting.\n");
- ret = 1;
+ return 1;
}
/* The /dump URI will dump all requests to stdout and say 200 ok. */
@@ -506,75 +366,53 @@ main(int argc, char **argv)
* cb. We can also add callbacks for specific paths. */
evhttp_set_gencb(http, send_document_cb, argv[1]);
- if (o.unixsock) {
-#ifdef EVENT__HAVE_STRUCT_SOCKADDR_UN
- struct sockaddr_un addr;
-
- if (o.unlink && (unlink(o.unixsock) && errno != ENOENT)) {
- perror(o.unixsock);
- ret = 1;
- goto err;
- }
-
- addr.sun_family = AF_UNIX;
- strcpy(addr.sun_path, o.unixsock);
+ /* Now we tell the evhttp what port to listen on */
+ handle = evhttp_bind_socket_with_handle(http, "0.0.0.0", port);
+ if (!handle) {
+ fprintf(stderr, "couldn't bind to port %d. Exiting.\n",
+ (int)port);
+ return 1;
+ }
- lev = evconnlistener_new_bind(base, NULL, NULL,
- LEV_OPT_CLOSE_ON_FREE, -1,
- (struct sockaddr *)&addr, sizeof(addr));
- if (!lev) {
- perror("Cannot create listener");
- ret = 1;
- goto err;
+ {
+ /* Extract and display the address we're listening on. */
+ struct sockaddr_storage ss;
+ evutil_socket_t fd;
+ ev_socklen_t socklen = sizeof(ss);
+ char addrbuf[128];
+ void *inaddr;
+ const char *addr;
+ int got_port = -1;
+ fd = evhttp_bound_socket_get_fd(handle);
+ memset(&ss, 0, sizeof(ss));
+ if (getsockname(fd, (struct sockaddr *)&ss, &socklen)) {
+ perror("getsockname() failed");
+ return 1;
}
-
- handle = evhttp_bind_listener(http, lev);
- if (!handle) {
- fprintf(stderr, "couldn't bind to %s. Exiting.\n", o.unixsock);
- ret = 1;
- goto err;
+ if (ss.ss_family == AF_INET) {
+ got_port = ntohs(((struct sockaddr_in*)&ss)->sin_port);
+ inaddr = &((struct sockaddr_in*)&ss)->sin_addr;
+ } else if (ss.ss_family == AF_INET6) {
+ got_port = ntohs(((struct sockaddr_in6*)&ss)->sin6_port);
+ inaddr = &((struct sockaddr_in6*)&ss)->sin6_addr;
+ } else {
+ fprintf(stderr, "Weird address family %d\n",
+ ss.ss_family);
+ return 1;
}
-#else /* !EVENT__HAVE_STRUCT_SOCKADDR_UN */
- fprintf(stderr, "-U is not supported on this platform. Exiting.\n");
- ret = 1;
- goto err;
-#endif /* EVENT__HAVE_STRUCT_SOCKADDR_UN */
- }
- else {
- handle = evhttp_bind_socket_with_handle(http, "0.0.0.0", o.port);
- if (!handle) {
- fprintf(stderr, "couldn't bind to port %d. Exiting.\n", o.port);
- ret = 1;
- goto err;
+ addr = evutil_inet_ntop(ss.ss_family, inaddr, addrbuf,
+ sizeof(addrbuf));
+ if (addr) {
+ printf("Listening on %s:%d\n", addr, got_port);
+ evutil_snprintf(uri_root, sizeof(uri_root),
+ "http://%s:%d",addr,got_port);
+ } else {
+ fprintf(stderr, "evutil_inet_ntop failed\n");
+ return 1;
}
}
- if (display_listen_sock(handle)) {
- ret = 1;
- goto err;
- }
-
- term = evsignal_new(base, SIGINT, do_term, base);
- if (!term)
- goto err;
- if (event_add(term, NULL))
- goto err;
-
event_base_dispatch(base);
-#ifdef _WIN32
- WSACleanup();
-#endif
-
-err:
- if (cfg)
- event_config_free(cfg);
- if (http)
- evhttp_free(http);
- if (term)
- event_free(term);
- if (base)
- event_base_free(base);
-
- return ret;
+ return 0;
}
diff --git a/sample/https-client.c b/sample/https-client.c
index 58e449b..7483956 100644
--- a/sample/https-client.c
+++ b/sample/https-client.c
@@ -45,6 +45,7 @@
#include "openssl_hostname_validation.h"
+static struct event_base *base;
static int ignore_cert = 0;
static void
@@ -53,7 +54,7 @@ http_request_done(struct evhttp_request *req, void *ctx)
char buffer[256];
int nread;
- if (!req || !evhttp_request_get_response_code(req)) {
+ if (req == NULL) {
/* If req is NULL, it means an error occurred, but
* sadly we are mostly left guessing what the error
* might have been. We'll do our best... */
@@ -187,10 +188,10 @@ int
main(int argc, char **argv)
{
int r;
- struct event_base *base = NULL;
+
struct evhttp_uri *http_uri = NULL;
const char *url = NULL, *data_file = NULL;
- const char *crt = NULL;
+ const char *crt = "/etc/ssl/certs/ca-certificates.crt";
const char *scheme, *host, *path, *query;
char uri[256];
int port;
@@ -311,8 +312,7 @@ main(int argc, char **argv)
}
uri[sizeof(uri) - 1] = '\0';
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
- (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
// Initialize OpenSSL
SSL_library_init();
ERR_load_crypto_strings();
@@ -338,19 +338,11 @@ main(int argc, char **argv)
#ifndef _WIN32
/* TODO: Add certificate loading on Windows as well */
- if (crt == NULL) {
- X509_STORE *store;
- /* Attempt to use the system's trusted root certificates. */
- store = SSL_CTX_get_cert_store(ssl_ctx);
- if (X509_STORE_set_default_paths(store) != 1) {
- err_openssl("X509_STORE_set_default_paths");
- goto error;
- }
- } else {
- if (SSL_CTX_load_verify_locations(ssl_ctx, crt, NULL) != 1) {
- err_openssl("SSL_CTX_load_verify_locations");
- goto error;
- }
+ /* Attempt to use the system's trusted root certificates.
+ * (This path is only valid for Debian-based systems.) */
+ if (1 != SSL_CTX_load_verify_locations(ssl_ctx, crt, NULL)) {
+ err_openssl("SSL_CTX_load_verify_locations");
+ goto error;
}
/* Ask OpenSSL to verify the server certificate. Note that this
* does NOT include verifying that the hostname is correct.
@@ -482,29 +474,25 @@ cleanup:
evhttp_connection_free(evcon);
if (http_uri)
evhttp_uri_free(http_uri);
- if (base)
- event_base_free(base);
+ event_base_free(base);
if (ssl_ctx)
SSL_CTX_free(ssl_ctx);
if (type == HTTP && ssl)
SSL_free(ssl);
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
- (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
EVP_cleanup();
ERR_free_strings();
-#if OPENSSL_VERSION_NUMBER < 0x10000000L
- ERR_remove_state(0);
-#else
+#ifdef EVENT__HAVE_ERR_REMOVE_THREAD_STATE
ERR_remove_thread_state(NULL);
+#else
+ ERR_remove_state(0);
#endif
-
CRYPTO_cleanup_all_ex_data();
sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
-#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
- (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */
+#endif /*OPENSSL_VERSION_NUMBER < 0x10100000L */
#ifdef _WIN32
WSACleanup();
diff --git a/sample/include.am b/sample/include.am
index cc003b7..d1a7242 100644
--- a/sample/include.am
+++ b/sample/include.am
@@ -16,16 +16,16 @@ SAMPLES = \
if OPENSSL
SAMPLES += sample/le-proxy
sample_le_proxy_SOURCES = sample/le-proxy.c
-sample_le_proxy_LDADD = libevent.la libevent_openssl.la $(OPENSSL_LIBS) $(OPENSSL_LIBADD)
-sample_le_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
+sample_le_proxy_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
+sample_le_proxy_INCLUDES = $(OPENSSL_INCS)
SAMPLES += sample/https-client
sample_https_client_SOURCES = \
sample/https-client.c \
sample/hostcheck.c \
sample/openssl_hostname_validation.c
-sample_https_client_LDADD = libevent.la libevent_openssl.la $(OPENSSL_LIBS) $(OPENSSL_LIBADD)
-sample_https_client_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
+sample_https_client_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
+sample_https_client_INCLUDES = $(OPENSSL_INCS)
noinst_HEADERS += \
sample/hostcheck.h \
sample/openssl_hostname_validation.h
diff --git a/sample/le-proxy.c b/sample/le-proxy.c
index 13e0e2a..8d9b529 100644
--- a/sample/le-proxy.c
+++ b/sample/le-proxy.c
@@ -30,7 +30,6 @@
#include <event2/listener.h>
#include <event2/util.h>
-#include "util-internal.h"
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rand.h>
@@ -195,7 +194,6 @@ accept_cb(struct evconnlistener *listener, evutil_socket_t fd,
perror("Bufferevent_openssl_new");
bufferevent_free(b_out);
bufferevent_free(b_in);
- return;
}
b_out = b_ssl;
}
@@ -216,13 +214,6 @@ main(int argc, char **argv)
int use_ssl = 0;
struct evconnlistener *listener;
-#ifdef _WIN32
- WORD wVersionRequested;
- WSADATA wsaData;
- wVersionRequested = MAKEWORD(2, 2);
- (void) WSAStartup(wVersionRequested, &wsaData);
-#endif
-
if (argc < 3)
syntax();
@@ -268,8 +259,7 @@ main(int argc, char **argv)
if (use_ssl) {
int r;
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
- (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init();
ERR_load_crypto_strings();
SSL_load_error_strings();
@@ -297,9 +287,5 @@ main(int argc, char **argv)
evconnlistener_free(listener);
event_base_free(base);
-#ifdef _WIN32
- WSACleanup();
-#endif
-
return 0;
}
diff --git a/sample/openssl_hostname_validation.c b/sample/openssl_hostname_validation.c
index 4036ccb..40312f2 100644
--- a/sample/openssl_hostname_validation.c
+++ b/sample/openssl_hostname_validation.c
@@ -48,8 +48,7 @@ SOFTWARE.
#define HOSTNAME_MAX_SIZE 255
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
- (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
#define ASN1_STRING_get0_data ASN1_STRING_data
#endif
diff --git a/sample/time-test.c b/sample/time-test.c
index 8d0fd91..c94c18a 100644
--- a/sample/time-test.c
+++ b/sample/time-test.c
@@ -100,9 +100,6 @@ main(int argc, char **argv)
evutil_gettimeofday(&lasttime, NULL);
- setbuf(stdout, NULL);
- setbuf(stderr, NULL);
-
event_base_dispatch(base);
return (0);
diff --git a/signal.c b/signal.c
index 89f5fc1..3f46295 100644
--- a/signal.c
+++ b/signal.c
@@ -85,10 +85,8 @@
#ifndef _WIN32
/* Windows wants us to call our signal handlers as __cdecl. Nobody else
* expects you to do anything crazy like this. */
-#ifndef __cdecl
#define __cdecl
#endif
-#endif
static int evsig_add(struct event_base *, evutil_socket_t, short, short, void *);
static int evsig_del(struct event_base *, evutil_socket_t, short, short, void *);
diff --git a/strlcpy-internal.h b/strlcpy-internal.h
index 4151d60..cfc27ec 100644
--- a/strlcpy-internal.h
+++ b/strlcpy-internal.h
@@ -6,12 +6,10 @@ extern "C" {
#endif
#include "event2/event-config.h"
-#include "event2/visibility.h"
#include "evconfig-private.h"
#ifndef EVENT__HAVE_STRLCPY
#include <string.h>
-EVENT2_EXPORT_SYMBOL
size_t event_strlcpy_(char *dst, const char *src, size_t siz);
#define strlcpy event_strlcpy_
#endif
diff --git a/test-driver b/test-driver
index b8521a4..8e575b0 100755
--- a/test-driver
+++ b/test-driver
@@ -1,9 +1,9 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2013-07-13.22; # UTC
-# Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@ scriptversion=2018-03-07.03; # UTC
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -140,9 +140,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
diff --git a/test/bench.c b/test/bench.c
index 3a6886d..214479c 100644
--- a/test/bench.c
+++ b/test/bench.c
@@ -34,7 +34,6 @@
*/
#include "event2/event-config.h"
-#include "../util-internal.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -65,8 +64,7 @@
#include <event.h>
#include <evutil.h>
-static ev_ssize_t count, fired;
-static int writes, failures;
+static int count, writes, fired, failures;
static evutil_socket_t *pipes;
static int num_pipes, num_active, num_writes;
static struct event *events;
@@ -119,18 +117,15 @@ run_once(void)
count = 0;
writes = num_writes;
- {
- int xcount = 0;
- evutil_gettimeofday(&ts, NULL);
- do {
- event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK);
- xcount++;
- } while (count != fired);
- evutil_gettimeofday(&te, NULL);
-
- if (xcount != count)
- fprintf(stderr, "Xcount: %d, Rcount: " EV_SSIZE_FMT "\n",
- xcount, count);
+ { int xcount = 0;
+ evutil_gettimeofday(&ts, NULL);
+ do {
+ event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK);
+ xcount++;
+ } while (count != fired);
+ evutil_gettimeofday(&te, NULL);
+
+ if (xcount != count) fprintf(stderr, "Xcount: %d, Rcount: %d\n", xcount, count);
}
evutil_timersub(&te, &ts, &te);
@@ -141,7 +136,7 @@ run_once(void)
int
main(int argc, char **argv)
{
-#ifdef EVENT__HAVE_SETRLIMIT
+#ifdef HAVE_SETRLIMIT
struct rlimit rl;
#endif
int i, c;
@@ -172,7 +167,7 @@ main(int argc, char **argv)
}
}
-#ifdef EVENT__HAVE_SETRLIMIT
+#ifdef HAVE_SETRLIMIT
rl.rlim_cur = rl.rlim_max = num_pipes * 2 + 50;
if (setrlimit(RLIMIT_NOFILE, &rl) == -1) {
perror("setrlimit");
diff --git a/test/bench_cascade.c b/test/bench_cascade.c
index 29a3203..2d85cc1 100644
--- a/test/bench_cascade.c
+++ b/test/bench_cascade.c
@@ -35,8 +35,7 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#include <getopt.h>
-#else /* _WIN32 */
+#else
#include <sys/socket.h>
#include <sys/resource.h>
#endif
@@ -49,6 +48,7 @@
#include <unistd.h>
#endif
#include <errno.h>
+#include <getopt.h>
#include <event.h>
#include <evutil.h>
@@ -139,7 +139,7 @@ run_once(int num_pipes)
int
main(int argc, char **argv)
{
-#ifdef EVENT__HAVE_SETRLIMIT
+#ifdef HAVE_SETRLIMIT
struct rlimit rl;
#endif
int i, c;
@@ -162,7 +162,7 @@ main(int argc, char **argv)
}
}
-#ifdef EVENT__HAVE_SETRLIMIT
+#ifdef HAVE_SETRLIMIT
rl.rlim_cur = rl.rlim_max = num_pipes * 2 + 50;
if (setrlimit(RLIMIT_NOFILE, &rl) == -1) {
perror("setrlimit");
diff --git a/test/bench_http.c b/test/bench_http.c
index 80377ee..d20d3bc 100644
--- a/test/bench_http.c
+++ b/test/bench_http.c
@@ -101,9 +101,6 @@ main(int argc, char **argv)
return (1);
#endif
- setbuf(stdout, NULL);
- setbuf(stderr, NULL);
-
for (i = 1; i < argc; ++i) {
if (*argv[i] != '-')
continue;
diff --git a/test/bench_httpclient.c b/test/bench_httpclient.c
index 7c7ee47..e159295 100644
--- a/test/bench_httpclient.c
+++ b/test/bench_httpclient.c
@@ -113,13 +113,13 @@ errorcb(struct bufferevent *b, short what, void *arg)
static void
frob_socket(evutil_socket_t sock)
{
-#ifdef EVENT__HAVE_STRUCT_LINGER
+#ifdef HAVE_SO_LINGER
struct linger l;
#endif
int one = 1;
if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*)&one, sizeof(one))<0)
perror("setsockopt(SO_REUSEADDR)");
-#ifdef EVENT__HAVE_STRUCT_LINGER
+#ifdef HAVE_SO_LINGER
l.l_onoff = 1;
l.l_linger = 0;
if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (void*)&l, sizeof(l))<0)
diff --git a/test/check-dumpevents.py b/test/check-dumpevents.py
index 3e1df30..16fe9bc 100755
--- a/test/check-dumpevents.py
+++ b/test/check-dumpevents.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python2
#
# Post-process the output of test-dumpevents and check it for correctness.
#
@@ -15,12 +15,12 @@ try:
got_inserted_pos = text.index("Inserted events:\n")
got_active_pos = text.index("Active events:\n")
except ValueError:
- sys.stderr.write("Missing expected dividing line in dumpevents output")
+ print >>sys.stderr, "Missing expected dividing line in dumpevents output"
sys.exit(1)
if not (expect_inserted_pos < expect_active_pos <
got_inserted_pos < got_active_pos):
- sys.stderr.write("Sections out of order in dumpevents output")
+ print >>sys.stderr, "Sections out of order in dumpevents output"
sys.exit(1)
now,T= text[1].split()
@@ -45,10 +45,10 @@ cleaned_inserted = set( pat.sub(replace_time, s) for s in got_inserted
if "Internal" not in s)
if cleaned_inserted != want_inserted:
- sys.stderr.write("Inserted event lists were not as expected!")
+ print >>sys.stderr, "Inserted event lists were not as expected!"
sys.exit(1)
if set(got_active) != set(want_active):
- sys.stderr.write("Active event lists were not as expected!")
+ print >>sys.stderr, "Active event lists were not as expected!"
sys.exit(1)
diff --git a/test/include.am b/test/include.am
index 0437524..eea249f 100644
--- a/test/include.am
+++ b/test/include.am
@@ -12,7 +12,6 @@ EXTRA_DIST+= \
test/regress.gen.h \
test/regress.rpc \
test/rpcgen_wrapper.sh \
- test/print-winsock-errors.c \
test/test.sh
TESTPROGRAMS = \
@@ -57,26 +56,26 @@ TESTS = \
LOG_COMPILER = true
TESTS_COMPILER = true
-test_runner_epoll: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b EPOLL
-test_runner_select: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b SELECT
-test_runner_kqueue: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b KQUEUE
-test_runner_evport: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b EVPORT
-test_runner_devpoll: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b DEVPOLL
-test_runner_poll: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b POLL
-test_runner_win32: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b WIN32
-test_runner_timerfd: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b "" -t
-test_runner_changelist: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b "" -c
-test_runner_timerfd_changelist: $(top_srcdir)/test/test.sh
- $(top_srcdir)/test/test.sh -b "" -T
+test_runner_epoll: test/test.sh
+ test/test.sh -b EPOLL
+test_runner_select: test/test.sh
+ test/test.sh -b SELECT
+test_runner_kqueue: test/test.sh
+ test/test.sh -b KQUEUE
+test_runner_evport: test/test.sh
+ test/test.sh -b EVPORT
+test_runner_devpoll: test/test.sh
+ test/test.sh -b DEVPOLL
+test_runner_poll: test/test.sh
+ test/test.sh -b POLL
+test_runner_win32: test/test.sh
+ test/test.sh -b WIN32
+test_runner_timerfd: test/test.sh
+ test/test.sh -b "" -t
+test_runner_changelist: test/test.sh
+ test/test.sh -b "" -c
+test_runner_timerfd_changelist: test/test.sh
+ test/test.sh -b "" -T
DISTCLEANFILES += test/regress.gen.c test/regress.gen.h
@@ -140,7 +139,7 @@ if BUILD_WIN32
test_regress_SOURCES += test/regress_iocp.c
endif
-test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la libevent_extra.la $(PTHREAD_LIBS) $(ZLIB_LIBS)
+test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la $(PTHREAD_LIBS) $(ZLIB_LIBS)
test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) $(ZLIB_CFLAGS) -Itest
test_regress_LDFLAGS = $(PTHREAD_CFLAGS)
diff --git a/test/print-winsock-errors.c b/test/print-winsock-errors.c
deleted file mode 100644
index 64d6b0e..0000000
--- a/test/print-winsock-errors.c
+++ /dev/null
@@ -1,86 +0,0 @@
-#include <winsock2.h>
-#include <windows.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "event2/event.h"
-#include "event2/util.h"
-#include "event2/thread.h"
-
-#define E(x) printf (#x " -> \"%s\"\n", evutil_socket_error_to_string (x));
-
-int main (int argc, char **argv)
-{
- int i, j;
- const char *s1, *s2;
-
-#ifdef EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED
- evthread_use_windows_threads ();
-#endif
-
- s1 = evutil_socket_error_to_string (WSAEINTR);
-
- for (i = 0; i < 3; i++) {
- printf ("\niteration %d:\n\n", i);
- E(WSAEINTR);
- E(WSAEACCES);
- E(WSAEFAULT);
- E(WSAEINVAL);
- E(WSAEMFILE);
- E(WSAEWOULDBLOCK);
- E(WSAEINPROGRESS);
- E(WSAEALREADY);
- E(WSAENOTSOCK);
- E(WSAEDESTADDRREQ);
- E(WSAEMSGSIZE);
- E(WSAEPROTOTYPE);
- E(WSAENOPROTOOPT);
- E(WSAEPROTONOSUPPORT);
- E(WSAESOCKTNOSUPPORT);
- E(WSAEOPNOTSUPP);
- E(WSAEPFNOSUPPORT);
- E(WSAEAFNOSUPPORT);
- E(WSAEADDRINUSE);
- E(WSAEADDRNOTAVAIL);
- E(WSAENETDOWN);
- E(WSAENETUNREACH);
- E(WSAENETRESET);
- E(WSAECONNABORTED);
- E(WSAECONNRESET);
- E(WSAENOBUFS);
- E(WSAEISCONN);
- E(WSAENOTCONN);
- E(WSAESHUTDOWN);
- E(WSAETIMEDOUT);
- E(WSAECONNREFUSED);
- E(WSAEHOSTDOWN);
- E(WSAEHOSTUNREACH);
- E(WSAEPROCLIM);
- E(WSASYSNOTREADY);
- E(WSAVERNOTSUPPORTED);
- E(WSANOTINITIALISED);
- E(WSAEDISCON);
- E(WSATYPE_NOT_FOUND);
- E(WSAHOST_NOT_FOUND);
- E(WSATRY_AGAIN);
- E(WSANO_RECOVERY);
- E(WSANO_DATA);
- E(0xdeadbeef); /* test the case where no message is available */
-
- /* fill up the hash table a bit to make sure it grows properly */
- for (j = 0; j < 50; j++) {
- int err;
- evutil_secure_rng_get_bytes(&err, sizeof(err));
- evutil_socket_error_to_string(err);
- }
- }
-
- s2 = evutil_socket_error_to_string (WSAEINTR);
- if (s1 != s2)
- printf ("caching failed!\n");
-
- libevent_global_shutdown ();
-
- return EXIT_SUCCESS;
-}
diff --git a/test/regress.c b/test/regress.c
index 0ebadcb..d8a6b9b 100644
--- a/test/regress.c
+++ b/test/regress.c
@@ -46,7 +46,6 @@
#ifndef _WIN32
#include <sys/socket.h>
#include <sys/wait.h>
-#include <limits.h>
#include <signal.h>
#include <unistd.h>
#include <netdb.h>
@@ -849,36 +848,18 @@ simple_child_read_cb(evutil_socket_t fd, short event, void *arg)
called++;
}
-
-#define TEST_FORK_EXIT_SUCCESS 76
-static void fork_wait_check(int pid)
-{
- int status;
-
- TT_BLATHER(("Before waitpid"));
-
-#ifdef WNOWAIT
- if ((waitpid(pid, &status, WNOWAIT) == -1 && errno == EINVAL) &&
-#else
- if (
-#endif
- waitpid(pid, &status, 0) == -1) {
- perror("waitpid");
- exit(1);
- }
- TT_BLATHER(("After waitpid"));
-
- if (WEXITSTATUS(status) != TEST_FORK_EXIT_SUCCESS) {
- fprintf(stdout, "FAILED (exit): %d\n", WEXITSTATUS(status));
- exit(1);
- }
-}
static void
test_fork(void)
{
char c;
+ int status;
struct event ev, sig_ev, usr_ev, existing_ev;
pid_t pid;
+ int wait_flags = 0;
+
+#ifdef EVENT__HAVE_WAITPID_WITH_WNOWAIT
+ wait_flags |= WNOWAIT;
+#endif
setup_test("After fork: ");
@@ -929,8 +910,8 @@ test_fork(void)
evsignal_set(&usr_ev, SIGUSR1, fork_signal_cb, &usr_ev);
evsignal_add(&usr_ev, NULL);
- kill(getpid(), SIGUSR1);
- kill(getpid(), SIGUSR2);
+ raise(SIGUSR1);
+ raise(SIGUSR2);
called = 0;
@@ -941,7 +922,7 @@ test_fork(void)
/* we do not send an EOF; simple_read_cb requires an EOF
* to set test_ok. we just verify that the callback was
* called. */
- exit(test_ok != 0 || called != 2 ? -2 : TEST_FORK_EXIT_SUCCESS);
+ exit(test_ok != 0 || called != 2 ? -2 : 76);
}
/** wait until client read first message */
@@ -952,7 +933,17 @@ test_fork(void)
tt_fail_perror("write");
}
- fork_wait_check(pid);
+ TT_BLATHER(("Before waitpid"));
+ if (waitpid(pid, &status, wait_flags) == -1) {
+ perror("waitpid");
+ exit(1);
+ }
+ TT_BLATHER(("After waitpid"));
+
+ if (WEXITSTATUS(status) != 76) {
+ fprintf(stdout, "FAILED (exit): %d\n", WEXITSTATUS(status));
+ exit(1);
+ }
/* test that the current event loop still works */
if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
@@ -963,8 +954,8 @@ test_fork(void)
evsignal_set(&usr_ev, SIGUSR1, fork_signal_cb, &usr_ev);
evsignal_add(&usr_ev, NULL);
- kill(getpid(), SIGUSR1);
- kill(getpid(), SIGUSR2);
+ raise(SIGUSR1);
+ raise(SIGUSR2);
event_dispatch();
@@ -998,9 +989,9 @@ static void
del_wait_cb(evutil_socket_t fd, short event, void *arg)
{
struct timeval delay = { 0, 300*1000 };
- TT_BLATHER(("Sleeping: %i", test_ok));
+ TT_BLATHER(("Sleeping"));
evutil_usleep_(&delay);
- ++test_ok;
+ test_ok = 1;
}
static void
@@ -1011,7 +1002,7 @@ test_del_wait(void)
setup_test("event_del will wait: ");
- event_set(&ev, pair[1], EV_READ|EV_PERSIST, del_wait_cb, &ev);
+ event_set(&ev, pair[1], EV_READ, del_wait_cb, &ev);
event_add(&ev, NULL);
pthread_create(&thread, NULL, del_wait_thread, NULL);
@@ -1035,39 +1026,9 @@ test_del_wait(void)
pthread_join(thread, NULL);
- tt_int_op(test_ok, ==, 1);
-
end:
;
}
-
-static void null_cb(evutil_socket_t fd, short what, void *arg) {}
-static void* test_del_notify_thread(void *arg)
-{
- event_dispatch();
- return NULL;
-}
-static void
-test_del_notify(void)
-{
- struct event ev;
- pthread_t thread;
-
- test_ok = 1;
-
- event_set(&ev, -1, EV_READ, null_cb, &ev);
- event_add(&ev, NULL);
-
- pthread_create(&thread, NULL, test_del_notify_thread, NULL);
-
- {
- struct timeval delay = { 0, 1000 };
- evutil_usleep_(&delay);
- }
-
- event_del(&ev);
- pthread_join(thread, NULL);
-}
#endif
static void
@@ -1166,7 +1127,7 @@ test_immediatesignal(void)
test_ok = 0;
evsignal_set(&ev, SIGUSR1, signal_cb, &ev);
evsignal_add(&ev, NULL);
- kill(getpid(), SIGUSR1);
+ raise(SIGUSR1);
event_loop(EVLOOP_NONBLOCK);
evsignal_del(&ev);
cleanup_test();
@@ -1239,7 +1200,7 @@ test_signal_switchbase(void)
test_ok = 0;
/* can handle signal before loop is called */
- kill(getpid(), SIGUSR1);
+ raise(SIGUSR1);
event_base_loop(base2, EVLOOP_NONBLOCK);
if (is_kqueue) {
if (!test_ok)
@@ -1252,7 +1213,7 @@ test_signal_switchbase(void)
/* set base1 to handle signals */
event_base_loop(base1, EVLOOP_NONBLOCK);
- kill(getpid(), SIGUSR1);
+ raise(SIGUSR1);
event_base_loop(base1, EVLOOP_NONBLOCK);
event_base_loop(base2, EVLOOP_NONBLOCK);
}
@@ -1281,7 +1242,7 @@ test_signal_assert(void)
*/
evsignal_del(&ev);
- kill(getpid(), SIGCONT);
+ raise(SIGCONT);
#if 0
/* only way to verify we were in evsig_handler() */
/* XXXX Now there's no longer a good way. */
@@ -1325,7 +1286,7 @@ test_signal_restore(void)
evsignal_add(&ev, NULL);
evsignal_del(&ev);
- kill(getpid(), SIGUSR1);
+ raise(SIGUSR1);
/* 1 == signal_cb, 2 == signal_cb_sa, we want our previous handler */
if (test_ok != 2)
test_ok = 0;
@@ -1340,7 +1301,7 @@ signal_cb_swp(int sig, short event, void *arg)
{
called++;
if (called < 5)
- kill(getpid(), sig);
+ raise(sig);
else
event_loopexit(NULL);
}
@@ -1352,7 +1313,7 @@ timeout_cb_swp(evutil_socket_t fd, short event, void *arg)
called = 0;
evtimer_add((struct event *)arg, &tv);
- kill(getpid(), SIGUSR1);
+ raise(SIGUSR1);
return;
}
test_ok = 0;
@@ -1390,14 +1351,18 @@ test_free_active_base(void *ptr)
struct event ev1;
base1 = event_init();
- tt_assert(base1);
- event_assign(&ev1, base1, data->pair[1], EV_READ, dummy_read_cb, NULL);
- event_add(&ev1, NULL);
- event_base_free(base1); /* should not crash */
+ if (base1) {
+ event_assign(&ev1, base1, data->pair[1], EV_READ,
+ dummy_read_cb, NULL);
+ event_add(&ev1, NULL);
+ event_base_free(base1); /* should not crash */
+ } else {
+ tt_fail_msg("failed to create event_base for test");
+ }
base1 = event_init();
tt_assert(base1);
- event_assign(&ev1, base1, data->pair[0], 0, dummy_read_cb, NULL);
+ event_assign(&ev1, base1, 0, 0, dummy_read_cb, NULL);
event_active(&ev1, EV_READ, 1);
event_base_free(base1);
end:
@@ -1875,8 +1840,7 @@ static void send_a_byte_cb(evutil_socket_t fd, short what, void *arg)
{
evutil_socket_t *sockp = arg;
(void) fd; (void) what;
- if (write(*sockp, "A", 1) < 0)
- tt_fail_perror("write");
+ (void) write(*sockp, "A", 1);
}
struct read_not_timeout_param
{
@@ -2106,48 +2070,60 @@ re_add_read_cb(evutil_socket_t fd, short event, void *arg)
if (n_read < 0) {
tt_fail_perror("read");
event_base_loopbreak(event_get_base(ev_other));
+ return;
} else {
event_add(ev_other, NULL);
++test_ok;
}
}
+
static void
-test_nonpersist_readd(void *_data)
+test_nonpersist_readd(void)
{
struct event ev1, ev2;
- struct basic_test_data *data = _data;
-
- memset(&ev1, 0, sizeof(ev1));
- memset(&ev2, 0, sizeof(ev2));
- tt_assert(!event_assign(&ev1, data->base, data->pair[0], EV_READ, re_add_read_cb, &ev2));
- tt_assert(!event_assign(&ev2, data->base, data->pair[1], EV_READ, re_add_read_cb, &ev1));
+ setup_test("Re-add nonpersistent events: ");
+ event_set(&ev1, pair[0], EV_READ, re_add_read_cb, &ev2);
+ event_set(&ev2, pair[1], EV_READ, re_add_read_cb, &ev1);
- tt_int_op(write(data->pair[0], "Hello", 5), ==, 5);
- tt_int_op(write(data->pair[1], "Hello", 5), ==, 5);
+ if (write(pair[0], "Hello", 5) < 0) {
+ tt_fail_perror("write(pair[0])");
+ }
- tt_int_op(event_add(&ev1, NULL), ==, 0);
- tt_int_op(event_add(&ev2, NULL), ==, 0);
- tt_int_op(event_base_loop(data->base, EVLOOP_ONCE), ==, 0);
- tt_int_op(test_ok, ==, 2);
+ if (write(pair[1], "Hello", 5) < 0) {
+ tt_fail_perror("write(pair[1])\n");
+ }
+ if (event_add(&ev1, NULL) == -1 ||
+ event_add(&ev2, NULL) == -1) {
+ test_ok = 0;
+ }
+ if (test_ok != 0)
+ exit(1);
+ event_loop(EVLOOP_ONCE);
+ if (test_ok != 2)
+ exit(1);
/* At this point, we executed both callbacks. Whichever one got
* called first added the second, but the second then immediately got
* deleted before its callback was called. At this point, though, it
* re-added the first.
*/
- tt_assert(readd_test_event_last_added);
- if (readd_test_event_last_added == &ev1) {
- tt_assert(event_pending(&ev1, EV_READ, NULL) && !event_pending(&ev2, EV_READ, NULL));
+ if (!readd_test_event_last_added) {
+ test_ok = 0;
+ } else if (readd_test_event_last_added == &ev1) {
+ if (!event_pending(&ev1, EV_READ, NULL) ||
+ event_pending(&ev2, EV_READ, NULL))
+ test_ok = 0;
} else {
- tt_assert(event_pending(&ev2, EV_READ, NULL) && !event_pending(&ev1, EV_READ, NULL));
+ if (event_pending(&ev1, EV_READ, NULL) ||
+ !event_pending(&ev2, EV_READ, NULL))
+ test_ok = 0;
}
-end:
- if (event_initialized(&ev1))
- event_del(&ev1);
- if (event_initialized(&ev2))
- event_del(&ev2);
+ event_del(&ev1);
+ event_del(&ev2);
+
+ cleanup_test();
}
struct test_pri_event {
@@ -3065,7 +3041,6 @@ test_many_events(void *arg)
* instance of that. */
sock[i] = socket(AF_INET, SOCK_DGRAM, 0);
tt_assert(sock[i] >= 0);
- tt_assert(!evutil_make_socket_nonblocking(sock[i]));
called[i] = 0;
ev[i] = event_new(base, sock[i], EV_WRITE|evflags,
many_event_cb, &called[i]);
@@ -3119,7 +3094,7 @@ test_get_assignment(void *arg)
event_get_assignment(ev1, &b, &s, &what, &cb, &cb_arg);
tt_ptr_op(b, ==, base);
- tt_fd_op(s, ==, data->pair[1]);
+ tt_int_op(s, ==, data->pair[1]);
tt_int_op(what, ==, EV_READ);
tt_ptr_op(cb, ==, dummy_read_cb);
tt_ptr_op(cb_arg, ==, str);
@@ -3305,46 +3280,6 @@ tabf_cb(evutil_socket_t fd, short what, void *arg)
}
static void
-test_evmap_invalid_slots(void *arg)
-{
- struct basic_test_data *data = arg;
- struct event_base *base = data->base;
- struct event *ev1 = NULL, *ev2 = NULL;
- int e1, e2;
-#ifndef _WIN32
- struct event *ev3 = NULL, *ev4 = NULL;
- int e3, e4;
-#endif
-
- ev1 = evsignal_new(base, -1, dummy_read_cb, (void *)base);
- ev2 = evsignal_new(base, NSIG, dummy_read_cb, (void *)base);
- tt_assert(ev1);
- tt_assert(ev2);
- e1 = event_add(ev1, NULL);
- e2 = event_add(ev2, NULL);
- tt_int_op(e1, !=, 0);
- tt_int_op(e2, !=, 0);
-#ifndef _WIN32
- ev3 = event_new(base, INT_MAX, EV_READ, dummy_read_cb, (void *)base);
- ev4 = event_new(base, INT_MAX / 2, EV_READ, dummy_read_cb, (void *)base);
- tt_assert(ev3);
- tt_assert(ev4);
- e3 = event_add(ev3, NULL);
- e4 = event_add(ev4, NULL);
- tt_int_op(e3, !=, 0);
- tt_int_op(e4, !=, 0);
-#endif
-
-end:
- event_free(ev1);
- event_free(ev2);
-#ifndef _WIN32
- event_free(ev3);
- event_free(ev4);
-#endif
-}
-
-static void
test_active_by_fd(void *arg)
{
struct basic_test_data *data = arg;
@@ -3395,7 +3330,6 @@ test_active_by_fd(void *arg)
/* Trigger 2, 3, 4 */
event_base_active_by_fd(base, data->pair[0], EV_WRITE);
event_base_active_by_fd(base, data->pair[1], EV_READ);
- event_base_active_by_fd(base, data->pair[1], EV_TIMEOUT);
#ifndef _WIN32
event_base_active_by_signal(base, SIGHUP);
#endif
@@ -3408,7 +3342,7 @@ test_active_by_fd(void *arg)
tt_int_op(e2, ==, EV_WRITE | 0x10000);
tt_int_op(e3, ==, EV_READ | 0x10000);
/* Mask out EV_WRITE here, since it could be genuinely writeable. */
- tt_int_op((e4 & ~EV_WRITE), ==, EV_READ | EV_TIMEOUT | 0x10000);
+ tt_int_op((e4 & ~EV_WRITE), ==, EV_READ | 0x10000);
#ifndef _WIN32
tt_int_op(es, ==, EV_SIGNAL | 0x10000);
#endif
@@ -3443,18 +3377,17 @@ struct testcase_t main_testcases[] = {
BASIC(event_assign_selfarg, TT_FORK|TT_NEED_BASE),
BASIC(event_base_get_num_events, TT_FORK|TT_NEED_BASE),
BASIC(event_base_get_max_events, TT_FORK|TT_NEED_BASE),
- BASIC(evmap_invalid_slots, TT_FORK|TT_NEED_BASE),
BASIC(bad_assign, TT_FORK|TT_NEED_BASE|TT_NO_LOGS),
BASIC(bad_reentrant, TT_FORK|TT_NEED_BASE|TT_NO_LOGS),
- BASIC(active_later, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR|TT_RETRIABLE),
+ BASIC(active_later, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR),
BASIC(event_remove_timeout, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR),
/* These are still using the old API */
LEGACY(persistent_timeout, TT_FORK|TT_NEED_BASE),
{ "persistent_timeout_jump", test_persistent_timeout_jump, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "persistent_active_timeout", test_persistent_active_timeout,
- TT_FORK|TT_NEED_BASE|TT_RETRIABLE, &basic_setup, NULL },
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
LEGACY(priorities, TT_FORK|TT_NEED_BASE),
BASIC(priority_active_inversion, TT_FORK|TT_NEED_BASE),
{ "common_timeout", test_common_timeout, TT_FORK|TT_NEED_BASE,
@@ -3473,7 +3406,7 @@ struct testcase_t main_testcases[] = {
LEGACY(loopbreak, TT_ISOLATED),
LEGACY(loopexit, TT_ISOLATED),
LEGACY(loopexit_multiple, TT_ISOLATED),
- { "nonpersist_readd", test_nonpersist_readd, TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE, &basic_setup, NULL },
+ LEGACY(nonpersist_readd, TT_ISOLATED),
LEGACY(multiple_events_for_same_fd, TT_ISOLATED),
LEGACY(want_only_once, TT_ISOLATED),
{ "event_once", test_event_once, TT_ISOLATED, &basic_setup, NULL },
@@ -3507,8 +3440,7 @@ struct testcase_t main_testcases[] = {
#endif
#ifdef EVENT__HAVE_PTHREADS
/** TODO: support win32 */
- LEGACY(del_wait, TT_ISOLATED|TT_NEED_THREADS|TT_RETRIABLE),
- LEGACY(del_notify, TT_ISOLATED|TT_NEED_THREADS),
+ LEGACY(del_wait, TT_ISOLATED|TT_NEED_THREADS),
#endif
END_OF_TESTCASES
diff --git a/test/regress.gen.c b/test/regress.gen.c
index 09f4674..da994a5 100644
--- a/test/regress.gen.c
+++ b/test/regress.gen.c
@@ -1,5 +1,5 @@
/*
- * Automatically generated from ../test/regress.rpc
+ * Automatically generated from ./test/regress.rpc
* by event_rpcgen.py/0.1. DO NOT EDIT THIS FILE.
*/
@@ -11,14 +11,8 @@
#include <event2/buffer.h>
#include <event2/tag.h>
-#if defined(EVENT__HAVE___func__)
-# ifndef __func__
-# define __func__ __func__
-# endif
-#elif defined(EVENT__HAVE___FUNCTION__)
-# define __func__ __FUNCTION__
-#else
-# define __func__ __FILE__
+#if defined(EVENT____func__) && !defined(__func__)
+#define __func__ EVENT____func__
#endif
@@ -27,6 +21,7 @@
void event_warn(const char *fmt, ...);
void event_warnx(const char *fmt, ...);
+
/*
* Implementation of msg
*/
@@ -326,6 +321,7 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
switch (tag) {
case MSG_FROM_NAME:
+
if (tmp->from_name_set)
return (-1);
if (evtag_unmarshal_string(evbuf, MSG_FROM_NAME, &tmp->from_name_data) == -1) {
@@ -334,7 +330,9 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
}
tmp->from_name_set = 1;
break;
+
case MSG_TO_NAME:
+
if (tmp->to_name_set)
return (-1);
if (evtag_unmarshal_string(evbuf, MSG_TO_NAME, &tmp->to_name_data) == -1) {
@@ -343,7 +341,9 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
}
tmp->to_name_set = 1;
break;
+
case MSG_ATTACK:
+
if (tmp->attack_set)
return (-1);
tmp->attack_data = kill_new();
@@ -355,7 +355,9 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
}
tmp->attack_set = 1;
break;
+
case MSG_RUN:
+
if (tmp->run_length >= tmp->run_num_allocated &&
msg_run_expand_to_hold_more(tmp) < 0) {
puts("HEY NOW");
@@ -371,6 +373,7 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
++tmp->run_length;
tmp->run_set = 1;
break;
+
default:
return -1;
}
@@ -635,6 +638,7 @@ kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
switch (tag) {
case KILL_WEAPON:
+
if (tmp->weapon_set)
return (-1);
if (evtag_unmarshal_string(evbuf, KILL_WEAPON, &tmp->weapon_data) == -1) {
@@ -643,7 +647,9 @@ kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
}
tmp->weapon_set = 1;
break;
+
case KILL_ACTION:
+
if (tmp->action_set)
return (-1);
if (evtag_unmarshal_string(evbuf, KILL_ACTION, &tmp->action_data) == -1) {
@@ -652,7 +658,9 @@ kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
}
tmp->action_set = 1;
break;
+
case KILL_HOW_OFTEN:
+
if (tmp->how_often_length >= tmp->how_often_num_allocated &&
kill_how_often_expand_to_hold_more(tmp) < 0) {
puts("HEY NOW");
@@ -665,6 +673,7 @@ kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
++tmp->how_often_length;
tmp->how_often_set = 1;
break;
+
default:
return -1;
}
@@ -1084,6 +1093,7 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
switch (tag) {
case RUN_HOW:
+
if (tmp->how_set)
return (-1);
if (evtag_unmarshal_string(evbuf, RUN_HOW, &tmp->how_data) == -1) {
@@ -1092,7 +1102,9 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
}
tmp->how_set = 1;
break;
+
case RUN_SOME_BYTES:
+
if (tmp->some_bytes_set)
return (-1);
if (evtag_payload_length(evbuf, &tmp->some_bytes_length) == -1)
@@ -1107,7 +1119,9 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
}
tmp->some_bytes_set = 1;
break;
+
case RUN_FIXED_BYTES:
+
if (tmp->fixed_bytes_set)
return (-1);
if (evtag_unmarshal_fixed(evbuf, RUN_FIXED_BYTES, tmp->fixed_bytes_data, (24)) == -1) {
@@ -1116,7 +1130,9 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
}
tmp->fixed_bytes_set = 1;
break;
+
case RUN_NOTES:
+
if (tmp->notes_length >= tmp->notes_num_allocated &&
run_notes_expand_to_hold_more(tmp) < 0) {
puts("HEY NOW");
@@ -1129,7 +1145,9 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
++tmp->notes_length;
tmp->notes_set = 1;
break;
+
case RUN_LARGE_NUMBER:
+
if (tmp->large_number_set)
return (-1);
if (evtag_unmarshal_int64(evbuf, RUN_LARGE_NUMBER, &tmp->large_number_data) == -1) {
@@ -1138,7 +1156,9 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
}
tmp->large_number_set = 1;
break;
+
case RUN_OTHER_NUMBERS:
+
if (tmp->other_numbers_length >= tmp->other_numbers_num_allocated &&
run_other_numbers_expand_to_hold_more(tmp) < 0) {
puts("HEY NOW");
@@ -1151,6 +1171,7 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
++tmp->other_numbers_length;
tmp->other_numbers_set = 1;
break;
+
default:
return -1;
}
diff --git a/test/regress.gen.h b/test/regress.gen.h
index 5a657f5..86b8d7f 100644
--- a/test/regress.gen.h
+++ b/test/regress.gen.h
@@ -1,12 +1,13 @@
/*
- * Automatically generated from ../test/regress.rpc
+ * Automatically generated from ./test/regress.rpc
*/
-#ifndef EVENT_RPCOUT____TEST_REGRESS_RPC_
-#define EVENT_RPCOUT____TEST_REGRESS_RPC_
+#ifndef EVENT_RPCOUT___TEST_REGRESS_RPC_
+#define EVENT_RPCOUT___TEST_REGRESS_RPC_
#include <event2/util.h> /* for ev_uint*_t */
#include <event2/rpc.h>
+
struct msg;
struct kill;
struct run;
@@ -203,4 +204,4 @@ int run_other_numbers_get(struct run *, int, ev_uint32_t *);
ev_uint32_t * run_other_numbers_add(struct run *msg, const ev_uint32_t value);
/* --- run done --- */
-#endif /* EVENT_RPCOUT____TEST_REGRESS_RPC_ */ \ No newline at end of file
+#endif /* EVENT_RPCOUT___TEST_REGRESS_RPC_ */
diff --git a/test/regress.h b/test/regress.h
index 643b82b..de1aed3 100644
--- a/test/regress.h
+++ b/test/regress.h
@@ -43,7 +43,6 @@ extern struct testcase_t bufferevent_iocp_testcases[];
extern struct testcase_t util_testcases[];
extern struct testcase_t signal_testcases[];
extern struct testcase_t http_testcases[];
-extern struct testcase_t http_iocp_testcases[];
extern struct testcase_t dns_testcases[];
extern struct testcase_t rpc_testcases[];
extern struct testcase_t edgetriggered_testcases[];
@@ -133,14 +132,11 @@ pid_t regress_fork(void);
#ifdef EVENT__HAVE_OPENSSL
#include <openssl/ssl.h>
EVP_PKEY *ssl_getkey(void);
-X509 *ssl_getcert(EVP_PKEY *key);
+X509 *ssl_getcert(void);
SSL_CTX *get_ssl_ctx(void);
void init_ssl(void);
#endif
-void * basic_test_setup(const struct testcase_t *testcase);
-int basic_test_cleanup(const struct testcase_t *testcase, void *ptr);
-
#ifdef __cplusplus
}
#endif
diff --git a/test/regress_buffer.c b/test/regress_buffer.c
index 8ac4b6e..1af75f5 100644
--- a/test/regress_buffer.c
+++ b/test/regress_buffer.c
@@ -63,8 +63,6 @@
#include "regress.h"
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
-
/* Validates that an evbuffer is good. Returns false if it isn't, true if it
* is*/
static int
@@ -296,39 +294,33 @@ no_cleanup(const void *data, size_t datalen, void *extra)
static void
test_evbuffer_remove_buffer_with_empty(void *ptr)
{
- struct evbuffer *src = evbuffer_new();
- struct evbuffer *dst = evbuffer_new();
- char buf[2] = { 'A', 'A' };
+ struct evbuffer *src = evbuffer_new();
+ struct evbuffer *dst = evbuffer_new();
+ char buf[2];
- evbuffer_validate(src);
- evbuffer_validate(dst);
-
- /* setup the buffers */
- /* we need more data in src than we will move later */
- evbuffer_add_reference(src, buf, sizeof(buf), no_cleanup, NULL);
- evbuffer_add_reference(src, buf, sizeof(buf), no_cleanup, NULL);
- /* we need one buffer in dst and one empty buffer at the end */
- evbuffer_add(dst, buf, sizeof(buf));
- evbuffer_add_reference(dst, buf, 0, no_cleanup, NULL);
-
- evbuffer_validate(src);
- evbuffer_validate(dst);
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
- tt_mem_op(evbuffer_pullup(src, -1), ==, "AAAA", 4);
- tt_mem_op(evbuffer_pullup(dst, -1), ==, "AA", 2);
+ /* setup the buffers */
+ /* we need more data in src than we will move later */
+ evbuffer_add_reference(src, buf, sizeof(buf), no_cleanup, NULL);
+ evbuffer_add_reference(src, buf, sizeof(buf), no_cleanup, NULL);
+ /* we need one buffer in dst and one empty buffer at the end */
+ evbuffer_add(dst, buf, sizeof(buf));
+ evbuffer_add_reference(dst, buf, 0, no_cleanup, NULL);
- /* move three bytes over */
- evbuffer_remove_buffer(src, dst, 3);
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
- evbuffer_validate(src);
- evbuffer_validate(dst);
+ /* move three bytes over */
+ evbuffer_remove_buffer(src, dst, 3);
- tt_mem_op(evbuffer_pullup(src, -1), ==, "A", 1);
- tt_mem_op(evbuffer_pullup(dst, -1), ==, "AAAAA", 5);
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
- end:
- evbuffer_free(src);
- evbuffer_free(dst);
+end:
+ evbuffer_free(src);
+ evbuffer_free(dst);
}
static void
@@ -358,9 +350,6 @@ test_evbuffer_remove_buffer_with_empty2(void *ptr)
evbuffer_validate(src);
evbuffer_validate(dst);
- tt_mem_op(evbuffer_pullup(src, -1), ==, "foofoofoo", 9);
- tt_mem_op(evbuffer_pullup(dst, -1), ==, "foofoofoo", 9);
-
evbuffer_remove_buffer(src, dst, 8);
evbuffer_validate(src);
@@ -369,9 +358,6 @@ test_evbuffer_remove_buffer_with_empty2(void *ptr)
tt_int_op(evbuffer_get_length(src), ==, 1);
tt_int_op(evbuffer_get_length(dst), ==, 17);
- tt_mem_op(evbuffer_pullup(src, -1), ==, "o", 1);
- tt_mem_op(evbuffer_pullup(dst, -1), ==, "foofoofoofoofoofo", 17);
-
end:
evbuffer_free(src);
evbuffer_free(dst);
@@ -405,9 +391,6 @@ test_evbuffer_remove_buffer_with_empty3(void *ptr)
evbuffer_validate(src);
evbuffer_validate(dst);
- tt_mem_op(evbuffer_pullup(src, -1), ==, "foofoo", 6);
- tt_mem_op(evbuffer_pullup(dst, -1), ==, "foofoo", 6);
-
evbuffer_remove_buffer(src, dst, 5);
evbuffer_validate(src);
@@ -416,9 +399,6 @@ test_evbuffer_remove_buffer_with_empty3(void *ptr)
tt_int_op(evbuffer_get_length(src), ==, 1);
tt_int_op(evbuffer_get_length(dst), ==, 11);
- tt_mem_op(evbuffer_pullup(src, -1), ==, "o", 1);
- tt_mem_op(evbuffer_pullup(dst, -1), ==, "foofoofoofo", 11);
-
end:
evbuffer_free(src);
evbuffer_free(dst);
@@ -426,89 +406,6 @@ test_evbuffer_remove_buffer_with_empty3(void *ptr)
}
static void
-test_evbuffer_remove_buffer_with_empty_front(void *ptr)
-{
- struct evbuffer *buf1 = NULL, *buf2 = NULL;
-
- buf1 = evbuffer_new();
- tt_assert(buf1);
-
- buf2 = evbuffer_new();
- tt_assert(buf2);
-
- tt_int_op(evbuffer_add_reference(buf1, "foo", 3, NULL, NULL), ==, 0);
- tt_int_op(evbuffer_prepend(buf1, "", 0), ==, 0);
- tt_int_op(evbuffer_remove_buffer(buf1, buf2, 1), ==, 1);
- tt_int_op(evbuffer_add(buf1, "bar", 3), ==, 0);
- tt_mem_op(evbuffer_pullup(buf1, -1), ==, "oobar", 5);
-
- evbuffer_validate(buf1);
- evbuffer_validate(buf2);
-
- end:
- if (buf1)
- evbuffer_free(buf1);
- if (buf2)
- evbuffer_free(buf2);
-}
-
-static void
-test_evbuffer_remove_buffer_adjust_last_with_datap_with_empty(void *ptr)
-{
- struct evbuffer *buf1 = NULL, *buf2 = NULL;
-
- buf1 = evbuffer_new();
- tt_assert(buf1);
-
- buf2 = evbuffer_new();
- tt_assert(buf2);
-
- tt_int_op(evbuffer_add(buf1, "aaaaaa", 6), ==, 0);
-
- // buf1: aaaaaab
- // buf2:
- {
- struct evbuffer_iovec iovecs[2];
- /** we want two chains, to leave one chain empty */
- tt_int_op(evbuffer_reserve_space(buf1, 971, iovecs, 2), ==, 2);
- tt_int_op(iovecs[0].iov_len, >=, 1);
- tt_int_op(iovecs[1].iov_len, >=, 1);
- tt_assert(*(char *)(iovecs[0].iov_base) = 'b');
- tt_assert(iovecs[0].iov_len = 1);
- tt_int_op(evbuffer_commit_space(buf1, iovecs, 1), ==, 0);
- }
-
- // buf1: aaaaaab
- // buf2: dddcc
- tt_int_op(evbuffer_add(buf2, "cc", 2), ==, 0);
- tt_int_op(evbuffer_prepend(buf2, "ddd", 3), ==, 0);
-
- // buf1:
- // buf2: aaaaaabdddcc
- tt_int_op(evbuffer_prepend_buffer(buf2, buf1), ==, 0);
-
- // buf1: aaaaaabdddcc
- // buf2:
- tt_int_op(evbuffer_add_buffer(buf1, buf2), ==, 0);
-
- // buf1: c
- // buf2: aaaaaabdddc
- tt_int_op(evbuffer_remove_buffer(buf1, buf2, 11), ==, 11);
-
- // This fails today, we observe "aaaaaabcddd" instead!
- tt_mem_op(evbuffer_pullup(buf2, -1), ==, "aaaaaabdddc", 11);
-
- evbuffer_validate(buf1);
- evbuffer_validate(buf2);
-
- end:
- if (buf1)
- evbuffer_free(buf1);
- if (buf2)
- evbuffer_free(buf2);
-}
-
-static void
test_evbuffer_add_buffer_with_empty(void *ptr)
{
struct evbuffer *src = evbuffer_new();
@@ -738,63 +635,6 @@ end:
}
static void
-test_evbuffer_reserve_with_empty(void *ptr)
-{
- struct evbuffer *buf;
- struct evbuffer_iovec v[2];
-
- tt_assert(buf = evbuffer_new());
- evbuffer_add(buf, "a", 1);
- tt_int_op(evbuffer_reserve_space(buf, 1<<12, v, 2), ==, 2);
- v[0].iov_len = 1;
- *(char *)v[0].iov_base = 'b';
- tt_int_op(evbuffer_commit_space(buf, v, 1), ==, 0);
- evbuffer_add(buf, "c", 1);
- tt_mem_op(evbuffer_pullup(buf, -1), ==, "abc", 2);
-
- evbuffer_validate(buf);
-
- end:
- if (buf)
- evbuffer_free(buf);
-}
-
-/* regression for evbuffer_expand_fast_() with invalid last_with_datap that has
- * been left after evbuffer_prepend() with empty chain in it */
-static void
-test_evbuffer_reserve_invalid_last_with_datap(void *ptr)
-{
- struct evbuffer *buf = NULL;
- struct evbuffer_iovec vec[2];
- const int nvec = ARRAY_SIZE(vec);
- int i, avec;
-
- buf = evbuffer_new();
- tt_assert(buf);
-
- /* prepend with an empty chain */
- evbuffer_add_reference(buf, "", 0, NULL, NULL);
- evbuffer_prepend(buf, "foo", 3);
- /* after invalid last_with_datap will create new chain */
- evbuffer_add(buf, "", 0);
- /* we need to create at least 2 "used" (in evbuffer_expand_fast_()) chains */
- tt_int_op(avec = evbuffer_reserve_space(buf, 1<<12, vec, nvec), >=, 1);
- for (i = 0; i < avec; ++i)
- vec[i].iov_len = 0;
- tt_int_op(evbuffer_commit_space(buf, vec, avec), ==, 0);
-
- /* and an actual problem, that triggers an assert(chain == buf->first) in
- * evbuffer_expand_fast_() */
- tt_int_op(evbuffer_reserve_space(buf, 1<<13, vec, nvec), >=, 1);
-
- evbuffer_validate(buf);
-
-end:
- if (buf)
- evbuffer_free(buf);
-}
-
-static void
test_evbuffer_expand(void *ptr)
{
char data[4096];
@@ -1956,12 +1796,12 @@ test_evbuffer_callbacks(void *ptr)
tt_assert(cb1 != NULL);
cb2 = evbuffer_add_cb(buf, log_change_callback, buf_out2);
tt_assert(cb2 != NULL);
- tt_int_op(evbuffer_setcb(buf, self_draining_callback, NULL), ==, 0);
+ evbuffer_setcb(buf, self_draining_callback, NULL);
evbuffer_add_printf(buf, "This should get drained right away.");
tt_uint_op(evbuffer_get_length(buf), ==, 0);
tt_uint_op(evbuffer_get_length(buf_out1), ==, 0);
tt_uint_op(evbuffer_get_length(buf_out2), ==, 0);
- tt_int_op(evbuffer_setcb(buf, NULL, NULL), ==, 0);
+ evbuffer_setcb(buf, NULL, NULL);
evbuffer_add_printf(buf, "This will not.");
tt_str_op((const char *) evbuffer_pullup(buf, -1), ==, "This will not.");
evbuffer_validate(buf);
@@ -1987,14 +1827,6 @@ test_evbuffer_callbacks(void *ptr)
"0->15; 15->11; 11->0; ");
#endif
- /* the next call to readline should fail */
-#ifndef EVENT__DISABLE_MM_REPLACEMENT
- event_set_mem_functions(failing_malloc, realloc, free);
- tt_int_op(evbuffer_setcb(buf, self_draining_callback, NULL), ==, -1);
- evbuffer_validate(buf);
- event_set_mem_functions(malloc, realloc, free);
-#endif
-
end:
if (buf)
evbuffer_free(buf);
@@ -2286,58 +2118,6 @@ end:
}
static void
-test_evbuffer_empty_reference_prepend(void *ptr)
-{
- struct evbuffer *buf = NULL;
-
- buf = evbuffer_new();
- tt_assert(buf);
-
- /** empty chain could leave invalid last_with_datap */
- evbuffer_add_reference(buf, "", 0, NULL, NULL);
- evbuffer_validate(buf);
- evbuffer_prepend(buf, "foo", 3);
-
- evbuffer_validate(buf);
- tt_assert(!strncmp((char *)evbuffer_pullup(buf, -1), "foo", 3));
- evbuffer_validate(buf);
-
-end:
- if (buf)
- evbuffer_free(buf);
-}
-static void
-test_evbuffer_empty_reference_prepend_buffer(void *ptr)
-{
- struct evbuffer *buf1 = NULL, *buf2 = NULL;
-
- buf1 = evbuffer_new();
- tt_assert(buf1);
- buf2 = evbuffer_new();
- tt_assert(buf2);
-
- /** empty chain could leave invalid last_with_datap */
- evbuffer_add_reference(buf1, "", 0, NULL, NULL);
- evbuffer_validate(buf1);
- evbuffer_add(buf2, "foo", 3);
- evbuffer_validate(buf2);
- evbuffer_prepend_buffer(buf2, buf1);
- evbuffer_validate(buf2);
-
- tt_assert(!strncmp((char *)evbuffer_pullup(buf2, -1), "foo", 3));
- evbuffer_validate(buf2);
-
- tt_assert(!strncmp((char *)evbuffer_pullup(buf1, -1), "", 0));
- evbuffer_validate(buf2);
-
-end:
- if (buf1)
- evbuffer_free(buf1);
- if (buf2)
- evbuffer_free(buf2);
-}
-
-static void
test_evbuffer_peek_first_gt(void *info)
{
struct evbuffer *buf = NULL, *tmp_buf = NULL;
@@ -2724,17 +2504,12 @@ struct testcase_t evbuffer_testcases[] = {
{ "remove_buffer_with_empty", test_evbuffer_remove_buffer_with_empty, 0, NULL, NULL },
{ "remove_buffer_with_empty2", test_evbuffer_remove_buffer_with_empty2, 0, NULL, NULL },
{ "remove_buffer_with_empty3", test_evbuffer_remove_buffer_with_empty3, 0, NULL, NULL },
- { "remove_buffer_with_empty_front", test_evbuffer_remove_buffer_with_empty_front, 0, NULL, NULL },
- { "remove_buffer_adjust_last_with_datap_with_empty",
- test_evbuffer_remove_buffer_adjust_last_with_datap_with_empty, 0, NULL, NULL },
{ "add_buffer_with_empty", test_evbuffer_add_buffer_with_empty, 0, NULL, NULL },
{ "add_buffer_with_empty2", test_evbuffer_add_buffer_with_empty2, 0, NULL, NULL },
{ "reserve2", test_evbuffer_reserve2, 0, NULL, NULL },
{ "reserve_many", test_evbuffer_reserve_many, 0, NULL, NULL },
{ "reserve_many2", test_evbuffer_reserve_many, 0, &nil_setup, (void*)"add" },
{ "reserve_many3", test_evbuffer_reserve_many, 0, &nil_setup, (void*)"fill" },
- { "reserve_with_empty", test_evbuffer_reserve_with_empty, 0, NULL, NULL },
- { "reserve_invalid_last_with_datap", test_evbuffer_reserve_invalid_last_with_datap, TT_FORK, NULL, NULL },
{ "expand", test_evbuffer_expand, 0, NULL, NULL },
{ "expand_overflow", test_evbuffer_expand_overflow, 0, NULL, NULL },
{ "add1", test_evbuffer_add1, 0, NULL, NULL },
@@ -2752,8 +2527,6 @@ struct testcase_t evbuffer_testcases[] = {
{ "multicast", test_evbuffer_multicast, 0, NULL, NULL },
{ "multicast_drain", test_evbuffer_multicast_drain, 0, NULL, NULL },
{ "prepend", test_evbuffer_prepend, TT_FORK, NULL, NULL },
- { "empty_reference_prepend", test_evbuffer_empty_reference_prepend, TT_FORK, NULL, NULL },
- { "empty_reference_prepend_buffer", test_evbuffer_empty_reference_prepend_buffer, TT_FORK, NULL, NULL },
{ "peek", test_evbuffer_peek, 0, NULL, NULL },
{ "peek_first_gt", test_evbuffer_peek_first_gt, 0, NULL, NULL },
{ "freeze_start", test_evbuffer_freeze, 0, &nil_setup, (void*)"start" },
diff --git a/test/regress_bufferevent.c b/test/regress_bufferevent.c
index d4208c2..249985e 100644
--- a/test/regress_bufferevent.c
+++ b/test/regress_bufferevent.c
@@ -137,14 +137,14 @@ test_bufferevent_impl(int use_pair, int flush)
bev2 = pair[1];
bufferevent_setcb(bev1, readcb, writecb, errorcb, bev1);
bufferevent_setcb(bev2, readcb, writecb, errorcb, NULL);
- tt_fd_op(bufferevent_getfd(bev1), ==, EVUTIL_INVALID_SOCKET);
+ tt_int_op(bufferevent_getfd(bev1), ==, -1);
tt_ptr_op(bufferevent_get_underlying(bev1), ==, NULL);
tt_ptr_op(bufferevent_pair_get_partner(bev1), ==, bev2);
tt_ptr_op(bufferevent_pair_get_partner(bev2), ==, bev1);
} else {
bev1 = bufferevent_new(pair[0], readcb, writecb, errorcb, NULL);
bev2 = bufferevent_new(pair[1], readcb, writecb, errorcb, NULL);
- tt_fd_op(bufferevent_getfd(bev1), ==, pair[0]);
+ tt_int_op(bufferevent_getfd(bev1), ==, pair[0]);
tt_ptr_op(bufferevent_get_underlying(bev1), ==, NULL);
tt_ptr_op(bufferevent_pair_get_partner(bev1), ==, NULL);
tt_ptr_op(bufferevent_pair_get_partner(bev2), ==, NULL);
@@ -569,8 +569,8 @@ test_bufferevent_filters_impl(int use_pair, int disable)
tt_ptr_op(bufferevent_get_underlying(bev1), ==, bev1_base);
tt_ptr_op(bufferevent_get_underlying(bev2), ==, bev2_base);
- tt_fd_op(bufferevent_getfd(bev1), ==, bufferevent_getfd(bev1_base));
- tt_fd_op(bufferevent_getfd(bev2), ==, bufferevent_getfd(bev2_base));
+ tt_int_op(bufferevent_getfd(bev1), ==, -1);
+ tt_int_op(bufferevent_getfd(bev2), ==, -1);
bufferevent_disable(bev1, EV_READ);
bufferevent_enable(bev2, EV_READ);
@@ -640,7 +640,7 @@ end:
;
}
-static evutil_socket_t
+static int
fake_listener_create(struct sockaddr_in *localhost)
{
struct sockaddr *sa = (struct sockaddr *)localhost;
@@ -908,24 +908,18 @@ struct timeout_cb_result {
struct timeval read_timeout_at;
struct timeval write_timeout_at;
struct timeval last_wrote_at;
- struct timeval last_read_at;
int n_read_timeouts;
int n_write_timeouts;
int total_calls;
};
static void
-bev_timeout_read_cb(struct bufferevent *bev, void *arg)
-{
- struct timeout_cb_result *res = arg;
- evutil_gettimeofday(&res->last_read_at, NULL);
-}
-static void
bev_timeout_write_cb(struct bufferevent *bev, void *arg)
{
struct timeout_cb_result *res = arg;
evutil_gettimeofday(&res->last_wrote_at, NULL);
}
+
static void
bev_timeout_event_cb(struct bufferevent *bev, short what, void *arg)
{
@@ -953,6 +947,7 @@ test_bufferevent_timeouts(void *arg)
int use_pair = 0, use_filter = 0;
struct timeval tv_w, tv_r, started_at;
struct timeout_cb_result res1, res2;
+ char buf[1024];
memset(&res1, 0, sizeof(res1));
memset(&res2, 0, sizeof(res2));
@@ -971,6 +966,7 @@ test_bufferevent_timeouts(void *arg)
bev1 = bufferevent_socket_new(data->base, data->pair[0], 0);
bev2 = bufferevent_socket_new(data->base, data->pair[1], 0);
}
+
tt_assert(bev1);
tt_assert(bev2);
@@ -994,14 +990,30 @@ test_bufferevent_timeouts(void *arg)
tv_w.tv_sec = tv_r.tv_sec = 0;
tv_w.tv_usec = 100*1000;
tv_r.tv_usec = 150*1000;
- bufferevent_setcb(bev1, bev_timeout_read_cb, bev_timeout_write_cb,
+ bufferevent_setcb(bev1, NULL, bev_timeout_write_cb,
bev_timeout_event_cb, &res1);
+ bufferevent_setwatermark(bev1, EV_WRITE, 1024*1024+10, 0);
bufferevent_set_timeouts(bev1, &tv_r, &tv_w);
- bufferevent_write(bev1, "ABCDEFG", 7);
+ if (use_pair) {
+ /* For a pair, the fact that the other side isn't reading
+ * makes the writer stall */
+ bufferevent_write(bev1, "ABCDEFG", 7);
+ } else {
+ /* For a real socket, the kernel's TCP buffers can eat a
+ * fair number of bytes; make sure that at some point we
+ * have some bytes that will stall. */
+ struct evbuffer *output = bufferevent_get_output(bev1);
+ int i;
+ memset(buf, 0xbb, sizeof(buf));
+ for (i=0;i<1024;++i) {
+ evbuffer_add_reference(output, buf, sizeof(buf),
+ NULL, NULL);
+ }
+ }
bufferevent_enable(bev1, EV_READ|EV_WRITE);
/* bev2 has nothing to say, and isn't listening. */
- bufferevent_setcb(bev2, bev_timeout_read_cb, bev_timeout_write_cb,
+ bufferevent_setcb(bev2, NULL, bev_timeout_write_cb,
bev_timeout_event_cb, &res2);
tv_w.tv_sec = tv_r.tv_sec = 0;
tv_w.tv_usec = 200*1000;
@@ -1018,26 +1030,15 @@ test_bufferevent_timeouts(void *arg)
/* XXXX Test that actually reading or writing a little resets the
* timeouts. */
- tt_want(res1.total_calls == 2);
+ /* Each buf1 timeout happens, and happens only once. */
+ tt_want(res1.n_read_timeouts);
+ tt_want(res1.n_write_timeouts);
tt_want(res1.n_read_timeouts == 1);
tt_want(res1.n_write_timeouts == 1);
- tt_want(res2.total_calls == !(use_pair && !use_filter));
- tt_want(res2.n_write_timeouts == !(use_pair && !use_filter));
- tt_want(!res2.n_read_timeouts);
test_timeval_diff_eq(&started_at, &res1.read_timeout_at, 150);
test_timeval_diff_eq(&started_at, &res1.write_timeout_at, 100);
-#define tt_assert_timeval_empty(tv) do { \
- tt_int_op((tv).tv_sec, ==, 0); \
- tt_int_op((tv).tv_usec, ==, 0); \
-} while(0)
- tt_assert_timeval_empty(res1.last_read_at);
- tt_assert_timeval_empty(res2.last_read_at);
- tt_assert_timeval_empty(res2.last_wrote_at);
- tt_assert_timeval_empty(res2.last_wrote_at);
-#undef tt_assert_timeval_empty
-
end:
if (bev1)
bufferevent_free(bev1);
@@ -1338,7 +1339,7 @@ struct testcase_t bufferevent_testcases[] = {
LEGACY(bufferevent_pair_flush_finished, TT_ISOLATED),
#if defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED)
{ "bufferevent_pair_release_lock", test_bufferevent_pair_release_lock,
- TT_FORK|TT_ISOLATED|TT_NEED_THREADS|TT_NEED_BASE|TT_LEGACY|TT_NO_LOGS,
+ TT_FORK|TT_ISOLATED|TT_NEED_THREADS|TT_NEED_BASE|TT_LEGACY,
&basic_setup, NULL },
#endif
LEGACY(bufferevent_watermarks, TT_ISOLATED),
@@ -1362,7 +1363,7 @@ struct testcase_t bufferevent_testcases[] = {
{ "bufferevent_connect_fail", test_bufferevent_connect_fail,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "bufferevent_timeout", test_bufferevent_timeouts,
- TT_FORK|TT_NEED_BASE, &basic_setup, (void*)"" },
+ TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR, &basic_setup, (void*)"" },
{ "bufferevent_timeout_pair", test_bufferevent_timeouts,
TT_FORK|TT_NEED_BASE, &basic_setup, (void*)"pair" },
{ "bufferevent_timeout_filter", test_bufferevent_timeouts,
@@ -1405,35 +1406,38 @@ struct testcase_t bufferevent_testcases[] = {
END_OF_TESTCASES,
};
-#define TT_IOCP (TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP)
-#define TT_IOCP_LEGACY (TT_ISOLATED|TT_ENABLE_IOCP)
struct testcase_t bufferevent_iocp_testcases[] = {
- LEGACY(bufferevent, TT_IOCP_LEGACY),
+
+ LEGACY(bufferevent, TT_ISOLATED|TT_ENABLE_IOCP),
LEGACY(bufferevent_flush_normal, TT_ISOLATED),
LEGACY(bufferevent_flush_flush, TT_ISOLATED),
LEGACY(bufferevent_flush_finished, TT_ISOLATED),
- LEGACY(bufferevent_watermarks, TT_IOCP_LEGACY),
- LEGACY(bufferevent_filters, TT_IOCP_LEGACY),
- LEGACY(bufferevent_filters_disable, TT_IOCP_LEGACY),
-
+ LEGACY(bufferevent_watermarks, TT_ISOLATED|TT_ENABLE_IOCP),
+ LEGACY(bufferevent_filters, TT_ISOLATED|TT_ENABLE_IOCP),
+ LEGACY(bufferevent_filters_disable, TT_ISOLATED|TT_ENABLE_IOCP),
{ "bufferevent_connect", test_bufferevent_connect,
- TT_IOCP, &basic_setup, (void*)"" },
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, (void*)"" },
{ "bufferevent_connect_defer", test_bufferevent_connect,
- TT_IOCP, &basic_setup, (void*)"defer" },
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, (void*)"defer" },
{ "bufferevent_connect_lock", test_bufferevent_connect,
- TT_IOCP, &basic_setup, (void*)"lock" },
+ TT_FORK|TT_NEED_BASE|TT_NEED_THREADS|TT_ENABLE_IOCP, &basic_setup,
+ (void*)"lock" },
{ "bufferevent_connect_lock_defer", test_bufferevent_connect,
- TT_IOCP, &basic_setup, (void*)"defer lock" },
+ TT_FORK|TT_NEED_BASE|TT_NEED_THREADS|TT_ENABLE_IOCP, &basic_setup,
+ (void*)"defer lock" },
{ "bufferevent_connect_fail", test_bufferevent_connect_fail,
- TT_IOCP, &basic_setup, NULL },
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, NULL },
{ "bufferevent_connect_nonblocking", test_bufferevent_connect,
- TT_IOCP, &basic_setup, (void*)"unset_connectex" },
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup,
+ (void*)"unset_connectex" },
{ "bufferevent_connect_fail_eventcb_defer",
test_bufferevent_connect_fail_eventcb,
- TT_IOCP, &basic_setup, (void*)BEV_OPT_DEFER_CALLBACKS },
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup,
+ (void*)BEV_OPT_DEFER_CALLBACKS },
{ "bufferevent_connect_fail_eventcb",
- test_bufferevent_connect_fail_eventcb, TT_IOCP, &basic_setup, NULL },
+ test_bufferevent_connect_fail_eventcb,
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, NULL },
END_OF_TESTCASES,
};
diff --git a/test/regress_dns.c b/test/regress_dns.c
index d2084b7..8950440 100644
--- a/test/regress_dns.c
+++ b/test/regress_dns.c
@@ -59,10 +59,6 @@
#include <string.h>
#include <errno.h>
-#ifdef EVENT__HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-
#include "event2/dns.h"
#include "event2/dns_compat.h"
#include "event2/dns_struct.h"
@@ -72,12 +68,9 @@
#include "event2/util.h"
#include "event2/listener.h"
#include "event2/bufferevent.h"
-#include <event2/thread.h>
#include "log-internal.h"
-#include "evthread-internal.h"
#include "regress.h"
#include "regress_testutils.h"
-#include "regress_thread.h"
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
@@ -204,7 +197,7 @@ dns_resolve_reverse(void *ptr)
{
struct in_addr in;
struct event_base *base = event_base_new();
- struct evdns_base *dns = evdns_base_new(base, EVDNS_BASE_INITIALIZE_NAMESERVERS);
+ struct evdns_base *dns = evdns_base_new(base, 1/* init name servers */);
struct evdns_request *req = NULL;
tt_assert(base);
@@ -619,8 +612,16 @@ end:
if (dns)
evdns_base_free(dns, 0);
}
-static void dns_search_test(void *arg) { dns_search_test_impl(arg, 0); }
-static void dns_search_lower_test(void *arg) { dns_search_test_impl(arg, 1); }
+static void
+dns_search_test(void *arg)
+{
+ return dns_search_test_impl(arg, 0);
+}
+static void
+dns_search_lower_test(void *arg)
+{
+ return dns_search_test_impl(arg, 1);
+}
static int request_count = 0;
static struct evdns_request *current_req = NULL;
@@ -1004,59 +1005,6 @@ end:
event_base_free(inactive_base);
}
-static void
-dns_initialize_nameservers_test(void *arg)
-{
- struct basic_test_data *data = arg;
- struct event_base *base = data->base;
- struct evdns_base *dns = NULL;
-
- dns = evdns_base_new(base, 0);
- tt_assert(dns);
- tt_int_op(evdns_base_get_nameserver_addr(dns, 0, NULL, 0), ==, -1);
- evdns_base_free(dns, 0);
-
- dns = evdns_base_new(base, EVDNS_BASE_INITIALIZE_NAMESERVERS);
- tt_assert(dns);
- tt_int_op(evdns_base_get_nameserver_addr(dns, 0, NULL, 0), ==, sizeof(struct sockaddr));
-
-end:
- if (dns)
- evdns_base_free(dns, 0);
-}
-#ifndef _WIN32
-#define RESOLV_FILE "empty-resolv.conf"
-static void
-dns_nameservers_no_default_test(void *arg)
-{
- struct basic_test_data *data = arg;
- struct event_base *base = data->base;
- struct evdns_base *dns = NULL;
- int ok = access(RESOLV_FILE, R_OK);
-
- tt_assert(ok);
-
- dns = evdns_base_new(base, 0);
- tt_assert(dns);
- tt_int_op(evdns_base_get_nameserver_addr(dns, 0, NULL, 0), ==, -1);
-
- /* We cannot test
- * EVDNS_BASE_INITIALIZE_NAMESERVERS|EVDNS_BASE_NAMESERVERS_NO_DEFAULT
- * because we cannot mock "/etc/resolv.conf" (yet). */
-
- evdns_base_resolv_conf_parse(dns,
- DNS_OPTIONS_ALL|DNS_OPTION_NAMESERVERS_NO_DEFAULT, RESOLV_FILE);
- tt_int_op(evdns_base_get_nameserver_addr(dns, 0, NULL, 0), ==, -1);
-
- evdns_base_resolv_conf_parse(dns, DNS_OPTIONS_ALL, RESOLV_FILE);
- tt_int_op(evdns_base_get_nameserver_addr(dns, 0, NULL, 0), ==, sizeof(struct sockaddr));
-
-end:
- if (dns)
- evdns_base_free(dns, 0);
-}
-#endif
-
/* === Test for bufferevent_socket_connect_hostname */
static int total_connected_or_failed = 0;
@@ -1073,7 +1021,7 @@ be_getaddrinfo_server_cb(struct evdns_server_request *req, void *data)
int added_any=0;
++*n_got_p;
- for (i = 0; i < req->nquestions; ++i) {
+ for (i=0;i<req->nquestions;++i) {
const int qtype = req->questions[i]->type;
const int qclass = req->questions[i]->dns_question_class;
const char *qname = req->questions[i]->name;
@@ -1217,36 +1165,27 @@ static void
be_connect_hostname_event_cb(struct bufferevent *bev, short what, void *ctx)
{
struct be_conn_hostname_result *got = ctx;
-
- if (got->what) {
+ if (!got->what) {
+ TT_BLATHER(("Got a bufferevent event %d", what));
+ got->what = what;
+
+ if ((what & BEV_EVENT_CONNECTED) || (what & BEV_EVENT_ERROR)) {
+ int r;
+ if ((r = bufferevent_socket_get_dns_error(bev))) {
+ got->dnserr = r;
+ TT_BLATHER(("DNS error %d: %s", r,
+ evutil_gai_strerror(r)));
+ } ++total_connected_or_failed;
+ TT_BLATHER(("Got %d connections or errors.", total_connected_or_failed));
+
+ if (total_n_accepted >= 3 && total_connected_or_failed >= 5)
+ event_base_loopexit(be_connect_hostname_base,
+ NULL);
+ }
+ } else {
TT_FAIL(("Two events on one bufferevent. %d,%d",
got->what, (int)what));
}
-
- TT_BLATHER(("Got a bufferevent event %d", what));
- got->what = what;
-
- if ((what & BEV_EVENT_CONNECTED) || (what & BEV_EVENT_ERROR)) {
- int expected = 3;
- int r = bufferevent_socket_get_dns_error(bev);
-
- if (r) {
- got->dnserr = r;
- TT_BLATHER(("DNS error %d: %s", r,
- evutil_gai_strerror(r)));
- }
- ++total_connected_or_failed;
- TT_BLATHER(("Got %d connections or errors.", total_connected_or_failed));
-
- /** emfile test */
- if (errno == EMFILE) {
- expected = 0;
- }
-
- if (total_n_accepted >= expected && total_connected_or_failed >= 5)
- event_base_loopexit(be_connect_hostname_base,
- NULL);
- }
}
static void
@@ -1254,9 +1193,10 @@ test_bufferevent_connect_hostname(void *arg)
{
struct basic_test_data *data = arg;
struct evconnlistener *listener = NULL;
- struct bufferevent *be[5];
- struct be_conn_hostname_result be_outcome[ARRAY_SIZE(be)];
- int expect_err;
+ struct bufferevent *be1=NULL, *be2=NULL, *be3=NULL, *be4=NULL, *be5=NULL;
+ struct be_conn_hostname_result be1_outcome={0,0}, be2_outcome={0,0},
+ be3_outcome={0,0}, be4_outcome={0,0}, be5_outcome={0,0};
+ int expect_err5;
struct evdns_base *dns=NULL;
struct evdns_server_port *port=NULL;
struct sockaddr_in sin;
@@ -1264,27 +1204,6 @@ test_bufferevent_connect_hostname(void *arg)
ev_uint16_t dns_port=0;
int n_accept=0, n_dns=0;
char buf[128];
- int emfile = data->setup_data && !strcmp(data->setup_data, "emfile");
- int success = BEV_EVENT_CONNECTED;
- int default_error = 0;
- unsigned i;
- int ret;
-
- if (emfile) {
- success = BEV_EVENT_ERROR;
-#if defined(__linux__)
- /* on linux glibc/musl reports EAI_SYSTEM, when getaddrinfo() cannot
- * open file for resolving service. */
- default_error = EVUTIL_EAI_SYSTEM;
-#elif defined(__sun__)
- /* on solaris it returns EAI_FAIL */
- default_error = EVUTIL_EAI_FAIL;
- /** the DP_POLL can also fail with EINVAL under EMFILE */
-#else
- /* on osx/freebsd it returns EAI_NONAME */
- default_error = EVUTIL_EAI_NONAME;
-#endif
- }
be_connect_hostname_base = data->base;
@@ -1311,34 +1230,32 @@ test_bufferevent_connect_hostname(void *arg)
evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)dns_port);
evdns_base_nameserver_ip_add(dns, buf);
-#ifdef EVENT__HAVE_SETRLIMIT
- if (emfile) {
- int fd = socket(AF_INET, SOCK_STREAM, 0);
- struct rlimit file = { fd, fd };
-
- tt_int_op(fd, >=, 0);
- tt_assert(!close(fd));
-
- tt_assert(!setrlimit(RLIMIT_NOFILE, &file));
- }
-#endif
-
/* Now, finally, at long last, launch the bufferevents. One should do
* a failing lookup IP, one should do a successful lookup by IP,
* and one should do a successful lookup by hostname. */
- for (i = 0; i < ARRAY_SIZE(be); ++i) {
- memset(&be_outcome[i], 0, sizeof(be_outcome[i]));
- be[i] = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
- bufferevent_setcb(be[i], NULL, NULL, be_connect_hostname_event_cb,
- &be_outcome[i]);
- }
+ be1 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+ be2 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+ be3 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+ be4 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+ be5 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+
+ bufferevent_setcb(be1, NULL, NULL, be_connect_hostname_event_cb,
+ &be1_outcome);
+ bufferevent_setcb(be2, NULL, NULL, be_connect_hostname_event_cb,
+ &be2_outcome);
+ bufferevent_setcb(be3, NULL, NULL, be_connect_hostname_event_cb,
+ &be3_outcome);
+ bufferevent_setcb(be4, NULL, NULL, be_connect_hostname_event_cb,
+ &be4_outcome);
+ bufferevent_setcb(be5, NULL, NULL, be_connect_hostname_event_cb,
+ &be5_outcome);
/* Use the blocking resolver. This one will fail if your resolver
* can't resolve localhost to 127.0.0.1 */
- tt_assert(!bufferevent_socket_connect_hostname(be[3], NULL, AF_INET,
+ tt_assert(!bufferevent_socket_connect_hostname(be4, NULL, AF_INET,
"localhost", listener_port));
/* Use the blocking resolver with a nonexistent hostname. */
- tt_assert(!bufferevent_socket_connect_hostname(be[4], NULL, AF_INET,
+ tt_assert(!bufferevent_socket_connect_hostname(be5, NULL, AF_INET,
"nonesuch.nowhere.example.com", 80));
{
/* The blocking resolver will use the system nameserver, which
@@ -1349,49 +1266,35 @@ test_bufferevent_connect_hostname(void *arg)
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
- expect_err = evutil_getaddrinfo(
+ expect_err5 = evutil_getaddrinfo(
"nonesuch.nowhere.example.com", "80", &hints, &ai);
}
/* Launch an async resolve that will fail. */
- tt_assert(!bufferevent_socket_connect_hostname(be[0], dns, AF_INET,
+ tt_assert(!bufferevent_socket_connect_hostname(be1, dns, AF_INET,
"nosuchplace.example.com", listener_port));
/* Connect to the IP without resolving. */
- tt_assert(!bufferevent_socket_connect_hostname(be[1], dns, AF_INET,
+ tt_assert(!bufferevent_socket_connect_hostname(be2, dns, AF_INET,
"127.0.0.1", listener_port));
/* Launch an async resolve that will succeed. */
- tt_assert(!bufferevent_socket_connect_hostname(be[2], dns, AF_INET,
+ tt_assert(!bufferevent_socket_connect_hostname(be3, dns, AF_INET,
"nobodaddy.example.com", listener_port));
- ret = event_base_dispatch(data->base);
-#ifdef __sun__
- if (emfile && !strcmp(event_base_get_method(data->base), "devpoll")) {
- tt_int_op(ret, ==, -1);
- /** DP_POLL failed */
- tt_skip();
- } else
-#endif
- {
- tt_int_op(ret, ==, 0);
- }
+ event_base_dispatch(data->base);
- tt_int_op(be_outcome[0].what, ==, BEV_EVENT_ERROR);
- tt_int_op(be_outcome[0].dnserr, ==, EVUTIL_EAI_NONAME);
- tt_int_op(be_outcome[1].what, ==, success);
- tt_int_op(be_outcome[1].dnserr, ==, 0);
- tt_int_op(be_outcome[2].what, ==, success);
- tt_int_op(be_outcome[2].dnserr, ==, 0);
- tt_int_op(be_outcome[3].what, ==, success);
- tt_int_op(be_outcome[3].dnserr, ==, default_error);
- if (expect_err) {
- tt_int_op(be_outcome[4].what, ==, BEV_EVENT_ERROR);
- tt_int_op(be_outcome[4].dnserr, ==, expect_err);
+ tt_int_op(be1_outcome.what, ==, BEV_EVENT_ERROR);
+ tt_int_op(be1_outcome.dnserr, ==, EVUTIL_EAI_NONAME);
+ tt_int_op(be2_outcome.what, ==, BEV_EVENT_CONNECTED);
+ tt_int_op(be2_outcome.dnserr, ==, 0);
+ tt_int_op(be3_outcome.what, ==, BEV_EVENT_CONNECTED);
+ tt_int_op(be3_outcome.dnserr, ==, 0);
+ tt_int_op(be4_outcome.what, ==, BEV_EVENT_CONNECTED);
+ tt_int_op(be4_outcome.dnserr, ==, 0);
+ if (expect_err5) {
+ tt_int_op(be5_outcome.what, ==, BEV_EVENT_ERROR);
+ tt_int_op(be5_outcome.dnserr, ==, expect_err5);
}
- if (emfile) {
- tt_int_op(n_accept, ==, 0);
- } else {
- tt_int_op(n_accept, ==, 3);
- }
+ tt_int_op(n_accept, ==, 3);
tt_int_op(n_dns, ==, 2);
end:
@@ -1401,10 +1304,16 @@ end:
evdns_close_server_port(port);
if (dns)
evdns_base_free(dns, 0);
- for (i = 0; i < ARRAY_SIZE(be); ++i) {
- if (be[i])
- bufferevent_free(be[i]);
- }
+ if (be1)
+ bufferevent_free(be1);
+ if (be2)
+ bufferevent_free(be2);
+ if (be3)
+ bufferevent_free(be3);
+ if (be4)
+ bufferevent_free(be4);
+ if (be5)
+ bufferevent_free(be5);
}
@@ -1443,7 +1352,7 @@ test_getaddrinfo_async(void *arg)
struct evutil_addrinfo hints, *a;
struct gai_outcome local_outcome;
struct gai_outcome a_out[12];
- unsigned i;
+ int i;
struct evdns_getaddrinfo_request *r;
char buf[128];
struct evdns_server_port *port = NULL;
@@ -1801,7 +1710,7 @@ test_getaddrinfo_async(void *arg)
end:
if (local_outcome.ai)
evutil_freeaddrinfo(local_outcome.ai);
- for (i = 0; i < ARRAY_SIZE(a_out); ++i) {
+ for (i=0;i<(int)ARRAY_SIZE(a_out);++i) {
if (a_out[i].ai)
evutil_freeaddrinfo(a_out[i].ai);
}
@@ -2075,7 +1984,7 @@ test_getaddrinfo_async_cancel_stress(void *ptr)
struct sockaddr_in sin;
struct sockaddr_storage ss;
ev_socklen_t slen;
- unsigned i;
+ int i;
base = event_base_new();
dns_base = evdns_base_new(base, 0);
@@ -2130,7 +2039,7 @@ dns_client_fail_requests_test(void *arg)
char buf[64];
struct generic_dns_callback_result r[20];
- unsigned i;
+ int i;
dns_port = regress_get_dnsserver(base, &portnum, NULL,
regress_dns_server_cb, reissue_table);
@@ -2187,7 +2096,7 @@ dns_client_fail_requests_getaddrinfo_test(void *arg)
tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
for (i = 0; i < 20; ++i)
- tt_assert(evdns_getaddrinfo(dns, "foof.example.com", "80", NULL, getaddrinfo_cb, &r[i]));
+ tt_assert(evdns_getaddrinfo(dns, "foof.example.com", "ssh", NULL, getaddrinfo_cb, &r[i]));
n_replies_left = 20;
exit_base = base;
@@ -2204,173 +2113,6 @@ end:
evdns_close_server_port(dns_port);
}
-#ifdef EVTHREAD_USE_PTHREADS_IMPLEMENTED
-struct race_param
-{
- void *lock;
- void *reqs_cmpl_cond;
- int bw_threads;
- void *bw_threads_exited_cond;
- volatile int stopping;
- void *base;
- void *dns;
-
- int locked;
-};
-static void *
-race_base_run(void *arg)
-{
- struct race_param *rp = (struct race_param *)arg;
- event_base_loop(rp->base, EVLOOP_NO_EXIT_ON_EMPTY);
- THREAD_RETURN();
-}
-static void *
-race_busywait_run(void *arg)
-{
- struct race_param *rp = (struct race_param *)arg;
- struct sockaddr_storage ss;
- while (!rp->stopping)
- evdns_base_get_nameserver_addr(rp->dns, 0, (struct sockaddr *)&ss, sizeof(ss));
- EVLOCK_LOCK(rp->lock, 0);
- if (--rp->bw_threads == 0)
- EVTHREAD_COND_SIGNAL(rp->bw_threads_exited_cond);
- EVLOCK_UNLOCK(rp->lock, 0);
- THREAD_RETURN();
-}
-static void
-race_gai_cb(int result, struct evutil_addrinfo *res, void *arg)
-{
- struct race_param *rp = arg;
- (void)result;
- (void)res;
-
- --n_replies_left;
- if (n_replies_left == 0) {
- EVLOCK_LOCK(rp->lock, 0);
- EVTHREAD_COND_SIGNAL(rp->reqs_cmpl_cond);
- EVLOCK_UNLOCK(rp->lock, 0);
- }
-}
-static void
-getaddrinfo_race_gotresolve_test(void *arg)
-{
- struct race_param rp;
- struct evdns_server_port *dns_port = NULL;
- ev_uint16_t portnum = 0;
- char buf[64];
- int i;
-
- // Some stress is needed to yield inside getaddrinfo between resolve_ipv4 and resolve_ipv6
- int n_reqs = 16384;
-#ifdef _SC_NPROCESSORS_ONLN
- int n_threads = sysconf(_SC_NPROCESSORS_ONLN) + 1;
-#else
- int n_threads = 17;
-#endif
- THREAD_T thread[n_threads];
- struct timeval tv;
-
- (void)arg;
-
- evthread_use_pthreads();
-
- rp.base = event_base_new();
- tt_assert(rp.base);
- if (evthread_make_base_notifiable(rp.base) < 0)
- tt_abort_msg("Couldn't make base notifiable!");
-
- dns_port = regress_get_dnsserver(rp.base, &portnum, NULL,
- regress_dns_server_cb, reissue_table);
- tt_assert(dns_port);
-
- evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
-
- rp.dns = evdns_base_new(rp.base, 0);
- tt_assert(!evdns_base_nameserver_ip_add(rp.dns, buf));
-
- n_replies_left = n_reqs;
-
- EVTHREAD_ALLOC_LOCK(rp.lock, 0);
- EVTHREAD_ALLOC_COND(rp.reqs_cmpl_cond);
- EVTHREAD_ALLOC_COND(rp.bw_threads_exited_cond);
- tt_assert(rp.lock);
- tt_assert(rp.reqs_cmpl_cond);
- tt_assert(rp.bw_threads_exited_cond);
- rp.bw_threads = 0;
- rp.stopping = 0;
-
- // Run resolver thread
- THREAD_START(thread[0], race_base_run, &rp);
- // Run busy-wait threads used to force yield this thread
- for (i = 1; i < n_threads; i++) {
- rp.bw_threads++;
- THREAD_START(thread[i], race_busywait_run, &rp);
- }
-
- EVLOCK_LOCK(rp.lock, 0);
- rp.locked = 1;
-
- for (i = 0; i < n_reqs; ++i) {
- tt_assert(evdns_getaddrinfo(rp.dns, "foof.example.com", "80", NULL, race_gai_cb, &rp));
- // This magic along with busy-wait threads make this thread yield frequently
- if (i % 100 == 0) {
- tv.tv_sec = 0;
- tv.tv_usec = 10000;
- evutil_usleep_(&tv);
- }
- }
-
- exit_base = rp.base;
-
- // Wait for some time
- tv.tv_sec = 5;
- tv.tv_usec = 0;
- EVTHREAD_COND_WAIT_TIMED(rp.reqs_cmpl_cond, rp.lock, &tv);
-
- // Stop busy-wait threads
- tv.tv_sec = 1;
- tv.tv_usec = 0;
- rp.stopping = 1;
- tt_assert(EVTHREAD_COND_WAIT_TIMED(rp.bw_threads_exited_cond, rp.lock, &tv) == 0);
-
- EVLOCK_UNLOCK(rp.lock, 0);
- rp.locked = 0;
-
- evdns_base_free(rp.dns, 1 /** fail requests */);
-
- tt_int_op(n_replies_left, ==, 0);
-
-end:
- if (rp.locked)
- EVLOCK_UNLOCK(rp.lock, 0);
- EVTHREAD_FREE_LOCK(rp.lock, 0);
- EVTHREAD_FREE_COND(rp.reqs_cmpl_cond);
- EVTHREAD_FREE_COND(rp.bw_threads_exited_cond);
- evdns_close_server_port(dns_port);
- event_base_loopbreak(rp.base);
- event_base_free(rp.base);
-}
-#endif
-
-static void
-test_set_so_rcvbuf_so_sndbuf(void *arg)
-{
- struct basic_test_data *data = arg;
- struct evdns_base *dns_base;
-
- dns_base = evdns_base_new(data->base, 0);
- tt_assert(dns_base);
-
- tt_assert(!evdns_base_set_option(dns_base, "so-rcvbuf", "10240"));
- tt_assert(!evdns_base_set_option(dns_base, "so-sndbuf", "10240"));
-
- /* actually check SO_RCVBUF/SO_SNDBUF not fails */
- tt_assert(!evdns_base_nameserver_ip_add(dns_base, "127.0.0.1"));
-
-end:
- if (dns_base)
- evdns_base_free(dns_base, 0);
-}
#define DNS_LEGACY(name, flags) \
{ #name, run_legacy_test_fn, flags|TT_LEGACY, &legacy_setup, \
@@ -2396,21 +2138,10 @@ struct testcase_t dns_testcases[] = {
{ "inflight", dns_inflight_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "bufferevent_connect_hostname", test_bufferevent_connect_hostname,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
-#ifdef EVENT__HAVE_SETRLIMIT
- { "bufferevent_connect_hostname_emfile", test_bufferevent_connect_hostname,
- TT_FORK|TT_NEED_BASE, &basic_setup, (char*)"emfile" },
-#endif
{ "disable_when_inactive", dns_disable_when_inactive_test,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "disable_when_inactive_no_ns", dns_disable_when_inactive_no_ns_test,
- TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
-
- { "initialize_nameservers", dns_initialize_nameservers_test,
- TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
-#ifndef _WIN32
- { "nameservers_no_default", dns_nameservers_no_default_test,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
-#endif
{ "getaddrinfo_async", test_getaddrinfo_async,
TT_FORK|TT_NEED_BASE, &basic_setup, (char*)"" },
@@ -2431,17 +2162,9 @@ struct testcase_t dns_testcases[] = {
#endif
{ "client_fail_requests", dns_client_fail_requests_test,
- TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "client_fail_requests_getaddrinfo",
dns_client_fail_requests_getaddrinfo_test,
- TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
-#ifdef EVTHREAD_USE_PTHREADS_IMPLEMENTED
- { "getaddrinfo_race_gotresolve",
- getaddrinfo_race_gotresolve_test,
- TT_FORK|TT_OFF_BY_DEFAULT, NULL, NULL },
-#endif
-
- { "set_SO_RCVBUF_SO_SNDBUF", test_set_so_rcvbuf_so_sndbuf,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
END_OF_TESTCASES
diff --git a/test/regress_et.c b/test/regress_et.c
index 5fa87a3..f75c59b 100644
--- a/test/regress_et.c
+++ b/test/regress_et.c
@@ -51,14 +51,6 @@
static int was_et = 0;
-static int base_supports_et(struct event_base *base)
-{
- return
- (!strcmp(event_base_get_method(base), "epoll") ||
- !strcmp(event_base_get_method(base), "epoll (with changelist)") ||
- !strcmp(event_base_get_method(base), "kqueue"));
-}
-
static void
read_cb(evutil_socket_t fd, short event, void *arg)
{
@@ -75,14 +67,19 @@ read_cb(evutil_socket_t fd, short event, void *arg)
event_del(arg);
}
+#ifdef _WIN32
+#define LOCAL_SOCKETPAIR_AF AF_INET
+#else
+#define LOCAL_SOCKETPAIR_AF AF_UNIX
+#endif
+
static void
-test_edgetriggered(void *data_)
+test_edgetriggered(void *et)
{
- struct basic_test_data *data = data_;
- struct event_base *base = data->base;
- evutil_socket_t *pair = data->pair;
struct event *ev = NULL;
+ struct event_base *base = NULL;
const char *test = "test string";
+ evutil_socket_t pair[2] = {-1,-1};
int supports_et;
/* On Linux 3.2.1 (at least, as patched by Fedora and tested by Nick),
@@ -91,21 +88,39 @@ test_edgetriggered(void *data_)
* get edge-triggered behavior. Yuck! Linux 3.1.9 didn't have this
* problem.
*/
+#ifdef __linux__
+ if (evutil_ersatz_socketpair_(AF_INET, SOCK_STREAM, 0, pair) == -1) {
+ tt_abort_perror("socketpair");
+ }
+#else
+ if (evutil_socketpair(LOCAL_SOCKETPAIR_AF, SOCK_STREAM, 0, pair) == -1) {
+ tt_abort_perror("socketpair");
+ }
+#endif
called = was_et = 0;
tt_int_op(send(pair[0], test, (int)strlen(test)+1, 0), >, 0);
- tt_int_op(shutdown(pair[0], EVUTIL_SHUT_WR), ==, 0);
+ shutdown(pair[0], EVUTIL_SHUT_WR);
+
+ /* Initalize the event library */
+ base = event_base_new();
+
+ if (!strcmp(event_base_get_method(base), "epoll") ||
+ !strcmp(event_base_get_method(base), "epoll (with changelist)") ||
+ !strcmp(event_base_get_method(base), "kqueue"))
+ supports_et = 1;
+ else
+ supports_et = 0;
- supports_et = base_supports_et(base);
TT_BLATHER(("Checking for edge-triggered events with %s, which should %s"
"support edge-triggering", event_base_get_method(base),
supports_et?"":"not "));
/* Initalize one event */
ev = event_new(base, pair[1], EV_READ|EV_ET|EV_PERSIST, read_cb, &ev);
- tt_assert(ev != NULL);
- tt_int_op(event_add(ev, NULL), ==, 0);
+
+ event_add(ev, NULL);
/* We're going to call the dispatch function twice. The first invocation
* will read a single byte from pair[1] in either case. If we're edge
@@ -114,8 +129,8 @@ test_edgetriggered(void *data_)
* do nothing. If we're level triggered, the second invocation of
* event_base_loop will also activate the event (because there's still
* data to read). */
- tt_int_op(event_base_loop(base,EVLOOP_NONBLOCK|EVLOOP_ONCE), ==, 0);
- tt_int_op(event_base_loop(base,EVLOOP_NONBLOCK|EVLOOP_ONCE), ==, 0);
+ event_base_loop(base,EVLOOP_NONBLOCK|EVLOOP_ONCE);
+ event_base_loop(base,EVLOOP_NONBLOCK|EVLOOP_ONCE);
if (supports_et) {
tt_int_op(called, ==, 1);
@@ -125,11 +140,15 @@ test_edgetriggered(void *data_)
tt_assert(!was_et);
}
-end:
+ end:
if (ev) {
event_del(ev);
event_free(ev);
}
+ if (base)
+ event_base_free(base);
+ evutil_closesocket(pair[0]);
+ evutil_closesocket(pair[1]);
}
static void
@@ -177,94 +196,9 @@ end:
event_base_free(base);
}
-static int read_notification_count;
-static int last_read_notification_was_et;
-static void
-read_notification_cb(evutil_socket_t fd, short event, void *arg)
-{
- read_notification_count++;
- last_read_notification_was_et = (event & EV_ET);
-}
-
-static int write_notification_count;
-static int last_write_notification_was_et;
-static void
-write_notification_cb(evutil_socket_t fd, short event, void *arg)
-{
- write_notification_count++;
- last_write_notification_was_et = (event & EV_ET);
-}
-
-/* After two or more events have been registered for the same
- * file descriptor using EV_ET, if one of the events is
- * deleted, then the epoll_ctl() call issued by libevent drops
- * the EPOLLET flag resulting in level triggered
- * notifications.
- */
-static void
-test_edge_triggered_multiple_events(void *data_)
-{
- struct basic_test_data *data = data_;
- struct event *read_ev = NULL;
- struct event *write_ev = NULL;
- const char c = 'A';
- struct event_base *base = data->base;
- evutil_socket_t *pair = data->pair;
-
- if (!base_supports_et(base)) {
- tt_skip();
- return;
- }
-
- read_notification_count = 0;
- last_read_notification_was_et = 0;
- write_notification_count = 0;
- last_write_notification_was_et = 0;
-
- /* Make pair[1] readable */
- tt_int_op(send(pair[0], &c, 1, 0), >, 0);
-
- read_ev = event_new(base, pair[1], EV_READ|EV_ET|EV_PERSIST,
- read_notification_cb, NULL);
- write_ev = event_new(base, pair[1], EV_WRITE|EV_ET|EV_PERSIST,
- write_notification_cb, NULL);
-
- event_add(read_ev, NULL);
- event_add(write_ev, NULL);
- event_base_loop(base, EVLOOP_NONBLOCK|EVLOOP_ONCE);
- event_base_loop(base, EVLOOP_NONBLOCK|EVLOOP_ONCE);
-
- tt_assert(last_read_notification_was_et);
- tt_int_op(read_notification_count, ==, 1);
- tt_assert(last_write_notification_was_et);
- tt_int_op(write_notification_count, ==, 1);
-
- event_del(read_ev);
-
- /* trigger acitivity second time for the backend that can have multiple
- * events for one fd (like kqueue) */
- close(pair[0]);
- pair[0] = -1;
-
- /* Verify that we are still edge-triggered for write notifications */
- event_base_loop(base, EVLOOP_NONBLOCK|EVLOOP_ONCE);
- event_base_loop(base, EVLOOP_NONBLOCK|EVLOOP_ONCE);
- tt_assert(last_write_notification_was_et);
- tt_int_op(write_notification_count, ==, 2);
-
-end:
- if (read_ev)
- event_free(read_ev);
- if (write_ev)
- event_free(write_ev);
-}
-
struct testcase_t edgetriggered_testcases[] = {
- { "et", test_edgetriggered,
- TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR, &basic_setup, NULL },
+ { "et", test_edgetriggered, TT_FORK, NULL, NULL },
{ "et_mix_error", test_edgetriggered_mix_error,
TT_FORK|TT_NEED_SOCKETPAIR|TT_NO_LOGS, &basic_setup, NULL },
- { "et_multiple_events", test_edge_triggered_multiple_events,
- TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR, &basic_setup, NULL },
END_OF_TESTCASES
};
diff --git a/test/regress_http.c b/test/regress_http.c
index 8f30b57..8010050 100644
--- a/test/regress_http.c
+++ b/test/regress_http.c
@@ -72,7 +72,6 @@ static struct event_base *exit_base;
static char const BASIC_REQUEST_BODY[] = "This is funny";
static void http_basic_cb(struct evhttp_request *req, void *arg);
-static void http_timeout_cb(struct evhttp_request *req, void *arg);
static void http_large_cb(struct evhttp_request *req, void *arg);
static void http_chunked_cb(struct evhttp_request *req, void *arg);
static void http_post_cb(struct evhttp_request *req, void *arg);
@@ -120,7 +119,7 @@ https_bev(struct event_base *base, void *arg)
{
SSL *ssl = SSL_new(get_ssl_ctx());
- SSL_use_certificate(ssl, ssl_getcert(ssl_getkey()));
+ SSL_use_certificate(ssl, ssl_getcert());
SSL_use_PrivateKey(ssl, ssl_getkey());
return bufferevent_openssl_socket_new(
@@ -129,8 +128,7 @@ https_bev(struct event_base *base, void *arg)
}
#endif
static struct evhttp *
-http_setup_gencb(ev_uint16_t *pport, struct event_base *base, int mask,
- void (*cb)(struct evhttp_request *, void *), void *cbarg)
+http_setup(ev_uint16_t *pport, struct event_base *base, int mask)
{
struct evhttp *myhttp;
@@ -146,12 +144,8 @@ http_setup_gencb(ev_uint16_t *pport, struct event_base *base, int mask,
}
#endif
- evhttp_set_gencb(myhttp, cb, cbarg);
-
/* Register a callback for certain types of requests */
evhttp_set_cb(myhttp, "/test", http_basic_cb, myhttp);
- evhttp_set_cb(myhttp, "/test nonconformant", http_basic_cb, myhttp);
- evhttp_set_cb(myhttp, "/timeout", http_timeout_cb, myhttp);
evhttp_set_cb(myhttp, "/large", http_large_cb, base);
evhttp_set_cb(myhttp, "/chunked", http_chunked_cb, base);
evhttp_set_cb(myhttp, "/streamed", http_chunked_cb, base);
@@ -165,9 +159,6 @@ http_setup_gencb(ev_uint16_t *pport, struct event_base *base, int mask,
evhttp_set_cb(myhttp, "/", http_dispatcher_cb, base);
return (myhttp);
}
-static struct evhttp *
-http_setup(ev_uint16_t *pport, struct event_base *base, int mask)
-{ return http_setup_gencb(pport, base, mask, NULL, NULL); }
#ifndef NI_MAXSERV
#define NI_MAXSERV 1024
@@ -181,7 +172,7 @@ http_connect(const char *address, ev_uint16_t port)
char strport[NI_MAXSERV];
struct sockaddr *sa;
- size_t slen;
+ int slen;
evutil_socket_t fd;
memset(&ai, 0, sizeof(ai));
@@ -315,31 +306,12 @@ http_basic_cb(struct evhttp_request *req, void *arg)
struct evbuffer *evb = evbuffer_new();
struct evhttp_connection *evcon;
int empty = evhttp_find_header(evhttp_request_get_input_headers(req), "Empty") != NULL;
-
- TT_BLATHER(("%s: called\n", __func__));
+ event_debug(("%s: called\n", __func__));
evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
evcon = evhttp_request_get_connection(req);
tt_assert(evhttp_connection_get_server(evcon) == arg);
- {
- const struct sockaddr *sa;
- char addrbuf[128];
-
- sa = evhttp_connection_get_addr(evcon);
- tt_assert(sa);
-
- if (sa->sa_family == AF_INET) {
- evutil_format_sockaddr_port_((struct sockaddr *)sa, addrbuf, sizeof(addrbuf));
- tt_assert(!strncmp(addrbuf, "127.0.0.1:", strlen("127.0.0.1:")));
- } else if (sa->sa_family == AF_INET6) {
- evutil_format_sockaddr_port_((struct sockaddr *)sa, addrbuf, sizeof(addrbuf));
- tt_assert(!strncmp(addrbuf, "[::1]:", strlen("[::1]:")));
- } else {
- tt_fail_msg("Unsupported family");
- }
- }
-
/* For multi-line headers test */
{
const char *multi =
@@ -374,20 +346,6 @@ end:
evbuffer_free(evb);
}
-static void http_timeout_reply_cb(evutil_socket_t fd, short events, void *arg)
-{
- struct evhttp_request *req = arg;
- evhttp_send_reply(req, HTTP_OK, "Everything is fine", NULL);
- test_ok++;
-}
-static void
-http_timeout_cb(struct evhttp_request *req, void *arg)
-{
- struct timeval when = { 0, 100 };
- event_base_once(exit_base, -1, EV_TIMEOUT,
- http_timeout_reply_cb, req, &when);
-}
-
static void
http_large_cb(struct evhttp_request *req, void *arg)
{
@@ -438,7 +396,7 @@ http_chunked_cb(struct evhttp_request *req, void *arg)
{
struct timeval when = { 0, 0 };
struct chunk_req_state *state = malloc(sizeof(struct chunk_req_state));
- TT_BLATHER(("%s: called\n", __func__));
+ event_debug(("%s: called\n", __func__));
memset(state, 0, sizeof(struct chunk_req_state));
state->req = req;
@@ -456,8 +414,18 @@ http_chunked_cb(struct evhttp_request *req, void *arg)
event_base_once(arg, -1, EV_TIMEOUT, http_chunked_trickle_cb, state, &when);
}
+static void
+http_complete_write(evutil_socket_t fd, short what, void *arg)
+{
+ struct bufferevent *bev = arg;
+ const char *http_request = "host\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+ bufferevent_write(bev, http_request, strlen(http_request));
+}
+
static struct bufferevent *
-create_bev(struct event_base *base, evutil_socket_t fd, int ssl_mask)
+create_bev(struct event_base *base, int fd, int ssl_mask)
{
int flags = BEV_OPT_DEFER_CALLBACKS;
struct bufferevent *bev = NULL;
@@ -484,34 +452,19 @@ create_bev(struct event_base *base, evutil_socket_t fd, int ssl_mask)
}
static void
-http_half_writecb(struct bufferevent *bev, void *arg)
-{
- if (evbuffer_get_length(bufferevent_get_output(bev)) == 0) {
- if (!test_ok) {
- const char http_request[] = "host\r\n"
- "Connection: close\r\n"
- "\r\n";
- bufferevent_write(bev, http_request, strlen(http_request));
- }
- /* enable reading of the reply */
- bufferevent_enable(bev, EV_READ);
- test_ok++;
- }
-}
-
-static void
-http_basic_test_impl(void *arg, int ssl, const char *request_line)
+http_basic_test_impl(void *arg, int ssl)
{
struct basic_test_data *data = arg;
+ struct timeval tv;
struct bufferevent *bev = NULL;
evutil_socket_t fd;
const char *http_request;
ev_uint16_t port = 0, port2 = 0;
int server_flags = ssl ? HTTP_BIND_SSL : 0;
struct evhttp *http = http_setup(&port, data->base, server_flags);
- struct evbuffer *out;
exit_base = data->base;
+ test_ok = 0;
/* bind to a second socket */
if (http_bind(http, &port2, server_flags) == -1) {
@@ -523,18 +476,23 @@ http_basic_test_impl(void *arg, int ssl, const char *request_line)
/* Stupid thing to send a request */
bev = create_bev(data->base, fd, ssl);
- bufferevent_setcb(bev, http_readcb, http_half_writecb,
+ bufferevent_setcb(bev, http_readcb, http_writecb,
http_errorcb, data->base);
- out = bufferevent_get_output(bev);
/* first half of the http request */
- evbuffer_add_printf(out,
- "%s\r\n"
- "Host: some", request_line);
+ http_request =
+ "GET /test HTTP/1.1\r\n"
+ "Host: some";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+ evutil_timerclear(&tv);
+ tv.tv_usec = 100000;
+ event_base_once(data->base,
+ -1, EV_TIMEOUT, http_complete_write, bev, &tv);
- test_ok = 0;
event_base_dispatch(data->base);
- tt_int_op(test_ok, ==, 3);
+
+ tt_assert(test_ok == 3);
/* connect to the second port */
bufferevent_free(bev);
@@ -546,17 +504,18 @@ http_basic_test_impl(void *arg, int ssl, const char *request_line)
bev = create_bev(data->base, fd, ssl);
bufferevent_setcb(bev, http_readcb, http_writecb,
http_errorcb, data->base);
- out = bufferevent_get_output(bev);
- evbuffer_add_printf(out,
- "%s\r\n"
+ http_request =
+ "GET /test HTTP/1.1\r\n"
"Host: somehost\r\n"
"Connection: close\r\n"
- "\r\n", request_line);
+ "\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
- test_ok = 0;
event_base_dispatch(data->base);
- tt_int_op(test_ok, ==, 2);
+
+ tt_assert(test_ok == 5);
/* Connect to the second port again. This time, send an absolute uri. */
bufferevent_free(bev);
@@ -577,19 +536,17 @@ http_basic_test_impl(void *arg, int ssl, const char *request_line)
bufferevent_write(bev, http_request, strlen(http_request));
- test_ok = 0;
event_base_dispatch(data->base);
- tt_int_op(test_ok, ==, 2);
+
+ tt_assert(test_ok == 7);
evhttp_free(http);
-end:
+ end:
if (bev)
bufferevent_free(bev);
}
-static void http_basic_test(void *arg)\
-{ http_basic_test_impl(arg, 0, "GET /test HTTP/1.1"); }
-static void http_basic_trailing_space_test(void *arg)
-{ http_basic_test_impl(arg, 0, "GET /test HTTP/1.1 "); }
+static void http_basic_test(void *arg)
+{ return http_basic_test_impl(arg, 0); }
static void
@@ -628,7 +585,7 @@ http_badreq_cb(struct evhttp_request *req, void *arg)
static void
http_badreq_errorcb(struct bufferevent *bev, short what, void *arg)
{
- TT_BLATHER(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
+ event_debug(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
/* ignore */
}
@@ -674,7 +631,7 @@ http_badreq_readcb(struct bufferevent *bev, void *arg)
static void
http_badreq_successcb(evutil_socket_t fd, short what, void *arg)
{
- TT_BLATHER(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
+ event_debug(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
event_base_loopexit(exit_base, NULL);
}
@@ -684,7 +641,7 @@ http_bad_request_test(void *arg)
struct basic_test_data *data = arg;
struct timeval tv;
struct bufferevent *bev = NULL;
- evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
+ evutil_socket_t fd = -1;
const char *http_request;
ev_uint16_t port=0, port2=0;
struct evhttp *http = http_setup(&port, data->base, 0);
@@ -698,7 +655,7 @@ http_bad_request_test(void *arg)
/* NULL request test */
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
+ tt_int_op(fd, >=, 0);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -730,7 +687,6 @@ http_bad_request_test(void *arg)
/* connect to the second port */
fd = http_connect("127.0.0.1", port2);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -791,7 +747,7 @@ http_delete_cb(struct evhttp_request *req, void *arg)
exit(1);
}
- TT_BLATHER(("%s: called\n", __func__));
+ event_debug(("%s: called\n", __func__));
evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
/* allow sending of an empty reply */
@@ -806,7 +762,7 @@ http_delete_test(void *arg)
{
struct basic_test_data *data = arg;
struct bufferevent *bev;
- evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
+ evutil_socket_t fd = -1;
const char *http_request;
ev_uint16_t port = 0;
struct evhttp *http = http_setup(&port, data->base, 0);
@@ -816,7 +772,7 @@ http_delete_test(void *arg)
tt_assert(http);
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
+ tt_int_op(fd, >=, 0);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -835,7 +791,7 @@ http_delete_test(void *arg)
bufferevent_free(bev);
evutil_closesocket(fd);
- fd = EVUTIL_INVALID_SOCKET;
+ fd = -1;
evhttp_free(http);
@@ -862,7 +818,7 @@ http_sent_cb(struct evhttp_request *req, void *arg)
exit(1);
}
- TT_BLATHER(("%s: called\n", __func__));
+ event_debug(("%s: called\n", __func__));
++test_ok;
}
@@ -874,7 +830,7 @@ http_on_complete_cb(struct evhttp_request *req, void *arg)
evhttp_request_set_on_complete_cb(req, http_sent_cb, (void *)0xDEADBEEF);
- TT_BLATHER(("%s: called\n", __func__));
+ event_debug(("%s: called\n", __func__));
evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
/* allow sending of an empty reply */
@@ -890,7 +846,7 @@ http_on_complete_test(void *arg)
{
struct basic_test_data *data = arg;
struct bufferevent *bev;
- evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
+ evutil_socket_t fd = -1;
const char *http_request;
ev_uint16_t port = 0;
struct evhttp *http = http_setup(&port, data->base, 0);
@@ -899,7 +855,7 @@ http_on_complete_test(void *arg)
test_ok = 0;
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
+ tt_int_op(fd, >=, 0);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -960,7 +916,7 @@ http_allowed_methods_test(void *arg)
test_ok = 0;
fd1 = http_connect("127.0.0.1", port);
- tt_assert(fd1 != EVUTIL_INVALID_SOCKET);
+ tt_int_op(fd1, >=, 0);
/* GET is out; PATCH is in. */
evhttp_set_allowed_methods(http, EVHTTP_REQ_PATCH);
@@ -982,7 +938,7 @@ http_allowed_methods_test(void *arg)
event_base_dispatch(data->base);
fd2 = http_connect("127.0.0.1", port);
- tt_assert(fd2 != EVUTIL_INVALID_SOCKET);
+ tt_int_op(fd2, >=, 0);
bev2 = bufferevent_socket_new(data->base, fd2, 0);
bufferevent_enable(bev2, EV_READ|EV_WRITE);
@@ -1000,7 +956,7 @@ http_allowed_methods_test(void *arg)
event_base_dispatch(data->base);
fd3 = http_connect("127.0.0.1", port);
- tt_assert(fd3 != EVUTIL_INVALID_SOCKET);
+ tt_int_op(fd3, >=, 0);
bev3 = bufferevent_socket_new(data->base, fd3, 0);
bufferevent_enable(bev3, EV_READ|EV_WRITE);
@@ -1788,7 +1744,6 @@ http_virtual_host_test(void *arg)
/* Now make a raw request with an absolute URI. */
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -1870,7 +1825,7 @@ http_dispatcher_cb(struct evhttp_request *req, void *arg)
{
struct evbuffer *evb = evbuffer_new();
- TT_BLATHER(("%s: called\n", __func__));
+ event_debug(("%s: called\n", __func__));
evbuffer_add_printf(evb, "DISPATCHER_TEST");
evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
@@ -2028,7 +1983,7 @@ void
http_post_cb(struct evhttp_request *req, void *arg)
{
struct evbuffer *evb;
- TT_BLATHER(("%s: called\n", __func__));
+ event_debug(("%s: called\n", __func__));
/* Yes, we are expecting a post request */
if (evhttp_request_get_command(req) != EVHTTP_REQ_POST) {
@@ -2145,7 +2100,7 @@ void
http_put_cb(struct evhttp_request *req, void *arg)
{
struct evbuffer *evb;
- TT_BLATHER(("%s: called\n", __func__));
+ event_debug(("%s: called\n", __func__));
/* Expecting a PUT request */
if (evhttp_request_get_command(req) != EVHTTP_REQ_PUT) {
@@ -2231,7 +2186,7 @@ http_failure_test(void *arg)
{
struct basic_test_data *data = arg;
struct bufferevent *bev;
- evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
+ evutil_socket_t fd = -1;
const char *http_request;
ev_uint16_t port = 0;
struct evhttp *http = http_setup(&port, data->base, 0);
@@ -2239,7 +2194,7 @@ http_failure_test(void *arg)
test_ok = 0;
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
+ tt_int_op(fd, >=, 0);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -2498,27 +2453,6 @@ http_parse_query_test(void *ptr)
end:
evhttp_clear_headers(&headers);
}
-static void
-http_parse_query_str_test(void *ptr)
-{
- struct evkeyvalq headers;
- int r;
-
- TAILQ_INIT(&headers);
-
- r = evhttp_parse_query_str("http://www.test.com/?q=test", &headers);
- tt_assert(evhttp_find_header(&headers, "q") == NULL);
- tt_int_op(r, ==, 0);
- evhttp_clear_headers(&headers);
-
- r = evhttp_parse_query_str("q=test", &headers);
- tt_want(validate_header(&headers, "q", "test") == 0);
- tt_int_op(r, ==, 0);
- evhttp_clear_headers(&headers);
-
-end:
- evhttp_clear_headers(&headers);
-}
static void
http_parse_uri_test(void *ptr)
@@ -3029,7 +2963,7 @@ http_base_test(void *ptr)
http = http_setup(&port, base, 0);
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
+ tt_int_op(fd, >=, 0);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(base, fd, 0);
@@ -3116,7 +3050,7 @@ http_incomplete_test_(struct basic_test_data *data, int use_timeout, int ssl)
evhttp_set_timeout(http, 1);
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
+ tt_int_op(fd, >=, 0);
/* Stupid thing to send a request */
bev = create_bev(data->base, fd, ssl);
@@ -3140,7 +3074,7 @@ http_incomplete_test_(struct basic_test_data *data, int use_timeout, int ssl)
bufferevent_free(bev);
if (use_timeout) {
evutil_closesocket(fd);
- fd = EVUTIL_INVALID_SOCKET;
+ fd = -1;
}
evhttp_free(http);
@@ -3333,7 +3267,6 @@ http_chunk_out_test_impl(void *arg, int ssl)
test_ok = 0;
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = create_bev(data->base, fd, ssl);
@@ -3394,7 +3327,7 @@ http_chunk_out_test_impl(void *arg, int ssl)
evhttp_free(http);
}
static void http_chunk_out_test(void *arg)
-{ http_chunk_out_test_impl(arg, 0); }
+{ return http_chunk_out_test_impl(arg, 0); }
static void
http_stream_out_test_impl(void *arg, int ssl)
@@ -3440,7 +3373,7 @@ http_stream_out_test_impl(void *arg, int ssl)
evhttp_free(http);
}
static void http_stream_out_test(void *arg)
-{ http_stream_out_test_impl(arg, 0); }
+{ return http_stream_out_test_impl(arg, 0); }
static void
http_stream_in_chunk(struct evhttp_request *req, void *arg)
@@ -3636,7 +3569,7 @@ http_connection_fail_test_impl(void *arg, int ssl)
;
}
static void http_connection_fail_test(void *arg)
-{ http_connection_fail_test_impl(arg, 0); }
+{ return http_connection_fail_test_impl(arg, 0); }
static void
http_connection_retry_done(struct evhttp_request *req, void *arg)
@@ -3669,13 +3602,13 @@ http_make_web_server(evutil_socket_t fd, short what, void *arg)
}
static void
-http_simple_test_impl(void *arg, int ssl, int dirty, const char *uri)
+http_simple_test_impl(void *arg, int ssl, int dirty)
{
struct basic_test_data *data = arg;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
struct bufferevent *bev;
- struct http_server hs = { 0, ssl, NULL, };
+ struct http_server hs = { .port = 0, .ssl = ssl, };
struct evhttp *http = http_setup(&hs.port, data->base, ssl ? HTTP_BIND_SSL : 0);
exit_base = data->base;
@@ -3694,8 +3627,9 @@ http_simple_test_impl(void *arg, int ssl, int dirty, const char *uri)
req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
tt_assert(req);
- if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, uri) == -1)
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
tt_abort_msg("Couldn't make request");
+ }
event_base_dispatch(data->base);
tt_int_op(test_ok, ==, 1);
@@ -3707,9 +3641,7 @@ http_simple_test_impl(void *arg, int ssl, int dirty, const char *uri)
evhttp_free(http);
}
static void http_simple_test(void *arg)
-{ http_simple_test_impl(arg, 0, 0, "/test"); }
-static void http_simple_nonconformant_test(void *arg)
-{ http_simple_test_impl(arg, 0, 0, "/test nonconformant"); }
+{ return http_simple_test_impl(arg, 0, 0); }
static void
http_connection_retry_test_basic(void *arg, const char *addr, struct evdns_base *dns_base, int ssl)
@@ -3719,7 +3651,7 @@ http_connection_retry_test_basic(void *arg, const char *addr, struct evdns_base
struct evhttp_request *req = NULL;
struct timeval tv, tv_start, tv_end;
struct bufferevent *bev;
- struct http_server hs = { 0, ssl, NULL, };
+ struct http_server hs = { .port = 0, .ssl = ssl, };
struct evhttp *http = http_setup(&hs.port, data->base, ssl ? HTTP_BIND_SSL : 0);
exit_base = data->base;
@@ -3866,16 +3798,16 @@ http_connection_retry_conn_address_test_impl(void *arg, int ssl)
/** dnsserver will be cleaned in http_connection_retry_test_basic() */
}
static void http_connection_retry_conn_address_test(void *arg)
-{ http_connection_retry_conn_address_test_impl(arg, 0); }
+{ return http_connection_retry_conn_address_test_impl(arg, 0); }
static void
http_connection_retry_test_impl(void *arg, int ssl)
{
- http_connection_retry_test_basic(arg, "127.0.0.1", NULL, ssl);
+ return http_connection_retry_test_basic(arg, "127.0.0.1", NULL, ssl);
}
static void
http_connection_retry_test(void *arg)
-{ http_connection_retry_test_impl(arg, 0); }
+{ return http_connection_retry_test_impl(arg, 0); }
static void
http_primitives(void *ptr)
@@ -3912,7 +3844,7 @@ http_multi_line_header_test(void *arg)
{
struct basic_test_data *data = arg;
struct bufferevent *bev= NULL;
- evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
+ evutil_socket_t fd = -1;
const char *http_start_request;
ev_uint16_t port = 0;
struct evhttp *http = http_setup(&port, data->base, 0);
@@ -3923,7 +3855,8 @@ http_multi_line_header_test(void *arg)
tt_ptr_op(http, !=, NULL);
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
+
+ tt_int_op(fd, !=, -1);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -4027,6 +3960,7 @@ http_large_entity_test_done(struct evhttp_request *req, void *arg)
end:
event_base_loopexit(arg, NULL);
}
+#ifndef WIN32
static void
http_expectation_failed_done(struct evhttp_request *req, void *arg)
{
@@ -4035,6 +3969,7 @@ http_expectation_failed_done(struct evhttp_request *req, void *arg)
end:
event_base_loopexit(arg, NULL);
}
+#endif
static void
http_data_length_constraints_test_impl(void *arg, int read_on_write_error)
@@ -4051,32 +3986,38 @@ http_data_length_constraints_test_impl(void *arg, int read_on_write_error)
test_ok = 0;
cb = http_failed_request_done;
+#ifndef WIN32
if (read_on_write_error)
cb = http_data_length_constraints_test_done;
+#endif
tt_assert(continue_size < size);
- long_str = malloc(size);
- memset(long_str, 'a', size);
- long_str[size - 1] = '\0';
-
- TT_BLATHER(("Creating connection to :%i", port));
evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
tt_assert(evcon);
if (read_on_write_error)
tt_assert(!evhttp_connection_set_flags(evcon, EVHTTP_CON_READ_ON_WRITE_ERROR));
+ /* also bind to local host */
evhttp_connection_set_local_address(evcon, "127.0.0.1");
- evhttp_set_max_headers_size(http, size - 1);
- TT_BLATHER(("Set max header size %zu", size - 1));
+ /*
+ * At this point, we want to schedule an HTTP GET request
+ * server using our make request method.
+ */
req = evhttp_request_new(http_data_length_constraints_test_done, data->base);
tt_assert(req);
+
+ long_str = malloc(size);
+ memset(long_str, 'a', size);
+ long_str[size - 1] = '\0';
+ /* Add the information that we care about */
+ evhttp_set_max_headers_size(http, size - 1);
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
evhttp_add_header(evhttp_request_get_output_headers(req), "Longheader", long_str);
- TT_BLATHER(("GET /?arg=val"));
+
if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/?arg=val") == -1) {
tt_abort_msg("Couldn't make request");
}
@@ -4085,22 +4026,21 @@ http_data_length_constraints_test_impl(void *arg, int read_on_write_error)
req = evhttp_request_new(http_data_length_constraints_test_done, data->base);
tt_assert(req);
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
/* GET /?arg=verylongvalue HTTP/1.1 */
- TT_BLATHER(("GET %s", long_str));
if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, long_str) == -1) {
tt_abort_msg("Couldn't make request");
}
event_base_dispatch(data->base);
- evhttp_set_max_body_size(http, size - 2);
- TT_BLATHER(("Set body header size %zu", size - 2));
-
+#ifndef WIN32
if (read_on_write_error)
cb = http_large_entity_test_done;
+#endif
+ evhttp_set_max_body_size(http, size - 2);
req = evhttp_request_new(cb, data->base);
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
- TT_BLATHER(("POST /"));
if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
tt_abort_msg("Couldn't make request");
}
@@ -4110,31 +4050,29 @@ http_data_length_constraints_test_impl(void *arg, int read_on_write_error)
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
evhttp_add_header(evhttp_request_get_output_headers(req), "Expect", "100-continue");
evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
- TT_BLATHER(("POST / (Expect: 100-continue, http_large_entity_test_done)"));
if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
tt_abort_msg("Couldn't make request");
}
event_base_dispatch(data->base);
- long_str[continue_size] = '\0';
-
req = evhttp_request_new(http_dispatcher_test_done, data->base);
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
evhttp_add_header(evhttp_request_get_output_headers(req), "Expect", "100-continue");
+ long_str[continue_size] = '\0';
evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
- TT_BLATHER(("POST / (Expect: 100-continue, http_dispatcher_test_done)"));
if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
tt_abort_msg("Couldn't make request");
}
event_base_dispatch(data->base);
+#ifndef WIN32
if (read_on_write_error)
cb = http_expectation_failed_done;
+#endif
req = evhttp_request_new(cb, data->base);
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
evhttp_add_header(evhttp_request_get_output_headers(req), "Expect", "101-continue");
evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
- TT_BLATHER(("POST / (Expect: 101-continue)"));
if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
tt_abort_msg("Couldn't make request");
}
@@ -4315,7 +4253,7 @@ http_terminate_chunked_test_impl(void *arg, int oneshot)
struct timeval tv;
const char *http_request;
ev_uint16_t port = 0;
- evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
+ evutil_socket_t fd = -1;
struct terminate_state terminate_state;
struct evhttp *http = http_setup(&port, data->base, 0);
@@ -4326,7 +4264,6 @@ http_terminate_chunked_test_impl(void *arg, int oneshot)
terminate_chunked_cb, &terminate_state) == 0);
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -4507,7 +4444,7 @@ http_write_during_read_test_impl(void *arg, int ssl)
ev_uint16_t port = 0;
struct bufferevent *bev = NULL;
struct timeval tv;
- evutil_socket_t fd;
+ int fd;
const char *http_request;
struct evhttp *http = http_setup(&port, data->base, ssl ? HTTP_BIND_SSL : 0);
@@ -4515,7 +4452,6 @@ http_write_during_read_test_impl(void *arg, int ssl)
exit_base = data->base;
fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
bev = create_bev(data->base, fd, 0);
bufferevent_setcb(bev, NULL, NULL, NULL, data->base);
bufferevent_disable(bev, EV_READ);
@@ -4532,14 +4468,13 @@ http_write_during_read_test_impl(void *arg, int ssl)
event_base_dispatch(data->base);
-end:
if (bev)
bufferevent_free(bev);
if (http)
evhttp_free(http);
}
static void http_write_during_read_test(void *arg)
-{ http_write_during_read_test_impl(arg, 0); }
+{ return http_write_during_read_test_impl(arg, 0); }
static void
http_request_own_test(void *arg)
@@ -4576,81 +4511,6 @@ http_request_own_test(void *arg)
test_ok = 1;
}
-static void http_run_bev_request(struct event_base *base, int port,
- const char *fmt, ...)
-{
- struct bufferevent *bev = NULL;
- va_list ap;
- evutil_socket_t fd;
- struct evbuffer *out;
-
- fd = http_connect("127.0.0.1", port);
- tt_assert(fd != EVUTIL_INVALID_SOCKET);
-
- /* Stupid thing to send a request */
- bev = create_bev(base, fd, 0);
- bufferevent_setcb(bev, http_readcb, http_writecb,
- http_errorcb, base);
- out = bufferevent_get_output(bev);
-
- va_start(ap, fmt);
- evbuffer_add_vprintf(out, fmt, ap);
- va_end(ap);
-
- event_base_dispatch(base);
-
-end:
- if (bev)
- bufferevent_free(bev);
-}
-static void
-http_request_extra_body_test(void *arg)
-{
- struct basic_test_data *data = arg;
- struct bufferevent *bev = NULL;
- ev_uint16_t port = 0;
- int i;
- struct evhttp *http =
- http_setup_gencb(&port, data->base, 0, http_timeout_cb, NULL);
- struct evbuffer *body = NULL;
-
- exit_base = data->base;
- test_ok = 0;
-
- body = evbuffer_new();
- for (i = 0; i < 10000; ++i)
- evbuffer_add_printf(body, "this is the body that HEAD should not have");
-
- http_run_bev_request(data->base, port,
- "HEAD /timeout HTTP/1.1\r\n"
- "Host: somehost\r\n"
- "Connection: close\r\n"
- "Content-Length: %i\r\n"
- "\r\n%s",
- (int)evbuffer_get_length(body),
- evbuffer_pullup(body, -1)
- );
- tt_assert(test_ok == -2);
-
- http_run_bev_request(data->base, port,
- "HEAD /__gencb__ HTTP/1.1\r\n"
- "Host: somehost\r\n"
- "Connection: close\r\n"
- "Content-Length: %i\r\n"
- "\r\n%s",
- (int)evbuffer_get_length(body),
- evbuffer_pullup(body, -1)
- );
- tt_assert(test_ok == -2);
-
- end:
- evhttp_free(http);
- if (bev)
- bufferevent_free(bev);
- if (body)
- evbuffer_free(body);
-}
-
#define HTTP_LEGACY(name) \
{ #name, run_legacy_test_fn, TT_ISOLATED|TT_LEGACY, &legacy_setup, \
http_##name##_test }
@@ -4658,45 +4518,43 @@ http_request_extra_body_test(void *arg)
#define HTTP_CAST_ARG(a) ((void *)(a))
#define HTTP_OFF_N(title, name, arg) \
{ #title, http_##name##_test, TT_ISOLATED|TT_OFF_BY_DEFAULT, &basic_setup, HTTP_CAST_ARG(arg) }
-#define HTTP_RET_N(title, name, test_opts, arg) \
- { #title, http_##name##_test, TT_ISOLATED|TT_RETRIABLE|test_opts, &basic_setup, HTTP_CAST_ARG(arg) }
-#define HTTP_N(title, name, test_opts, arg) \
- { #title, http_##name##_test, TT_ISOLATED|test_opts, &basic_setup, HTTP_CAST_ARG(arg) }
-#define HTTP(name) HTTP_N(name, name, 0, NULL)
+#define HTTP_N(title, name, arg) \
+ { #title, http_##name##_test, TT_ISOLATED, &basic_setup, HTTP_CAST_ARG(arg) }
+#define HTTP(name) HTTP_N(name, name, NULL)
#define HTTPS(name) \
{ "https_" #name, https_##name##_test, TT_ISOLATED, &basic_setup, NULL }
#ifdef EVENT__HAVE_OPENSSL
static void https_basic_test(void *arg)
-{ http_basic_test_impl(arg, 1, "GET /test HTTP/1.1"); }
+{ return http_basic_test_impl(arg, 1); }
static void https_filter_basic_test(void *arg)
-{ http_basic_test_impl(arg, 1 | HTTP_SSL_FILTER, "GET /test HTTP/1.1"); }
+{ return http_basic_test_impl(arg, 1 | HTTP_SSL_FILTER); }
static void https_incomplete_test(void *arg)
{ http_incomplete_test_(arg, 0, 1); }
static void https_incomplete_timeout_test(void *arg)
{ http_incomplete_test_(arg, 1, 1); }
static void https_simple_test(void *arg)
-{ http_simple_test_impl(arg, 1, 0, "/test"); }
+{ return http_simple_test_impl(arg, 1, 0); }
static void https_simple_dirty_test(void *arg)
-{ http_simple_test_impl(arg, 1, 1, "/test"); }
+{ return http_simple_test_impl(arg, 1, 1); }
static void https_connection_retry_conn_address_test(void *arg)
-{ http_connection_retry_conn_address_test_impl(arg, 1); }
+{ return http_connection_retry_conn_address_test_impl(arg, 1); }
static void https_connection_retry_test(void *arg)
-{ http_connection_retry_test_impl(arg, 1); }
+{ return http_connection_retry_test_impl(arg, 1); }
static void https_chunk_out_test(void *arg)
-{ http_chunk_out_test_impl(arg, 1); }
+{ return http_chunk_out_test_impl(arg, 1); }
static void https_filter_chunk_out_test(void *arg)
-{ http_chunk_out_test_impl(arg, 1 | HTTP_SSL_FILTER); }
+{ return http_chunk_out_test_impl(arg, 1 | HTTP_SSL_FILTER); }
static void https_stream_out_test(void *arg)
-{ http_stream_out_test_impl(arg, 1); }
+{ return http_stream_out_test_impl(arg, 1); }
static void https_connection_fail_test(void *arg)
-{ http_connection_fail_test_impl(arg, 1); }
+{ return http_connection_fail_test_impl(arg, 1); }
static void https_write_during_read_test(void *arg)
-{ http_write_during_read_test_impl(arg, 1); }
+{ return http_write_during_read_test_impl(arg, 1); }
static void https_connection_test(void *arg)
-{ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC, 1); }
+{ return http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC, 1); }
static void https_persist_connection_test(void *arg)
-{ http_connection_test_(arg, 1, "127.0.0.1", NULL, 0, AF_UNSPEC, 1); }
+{ return http_connection_test_(arg, 1, "127.0.0.1", NULL, 0, AF_UNSPEC, 1); }
#endif
struct testcase_t http_testcases[] = {
@@ -4704,27 +4562,24 @@ struct testcase_t http_testcases[] = {
{ "base", http_base_test, TT_FORK, NULL, NULL },
{ "bad_headers", http_bad_header_test, 0, NULL, NULL },
{ "parse_query", http_parse_query_test, 0, NULL, NULL },
- { "parse_query_str", http_parse_query_str_test, 0, NULL, NULL },
{ "parse_uri", http_parse_uri_test, 0, NULL, NULL },
{ "parse_uri_nc", http_parse_uri_test, 0, &basic_setup, (void*)"nc" },
{ "uriencode", http_uriencode_test, 0, NULL, NULL },
HTTP(basic),
- HTTP(basic_trailing_space),
HTTP(simple),
- HTTP(simple_nonconformant),
-
- HTTP_N(cancel, cancel, 0, BASIC),
- HTTP_RET_N(cancel_by_host, cancel, 0, BY_HOST),
- HTTP_RET_N(cancel_by_host_inactive_server, cancel, TT_NO_LOGS, BY_HOST | INACTIVE_SERVER),
- HTTP_RET_N(cancel_by_host_no_ns, cancel, TT_NO_LOGS, BY_HOST | NO_NS),
- HTTP_N(cancel_inactive_server, cancel, 0, INACTIVE_SERVER),
- HTTP_N(cancel_by_host_no_ns_inactive_server, cancel, TT_NO_LOGS, BY_HOST | NO_NS | INACTIVE_SERVER),
+
+ HTTP_N(cancel, cancel, BASIC),
+ HTTP_N(cancel_by_host, cancel, BY_HOST),
+ HTTP_N(cancel_by_host_no_ns, cancel, BY_HOST | NO_NS),
+ HTTP_N(cancel_by_host_inactive_server, cancel, BY_HOST | INACTIVE_SERVER),
+ HTTP_N(cancel_inactive_server, cancel, INACTIVE_SERVER),
+ HTTP_N(cancel_by_host_no_ns_inactive_server, cancel, BY_HOST | NO_NS | INACTIVE_SERVER),
HTTP_OFF_N(cancel_by_host_server_timeout, cancel, BY_HOST | INACTIVE_SERVER | SERVER_TIMEOUT),
HTTP_OFF_N(cancel_server_timeout, cancel, INACTIVE_SERVER | SERVER_TIMEOUT),
HTTP_OFF_N(cancel_by_host_no_ns_server_timeout, cancel, BY_HOST | NO_NS | INACTIVE_SERVER | SERVER_TIMEOUT),
HTTP_OFF_N(cancel_by_host_ns_timeout_server_timeout, cancel, BY_HOST | NO_NS | NS_TIMEOUT | INACTIVE_SERVER | SERVER_TIMEOUT),
- HTTP_RET_N(cancel_by_host_ns_timeout, cancel, TT_NO_LOGS, BY_HOST | NO_NS | NS_TIMEOUT),
- HTTP_RET_N(cancel_by_host_ns_timeout_inactive_server, cancel, TT_NO_LOGS, BY_HOST | NO_NS | NS_TIMEOUT | INACTIVE_SERVER),
+ HTTP_N(cancel_by_host_ns_timeout, cancel, BY_HOST | NO_NS | NS_TIMEOUT),
+ HTTP_N(cancel_by_host_ns_timeout_inactive_server, cancel, BY_HOST | NO_NS | NS_TIMEOUT | INACTIVE_SERVER),
HTTP(virtual_host),
HTTP(post),
@@ -4775,8 +4630,6 @@ struct testcase_t http_testcases[] = {
HTTP(write_during_read),
HTTP(request_own),
- HTTP(request_extra_body),
-
#ifdef EVENT__HAVE_OPENSSL
HTTPS(basic),
HTTPS(filter_basic),
@@ -4799,10 +4652,3 @@ struct testcase_t http_testcases[] = {
END_OF_TESTCASES
};
-struct testcase_t http_iocp_testcases[] = {
- { "simple", http_simple_test, TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, NULL },
-#ifdef EVENT__HAVE_OPENSSL
- { "https_simple", https_simple_test, TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, NULL },
-#endif
- END_OF_TESTCASES
-};
diff --git a/test/regress_listener.c b/test/regress_listener.c
index 871da4c..72f7237 100644
--- a/test/regress_listener.c
+++ b/test/regress_listener.c
@@ -80,9 +80,8 @@ regress_pick_a_port(void *arg)
ev_socklen_t slen1 = sizeof(ss1), slen2 = sizeof(ss2);
unsigned int flags =
LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE|LEV_OPT_CLOSE_ON_EXEC;
- evutil_socket_t fd1, fd2, fd3;
- fd1 = fd2 = fd3 = EVUTIL_INVALID_SOCKET;
+ evutil_socket_t fd1 = -1, fd2 = -1, fd3 = -1;
if (data->setup_data && strstr((char*)data->setup_data, "ts")) {
flags |= LEV_OPT_THREADSAFE;
@@ -100,8 +99,8 @@ regress_pick_a_port(void *arg)
flags, -1, (struct sockaddr *)&sin, sizeof(sin));
tt_assert(listener2);
- tt_assert(evconnlistener_get_fd(listener1) != EVUTIL_INVALID_SOCKET);
- tt_assert(evconnlistener_get_fd(listener2) != EVUTIL_INVALID_SOCKET);
+ tt_int_op(evconnlistener_get_fd(listener1), >=, 0);
+ tt_int_op(evconnlistener_get_fd(listener2), >=, 0);
tt_assert(getsockname(evconnlistener_get_fd(listener1),
(struct sockaddr*)&ss1, &slen1) == 0);
tt_assert(getsockname(evconnlistener_get_fd(listener2),
@@ -118,7 +117,7 @@ regress_pick_a_port(void *arg)
tt_ptr_op(evconnlistener_get_base(listener1), ==, base);
tt_ptr_op(evconnlistener_get_base(listener2), ==, base);
- fd1 = fd2 = fd3 = EVUTIL_INVALID_SOCKET;
+ fd1 = fd2 = fd3 = -1;
evutil_socket_connect_(&fd1, (struct sockaddr*)&ss1, slen1);
evutil_socket_connect_(&fd2, (struct sockaddr*)&ss1, slen1);
evutil_socket_connect_(&fd3, (struct sockaddr*)&ss2, slen2);
@@ -186,89 +185,6 @@ end:
evconnlistener_free(listener);
}
-static void
-acceptcb_free(struct evconnlistener *listener, evutil_socket_t fd,
- struct sockaddr *addr, int socklen, void *arg)
-{
- int *ptr = arg;
- --*ptr;
- TT_BLATHER(("Got one for %p", ptr));
- evutil_closesocket(fd);
-
- if (! *ptr)
- evconnlistener_free(listener);
-}
-static void
-regress_listener_close_accepted_fd(void *arg)
-{
- struct basic_test_data *data = arg;
- struct event_base *base = data->base;
- struct evconnlistener *listener = NULL;
- struct sockaddr_in sin;
- struct sockaddr_storage ss;
- ev_socklen_t slen = sizeof(ss);
- int count = 1;
- unsigned int flags = LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE;
- evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
-
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = htonl(0x7f000001); /* 127.0.0.1 */
- sin.sin_port = 0; /* "You pick!" */
-
- /* Start a listener with a bogus socket. */
- listener = evconnlistener_new_bind(base, acceptcb_free, &count,
- flags, -1, (struct sockaddr *)&sin, sizeof(sin));
- tt_assert(listener);
-
- tt_assert(getsockname(evconnlistener_get_fd(listener),
- (struct sockaddr*)&ss, &slen) == 0);
- evutil_socket_connect_(&fd, (struct sockaddr*)&ss, slen);
-
- event_base_dispatch(base);
-
-end:
- ;
-}
-
-static void
-regress_listener_immediate_close(void *arg)
-{
- struct basic_test_data *data = arg;
- struct event_base *base = data->base;
- struct evconnlistener *listener = NULL;
- struct sockaddr_in sin;
- struct sockaddr_storage ss;
- ev_socklen_t slen = sizeof(ss);
- int count = 1;
- unsigned int flags = LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE;
- evutil_socket_t fd1 = EVUTIL_INVALID_SOCKET, fd2 = EVUTIL_INVALID_SOCKET;
-
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = htonl(0x7f000001); /* 127.0.0.1 */
- sin.sin_port = 0; /* "You pick!" */
-
- /* Start a listener with a bogus socket. */
- listener = evconnlistener_new_bind(base, acceptcb, &count,
- flags, -1, (struct sockaddr *)&sin, sizeof(sin));
- tt_assert(listener);
-
- tt_assert(getsockname(evconnlistener_get_fd(listener),
- (struct sockaddr*)&ss, &slen) == 0);
-
- evutil_socket_connect_(&fd1, (struct sockaddr*)&ss, slen);
- evutil_socket_connect_(&fd2, (struct sockaddr*)&ss, slen);
-
- event_base_dispatch(base);
-
- tt_int_op(count, ==, 0);
-
-end:
- if (listener)
- evconnlistener_free(listener);
-}
-
#ifdef EVENT__HAVE_SETRLIMIT
static void
regress_listener_error_unlock(void *arg)
@@ -314,7 +230,7 @@ struct testcase_t listener_testcases[] = {
#ifdef EVENT__HAVE_SETRLIMIT
{ "error_unlock", regress_listener_error_unlock,
- TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR|TT_NO_LOGS,
+ TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR,
&basic_setup, NULL},
#endif
@@ -326,12 +242,6 @@ struct testcase_t listener_testcases[] = {
TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR,
&basic_setup, (char*)"ts"},
- { "close_accepted_fd", regress_listener_close_accepted_fd,
- TT_FORK|TT_NEED_BASE, &basic_setup, NULL, },
-
- { "immediate_close", regress_listener_immediate_close,
- TT_FORK|TT_NEED_BASE, &basic_setup, NULL, },
-
END_OF_TESTCASES,
};
diff --git a/test/regress_main.c b/test/regress_main.c
index c937282..44e2911 100644
--- a/test/regress_main.c
+++ b/test/regress_main.c
@@ -186,7 +186,7 @@ ignore_log_cb(int s, const char *msg)
{
}
-void *
+static void *
basic_test_setup(const struct testcase_t *testcase)
{
struct event_base *base = NULL;
@@ -262,7 +262,7 @@ basic_test_setup(const struct testcase_t *testcase)
return data;
}
-int
+static int
basic_test_cleanup(const struct testcase_t *testcase, void *ptr)
{
struct basic_test_data *data = ptr;
@@ -384,7 +384,6 @@ struct testgroup_t testgroups[] = {
{ "iocp/", iocp_testcases },
{ "iocp/bufferevent/", bufferevent_iocp_testcases },
{ "iocp/listener/", listener_iocp_testcases },
- { "iocp/http/", http_iocp_testcases },
#endif
#ifdef EVENT__HAVE_OPENSSL
{ "ssl/", ssl_testcases },
@@ -436,7 +435,6 @@ main(int argc, const char **argv)
#ifdef _WIN32
tinytest_skip(testgroups, "http/connection_retry");
tinytest_skip(testgroups, "http/https_connection_retry");
- tinytest_skip(testgroups, "http/read_on_write_error");
#endif
#ifndef EVENT__DISABLE_THREAD_SUPPORT
@@ -456,11 +454,6 @@ main(int argc, const char **argv)
evutil_weakrand_seed_(&test_weakrand_state, 0);
- if (getenv("EVENT_NO_FILE_BUFFERING")) {
- setbuf(stdout, NULL);
- setbuf(stderr, NULL);
- }
-
if (tinytest_main(argc,argv,testgroups))
return 1;
diff --git a/test/regress_rpc.c b/test/regress_rpc.c
index 87a7efa..01a058c 100644
--- a/test/regress_rpc.c
+++ b/test/regress_rpc.c
@@ -61,6 +61,7 @@
#include "event2/http_compat.h"
#include "event2/http_struct.h"
#include "event2/rpc.h"
+#include "event2/rpc.h"
#include "event2/rpc_struct.h"
#include "event2/tag.h"
#include "log-internal.h"
@@ -879,53 +880,6 @@ end:
evbuffer_free(tmp);
}
-static void
-rpc_invalid_type(void)
-{
- ev_uint16_t port;
- struct evhttp *http = NULL;
- struct evrpc_base *base = NULL;
- struct evhttp_connection *evcon = NULL;
- struct evhttp_request *req = NULL;
-
- rpc_setup(&http, &port, &base);
-
- evcon = evhttp_connection_new("127.0.0.1", port);
- tt_assert(evcon);
-
- /*
- * At this point, we want to schedule an HTTP POST request
- * server using our make request method.
- */
-
- req = evhttp_request_new(rpc_postrequest_failure, NULL);
- tt_assert(req);
-
- /* Add the information that we care about */
- evhttp_add_header(req->output_headers, "Host", "somehost");
- evbuffer_add_printf(req->output_buffer, "Some Nonsense");
-
- if (evhttp_make_request(evcon, req,
- EVHTTP_REQ_GET,
- "/.rpc.Message") == -1) {
- tt_abort();
- }
-
- test_ok = 0;
-
- event_dispatch();
-
- evhttp_connection_free(evcon);
-
- rpc_teardown(base);
-
- tt_assert(test_ok == 1);
-
-end:
- evhttp_free(http);
-}
-
-
#define RPC_LEGACY(name) \
{ #name, run_legacy_test_fn, TT_FORK|TT_NEED_BASE|TT_LEGACY, \
&legacy_setup, \
@@ -944,7 +898,6 @@ struct testcase_t rpc_testcases[] = {
RPC_LEGACY(basic_client),
RPC_LEGACY(basic_queued_client),
RPC_LEGACY(basic_client_with_pause),
- RPC_LEGACY(invalid_type),
RPC_LEGACY(client_timeout),
RPC_LEGACY(test),
diff --git a/test/regress_ssl.c b/test/regress_ssl.c
index 68c2811..681705f 100644
--- a/test/regress_ssl.c
+++ b/test/regress_ssl.c
@@ -53,6 +53,7 @@
#include "tinytest.h"
#include "tinytest_macros.h"
+#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include "openssl-compat.h"
@@ -118,13 +119,14 @@ end:
}
X509 *
-ssl_getcert(EVP_PKEY *key)
+ssl_getcert(void)
{
/* Dummy code to make a quick-and-dirty valid certificate with
OpenSSL. Don't copy this code into your own program! It does a
number of things in a stupid and insecure way. */
X509 *x509 = NULL;
X509_NAME *name = NULL;
+ EVP_PKEY *key = ssl_getkey();
int nid;
time_t now = time(NULL);
@@ -146,7 +148,6 @@ ssl_getcert(EVP_PKEY *key)
X509_set_subject_name(x509, name);
X509_set_issuer_name(x509, name);
- X509_NAME_free(name);
X509_time_adj(X509_get_notBefore(x509), 0, &now);
now += 3600;
@@ -157,7 +158,6 @@ ssl_getcert(EVP_PKEY *key)
return x509;
end:
X509_free(x509);
- X509_NAME_free(name);
return NULL;
}
@@ -183,86 +183,35 @@ get_ssl_ctx(void)
return the_ssl_ctx;
}
-static int test_is_done;
-static int n_connected;
-static int got_close;
-static int got_error;
-static int got_timeout;
-static int renegotiate_at = -1;
-static int stop_when_connected;
-static int pending_connect_events;
-static struct event_base *exit_base;
-static X509 *the_cert;
-EVP_PKEY *the_key;
-
void
init_ssl(void)
{
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
- (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init();
ERR_load_crypto_strings();
SSL_load_error_strings();
OpenSSL_add_all_algorithms();
if (SSLeay() != OPENSSL_VERSION_NUMBER) {
- TT_DECLARE("WARN",
- ("Version mismatch for openssl: compiled with %lx but running with %lx",
- (unsigned long)OPENSSL_VERSION_NUMBER, (unsigned long)SSLeay()));
+ TT_DECLARE("WARN", ("Version mismatch for openssl: compiled with %lx but running with %lx", (unsigned long)OPENSSL_VERSION_NUMBER, (unsigned long) SSLeay()));
}
#endif
}
-static void *
-ssl_test_setup(const struct testcase_t *testcase)
-{
- init_ssl();
-
- the_key = ssl_getkey();
- EVUTIL_ASSERT(the_key);
-
- the_cert = ssl_getcert(the_key);
- EVUTIL_ASSERT(the_cert);
-
- disable_tls_11_and_12 = 0;
-
- return basic_test_setup(testcase);
-}
-static int
-ssl_test_cleanup(const struct testcase_t *testcase, void *ptr)
-{
- int ret = basic_test_cleanup(testcase, ptr);
- if (!ret) {
- return ret;
- }
-
- test_is_done = 0;
- n_connected = 0;
- got_close = 0;
- got_error = 0;
- got_timeout = 0;
- renegotiate_at = -1;
- stop_when_connected = 0;
- pending_connect_events = 0;
- exit_base = NULL;
-
- X509_free(the_cert);
- EVP_PKEY_free(the_key);
-
- SSL_CTX_free(the_ssl_ctx);
- the_ssl_ctx = NULL;
-
- return 1;
-}
-const struct testcase_setup_t ssl_setup = {
- ssl_test_setup, ssl_test_cleanup
-};
-
-
/* ====================
Here's a simple test: we read a number from the input, increment it, and
reply, until we get to 1001.
*/
+static int test_is_done = 0;
+static int n_connected = 0;
+static int got_close = 0;
+static int got_error = 0;
+static int got_timeout = 0;
+static int renegotiate_at = -1;
+static int stop_when_connected = 0;
+static int pending_connect_events = 0;
+static struct event_base *exit_base = NULL;
+
enum regress_openssl_type
{
REGRESS_OPENSSL_SOCKETPAIR = 1,
@@ -280,19 +229,17 @@ enum regress_openssl_type
REGRESS_OPENSSL_SLEEP = 1024,
REGRESS_OPENSSL_CLIENT_WRITE = 2048,
-
- REGRESS_DEFERRED_CALLBACKS = 4096,
};
static void
bufferevent_openssl_check_fd(struct bufferevent *bev, int filter)
{
- tt_fd_op(bufferevent_getfd(bev), !=, EVUTIL_INVALID_SOCKET);
- tt_fd_op(bufferevent_setfd(bev, EVUTIL_INVALID_SOCKET), ==, 0);
+ tt_int_op(bufferevent_getfd(bev), !=, -1);
+ tt_int_op(bufferevent_setfd(bev, -1), ==, 0);
if (filter) {
- tt_fd_op(bufferevent_getfd(bev), !=, EVUTIL_INVALID_SOCKET);
+ tt_int_op(bufferevent_getfd(bev), !=, -1);
} else {
- tt_fd_op(bufferevent_getfd(bev), ==, EVUTIL_INVALID_SOCKET);
+ tt_int_op(bufferevent_getfd(bev), ==, -1);
}
end:
@@ -309,13 +256,6 @@ end:
}
static void
-free_on_cb(struct bufferevent *bev, void *ctx)
-{
- TT_BLATHER(("free_on_cb: %p", bev));
- bufferevent_free(bev);
-}
-
-static void
respond_to_number(struct bufferevent *bev, void *ctx)
{
struct evbuffer *b = bufferevent_get_input(bev);
@@ -363,14 +303,13 @@ done_writing_cb(struct bufferevent *bev, void *ctx)
static void
eventcb(struct bufferevent *bev, short what, void *ctx)
{
- X509 *peer_cert = NULL;
enum regress_openssl_type type;
-
type = (enum regress_openssl_type)ctx;
TT_BLATHER(("Got event %d", (int)what));
if (what & BEV_EVENT_CONNECTED) {
SSL *ssl;
+ X509 *peer_cert;
++n_connected;
ssl = bufferevent_openssl_get_ssl(bev);
tt_assert(ssl);
@@ -418,10 +357,8 @@ eventcb(struct bufferevent *bev, short what, void *ctx)
}
bufferevent_free(bev);
}
-
end:
- if (peer_cert)
- X509_free(peer_cert);
+ ;
}
static void
@@ -461,6 +398,8 @@ regress_bufferevent_openssl(void *arg)
struct bufferevent *bev1, *bev2;
SSL *ssl1, *ssl2;
+ X509 *cert = ssl_getcert();
+ EVP_PKEY *key = ssl_getkey();
int flags = BEV_OPT_DEFER_CALLBACKS;
struct bufferevent *bev_ll[2] = { NULL, NULL };
evutil_socket_t *fd_pair = NULL;
@@ -468,6 +407,11 @@ regress_bufferevent_openssl(void *arg)
enum regress_openssl_type type;
type = (enum regress_openssl_type)data->setup_data;
+ tt_assert(cert);
+ tt_assert(key);
+
+ init_ssl();
+
if (type & REGRESS_OPENSSL_RENEGOTIATE) {
if (SSLeay() >= 0x10001000 &&
SSLeay() < 0x1000104f) {
@@ -481,8 +425,8 @@ regress_bufferevent_openssl(void *arg)
ssl1 = SSL_new(get_ssl_ctx());
ssl2 = SSL_new(get_ssl_ctx());
- SSL_use_certificate(ssl2, the_cert);
- SSL_use_PrivateKey(ssl2, the_key);
+ SSL_use_certificate(ssl2, cert);
+ SSL_use_PrivateKey(ssl2, key);
if (!(type & REGRESS_OPENSSL_OPEN))
flags |= BEV_OPT_CLOSE_ON_FREE;
@@ -501,7 +445,7 @@ regress_bufferevent_openssl(void *arg)
fd_pair, bev_ll, type);
if (!(type & REGRESS_OPENSSL_FILTER)) {
- tt_fd_op(bufferevent_getfd(bev1), ==, data->pair[0]);
+ tt_int_op(bufferevent_getfd(bev1), ==, data->pair[0]);
} else {
tt_ptr_op(bufferevent_get_underlying(bev1), ==, bev_ll[0]);
}
@@ -560,10 +504,7 @@ regress_bufferevent_openssl(void *arg)
tt_int_op(got_close, ==, 0);
tt_int_op(got_error, ==, 0);
tt_int_op(got_timeout, ==, 1);
-
- bufferevent_free(bev2);
}
-
end:
return;
}
@@ -585,13 +526,15 @@ acceptcb(struct evconnlistener *listener, evutil_socket_t fd,
type = (enum regress_openssl_type)data->setup_data;
- SSL_use_certificate(ssl, the_cert);
- SSL_use_PrivateKey(ssl, the_key);
+ SSL_use_certificate(ssl, ssl_getcert());
+ SSL_use_PrivateKey(ssl, ssl_getkey());
bev = bufferevent_openssl_socket_new(
- data->base, fd, ssl, BUFFEREVENT_SSL_ACCEPTING,
+ data->base,
+ fd,
+ ssl,
+ BUFFEREVENT_SSL_ACCEPTING,
BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
- tt_assert(bev);
bufferevent_setcb(bev, respond_to_number, NULL, eventcb,
(void*)(REGRESS_OPENSSL_SERVER));
@@ -607,14 +550,11 @@ acceptcb(struct evconnlistener *listener, evutil_socket_t fd,
/* Only accept once, then disable ourself. */
evconnlistener_disable(listener);
-
-end:
- ;
}
struct rwcount
{
- evutil_socket_t fd;
+ int fd;
size_t read;
size_t write;
};
@@ -628,7 +568,6 @@ bio_rwcount_new(BIO *b)
static int
bio_rwcount_free(BIO *b)
{
- TT_BLATHER(("bio_rwcount_free: %p", b));
if (!b)
return 0;
if (BIO_get_shutdown(b)) {
@@ -651,6 +590,7 @@ bio_rwcount_read(BIO *b, char *out, int outlen)
static int
bio_rwcount_write(BIO *b, const char *in, int inlen)
{
+
struct rwcount *rw = BIO_get_data(b);
ev_ssize_t ret = send(rw->fd, in, inlen, 0);
++rw->write;
@@ -662,12 +602,8 @@ bio_rwcount_write(BIO *b, const char *in, int inlen)
static long
bio_rwcount_ctrl(BIO *b, int cmd, long num, void *ptr)
{
- struct rwcount *rw = BIO_get_data(b);
long ret = 0;
switch (cmd) {
- case BIO_C_GET_FD:
- ret = rw->fd;
- break;
case BIO_CTRL_GET_CLOSE:
ret = BIO_get_shutdown(b);
break;
@@ -736,11 +672,14 @@ regress_bufferevent_openssl_connect(void *arg)
struct sockaddr_storage ss;
ev_socklen_t slen;
SSL *ssl;
+ BIO *bio;
struct rwcount rw = { -1, 0, 0 };
enum regress_openssl_type type;
type = (enum regress_openssl_type)data->setup_data;
+ init_ssl();
+
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = htonl(0x7f000001);
@@ -764,7 +703,7 @@ regress_bufferevent_openssl_connect(void *arg)
BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
tt_assert(bev);
- bufferevent_setcb(bev, respond_to_number, free_on_cb, eventcb,
+ bufferevent_setcb(bev, respond_to_number, NULL, eventcb,
(void*)(REGRESS_OPENSSL_CLIENT));
tt_assert(getsockname(evconnlistener_get_fd(listener),
@@ -777,8 +716,6 @@ regress_bufferevent_openssl_connect(void *arg)
/* Possible only when we have fd, since be_openssl can and will overwrite
* bio otherwise before */
if (type & REGRESS_OPENSSL_SLEEP) {
- BIO *bio;
-
rw.fd = bufferevent_getfd(bev);
bio = BIO_new_rwcount(0);
tt_assert(bio);
@@ -793,279 +730,83 @@ regress_bufferevent_openssl_connect(void *arg)
tt_int_op(rw.read, <=, 100);
tt_int_op(rw.write, <=, 100);
end:
- evconnlistener_free(listener);
-}
-
-struct wm_context
-{
- int server;
- int flags;
- struct evbuffer *data;
- size_t to_read;
- size_t wm_high;
- size_t limit;
- size_t get;
- struct bufferevent *bev;
- struct wm_context *neighbour;
-};
-static void
-wm_transfer(struct bufferevent *bev, void *arg)
-{
- struct wm_context *ctx = arg;
- struct evbuffer *in = bufferevent_get_input(bev);
- struct evbuffer *out = bufferevent_get_output(bev);
- size_t len = evbuffer_get_length(in);
- size_t drain = len < ctx->to_read ? len : ctx->to_read;
-
- if (ctx->get >= ctx->limit) {
- TT_BLATHER(("wm_transfer-%s(%p): break",
- ctx->server ? "server" : "client", bev));
- bufferevent_setcb(bev, NULL, NULL, NULL, NULL);
- bufferevent_disable(bev, EV_READ);
- if (ctx->neighbour->get >= ctx->neighbour->limit) {
- event_base_loopbreak(bufferevent_get_base(bev));
- }
- } else {
- ctx->get += drain;
- evbuffer_drain(in, drain);
- }
-
- TT_BLATHER(("wm_transfer-%s(%p): "
- "in: " EV_SIZE_FMT ", "
- "out: " EV_SIZE_FMT ", "
- "got: " EV_SIZE_FMT "",
- ctx->server ? "server" : "client", bev,
- evbuffer_get_length(in),
- evbuffer_get_length(out),
- ctx->get));
-
- evbuffer_add_buffer_reference(out, ctx->data);
-}
-static void
-wm_eventcb(struct bufferevent *bev, short what, void *arg)
-{
- struct wm_context *ctx = arg;
- TT_BLATHER(("wm_eventcb-%s(%p): %i",
- ctx->server ? "server" : "client", bev, what));
- if (what & BEV_EVENT_CONNECTED) {
- } else {
- ctx->get = 0;
- }
-}
-static void
-wm_acceptcb(struct evconnlistener *listener, evutil_socket_t fd,
- struct sockaddr *addr, int socklen, void *arg)
-{
- struct wm_context *ctx = arg;
- struct bufferevent *bev;
- struct event_base *base = evconnlistener_get_base(listener);
- SSL *ssl = SSL_new(get_ssl_ctx());
-
- SSL_use_certificate(ssl, the_cert);
- SSL_use_PrivateKey(ssl, the_key);
-
- bev = bufferevent_openssl_socket_new(
- base, fd, ssl, BUFFEREVENT_SSL_ACCEPTING, ctx->flags);
-
- TT_BLATHER(("wm_transfer-%s(%p): accept",
- ctx->server ? "server" : "client", bev));
-
- bufferevent_setwatermark(bev, EV_READ, 0, ctx->wm_high);
- bufferevent_setcb(bev, wm_transfer, NULL, wm_eventcb, ctx);
- bufferevent_enable(bev, EV_READ|EV_WRITE);
- ctx->bev = bev;
-
- /* Only accept once, then disable ourself. */
- evconnlistener_disable(listener);
-}
-static void
-regress_bufferevent_openssl_wm(void *arg)
-{
- struct basic_test_data *data = arg;
- struct event_base *base = data->base;
-
- struct evconnlistener *listener;
- struct bufferevent *bev;
- struct sockaddr_in sin;
- struct sockaddr_storage ss;
- enum regress_openssl_type type =
- (enum regress_openssl_type)data->setup_data;
- int bev_flags = BEV_OPT_CLOSE_ON_FREE;
- ev_socklen_t slen;
- SSL *ssl;
- struct wm_context client, server;
- char *payload;
- size_t payload_len = 1<<10;
- size_t wm_high = 5<<10;
-
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = htonl(0x7f000001);
-
- memset(&ss, 0, sizeof(ss));
- slen = sizeof(ss);
-
- if (type & REGRESS_DEFERRED_CALLBACKS)
- bev_flags |= BEV_OPT_DEFER_CALLBACKS;
-
- memset(&client, 0, sizeof(client));
- memset(&server, 0, sizeof(server));
- client.server = 0;
- server.server = 1;
- client.flags = server.flags = bev_flags;
- client.data = evbuffer_new();
- server.data = evbuffer_new();
- payload = calloc(1, payload_len);
- memset(payload, 'A', payload_len);
- evbuffer_add(server.data, payload, payload_len);
- evbuffer_add(client.data, payload, payload_len);
- client.wm_high = server.wm_high = wm_high;
- client.limit = server.limit = wm_high<<3;
- client.to_read = server.to_read = payload_len>>1;
-
- TT_BLATHER(("openssl_wm: "
- "payload_len = " EV_SIZE_FMT ", "
- "wm_high = " EV_SIZE_FMT ", "
- "limit = " EV_SIZE_FMT ", "
- "to_read: " EV_SIZE_FMT "",
- payload_len,
- wm_high,
- server.limit,
- server.to_read));
-
- listener = evconnlistener_new_bind(base, wm_acceptcb, &server,
- LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE,
- -1, (struct sockaddr *)&sin, sizeof(sin));
-
- tt_assert(listener);
- tt_assert(evconnlistener_get_fd(listener) >= 0);
-
- ssl = SSL_new(get_ssl_ctx());
- tt_assert(ssl);
-
- if (type & REGRESS_OPENSSL_FILTER) {
- bev = bufferevent_socket_new(data->base, -1, client.flags);
- tt_assert(bev);
- bev = bufferevent_openssl_filter_new(
- base, bev, ssl, BUFFEREVENT_SSL_CONNECTING, client.flags);
- } else {
- bev = bufferevent_openssl_socket_new(
- data->base, -1, ssl,
- BUFFEREVENT_SSL_CONNECTING,
- client.flags);
- }
- tt_assert(bev);
- client.bev = bev;
-
- server.neighbour = &client;
- client.neighbour = &server;
-
- bufferevent_setwatermark(bev, EV_READ, 0, client.wm_high);
- bufferevent_setcb(bev, wm_transfer, NULL, wm_eventcb, &client);
-
- tt_assert(getsockname(evconnlistener_get_fd(listener),
- (struct sockaddr*)&ss, &slen) == 0);
-
- tt_assert(!bufferevent_socket_connect(bev, (struct sockaddr*)&ss, slen));
- tt_assert(!evbuffer_add_buffer_reference(bufferevent_get_output(bev), client.data));
- tt_assert(!bufferevent_enable(bev, EV_READ|EV_WRITE));
-
- event_base_dispatch(base);
-
- tt_int_op(client.get, ==, client.limit);
- tt_int_op(server.get, ==, server.limit);
-end:
- free(payload);
- evbuffer_free(client.data);
- evbuffer_free(server.data);
- evconnlistener_free(listener);
- bufferevent_free(client.bev);
- bufferevent_free(server.bev);
+ ;
}
struct testcase_t ssl_testcases[] = {
#define T(a) ((void *)(a))
{ "bufferevent_socketpair", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup, T(REGRESS_OPENSSL_SOCKETPAIR) },
+ TT_ISOLATED, &basic_setup, T(REGRESS_OPENSSL_SOCKETPAIR) },
{ "bufferevent_socketpair_write_after_connect", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR|REGRESS_OPENSSL_CLIENT_WRITE) },
{ "bufferevent_filter", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup, T(REGRESS_OPENSSL_FILTER) },
+ TT_ISOLATED, &basic_setup, T(REGRESS_OPENSSL_FILTER) },
{ "bufferevent_filter_write_after_connect", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_FILTER|REGRESS_OPENSSL_CLIENT_WRITE) },
{ "bufferevent_renegotiate_socketpair", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_RENEGOTIATE) },
{ "bufferevent_renegotiate_filter", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_RENEGOTIATE) },
{ "bufferevent_socketpair_startopen", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_OPEN) },
{ "bufferevent_filter_startopen", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_OPEN) },
{ "bufferevent_socketpair_dirty_shutdown", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
{ "bufferevent_filter_dirty_shutdown", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
{ "bufferevent_renegotiate_socketpair_dirty_shutdown",
regress_bufferevent_openssl,
TT_ISOLATED,
- &ssl_setup,
+ &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_RENEGOTIATE | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
{ "bufferevent_renegotiate_filter_dirty_shutdown",
regress_bufferevent_openssl,
TT_ISOLATED,
- &ssl_setup,
+ &basic_setup,
T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_RENEGOTIATE | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
{ "bufferevent_socketpair_startopen_dirty_shutdown",
regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_OPEN | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
{ "bufferevent_filter_startopen_dirty_shutdown",
regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_OPEN | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
{ "bufferevent_socketpair_fd", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_FD) },
{ "bufferevent_socketpair_freed", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_FREED) },
{ "bufferevent_socketpair_freed_fd", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_FREED | REGRESS_OPENSSL_FD) },
{ "bufferevent_filter_freed_fd", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_FREED | REGRESS_OPENSSL_FD) },
{ "bufferevent_socketpair_timeout", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_TIMEOUT) },
{ "bufferevent_socketpair_timeout_freed_fd", regress_bufferevent_openssl,
- TT_ISOLATED, &ssl_setup,
+ TT_ISOLATED, &basic_setup,
T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_TIMEOUT | REGRESS_OPENSSL_FREED | REGRESS_OPENSSL_FD) },
{ "bufferevent_connect", regress_bufferevent_openssl_connect,
- TT_FORK|TT_NEED_BASE, &ssl_setup, NULL },
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "bufferevent_connect_sleep", regress_bufferevent_openssl_connect,
- TT_FORK|TT_NEED_BASE, &ssl_setup, T(REGRESS_OPENSSL_SLEEP) },
-
- { "bufferevent_wm", regress_bufferevent_openssl_wm,
- TT_FORK|TT_NEED_BASE, &ssl_setup, NULL },
- { "bufferevent_wm_filter", regress_bufferevent_openssl_wm,
- TT_FORK|TT_NEED_BASE, &ssl_setup, T(REGRESS_OPENSSL_FILTER) },
- { "bufferevent_wm_defer", regress_bufferevent_openssl_wm,
- TT_FORK|TT_NEED_BASE, &ssl_setup, T(REGRESS_DEFERRED_CALLBACKS) },
- { "bufferevent_wm_filter_defer", regress_bufferevent_openssl_wm,
- TT_FORK|TT_NEED_BASE, &ssl_setup, T(REGRESS_OPENSSL_FILTER|REGRESS_DEFERRED_CALLBACKS) },
+ TT_FORK|TT_NEED_BASE, &basic_setup, T(REGRESS_OPENSSL_SLEEP) },
#undef T
diff --git a/test/regress_thread.c b/test/regress_thread.c
index 1e0ce41..689c23d 100644
--- a/test/regress_thread.c
+++ b/test/regress_thread.c
@@ -564,8 +564,8 @@ end:
;
}
-#define TEST(name, f) \
- { #name, thread_##name, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE|(f), \
+#define TEST(name) \
+ { #name, thread_##name, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE, \
&basic_setup, NULL }
struct testcase_t thread_testcases[] = {
@@ -575,7 +575,7 @@ struct testcase_t thread_testcases[] = {
{ "forking", thread_basic, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE,
&basic_setup, (char*)"forking" },
#endif
- TEST(conditions_simple, TT_RETRIABLE),
+ TEST(conditions_simple),
{ "deferred_cb_skew", thread_deferred_cb_skew,
TT_FORK|TT_NEED_THREADS|TT_OFF_BY_DEFAULT,
&basic_setup, NULL },
@@ -583,7 +583,7 @@ struct testcase_t thread_testcases[] = {
/****** XXX TODO FIXME windows seems to be having some timing trouble,
* looking into it now. / ellzey
******/
- TEST(no_events, TT_RETRIABLE),
+ TEST(no_events),
#endif
END_OF_TESTCASES
};
diff --git a/test/regress_thread.h b/test/regress_thread.h
index db0d8d1..831b51e 100644
--- a/test/regress_thread.h
+++ b/test/regress_thread.h
@@ -28,7 +28,6 @@
#define REGRESS_THREAD_H_INCLUDED_
#ifdef EVENT__HAVE_PTHREADS
-#include <pthread.h>
#define THREAD_T pthread_t
#define THREAD_FN void *
#define THREAD_RETURN() return (NULL)
diff --git a/test/regress_util.c b/test/regress_util.c
index 3da2070..ef6a148 100644
--- a/test/regress_util.c
+++ b/test/regress_util.c
@@ -23,10 +23,6 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
-/** For event_debug() usage/coverage */
-#define EVENT_VISIBILITY_WANT_DLLIMPORT
-
#include "../util-internal.h"
#ifdef _WIN32
@@ -1416,12 +1412,10 @@ static struct date_rfc1123_case {
{ 1289433600, "Thu, 11 Nov 2010 00:00:00 GMT"},
{ 1323648000, "Mon, 12 Dec 2011 00:00:00 GMT"},
#ifndef _WIN32
-#if EVENT__SIZEOF_TIME_T > 4
/** In win32 case we have max "23:59:59 January 18, 2038, UTC" for time32 */
{ 4294967296, "Sun, 07 Feb 2106 06:28:16 GMT"} /* 2^32 */,
/** In win32 case we have max "23:59:59, December 31, 3000, UTC" for time64 */
{253402300799, "Fri, 31 Dec 9999 23:59:59 GMT"} /* long long future no one can imagine */,
-#endif /* time_t != 32bit */
{ 1456704000, "Mon, 29 Feb 2016 00:00:00 GMT"} /* leap year */,
#endif
{ 1435708800, "Wed, 01 Jul 2015 00:00:00 GMT"} /* leap second */,
@@ -1459,83 +1453,6 @@ end:
;
}
-static void
-test_evutil_v4addr_is_local(void *arg)
-{
- struct sockaddr_in sin;
- sin.sin_family = AF_INET;
-
- /* we use evutil_inet_pton() here to fill in network-byte order */
-#define LOCAL(str, yes) do { \
- tt_int_op(evutil_inet_pton(AF_INET, str, &sin.sin_addr), ==, 1); \
- tt_int_op(evutil_v4addr_is_local_(&sin.sin_addr), ==, yes); \
-} while (0)
-
- /** any */
- sin.sin_addr.s_addr = INADDR_ANY;
- tt_int_op(evutil_v4addr_is_local_(&sin.sin_addr), ==, 1);
-
- /** loopback */
- sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- tt_int_op(evutil_v4addr_is_local_(&sin.sin_addr), ==, 1);
- LOCAL("127.0.0.1", 1);
- LOCAL("127.255.255.255", 1);
- LOCAL("121.0.0.1", 0);
-
- /** link-local */
- LOCAL("169.254.0.1", 1);
- LOCAL("169.254.255.255", 1);
- LOCAL("170.0.0.0", 0);
-
- /** Multicast */
- LOCAL("224.0.0.0", 1);
- LOCAL("239.255.255.255", 1);
- LOCAL("240.0.0.0", 0);
-end:
- ;
-}
-
-static void
-test_evutil_v6addr_is_local(void *arg)
-{
- struct sockaddr_in6 sin6;
- struct in6_addr anyaddr = IN6ADDR_ANY_INIT;
- struct in6_addr loopback = IN6ADDR_LOOPBACK_INIT;
-
- sin6.sin6_family = AF_INET6;
-#define LOCAL6(str, yes) do { \
- tt_int_op(evutil_inet_pton(AF_INET6, str, &sin6.sin6_addr), ==, 1);\
- tt_int_op(evutil_v6addr_is_local_(&sin6.sin6_addr), ==, yes); \
-} while (0)
-
- /** any */
- tt_int_op(evutil_v6addr_is_local_(&anyaddr), ==, 1);
- LOCAL6("::0", 1);
-
- /** loopback */
- tt_int_op(evutil_v6addr_is_local_(&loopback), ==, 1);
- LOCAL6("::1", 1);
-
- /** IPV4 mapped */
- LOCAL6("::ffff:0:0", 1);
- /** IPv4 translated */
- LOCAL6("::ffff:0:0:0", 1);
- /** IPv4/IPv6 translation */
- LOCAL6("64:ff9b::", 0);
- /** Link-local */
- LOCAL6("fe80::", 1);
- /** Multicast */
- LOCAL6("ff00::", 1);
- /** Unspecified */
- LOCAL6("::", 1);
-
- /** Global Internet */
- LOCAL6("2001::", 0);
- LOCAL6("2001:4860:4802:32::1b", 0);
-end:
- ;
-}
-
struct testcase_t util_testcases[] = {
{ "ipv4_parse", regress_ipv4_parse, 0, NULL, NULL },
{ "ipv6_parse", regress_ipv6_parse, 0, NULL, NULL },
@@ -1559,16 +1476,14 @@ struct testcase_t util_testcases[] = {
{ "mm_malloc", test_event_malloc, 0, NULL, NULL },
{ "mm_calloc", test_event_calloc, 0, NULL, NULL },
{ "mm_strdup", test_event_strdup, 0, NULL, NULL },
- { "usleep", test_evutil_usleep, TT_RETRIABLE, NULL, NULL },
+ { "usleep", test_evutil_usleep, 0, NULL, NULL },
{ "monotonic_res", test_evutil_monotonic_res, 0, &basic_setup, (void*)"" },
{ "monotonic_res_precise", test_evutil_monotonic_res, TT_OFF_BY_DEFAULT, &basic_setup, (void*)"precise" },
{ "monotonic_res_fallback", test_evutil_monotonic_res, TT_OFF_BY_DEFAULT, &basic_setup, (void*)"fallback" },
{ "monotonic_prc", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"" },
- { "monotonic_prc_precise", test_evutil_monotonic_prc, TT_RETRIABLE, &basic_setup, (void*)"precise" },
+ { "monotonic_prc_precise", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"precise" },
{ "monotonic_prc_fallback", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"fallback" },
{ "date_rfc1123", test_evutil_date_rfc1123, 0, NULL, NULL },
- { "evutil_v4addr_is_local", test_evutil_v4addr_is_local, 0, NULL, NULL },
- { "evutil_v6addr_is_local", test_evutil_v6addr_is_local, 0, NULL, NULL },
END_OF_TESTCASES,
};
diff --git a/test/rpcgen_wrapper.sh b/test/rpcgen_wrapper.sh
index fe582d5..aaa0303 100755
--- a/test/rpcgen_wrapper.sh
+++ b/test/rpcgen_wrapper.sh
@@ -25,10 +25,19 @@ exit_failed() {
echo "Could not generate regress.gen.\[ch\] using event_rpcgen.sh" >&2
exit 1
}
+
+if [ -x /usr/bin/python2 ] ; then
+ PYTHON2=/usr/bin/python2
+elif [ "x`which python2`" != x ] ; then
+ PYTHON2=python2
+else
+ PYTHON2=python
+fi
+
srcdir=$1
srcdir=${srcdir:-.}
-${srcdir}/../event_rpcgen.py --quiet ${srcdir}/regress.rpc \
+${PYTHON2} ${srcdir}/../event_rpcgen.py --quiet ${srcdir}/regress.rpc \
test/regress.gen.h test/regress.gen.c
case "$?" in
diff --git a/test/test-fdleak.c b/test/test-fdleak.c
index a1fb4ed..4c4eba2 100644
--- a/test/test-fdleak.c
+++ b/test/test-fdleak.c
@@ -95,11 +95,8 @@ server_event_cb(struct bufferevent *bev, short events, void *ctx)
if (events & BEV_EVENT_ERROR) {
my_perror("Error from bufferevent");
exit(1);
- } else if (events & BEV_EVENT_EOF) {
+ } else if (events & (BEV_EVENT_EOF | BEV_EVENT_ERROR)) {
bufferevent_free(bev);
- if (num_requests == MAX_REQUESTS) {
- event_base_loopbreak(bufferevent_get_base(bev));
- }
}
}
@@ -110,7 +107,8 @@ listener_accept_cb(struct evconnlistener *listener, evutil_socket_t sock,
{
struct event_base *base = evconnlistener_get_base(listener);
struct bufferevent *bev = bufferevent_socket_new(base, sock,
- BEV_OPT_CLOSE_ON_FREE);
+ BEV_OPT_CLOSE_ON_FREE);
+
bufferevent_setcb(bev, server_read_cb, NULL, server_event_cb, NULL);
bufferevent_enable(bev, EV_READ|EV_WRITE);
}
@@ -156,9 +154,6 @@ start_loop(void)
start_client(base);
event_base_dispatch(base);
-
- evconnlistener_free(listener);
- event_base_free(base);
}
/*
@@ -183,7 +178,9 @@ client_read_cb(struct bufferevent *bev, void *ctx)
bufferevent_free(bev);
num_requests++;
- if (++num_requests < MAX_REQUESTS) {
+ if (num_requests == MAX_REQUESTS) {
+ event_base_loopbreak(base);
+ } else {
start_client(base);
}
}
diff --git a/test/test.sh b/test/test.sh
index f91a8b0..dd3d986 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -82,8 +82,8 @@ run_tests () {
fi
done
announce_n " test-dumpevents: "
- if python -c 'import sys; assert(sys.version_info >= (2, 4))' 2>/dev/null && test -f $TEST_SRC_DIR/check-dumpevents.py; then
- if $TEST_DIR/test-dumpevents | $TEST_SRC_DIR/check-dumpevents.py >> "$TEST_OUTPUT_FILE" ;
+ if python2 -c 'import sys; assert(sys.version_info >= (2, 4))' 2>/dev/null && test -f $TEST_SRC_DIR/check-dumpevents.py; then
+ if $TEST_DIR/test-dumpevents | python2 $TEST_SRC_DIR/check-dumpevents.py >> "$TEST_OUTPUT_FILE" ;
then
announce OKAY ;
else
diff --git a/test/tinytest.c b/test/tinytest.c
index a94fb9d..3a8e331 100644
--- a/test/tinytest.c
+++ b/test/tinytest.c
@@ -61,12 +61,6 @@
#define LONGEST_TEST_NAME 16384
-#ifndef _WIN32
-#define DEFAULT_TESTCASE_TIMEOUT 30U
-#else
-#define DEFAULT_TESTCASE_TIMEOUT 0U
-#endif
-
static int in_tinytest_main = 0; /**< true if we're in tinytest_main().*/
static int n_ok = 0; /**< Number of tests that have passed */
static int n_bad = 0; /**< Number of tests that have failed. */
@@ -75,7 +69,6 @@ static int n_skipped = 0; /**< Number of tests that have been skipped. */
static int opt_forked = 0; /**< True iff we're called from inside a win32 fork*/
static int opt_nofork = 0; /**< Suppress calls to fork() for debugging. */
static int opt_verbosity = 1; /**< -==quiet,0==terse,1==normal,2==verbose */
-static unsigned int opt_timeout = DEFAULT_TESTCASE_TIMEOUT; /**< Timeout for every test (using alarm()) */
const char *verbosity_flag = "";
const struct testlist_alias_t *cfg_aliases=NULL;
@@ -95,25 +88,6 @@ static void usage(struct testgroup_t *groups, int list_groups)
__attribute__((noreturn));
static int process_test_option(struct testgroup_t *groups, const char *test);
-static unsigned int testcase_set_timeout_(void)
-{
- if (!opt_timeout)
- return 0;
-#ifndef _WIN32
- return alarm(opt_timeout);
-#else
- /** TODO: win32 support */
- fprintf(stderr, "You cannot set alarm on windows\n");
- exit(1);
-#endif
-}
-static unsigned int testcase_reset_timeout_(void)
-{
-#ifndef _WIN32
- return alarm(0);
-#endif
-}
-
static enum outcome
testcase_run_bare_(const struct testcase_t *testcase)
{
@@ -128,11 +102,7 @@ testcase_run_bare_(const struct testcase_t *testcase)
}
cur_test_outcome = OK;
- {
- testcase_set_timeout_();
- testcase->fn(env);
- testcase_reset_timeout_();
- }
+ testcase->fn(env);
outcome = cur_test_outcome;
if (testcase->setup) {
@@ -283,12 +253,15 @@ testcase_run_one(const struct testgroup_t *group,
}
if (outcome == OK) {
+ ++n_ok;
if (opt_verbosity>0 && !opt_forked)
puts(opt_verbosity==1?"OK":"");
} else if (outcome == SKIP) {
+ ++n_skipped;
if (opt_verbosity>0 && !opt_forked)
puts("SKIPPED");
} else {
+ ++n_bad;
if (!opt_forked)
printf("\n [%s FAILED]\n", testcase->name);
}
@@ -339,7 +312,7 @@ tinytest_set_flag_(struct testgroup_t *groups, const char *arg, int set, unsigne
static void
usage(struct testgroup_t *groups, int list_groups)
{
- puts("Options are: [--verbose|--quiet|--terse] [--no-fork] [--timeout <sec>]");
+ puts("Options are: [--verbose|--quiet|--terse] [--no-fork]");
puts(" Specify tests by name, or using a prefix ending with '..'");
puts(" To skip a test, prefix its name with a colon.");
puts(" To enable a disabled test, prefix its name with a plus.");
@@ -436,15 +409,8 @@ tinytest_main(int c, const char **v, struct testgroup_t *groups)
usage(groups, 0);
} else if (!strcmp(v[i], "--list-tests")) {
usage(groups, 1);
- } else if (!strcmp(v[i], "--timeout")) {
- ++i;
- if (i >= c) {
- fprintf(stderr, "--timeout requires argument\n");
- return -1;
- }
- opt_timeout = (unsigned)atoi(v[i]);
} else {
- fprintf(stderr, "Unknown option %s. Try --help\n", v[i]);
+ printf("Unknown option %s. Try --help\n",v[i]);
return -1;
}
} else {
@@ -462,35 +428,11 @@ tinytest_main(int c, const char **v, struct testgroup_t *groups)
#endif
++in_tinytest_main;
- for (i = 0; groups[i].prefix; ++i) {
- struct testgroup_t *group = &groups[i];
- for (j = 0; group->cases[j].name; ++j) {
- struct testcase_t *testcase = &group->cases[j];
- int test_attempts = 3;
- int test_ret_err;
-
- if (!(testcase->flags & TT_ENABLED_))
- continue;
-
- for (;;) {
- test_ret_err = testcase_run_one(group, testcase);
-
- if (test_ret_err == OK)
- break;
- if (!(testcase->flags & TT_RETRIABLE))
- break;
- printf("\n [RETRYING %s (%i)]\n", testcase->name, test_attempts);
- if (!test_attempts--)
- break;
- }
-
- switch (test_ret_err) {
- case OK: ++n_ok; break;
- case SKIP: ++n_skipped; break;
- default: ++n_bad; break;
- }
- }
- }
+ for (i=0; groups[i].prefix; ++i)
+ for (j=0; groups[i].cases[j].name; ++j)
+ if (groups[i].cases[j].flags & TT_ENABLED_)
+ testcase_run_one(&groups[i],
+ &groups[i].cases[j]);
--in_tinytest_main;
diff --git a/test/tinytest.h b/test/tinytest.h
index d321dd4..ed07b26 100644
--- a/test/tinytest.h
+++ b/test/tinytest.h
@@ -34,11 +34,8 @@
#define TT_ENABLED_ (1<<2)
/** Flag for a test that's off by default. */
#define TT_OFF_BY_DEFAULT (1<<3)
-/** Flag for a test that should be runned again in case of failure (but not
- * more then 3 times). */
-#define TT_RETRIABLE (1<<4)
/** If you add your own flags, make them start at this point. */
-#define TT_FIRST_USER_FLAG (1<<5)
+#define TT_FIRST_USER_FLAG (1<<4)
typedef void (*testcase_fn)(void *);
diff --git a/test/tinytest_macros.h b/test/tinytest_macros.h
index e34e74e..2c02a74 100644
--- a/test/tinytest_macros.h
+++ b/test/tinytest_macros.h
@@ -158,14 +158,6 @@
tt_assert_test_type(a,b,#a" "#op" "#b,long,(val1_ op val2_), \
"%ld",TT_EXIT_TEST_FUNCTION)
-/** To compare SOCKET(windows)/fd */
-#define tt_fd_op(a,op,b) do { \
- int _a = (int)(a); \
- int _b = (int)(b); \
- tt_assert_test_type(_a,_b,#a" "#op" "#b,long,(val1_ op val2_), \
- "%ld",TT_EXIT_TEST_FUNCTION); \
-} while (0)
-
#define tt_uint_op(a,op,b) \
tt_assert_test_type(a,b,#a" "#op" "#b,unsigned long, \
(val1_ op val2_),"%lu",TT_EXIT_TEST_FUNCTION)
diff --git a/time-internal.h b/time-internal.h
index e79e6a5..2c584fa 100644
--- a/time-internal.h
+++ b/time-internal.h
@@ -54,7 +54,6 @@ extern "C" {
#endif
long evutil_tv_to_msec_(const struct timeval *tv);
-EVENT2_EXPORT_SYMBOL
void evutil_usleep_(const struct timeval *tv);
#ifdef _WIN32
@@ -87,10 +86,8 @@ struct evutil_monotonic_timer {
struct timeval last_time;
};
-EVENT2_EXPORT_SYMBOL
int evutil_configure_monotonic_time_(struct evutil_monotonic_timer *mt,
int flags);
-EVENT2_EXPORT_SYMBOL
int evutil_gettime_monotonic_(struct evutil_monotonic_timer *mt, struct timeval *tv);
diff --git a/util-internal.h b/util-internal.h
index 39576c7..38d0f59 100644
--- a/util-internal.h
+++ b/util-internal.h
@@ -50,40 +50,12 @@
extern "C" {
#endif
-/* __has_attribute() wrapper */
-#ifdef __has_attribute
-# define EVUTIL_HAS_ATTRIBUTE __has_attribute
-#endif
-/** clang 3 __has_attribute misbehaves in some versions */
-#if defined(__clang__) && __clang__ == 1
-# if defined(__apple_build_version__)
-# if __clang_major__ <= 6
-# undef EVUTIL_HAS_ATTRIBUTE
-# endif
-# else /* !__apple_build_version__ */
-# if __clang_major__ == 3 && __clang_minor__ >= 2 && __clang_minor__ <= 5
-# undef EVUTIL_HAS_ATTRIBUTE
-# endif
-# endif /* __apple_build_version__ */
-#endif /*\ defined(__clang__) && __clang__ == 1 */
-#ifndef EVUTIL_HAS_ATTRIBUTE
-# define EVUTIL_HAS_ATTRIBUTE(x) 0
-#endif
-
/* If we need magic to say "inline", get it for free internally. */
#ifdef EVENT__inline
#define inline EVENT__inline
#endif
-
-/* Define to appropriate substitute if compiler doesnt have __func__ */
-#if defined(EVENT__HAVE___func__)
-# ifndef __func__
-# define __func__ __func__
-# endif
-#elif defined(EVENT__HAVE___FUNCTION__)
-# define __func__ __FUNCTION__
-#else
-# define __func__ __FILE__
+#if defined(EVENT____func__) && !defined(__func__)
+#define __func__ EVENT____func__
#endif
/* A good no-op to use in macro definitions. */
@@ -247,26 +219,19 @@ extern "C" {
* when you care about ASCII's notion of character types, because you are about
* to send those types onto the wire.
*/
-EVENT2_EXPORT_SYMBOL
int EVUTIL_ISALPHA_(char c);
-EVENT2_EXPORT_SYMBOL
int EVUTIL_ISALNUM_(char c);
int EVUTIL_ISSPACE_(char c);
-EVENT2_EXPORT_SYMBOL
int EVUTIL_ISDIGIT_(char c);
-EVENT2_EXPORT_SYMBOL
int EVUTIL_ISXDIGIT_(char c);
int EVUTIL_ISPRINT_(char c);
int EVUTIL_ISLOWER_(char c);
int EVUTIL_ISUPPER_(char c);
-EVENT2_EXPORT_SYMBOL
char EVUTIL_TOUPPER_(char c);
-EVENT2_EXPORT_SYMBOL
char EVUTIL_TOLOWER_(char c);
/** Remove all trailing horizontal whitespace (space or tab) from the end of a
* string */
-EVENT2_EXPORT_SYMBOL
void evutil_rtrim_lws_(char *);
@@ -293,16 +258,13 @@ void evutil_rtrim_lws_(char *);
*/
int evutil_open_closeonexec_(const char *pathname, int flags, unsigned mode);
-EVENT2_EXPORT_SYMBOL
int evutil_read_file_(const char *filename, char **content_out, size_t *len_out,
int is_binary);
-EVENT2_EXPORT_SYMBOL
int evutil_socket_connect_(evutil_socket_t *fd_ptr, const struct sockaddr *sa, int socklen);
int evutil_socket_finished_connecting_(evutil_socket_t fd);
-EVENT2_EXPORT_SYMBOL
int evutil_ersatz_socketpair_(int, int , int, evutil_socket_t[]);
int evutil_resolve_(int family, const char *hostname, struct sockaddr *sa,
@@ -327,18 +289,15 @@ struct evutil_weakrand_state {
* attacker can't predict, or which passes strong statistical tests, use the
* evutil_secure_rng* functions instead.
*/
-EVENT2_EXPORT_SYMBOL
ev_uint32_t evutil_weakrand_seed_(struct evutil_weakrand_state *state, ev_uint32_t seed);
/* Return a pseudorandom value between 0 and EVUTIL_WEAKRAND_MAX inclusive.
* Updates the state in 'seed' as needed -- this value must be protected by a
* lock.
*/
-EVENT2_EXPORT_SYMBOL
ev_int32_t evutil_weakrand_(struct evutil_weakrand_state *seed);
/* Return a pseudorandom value x such that 0 <= x < top. top must be no more
* than EVUTIL_WEAKRAND_MAX. Updates the state in 'seed' as needed -- this
* value must be proteced by a lock */
-EVENT2_EXPORT_SYMBOL
ev_int32_t evutil_weakrand_range_(struct evutil_weakrand_state *seed, ev_int32_t top);
/* Evaluates to the same boolean value as 'p', and hints to the compiler that
@@ -349,12 +308,6 @@ ev_int32_t evutil_weakrand_range_(struct evutil_weakrand_state *seed, ev_int32_t
#define EVUTIL_UNLIKELY(p) (p)
#endif
-#if EVUTIL_HAS_ATTRIBUTE(fallthrough)
-#define EVUTIL_FALLTHROUGH __attribute__((fallthrough))
-#else
-#define EVUTIL_FALLTHROUGH /* fallthrough */
-#endif
-
/* Replacement for assert() that calls event_errx on failure. */
#ifdef NDEBUG
#define EVUTIL_ASSERT(cond) EVUTIL_NIL_CONDITION_(cond)
@@ -404,22 +357,16 @@ typedef struct evdns_getaddrinfo_request* (*evdns_getaddrinfo_fn)(
const char *nodename, const char *servname,
const struct evutil_addrinfo *hints_in,
void (*cb)(int, struct evutil_addrinfo *, void *), void *arg);
-EVENT2_EXPORT_SYMBOL
void evutil_set_evdns_getaddrinfo_fn_(evdns_getaddrinfo_fn fn);
typedef void (*evdns_getaddrinfo_cancel_fn)(
struct evdns_getaddrinfo_request *req);
-EVENT2_EXPORT_SYMBOL
void evutil_set_evdns_getaddrinfo_cancel_fn_(evdns_getaddrinfo_cancel_fn fn);
-EVENT2_EXPORT_SYMBOL
struct evutil_addrinfo *evutil_new_addrinfo_(struct sockaddr *sa,
ev_socklen_t socklen, const struct evutil_addrinfo *hints);
-EVENT2_EXPORT_SYMBOL
struct evutil_addrinfo *evutil_addrinfo_append_(struct evutil_addrinfo *first,
struct evutil_addrinfo *append);
-EVENT2_EXPORT_SYMBOL
void evutil_adjust_hints_for_addrconfig_(struct evutil_addrinfo *hints);
-EVENT2_EXPORT_SYMBOL
int evutil_getaddrinfo_common_(const char *nodename, const char *servname,
struct evutil_addrinfo *hints, struct evutil_addrinfo **res, int *portnum);
@@ -432,7 +379,6 @@ void evutil_getaddrinfo_cancel_async_(struct evdns_getaddrinfo_request *data);
/** Return true iff sa is a looback address. (That is, it is 127.0.0.1/8, or
* ::1). */
-EVENT2_EXPORT_SYMBOL
int evutil_sockaddr_is_loopback_(const struct sockaddr *sa);
@@ -441,7 +387,6 @@ int evutil_sockaddr_is_loopback_(const struct sockaddr *sa);
Returns a pointer to out. Always writes something into out, so it's safe
to use the output of this function without checking it for NULL.
*/
-EVENT2_EXPORT_SYMBOL
const char *evutil_format_sockaddr_port_(const struct sockaddr *sa, char *out, size_t outlen);
int evutil_hex_char_to_int_(char c);
@@ -451,7 +396,6 @@ void evutil_free_secure_rng_globals_(void);
void evutil_free_globals_(void);
#ifdef _WIN32
-EVENT2_EXPORT_SYMBOL
HMODULE evutil_load_windows_system_library_(const TCHAR *library_name);
#endif
@@ -500,7 +444,6 @@ HMODULE evutil_load_windows_system_library_(const TCHAR *library_name);
#endif
#endif
-EVENT2_EXPORT_SYMBOL
evutil_socket_t evutil_socket_(int domain, int type, int protocol);
evutil_socket_t evutil_accept4_(evutil_socket_t sockfd, struct sockaddr *addr,
ev_socklen_t *addrlen, int flags);
@@ -533,17 +476,6 @@ evutil_socket_t evutil_eventfd_(unsigned initval, int flags);
void evutil_memclear_(void *mem, size_t len);
-struct in_addr;
-struct in6_addr;
-
-/* This is a any, loopback, link-local, multicast */
-EVENT2_EXPORT_SYMBOL
-int evutil_v4addr_is_local_(const struct in_addr *in);
-/* This is a reserved, ipv4compat, ipv4map, loopback,
- * link-local, multicast, or unspecified address. */
-EVENT2_EXPORT_SYMBOL
-int evutil_v6addr_is_local_(const struct in6_addr *in);
-
#ifdef __cplusplus
}
#endif
diff --git a/win32select.c b/win32select.c
index 0ddfe4b..1766858 100644
--- a/win32select.c
+++ b/win32select.c
@@ -326,8 +326,6 @@ win32_dispatch(struct event_base *base, struct timeval *tv)
event_debug(("%s: select returned %d", __func__, res));
if (res <= 0) {
- event_debug(("%s: %s", __func__,
- evutil_socket_error_to_string(EVUTIL_SOCKET_ERROR())));
return res;
}