/usr/src/redhat/BUILD/httpd-2.2.3/srclib/apr/include/arch/netware/apr_arch_file_io.h

00001 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
00002  * applicable.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef FILE_IO_H
00018 #define FILE_IO_H
00019 
00020 #include "apr.h"
00021 #include "apr_private.h"
00022 #include "apr_general.h"
00023 #include "apr_tables.h"
00024 #include "apr_file_io.h"
00025 #include "apr_file_info.h"
00026 #include "apr_errno.h"
00027 #include "apr_lib.h"
00028 #include "apr_poll.h"
00029 
00030 /* System headers the file I/O library needs */
00031 #if APR_HAVE_FCNTL_H
00032 #include <fcntl.h>
00033 #endif
00034 #if APR_HAVE_SYS_TYPES_H
00035 #include <sys/types.h>
00036 #endif
00037 #if APR_HAVE_ERRNO_H
00038 #include <errno.h>
00039 #endif
00040 #if APR_HAVE_STRING_H
00041 #include <string.h>
00042 #endif
00043 #if APR_HAVE_STRINGS_H
00044 #include <strings.h>
00045 #endif
00046 #if APR_HAVE_DIRENT_H
00047 #include <dirent.h>
00048 #endif
00049 #ifdef HAVE_SYS_STAT_H
00050 #include <sys/stat.h>
00051 #endif
00052 #if APR_HAVE_UNISTD_H
00053 #include <unistd.h>
00054 #endif
00055 #if APR_HAVE_STDIO_H
00056 #include <stdio.h>
00057 #endif
00058 #if APR_HAVE_STDLIB_H
00059 #include <stdlib.h>
00060 #endif
00061 #if APR_HAVE_SYS_UIO_H
00062 #include <sys/uio.h>
00063 #endif
00064 #if APR_HAVE_SYS_TIME_H
00065 #include <sys/time.h>
00066 #endif
00067 
00068 #include <fsio.h>
00069 
00070 /* End System headers */
00071 
00072 #define APR_FILE_BUFSIZE 4096
00073 
00074 #if APR_HAS_LARGE_FILES
00075 #define lseek(f,o,w) lseek64(f,o,w)
00076 #define ftruncate(f,l) ftruncate64(f,l)
00077 #endif
00078 
00079 typedef struct stat struct_stat;
00080 
00081 struct apr_file_t {
00082     apr_pool_t *pool;
00083     int filedes;
00084     char *fname;
00085     apr_int32_t flags;
00086     int eof_hit;
00087     int is_pipe;
00088     apr_interval_time_t timeout;
00089     int buffered;
00090     enum {BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;
00091     int ungetchar;    /* Last char provided by an unget op. (-1 = no char)*/
00092 
00093     /* if there is a timeout set, then this pollset is used */
00094     apr_pollset_t *pollset;
00095 
00096     /* Stuff for buffered mode */
00097     char *buffer;
00098     int bufpos;               /* Read/Write position in buffer */
00099     apr_off_t dataRead;   /* amount of valid data read into buffer */
00100     int direction;            /* buffer being used for 0 = read, 1 = write */
00101     apr_off_t filePtr;    /* position in file of handle */
00102 #if APR_HAS_THREADS
00103     struct apr_thread_mutex_t *thlock;
00104 #endif
00105 };
00106 
00107 struct apr_dir_t {
00108     apr_pool_t *pool;
00109     char *dirname;
00110     DIR *dirstruct;
00111     struct dirent *entry;
00112 };
00113 
00114 typedef struct apr_stat_entry_t apr_stat_entry_t;
00115 
00116 struct apr_stat_entry_t {
00117     struct stat info;
00118     char *casedName;
00119     apr_time_t expire;
00120     NXPathCtx_t pathCtx;
00121 };
00122 
00123 #define MAX_SERVER_NAME     64
00124 #define MAX_VOLUME_NAME     64
00125 #define MAX_PATH_NAME       256
00126 #define MAX_FILE_NAME       256
00127 
00128 #define DRIVE_ONLY          1
00129 
00130 /* If the user passes d: vs. D: (or //mach/share vs. //MACH/SHARE),
00131  * we need to fold the case to canonical form.  This function is
00132  * supposed to do so.
00133  */
00134 apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p);
00135 
00136 /* This function check to see of the given path includes a drive/volume
00137  * specifier.  If the _only_ parameter is set to DRIVE_ONLY then it 
00138  * check to see of the path only contains a drive/volume specifier and
00139  * nothing else.
00140  */
00141 apr_status_t filepath_has_drive(const char *rootpath, int only, apr_pool_t *p);
00142 
00143 /* This function compares the drive/volume specifiers for each given path.
00144  * It returns zero if they match or non-zero if not. 
00145  */
00146 apr_status_t filepath_compare_drive(const char *path1, const char *path2, apr_pool_t *p);
00147 
00148 apr_status_t apr_unix_file_cleanup(void *);
00149 
00150 #endif  /* ! FILE_IO_H */
00151 

Apacheに対してSun Jul 19 22:05:24 2009に生成されました。  doxygen 1.4.7