Changeset 1567

Show
Ignore:
Timestamp:
06/17/08 16:04:41 (4 months ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/ChangeLog

    r1565 r1567  
    112008-06-17  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * cherokee/server.c (cherokee_server_print_build_info), 
     4        cherokee/server.h, cherokee/main.c: Moved to utils.c as 
     5        cherokee_info_print(). It makes more sense there. 
    26 
    37        * cherokee/server.c (cherokee_server_print_build_info): Now it 
  • cherokee/trunk/cherokee/main.c

    r1550 r1567  
    2727#include "init.h" 
    2828#include "server.h" 
     29#include "server-protected.h" 
     30#include "util.h" 
    2931 
    3032#ifdef HAVE_GETOPT_H 
     
    285287         
    286288        if (print_modules) { 
    287                 cherokee_server_print_build_info (srv); 
     289                cherokee_build_info_print (&srv->loader); 
    288290                exit (ret_ok); 
    289291        } 
  • cherokee/trunk/cherokee/server.c

    r1565 r1567  
    21032103        return ret_ok; 
    21042104} 
    2105  
    2106  
    2107 ret_t  
    2108 cherokee_server_print_build_info (cherokee_server_t *srv) 
    2109 { 
    2110         cherokee_buffer_t builtin = CHEROKEE_BUF_INIT; 
    2111  
    2112         /* Basic info 
    2113          */ 
    2114         printf ("Compilation\n"); 
    2115         printf (" Version: " PACKAGE_VERSION "\n"); 
    2116         printf (" Compiled on: " __DATE__ " " __TIME__ "\n"); 
    2117         printf (" Arguments to configure: " CHEROKEE_CONFIG_ARGS "\n"); 
    2118         printf ("\n"); 
    2119  
    2120         /* Paths 
    2121          */ 
    2122         printf ("Installation\n"); 
    2123         printf (" Deps dir: " CHEROKEE_DEPSDIR "\n"); 
    2124         printf (" Data dir: " CHEROKEE_DATADIR "\n"); 
    2125         printf (" Icons dir: " CHEROKEE_ICONSDIR "\n"); 
    2126         printf (" Themes dir: " CHEROKEE_THEMEDIR "\n"); 
    2127         printf (" Plug-in dir: " CHEROKEE_PLUGINDIR "\n"); 
    2128         printf ("\n"); 
    2129  
    2130         /* Print plug-ins information 
    2131          */ 
    2132         printf ("Plug-ins\n"); 
    2133         cherokee_plugin_loader_get_mods_info (&srv->loader, &builtin); 
    2134         printf (" Built-in: %s\n", builtin.buf ? builtin.buf : ""); 
    2135         printf ("\n"); 
    2136         cherokee_buffer_mrproper (&builtin); 
    2137  
    2138         /* Support 
    2139          */ 
    2140         printf ("Support\n"); 
    2141 #ifdef HAVE_IPV6 
    2142         printf (" IPv6: yes\n"); 
    2143 #else 
    2144         printf (" IPv6: no\n"); 
    2145 #endif 
    2146 #ifdef HAVE_OPENSSL 
    2147         printf (" OpenSSL: yes\n"); 
    2148 #else 
    2149         printf (" OpenSSL: no\n"); 
    2150 #endif 
    2151 #ifdef HAVE_GNUTLS 
    2152         printf (" GnuTLS: yes\n"); 
    2153 #else 
    2154         printf (" GnuTLS: no\n"); 
    2155 #endif 
    2156 #ifdef HAVE_PTHREAD 
    2157         printf (" Pthreads: yes\n"); 
    2158 #else 
    2159         printf (" Pthreads: no\n"); 
    2160 #endif 
    2161 #ifdef TRACE_ENABLED 
    2162         printf (" Tracing: yes\n"); 
    2163 #else 
    2164         printf (" Tracing: no\n"); 
    2165 #endif 
    2166 #ifdef HAVE_SENDFILE 
    2167         printf (" sendfile(): yes\n"); 
    2168 #else 
    2169         printf (" sendfile(): no\n"); 
    2170 #endif 
    2171 #ifdef HAVE_SYSLOG 
    2172         printf (" syslog(): yes\n"); 
    2173 #else 
    2174         printf (" syslog(): no\n"); 
    2175 #endif 
    2176         printf ("\n"); 
    2177  
    2178  
    2179         printf ("Polling methods\n"); 
    2180 #ifdef HAVE_PORT 
    2181         printf (" Solaris' port(): yes\n"); 
    2182 #else 
    2183         printf (" Solaris' port(): no\n"); 
    2184 #endif 
    2185 #ifdef HAVE_SELECT 
    2186         printf (" select(): yes\n"); 
    2187 #else 
    2188         printf (" select(): no\n"); 
    2189 #endif 
    2190 #ifdef HAVE_WIN32_SELECT 
    2191         printf (" Win32 select(): yes\n"); 
    2192 #else 
    2193         printf (" Win32 select(): no\n"); 
    2194 #endif 
    2195 #ifdef HAVE_POLL 
    2196         printf (" poll(): yes\n"); 
    2197 #else 
    2198         printf (" poll(): no\n"); 
    2199 #endif 
    2200 #ifdef HAVE_EPOLL 
    2201         printf (" epoll(): yes\n"); 
    2202 #else 
    2203         printf (" epoll(): no\n"); 
    2204 #endif 
    2205 #ifdef HAVE_KQUEUE 
    2206         printf (" kqueue(): yes\n"); 
    2207 #else 
    2208         printf (" kqueue(): no\n"); 
    2209 #endif 
    2210  
    2211         return ret_ok; 
    2212 } 
  • cherokee/trunk/cherokee/server.h

    r1506 r1567  
    6969ret_t cherokee_server_log_reopen         (cherokee_server_t *srv); 
    7070 
    71 ret_t cherokee_server_print_build_info   (cherokee_server_t *srv); 
    72  
    7371/* System signal callback 
    7472 */ 
  • cherokee/trunk/cherokee/util.c

    r1564 r1567  
    12711271        fflush (stdout); 
    12721272} 
     1273 
     1274 
     1275void 
     1276cherokee_build_info_print (cherokee_plugin_loader_t *loader) 
     1277{ 
     1278        cherokee_buffer_t builtin = CHEROKEE_BUF_INIT; 
     1279 
     1280        /* Basic info 
     1281         */ 
     1282        printf ("Compilation\n"); 
     1283        printf (" Version: " PACKAGE_VERSION "\n"); 
     1284        printf (" Compiled on: " __DATE__ " " __TIME__ "\n"); 
     1285        printf (" Arguments to configure: " CHEROKEE_CONFIG_ARGS "\n"); 
     1286        printf ("\n"); 
     1287 
     1288        /* Paths 
     1289         */ 
     1290        printf ("Installation\n"); 
     1291        printf (" Deps dir: " CHEROKEE_DEPSDIR "\n"); 
     1292        printf (" Data dir: " CHEROKEE_DATADIR "\n"); 
     1293        printf (" Icons dir: " CHEROKEE_ICONSDIR "\n"); 
     1294        printf (" Themes dir: " CHEROKEE_THEMEDIR "\n"); 
     1295        printf (" Plug-in dir: " CHEROKEE_PLUGINDIR "\n"); 
     1296        printf ("\n"); 
     1297 
     1298        /* Print plug-ins information 
     1299         */ 
     1300        printf ("Plug-ins\n"); 
     1301        cherokee_plugin_loader_get_mods_info (loader, &builtin); 
     1302        printf (" Built-in: %s\n", builtin.buf ? builtin.buf : ""); 
     1303        printf ("\n"); 
     1304        cherokee_buffer_mrproper (&builtin); 
     1305 
     1306        /* Support 
     1307         */ 
     1308        printf ("Support\n"); 
     1309#ifdef HAVE_IPV6 
     1310        printf (" IPv6: yes\n"); 
     1311#else 
     1312        printf (" IPv6: no\n"); 
     1313#endif 
     1314#ifdef HAVE_OPENSSL 
     1315        printf (" OpenSSL: yes\n"); 
     1316#else 
     1317        printf (" OpenSSL: no\n"); 
     1318#endif 
     1319#ifdef HAVE_GNUTLS 
     1320        printf (" GnuTLS: yes\n"); 
     1321#else 
     1322        printf (" GnuTLS: no\n"); 
     1323#endif 
     1324#ifdef HAVE_PTHREAD 
     1325        printf (" Pthreads: yes\n"); 
     1326#else 
     1327        printf (" Pthreads: no\n"); 
     1328#endif 
     1329#ifdef TRACE_ENABLED 
     1330        printf (" Tracing: yes\n"); 
     1331#else 
     1332        printf (" Tracing: no\n"); 
     1333#endif 
     1334#ifdef HAVE_SENDFILE 
     1335        printf (" sendfile(): yes\n"); 
     1336#else 
     1337        printf (" sendfile(): no\n"); 
     1338#endif 
     1339#ifdef HAVE_SYSLOG 
     1340        printf (" syslog(): yes\n"); 
     1341#else 
     1342        printf (" syslog(): no\n"); 
     1343#endif 
     1344        printf ("\n"); 
     1345 
     1346 
     1347        printf ("Polling methods\n"); 
     1348#ifdef HAVE_PORT 
     1349        printf (" Solaris' port(): yes\n"); 
     1350#else 
     1351        printf (" Solaris' port(): no\n"); 
     1352#endif 
     1353#ifdef HAVE_SELECT 
     1354        printf (" select(): yes\n"); 
     1355#else 
     1356        printf (" select(): no\n"); 
     1357#endif 
     1358#ifdef HAVE_WIN32_SELECT 
     1359        printf (" Win32 select(): yes\n"); 
     1360#else 
     1361        printf (" Win32 select(): no\n"); 
     1362#endif 
     1363#ifdef HAVE_POLL 
     1364        printf (" poll(): yes\n"); 
     1365#else 
     1366        printf (" poll(): no\n"); 
     1367#endif 
     1368#ifdef HAVE_EPOLL 
     1369        printf (" epoll(): yes\n"); 
     1370#else 
     1371        printf (" epoll(): no\n"); 
     1372#endif 
     1373#ifdef HAVE_KQUEUE 
     1374        printf (" kqueue(): yes\n"); 
     1375#else 
     1376        printf (" kqueue(): no\n"); 
     1377#endif 
     1378} 
  • cherokee/trunk/cherokee/util.h

    r1506 r1567  
    3333#include <cherokee/avl.h> 
    3434#include <cherokee/trace.h> 
     35#include <cherokee/plugin_loader.h> 
    3536 
    3637#ifdef HAVE_NETINET_IN_H 
     
    116117/* Debug 
    117118 */ 
    118 void  cherokee_trace       (const char *entry, const char *file, int line, const char *func, const char *fmt, ...); 
    119 void  cherokee_print_errno (int error, char *format, ...); 
     119void  cherokee_trace            (const char *entry, const char *file, int line, const char *func, const char *fmt, ...); 
     120void  cherokee_print_errno      (int error, char *format, ...); 
     121void  cherokee_build_info_print (cherokee_plugin_loader_t *loader); 
    120122 
    121123/* Path walking