Changeset 324

Show
Ignore:
Timestamp:
07/05/06 23:13:18 (2 years ago)
Author:
alo
Message:

--

Files:

Legend:

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

    r307 r324  
     12006-07-05  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * configure.in, cherokee/util.c (cherokee_trace): Added check for 
     4        flockfile() and funlockfile(). It was failing compile on Win32. 
     5        Patch by Philip Pemberton <philpem@dsl.pipex.com> 
     6 
     72006-0x-xx  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     8 
     9        * Loads of commits.. 
     10         
    1112006-06-13  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
    212 
  • cherokee/trunk/cherokee/thread.c

    r296 r324  
    853853                         */ 
    854854                        if (CONN_VSRV(conn)->default_handler != NULL) { 
    855                                 cherokee_config_entry_complete (&entry, CONN_VSRV(conn)->default_handler, false); 
     855                                cherokee_virtual_server_t *vsrv = CONN_VSRV(conn); 
     856  
     857                                cherokee_config_entry_complete (&entry, vsrv->default_handler, false); 
     858 
     859                                if (conn->realm_ref == NULL)  
     860                                        conn->realm_ref = vsrv->default_handler->auth_realm; 
     861                                if (conn->auth_type == http_auth_nothing)  
     862                                        conn->auth_type = vsrv->default_handler->authentication; 
    856863 
    857864                                if (cherokee_buffer_is_empty (&conn->web_directory) && (! matched_req)) { 
  • cherokee/trunk/cherokee/util.c

    r320 r324  
    3333#include <sys/stat.h> 
    3434#include <unistd.h> 
     35#include <errno.h> 
    3536 
    3637#ifdef HAVE_SYS_TIME_H 
     
    402403cherokee_readdir (DIR *dirstream, struct dirent *entry, struct dirent **result) 
    403404{ 
    404 #ifdef HAVE_POSIX_READDIR_R 
    405         return readdir_r (dirstream, entry, result); 
    406  
    407 #else 
    408 # ifdef HAVE_OLD_READDIR_R 
    409         int ret = 0; 
    410          
    411         /* We cannot rely on the return value of readdir_r 
    412          * as it differs between various platforms 
    413          * (HPUX returns 0 on success whereas Solaris returns non-zero) 
     405#ifdef HAVE_READDIR_R_2 
     406        /* We cannot rely on the return value of readdir_r as it 
     407         * differs between various platforms (HPUX returns 0 on 
     408         * success whereas Solaris returns non-zero) 
    414409         */ 
    415410        entry->d_name[0] = '\0'; 
    416         readdir_r(dirp, entry); 
     411 
     412        readdir_r (dirstream, entry); 
     413 
     414        if (entry->d_name[0] != '\0') { 
     415                *result = entry; 
     416                return 0; 
     417        } 
    417418         
    418         if (entry->d_name[0] == '\0') { 
    419                 *result = NULL; 
    420                 ret = errno; 
    421         } else { 
    422                 *result = entry; 
    423         } 
    424  
    425         return ret; 
    426  
    427 # else 
     419        *result = NULL; 
     420        return errno; 
     421 
     422#elif defined(HAVE_READDIR_R_3) 
     423        return readdir_r (dirstream, entry, result); 
     424 
     425#else 
    428426        struct dirent *ptr; 
    429427        int            ret = 0; 
     
    444442        CHEROKEE_MUTEX_UNLOCK (&readdir_mutex); 
    445443        return ret; 
    446 # endif 
    447 #endif 
     444#endif  
    448445} 
    449446 
     
    914911                syslog (LOG_DEBUG, "%s", output.buf); 
    915912        } else { 
     913#ifdef HAVE_FLOCKFILE 
    916914                flockfile (stdout); 
     915#endif 
    917916                fprintf (stdout, "%s", output.buf); 
     917#ifdef HAVE_FUNLOCKFILE 
    918918                funlockfile (stdout); 
     919#endif 
    919920        } 
    920921 
  • cherokee/trunk/configure.in

    r307 r324  
    220220AC_FUNC_MMAP 
    221221 
    222 AC_CHECK_FUNCS(gmtime gmtime_r localtime localtime_r getrlimit getdtablesize readdir_r
     222AC_CHECK_FUNCS(gmtime gmtime_r localtime localtime_r getrlimit getdtablesize readdir_r flockfile funlockfile
    223223 
    224224 
     
    627627 
    628628# readdir_r() 
    629 PHP_READDIR_R_TYPE 
     629LIBWWW_READDIR_R_TYPE 
    630630 
    631631 
  • cherokee/trunk/m4/Makefile.am

    r31 r324  
    11EXTRA_DIST = \ 
    2 php.m4 \ 
     2libwww.m4 \ 
    33network.m4 \ 
    44sendfile_samba.m4 \