components/apr-1_5/patches/extended_file.patch
changeset 1782 5aa8051aaa4b
equal deleted inserted replaced
1781:d7603a31fdd3 1782:5aa8051aaa4b
       
     1 Patch origin: in-house
       
     2 Patch status: Solaris-specific; not suitable for upstream
       
     3 
       
     4 --- misc/unix/start.c.orig	Fri Sep 19 11:41:54 2008
       
     5 +++ misc/unix/start.c	Fri Sep 19 11:44:38 2008
       
     6 @@ -23,6 +23,9 @@
       
     7  #include "apr_arch_proc_mutex.h" /* for apr_proc_mutex_unix_setup_lock() */
       
     8  #include "apr_arch_internal_time.h"
       
     9  
       
    10 +#if defined(SOLARIS2) && !defined(_LP64)
       
    11 +#include <stdio_ext.h>
       
    12 +#endif
       
    13  
       
    14  APR_DECLARE(apr_status_t) apr_app_initialize(int *argc, 
       
    15                                               const char * const * *argv, 
       
    16 @@ -47,6 +50,17 @@
       
    17          return APR_SUCCESS;
       
    18      }
       
    19  
       
    20 +#if defined(SOLARIS2) && !defined(_LP64)
       
    21 +    if (enable_extended_FILE_stdio (-1, -1) < 0) {
       
    22 +        /* if the process has already enabled the extended file stdio 
       
    23 +         * then, the above call will return an error. It should be
       
    24 +         * ignored. 
       
    25 +         */
       
    26 +        if ((errno != EAGAIN) && (errno != EEXIST))
       
    27 +            return APR_FROM_OS_ERROR(errno);
       
    28 +    }
       
    29 +#endif
       
    30 +
       
    31  #if !defined(BEOS) && !defined(OS2)
       
    32      apr_proc_mutex_unix_setup_lock();
       
    33      apr_unix_setup_time();