mirror of https://github.com/aria2/aria2
2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error on OpenBSD4.7(i386). In openssl.m4, we first search libcrypto and then libssl because libssl depends on libcrypto on OpenBSD. * src/Netrc.cc * src/Netrc.h * src/Triplet.h * src/openssl.m4pull/1/head
parent
584af68e19
commit
32d4ffa8ee
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Fixed compile error on OpenBSD4.7(i386). In openssl.m4, we first
|
||||||
|
search libcrypto and then libssl because libssl depends on
|
||||||
|
libcrypto on OpenBSD.
|
||||||
|
* src/Netrc.cc
|
||||||
|
* src/Netrc.h
|
||||||
|
* src/Triplet.h
|
||||||
|
* src/openssl.m4
|
||||||
|
|
||||||
2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Execute 5 DHT tasks concurrently in each task queue.
|
Execute 5 DHT tasks concurrently in each task queue.
|
||||||
|
|
|
@ -6833,6 +6833,43 @@ if test "x$have_openssl" != "xyes"; then
|
||||||
LIBS="-L$openssl_prefix_lib $LIBS"
|
LIBS="-L$openssl_prefix_lib $LIBS"
|
||||||
CPPFLAGS="-I$openssl_prefix_include $CPPFLAGS"
|
CPPFLAGS="-I$openssl_prefix_include $CPPFLAGS"
|
||||||
|
|
||||||
|
# First check libcrypto, because libssl may depend on it
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcrypto" >&5
|
||||||
|
$as_echo_n "checking for main in -lcrypto... " >&6; }
|
||||||
|
if test "${ac_cv_lib_crypto_main+set}" = set; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
LIBS="-lcrypto $LIBS"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return main ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_cxx_try_link "$LINENO"; then :
|
||||||
|
ac_cv_lib_crypto_main=yes
|
||||||
|
else
|
||||||
|
ac_cv_lib_crypto_main=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_main" >&5
|
||||||
|
$as_echo "$ac_cv_lib_crypto_main" >&6; }
|
||||||
|
if test "x$ac_cv_lib_crypto_main" = x""yes; then :
|
||||||
|
have_openssl=yes; LIBS="-lcrypto $LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$have_openssl" = "xyes"; then
|
||||||
|
have_openssl=no
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
|
||||||
$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
|
$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
|
||||||
if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then :
|
if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then :
|
||||||
|
@ -6873,42 +6910,6 @@ if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then :
|
||||||
have_openssl=yes LIBS="-lssl $LIBS"
|
have_openssl=yes LIBS="-lssl $LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$have_openssl" = "xyes"; then
|
|
||||||
have_openssl=no
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcrypto" >&5
|
|
||||||
$as_echo_n "checking for main in -lcrypto... " >&6; }
|
|
||||||
if test "${ac_cv_lib_crypto_main+set}" = set; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
ac_check_lib_save_LIBS=$LIBS
|
|
||||||
LIBS="-lcrypto $LIBS"
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
return main ();
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_cxx_try_link "$LINENO"; then :
|
|
||||||
ac_cv_lib_crypto_main=yes
|
|
||||||
else
|
|
||||||
ac_cv_lib_crypto_main=no
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
LIBS=$ac_check_lib_save_LIBS
|
|
||||||
fi
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_main" >&5
|
|
||||||
$as_echo "$ac_cv_lib_crypto_main" >&6; }
|
|
||||||
if test "x$ac_cv_lib_crypto_main" = x""yes; then :
|
|
||||||
have_openssl=yes; LIBS="-lcrypto $LIBS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$have_openssl" = "xyes"; then
|
if test "x$have_openssl" = "xyes"; then
|
||||||
OPENSSL_LIBS="-L$openssl_prefix_lib -lssl -lcrypto"
|
OPENSSL_LIBS="-L$openssl_prefix_lib -lssl -lcrypto"
|
||||||
OPENSSL_CFLAGS="-I$openssl_prefix_include"
|
OPENSSL_CFLAGS="-I$openssl_prefix_include"
|
||||||
|
|
|
@ -36,10 +36,11 @@ if test "x$have_openssl" != "xyes"; then
|
||||||
LIBS="-L$openssl_prefix_lib $LIBS"
|
LIBS="-L$openssl_prefix_lib $LIBS"
|
||||||
CPPFLAGS="-I$openssl_prefix_include $CPPFLAGS"
|
CPPFLAGS="-I$openssl_prefix_include $CPPFLAGS"
|
||||||
|
|
||||||
AC_CHECK_LIB([ssl], [SSL_library_init], [have_openssl=yes LIBS="-lssl $LIBS"])
|
# First check libcrypto, because libssl may depend on it
|
||||||
|
AC_CHECK_LIB([crypto], [main], [have_openssl=yes; LIBS="-lcrypto $LIBS"])
|
||||||
if test "x$have_openssl" = "xyes"; then
|
if test "x$have_openssl" = "xyes"; then
|
||||||
have_openssl=no
|
have_openssl=no
|
||||||
AC_CHECK_LIB([crypto], [main], [have_openssl=yes; LIBS="-lcrypto $LIBS"])
|
AC_CHECK_LIB([ssl], [SSL_library_init], [have_openssl=yes LIBS="-lssl $LIBS"])
|
||||||
if test "x$have_openssl" = "xyes"; then
|
if test "x$have_openssl" = "xyes"; then
|
||||||
OPENSSL_LIBS="-L$openssl_prefix_lib -lssl -lcrypto"
|
OPENSSL_LIBS="-L$openssl_prefix_lib -lssl -lcrypto"
|
||||||
OPENSSL_CFLAGS="-I$openssl_prefix_include"
|
OPENSSL_CFLAGS="-I$openssl_prefix_include"
|
||||||
|
|
24
src/Netrc.cc
24
src/Netrc.cc
|
@ -44,17 +44,17 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
const std::string Netrc::MACHINE("machine");
|
const std::string Netrc::A2_MACHINE("machine");
|
||||||
|
|
||||||
const std::string Netrc::DEFAULT("default");
|
const std::string Netrc::A2_DEFAULT("default");
|
||||||
|
|
||||||
const std::string Netrc::LOGIN("login");
|
const std::string Netrc::A2_LOGIN("login");
|
||||||
|
|
||||||
const std::string Netrc::PASSWORD("password");
|
const std::string Netrc::A2_PASSWORD("password");
|
||||||
|
|
||||||
const std::string Netrc::ACCOUNT("account");
|
const std::string Netrc::A2_ACCOUNT("account");
|
||||||
|
|
||||||
const std::string Netrc::MACDEF("macdef");
|
const std::string Netrc::A2_MACDEF("macdef");
|
||||||
|
|
||||||
void Netrc::skipMacdef(std::ifstream& f) const
|
void Netrc::skipMacdef(std::ifstream& f) const
|
||||||
{
|
{
|
||||||
|
@ -97,11 +97,11 @@ void Netrc::parse(const std::string& path)
|
||||||
eoi = tokens.end(); iter != eoi; ++iter) {
|
eoi = tokens.end(); iter != eoi; ++iter) {
|
||||||
const std::string& token = *iter;
|
const std::string& token = *iter;
|
||||||
if(state == GET_TOKEN) {
|
if(state == GET_TOKEN) {
|
||||||
if(token == Netrc::MACHINE) {
|
if(token == Netrc::A2_MACHINE) {
|
||||||
storeAuthenticator(authenticator);
|
storeAuthenticator(authenticator);
|
||||||
authenticator.reset(new Authenticator());
|
authenticator.reset(new Authenticator());
|
||||||
state = SET_MACHINE;
|
state = SET_MACHINE;
|
||||||
} else if(token == Netrc::DEFAULT) {
|
} else if(token == Netrc::A2_DEFAULT) {
|
||||||
storeAuthenticator(authenticator);
|
storeAuthenticator(authenticator);
|
||||||
authenticator.reset(new DefaultAuthenticator());
|
authenticator.reset(new DefaultAuthenticator());
|
||||||
} else {
|
} else {
|
||||||
|
@ -110,13 +110,13 @@ void Netrc::parse(const std::string& path)
|
||||||
(StringFormat("Netrc:parse error. %s encounterd where 'machine'"
|
(StringFormat("Netrc:parse error. %s encounterd where 'machine'"
|
||||||
" or 'default' expected.", token.c_str()).str());
|
" or 'default' expected.", token.c_str()).str());
|
||||||
}
|
}
|
||||||
if(token == Netrc::LOGIN) {
|
if(token == Netrc::A2_LOGIN) {
|
||||||
state = SET_LOGIN;
|
state = SET_LOGIN;
|
||||||
} else if(token == Netrc::PASSWORD) {
|
} else if(token == Netrc::A2_PASSWORD) {
|
||||||
state = SET_PASSWORD;
|
state = SET_PASSWORD;
|
||||||
} else if(token == Netrc::ACCOUNT) {
|
} else if(token == Netrc::A2_ACCOUNT) {
|
||||||
state = SET_ACCOUNT;
|
state = SET_ACCOUNT;
|
||||||
} else if(token == Netrc::MACDEF) {
|
} else if(token == Netrc::A2_MACDEF) {
|
||||||
state = SET_MACDEF;
|
state = SET_MACDEF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
src/Netrc.h
12
src/Netrc.h
|
@ -160,17 +160,17 @@ public:
|
||||||
authenticators_.push_back(authenticator);
|
authenticators_.push_back(authenticator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const std::string MACHINE;
|
static const std::string A2_MACHINE;
|
||||||
|
|
||||||
static const std::string DEFAULT;
|
static const std::string A2_DEFAULT;
|
||||||
|
|
||||||
static const std::string LOGIN;
|
static const std::string A2_LOGIN;
|
||||||
|
|
||||||
static const std::string PASSWORD;
|
static const std::string A2_PASSWORD;
|
||||||
|
|
||||||
static const std::string ACCOUNT;
|
static const std::string A2_ACCOUNT;
|
||||||
|
|
||||||
static const std::string MACDEF;
|
static const std::string A2_MACDEF;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace aria2
|
} // namespace aria2
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#ifndef D_TRIPLET_H
|
#ifndef D_TRIPLET_H
|
||||||
#define D_TRIPLET_H
|
#define D_TRIPLET_H
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
Loading…
Reference in New Issue