Skip to content

Commit

Permalink
Make sure to only globally init/deinit libcurl upon library load/unload
Browse files Browse the repository at this point in the history
Up until now libcurl was initialized/deinitialized every time a request
was sent. However curl_global_cleanup() also affects other libraries'
code so that e.g. OpenSSL-related functions could fail.
  • Loading branch information
nikias committed Jul 4, 2017
1 parent 6d7418a commit b7e78e2
Show file tree
Hide file tree
Showing 3 changed files with 576 additions and 4 deletions.
18 changes: 18 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,24 @@ AC_TYPE_UINT8_T
# Checks for library functions.
AC_CHECK_FUNCS([strcasecmp strdup strerror strndup])

# Check for operating system
AC_MSG_CHECKING([wether we need platform-specific build settings for ${host_os}])
case ${host_os} in
*mingw32*|*cygwin*)
AC_MSG_RESULT([yes])
win32=true
;;
darwin*|*android*)
AC_MSG_RESULT([no])
;;
*)
AC_MSG_RESULT([yes])
AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build ${PACKAGE}])])
AC_CHECK_LIB(pthread, [pthread_once], [], [AC_MSG_ERROR([pthread with pthread_once required to build ${PACKAGE}])])
;;
esac
AM_CONDITIONAL(WIN32, test x$win32 = xtrue)

AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char -fvisibility=hidden")
AC_SUBST(GLOBAL_CFLAGS)

Expand Down
Loading

0 comments on commit b7e78e2

Please sign in to comment.