[Cherokee-commits] rev 1571 - in cherokee/trunk
cherokee at cherokee-project.com
cherokee at cherokee-project.com
Wed Jun 18 10:05:37 CEST 2008
Author: alo
Date: 2008-06-18 10:05:36 +0200 (Wed, 18 Jun 2008)
New Revision: 1571
Log:
Get the changeset with:
svn diff -r 1570:1571 svn://svn.cherokee-project.com/
Added:
cherokee/trunk/cherokee/info.c
cherokee/trunk/cherokee/info.h
Modified:
cherokee/trunk/ChangeLog
5 +
cherokee/trunk/cherokee/Makefile.am
4 -
cherokee/trunk/cherokee/main.c
5 -
cherokee/trunk/cherokee/util.c
106 ----------------------------
cherokee/trunk/cherokee/util.h
5 -
Modified: cherokee/trunk/ChangeLog
===================================================================
--- cherokee/trunk/ChangeLog 2008-06-18 07:34:20 UTC (rev 1570)
+++ cherokee/trunk/ChangeLog 2008-06-18 08:05:36 UTC (rev 1571)
@@ -1,5 +1,10 @@
2008-06-18 Alvaro Lopez Ortega <alvaro at alobbs.com>
+ * cherokee/util.h, cherokee/util.c, cherokee/info.h,
+ cherokee/info.c, cherokee/Makefile.am: As long as the
+ cherokee_server_print_build_info() depends on libcherokee-server
+ functions it has to be relocated within the library.
+
* cherokee/avl.c (cherokee_avl_get, cherokee_avl_add)
(cherokee_avl_del): Added sanity check. The key must not be empty.
Modified: cherokee/trunk/cherokee/Makefile.am
===================================================================
--- cherokee/trunk/cherokee/Makefile.am 2008-06-18 07:34:20 UTC (rev 1570)
+++ cherokee/trunk/cherokee/Makefile.am 2008-06-18 08:05:36 UTC (rev 1571)
@@ -1068,7 +1068,9 @@
source.h \
source.c \
source_interpreter.h \
-source_interpreter.c
+source_interpreter.c \
+info.h \
+info.c
libcherokee_config_la_SOURCES = \
$(config_common) \
Added: cherokee/trunk/cherokee/info.c
===================================================================
--- cherokee/trunk/cherokee/info.c (rev 0)
+++ cherokee/trunk/cherokee/info.c 2008-06-18 08:05:36 UTC (rev 1571)
@@ -0,0 +1,133 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/* Cherokee
+ *
+ * Authors:
+ * Alvaro Lopez Ortega <alvaro at alobbs.com>
+ *
+ * Copyright (C) 2001-2008 Alvaro Lopez Ortega
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#include "common-internal.h"
+#include "info.h"
+#include "plugin_loader.h"
+#include "server-protected.h"
+
+void
+cherokee_info_build_print (cherokee_server_t *srv)
+{
+ cherokee_buffer_t builtin = CHEROKEE_BUF_INIT;
+
+ /* Basic info
+ */
+ printf ("Compilation\n");
+ printf (" Version: " PACKAGE_VERSION "\n");
+ printf (" Compiled on: " __DATE__ " " __TIME__ "\n");
+ printf (" Arguments to configure: " CHEROKEE_CONFIG_ARGS "\n");
+ printf ("\n");
+
+ /* Paths
+ */
+ printf ("Installation\n");
+ printf (" Deps dir: " CHEROKEE_DEPSDIR "\n");
+ printf (" Data dir: " CHEROKEE_DATADIR "\n");
+ printf (" Icons dir: " CHEROKEE_ICONSDIR "\n");
+ printf (" Themes dir: " CHEROKEE_THEMEDIR "\n");
+ printf (" Plug-in dir: " CHEROKEE_PLUGINDIR "\n");
+ printf ("\n");
+
+ /* Print plug-ins information
+ */
+ printf ("Plug-ins\n");
+ cherokee_plugin_loader_get_mods_info (&srv->loader, &builtin);
+ printf (" Built-in: %s\n", builtin.buf ? builtin.buf : "");
+ printf ("\n");
+ cherokee_buffer_mrproper (&builtin);
+
+ /* Support
+ */
+ printf ("Support\n");
+#ifdef HAVE_IPV6
+ printf (" IPv6: yes\n");
+#else
+ printf (" IPv6: no\n");
+#endif
+#ifdef HAVE_OPENSSL
+ printf (" OpenSSL: yes\n");
+#else
+ printf (" OpenSSL: no\n");
+#endif
+#ifdef HAVE_GNUTLS
+ printf (" GnuTLS: yes\n");
+#else
+ printf (" GnuTLS: no\n");
+#endif
+#ifdef HAVE_PTHREAD
+ printf (" Pthreads: yes\n");
+#else
+ printf (" Pthreads: no\n");
+#endif
+#ifdef TRACE_ENABLED
+ printf (" Tracing: yes\n");
+#else
+ printf (" Tracing: no\n");
+#endif
+#ifdef HAVE_SENDFILE
+ printf (" sendfile(): yes\n");
+#else
+ printf (" sendfile(): no\n");
+#endif
+#ifdef HAVE_SYSLOG
+ printf (" syslog(): yes\n");
+#else
+ printf (" syslog(): no\n");
+#endif
+ printf ("\n");
+
+
+ printf ("Polling methods\n");
+#ifdef HAVE_PORT
+ printf (" Solaris' port(): yes\n");
+#else
+ printf (" Solaris' port(): no\n");
+#endif
+#ifdef HAVE_SELECT
+ printf (" select(): yes\n");
+#else
+ printf (" select(): no\n");
+#endif
+#ifdef HAVE_WIN32_SELECT
+ printf (" Win32 select(): yes\n");
+#else
+ printf (" Win32 select(): no\n");
+#endif
+#ifdef HAVE_POLL
+ printf (" poll(): yes\n");
+#else
+ printf (" poll(): no\n");
+#endif
+#ifdef HAVE_EPOLL
+ printf (" epoll(): yes\n");
+#else
+ printf (" epoll(): no\n");
+#endif
+#ifdef HAVE_KQUEUE
+ printf (" kqueue(): yes\n");
+#else
+ printf (" kqueue(): no\n");
+#endif
+}
Added: cherokee/trunk/cherokee/info.h
===================================================================
--- cherokee/trunk/cherokee/info.h (rev 0)
+++ cherokee/trunk/cherokee/info.h 2008-06-18 08:05:36 UTC (rev 1571)
@@ -0,0 +1,40 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/* Cherokee
+ *
+ * Authors:
+ * Alvaro Lopez Ortega <alvaro at alobbs.com>
+ *
+ * Copyright (C) 2001-2008 Alvaro Lopez Ortega
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#if !defined (CHEROKEE_INSIDE_CHEROKEE_H) && !defined (CHEROKEE_COMPILATION)
+# error "Only <cherokee/cherokee.h> can be included directly, this file may disappear or change contents."
+#endif
+
+#ifndef CHEROKEE_INFO_H
+#define CHEROKEE_INFO_H
+
+#include <cherokee/server.h>
+
+CHEROKEE_BEGIN_DECLS
+
+void cherokee_info_build_print (cherokee_server_t *srv);
+
+CHEROKEE_END_DECLS
+
+#endif /* CHEROKEE_INFO_H */
Modified: cherokee/trunk/cherokee/main.c
===================================================================
--- cherokee/trunk/cherokee/main.c 2008-06-18 07:34:20 UTC (rev 1570)
+++ cherokee/trunk/cherokee/main.c 2008-06-18 08:05:36 UTC (rev 1571)
@@ -26,8 +26,7 @@
#include <signal.h>
#include "init.h"
#include "server.h"
-#include "server-protected.h"
-#include "util.h"
+#include "info.h"
#ifdef HAVE_GETOPT_H
# include <getopt.h>
@@ -286,7 +285,7 @@
process_parameters (argc, argv);
if (print_modules) {
- cherokee_build_info_print (&srv->loader);
+ cherokee_info_build_print (srv);
exit (ret_ok);
}
Modified: cherokee/trunk/cherokee/util.c
===================================================================
--- cherokee/trunk/cherokee/util.c 2008-06-18 07:34:20 UTC (rev 1570)
+++ cherokee/trunk/cherokee/util.c 2008-06-18 08:05:36 UTC (rev 1571)
@@ -1270,109 +1270,3 @@
printf ("%s\n", buffer->buf);
fflush (stdout);
}
-
-
-void
-cherokee_build_info_print (cherokee_plugin_loader_t *loader)
-{
- cherokee_buffer_t builtin = CHEROKEE_BUF_INIT;
-
- /* Basic info
- */
- printf ("Compilation\n");
- printf (" Version: " PACKAGE_VERSION "\n");
- printf (" Compiled on: " __DATE__ " " __TIME__ "\n");
- printf (" Arguments to configure: " CHEROKEE_CONFIG_ARGS "\n");
- printf ("\n");
-
- /* Paths
- */
- printf ("Installation\n");
- printf (" Deps dir: " CHEROKEE_DEPSDIR "\n");
- printf (" Data dir: " CHEROKEE_DATADIR "\n");
- printf (" Icons dir: " CHEROKEE_ICONSDIR "\n");
- printf (" Themes dir: " CHEROKEE_THEMEDIR "\n");
- printf (" Plug-in dir: " CHEROKEE_PLUGINDIR "\n");
- printf ("\n");
-
- /* Print plug-ins information
- */
- printf ("Plug-ins\n");
- cherokee_plugin_loader_get_mods_info (loader, &builtin);
- printf (" Built-in: %s\n", builtin.buf ? builtin.buf : "");
- printf ("\n");
- cherokee_buffer_mrproper (&builtin);
-
- /* Support
- */
- printf ("Support\n");
-#ifdef HAVE_IPV6
- printf (" IPv6: yes\n");
-#else
- printf (" IPv6: no\n");
-#endif
-#ifdef HAVE_OPENSSL
- printf (" OpenSSL: yes\n");
-#else
- printf (" OpenSSL: no\n");
-#endif
-#ifdef HAVE_GNUTLS
- printf (" GnuTLS: yes\n");
-#else
- printf (" GnuTLS: no\n");
-#endif
-#ifdef HAVE_PTHREAD
- printf (" Pthreads: yes\n");
-#else
- printf (" Pthreads: no\n");
-#endif
-#ifdef TRACE_ENABLED
- printf (" Tracing: yes\n");
-#else
- printf (" Tracing: no\n");
-#endif
-#ifdef HAVE_SENDFILE
- printf (" sendfile(): yes\n");
-#else
- printf (" sendfile(): no\n");
-#endif
-#ifdef HAVE_SYSLOG
- printf (" syslog(): yes\n");
-#else
- printf (" syslog(): no\n");
-#endif
- printf ("\n");
-
-
- printf ("Polling methods\n");
-#ifdef HAVE_PORT
- printf (" Solaris' port(): yes\n");
-#else
- printf (" Solaris' port(): no\n");
-#endif
-#ifdef HAVE_SELECT
- printf (" select(): yes\n");
-#else
- printf (" select(): no\n");
-#endif
-#ifdef HAVE_WIN32_SELECT
- printf (" Win32 select(): yes\n");
-#else
- printf (" Win32 select(): no\n");
-#endif
-#ifdef HAVE_POLL
- printf (" poll(): yes\n");
-#else
- printf (" poll(): no\n");
-#endif
-#ifdef HAVE_EPOLL
- printf (" epoll(): yes\n");
-#else
- printf (" epoll(): no\n");
-#endif
-#ifdef HAVE_KQUEUE
- printf (" kqueue(): yes\n");
-#else
- printf (" kqueue(): no\n");
-#endif
-}
Modified: cherokee/trunk/cherokee/util.h
===================================================================
--- cherokee/trunk/cherokee/util.h 2008-06-18 07:34:20 UTC (rev 1570)
+++ cherokee/trunk/cherokee/util.h 2008-06-18 08:05:36 UTC (rev 1571)
@@ -116,9 +116,8 @@
/* Debug
*/
-void cherokee_trace (const char *entry, const char *file, int line, const char *func, const char *fmt, ...);
-void cherokee_print_errno (int error, char *format, ...);
-void cherokee_build_info_print (cherokee_plugin_loader_t *loader);
+void cherokee_trace (const char *entry, const char *file, int line, const char *func, const char *fmt, ...);
+void cherokee_print_errno (int error, char *format, ...);
/* Path walking
*/
More information about the Cherokee-commits
mailing list