httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/network_io/win32 poll.c
Date Fri, 06 Oct 2000 22:02:05 GMT
wrowe       00/10/06 15:02:05

  Modified:    src/lib/apr/dso/win32 dso.c
               src/lib/apr/file_io/win32 filestat.c
               src/lib/apr/network_io/win32 poll.c
  Log:
    Knock off some XXX's prior to a7.
  
  Revision  Changes    Path
  1.12      +15 -2     apache-2.0/src/lib/apr/dso/win32/dso.c
  
  Index: dso.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/win32/dso.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- dso.c	2000/10/06 17:24:37	1.11
  +++ dso.c	2000/10/06 22:02:00	1.12
  @@ -53,15 +53,28 @@
    */
   
   #include "dso.h"
  +#include "apr_strings.h"
   
   #if APR_HAS_DSO
   
   apr_status_t apr_dso_load(struct apr_dso_handle_t **res_handle, const char *path, 
                           apr_pool_t *ctx)
   {
  -    /* XXX: Must convert path from / to \ notation
  +    HINSTANCE os_handle;
  +    char fspec[MAX_PATH], *p;
  +
  +    /* Must convert path from / to \ notation.
  +     * Per PR2555, the LoadLibraryEx function is very picky about slashes.
  +     * Debugging on NT 4 SP 6a reveals First Chance Exception within NTDLL.
  +     * LoadLibrary in the MS PSDK also reveals that it -explicitly- states
  +     * that backslashes must be used for the LoadLibrary family of calls.
        */
  -    HINSTANCE os_handle = LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
  +    apr_cpystrn(fspec, path, MAX_PATH);
  +    for (p = fspec; *p; ++p)
  +        if (*p == '/')
  +            *p = '\\';
  +        
  +    os_handle = LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
       *res_handle = apr_pcalloc(ctx, sizeof(*res_handle));
   
       if(os_handle == NULL) {
  
  
  
  1.27      +5 -2      apache-2.0/src/lib/apr/file_io/win32/filestat.c
  
  Index: filestat.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/filestat.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- filestat.c	2000/10/06 17:24:38	1.26
  +++ filestat.c	2000/10/06 22:02:01	1.27
  @@ -218,9 +218,10 @@
           }
       }
       else {
  -        /*  XXX: The question remains, can we assume fname is not a wildcard?
  -         *  Must we test it?  Absolutely YES.
  +        /* What a waste of cpu cycles... but what else can we do?
            */
  +        if (strchr(fname, '*') || strchr(fname, '?'))
  +            return APR_ENOENT;
           hFind = FindFirstFile(fname, &FileInformation);
           if (hFind == INVALID_HANDLE_VALUE) {
               return apr_get_os_error();
  @@ -280,6 +281,8 @@
        * XXX: Do we want to tag if nFileSizeHigh as -1 (or 0x7fffffff?)
        */
       finfo->size = FileInformation.nFileSizeLow;
  +    if (finfo->size < 0 || FileInformation.nFileSizeLow)
  +        finfo->size = 0x7fffffff;
   
       return APR_SUCCESS;
   }
  
  
  
  1.22      +1 -0      apache-2.0/src/lib/apr/network_io/win32/poll.c
  
  Index: poll.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/poll.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- poll.c	2000/10/06 17:24:39	1.21
  +++ poll.c	2000/10/06 22:02:04	1.22
  @@ -157,6 +157,7 @@
           revents |= APR_POLLIN;
           if (WSARecv(sock->sock, &data, 1, &dummy, &flags, NULL, 
                       NULL) == SOCKET_ERROR) {
  +            /* This is only legit since we don't return the error */
               dummy = WSAGetLastError();
               switch (dummy) {
                   case WSAECONNRESET:
  
  
  

Mime
View raw message