Skip to content

Commit

Permalink
git-svn-id: svn://cherokee-project.com/cherokee/trunk@666 5dc97367-97…
Browse files Browse the repository at this point in the history
…f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed Mar 13, 2007
1 parent 2cbe8fc commit 14c9e3c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 33 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2007-03-13 Alvaro Lopez Ortega <alvaro@alobbs.com>

* cherokee/thread.c (process_active_connections): Tries to report
the handler name when a ret code is found after calling the
handler init method.

2007-03-12 Alvaro Lopez Ortega <alvaro@alobbs.com>

* cherokee/socket.c (cherokee_socket_writev): Fixed. It wasn't
Expand Down
7 changes: 6 additions & 1 deletion cherokee/thread.c
Expand Up @@ -1021,7 +1021,12 @@ process_active_connections (cherokee_thread_t *thd)
continue;

default:
RET_UNKNOWN(ret);
if ((MODULE(conn->handler)->info) &&
(MODULE(conn->handler)->info->name))
PRINT_ERROR ("Unknown ret %d from handler %s\n", ret,
MODULE(conn->handler)->info->name);
else
RET_UNKNOWN(ret);
}

/* If it is an error, and the connection has not a handler to manage
Expand Down
46 changes: 14 additions & 32 deletions configure.in
Expand Up @@ -91,31 +91,23 @@ AC_MSG_CHECKING([host platform characteristics])
os_string="Win32"
libdl=
;;
*-*-*netbsd*)
thread_ldflags="-pthread"
libdl=
;;
*-*-*freebsd*|*-*-*openbsd*|*-*-*dragonfly*)
thread_ldflags="-pthread"
libdl="-pthread"
;;
*-*-linux*)
thread_ldflags="-lpthread"
libdl="-ldl"
;;
*-*-hpux*)
thread_ldflags="-lpthread"
libdl="-ldl"
;;
*-*-solaris*)
AC_DEFINE(SOLARIS, 1, [It is Solaris])
setenv_is_threadsafe="yes"
libdl="-ldl"
;;
*-*-hpux*)
libdl="-ldl"
;;
*-*-*freebsd*|*-*-*openbsd*|*-*-*netbsd*|*-*-*dragonfly*)
libdl=
;;
*-*-darwin*)
so_suffix=dylib
mod_suffix=so
thread_ldflags="-pthread"
libdl="-ldl"
;;
*)
Expand Down Expand Up @@ -425,6 +417,9 @@ AC_CHECK_FUNC(getopt_long, have_getopt_long="yes")
AM_CONDITIONAL(HAVE_GETOPT_LONG, test x"$have_getopt_long" = "xyes")





dnl
dnl Pthread
dnl
Expand All @@ -437,20 +432,7 @@ if test "x$with_pthread" = "xyes"
then
ACX_PTHREAD( , AC_MSG_ERROR([POSIX threads missing]))

dnl I'm not sure about it..
dnl but I've had problems compiling in some GNU/Linux machines
dnl because ACX_PTHREAD didn't add -lpthread
if test "x$PTHREAD_LIBS" = "x"
then
# AC_CHECK_LIB(pthread, pthread_create,
# [PTHREAD_LIBS="-lpthread"
# AC_SUBST(PTHREAD_LIBS)])
PTHREAD_LIBS="$thread_ldflags"
AC_SUBST(PTHREAD_LIBS)
fi

if test "$acx_pthread_ok" = "yes"; then

AC_MSG_CHECKING([for pthread_rwlock_t support])
have_pthread_rwlock_t=yes

Expand Down Expand Up @@ -482,16 +464,16 @@ then
if test "$have_pthread_rwlock_t" = yes; then
AC_DEFINE(HAVE_PTHREAD_RWLOCK_T, 1, [Define if your pthread library includes pthread_rwlock_t])
fi

AC_CHECK_FUNC(pthread_attr_setschedpolicy, have_pthread_attr_setschedpolicy=yes)
if test x"$have_pthread_attr_setschedpolicy" = "xyes"; then
AC_DEFINE(HAVE_PTHREAD_SETSCHEDPOLICY, 1, [Pthread support pthread_attr_setschedpolicy])
fi

with_pthread="yes"
fi
fi

AC_CHECK_FUNC(pthread_attr_setschedpolicy, have_pthread_attr_setschedpolicy=yes)
if test x"$have_pthread_attr_setschedpolicy" = "xyes"; then
AC_DEFINE(HAVE_PTHREAD_SETSCHEDPOLICY, 1, [Pthread support pthread_attr_setschedpolicy])
fi

dnl
dnl Is setenv() threadsafe?
dnl
Expand Down

0 comments on commit 14c9e3c

Please sign in to comment.