2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed compile error on opensolaris
	* configure.ac
	* src/Logger.h
	* src/GZipEncoder.h
pull/1/head
Tatsuhiro Tsujikawa 2010-04-11 15:44:37 +00:00
parent 15bb26cac8
commit f2697552ae
5 changed files with 78 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error on opensolaris
* configure.ac
* src/Logger.h
* src/GZipEncoder.h
2010-04-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added aria2.pauseAll, aria2.forcePauseAll and aria2.unpauseAll

61
configure vendored
View File

@ -7488,6 +7488,67 @@ if test "$ac_res" != no; then :
fi
case "$target" in
*solaris*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
$as_echo_n "checking for library containing getaddrinfo... " >&6; }
if test "${ac_cv_search_getaddrinfo+set}" = set; 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 getaddrinfo ();
int
main ()
{
return getaddrinfo ();
;
return 0;
}
_ACEOF
for ac_lib in '' socket; 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_cxx_try_link "$LINENO"; then :
ac_cv_search_getaddrinfo=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if test "${ac_cv_search_getaddrinfo+set}" = set; then :
break
fi
done
if test "${ac_cv_search_getaddrinfo+set}" = set; then :
else
ac_cv_search_getaddrinfo=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
$as_echo "$ac_cv_search_getaddrinfo" >&6; }
ac_res=$ac_cv_search_getaddrinfo
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
;;
esac
# Checks for header files.
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!

View File

@ -210,6 +210,12 @@ AM_CONDITIONAL([HAVE_SQLITE3], [test "x$have_sqlite3" = "xyes"])
AC_SEARCH_LIBS([clock_gettime], [rt])
case "$target" in
*solaris*)
AC_SEARCH_LIBS([getaddrinfo], [socket])
;;
esac
# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_STDC

View File

@ -34,6 +34,7 @@
/* copyright --> */
#ifndef _D_GZIP_ENCODER_H_
#define _D_GZIP_ENCODER_H_
#include "common.h"
#include <string>

View File

@ -72,7 +72,7 @@ private:
int _stdoutField;
inline bool levelEnabled(LEVEL level) const
inline bool levelEnabled(LEVEL level)
{
return (level >= _logLevel && _file.is_open()) || _stdoutField&level;
}
@ -195,12 +195,12 @@ public:
// Returns true if this logger actually writes debug log message to
// either file or stdout.
bool debug() const
bool debug()
{
return levelEnabled(DEBUG);
}
bool info() const
bool info()
{
return levelEnabled(INFO);
}