~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to srclib/apr/include/arch/os2/apr_arch_file_io.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
 
2
 * applicable.
 
3
 *
 
4
 * Licensed under the Apache License, Version 2.0 (the "License");
 
5
 * you may not use this file except in compliance with the License.
 
6
 * You may obtain a copy of the License at
 
7
 *
 
8
 *     http://www.apache.org/licenses/LICENSE-2.0
 
9
 *
 
10
 * Unless required by applicable law or agreed to in writing, software
 
11
 * distributed under the License is distributed on an "AS IS" BASIS,
 
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 */
 
16
 
 
17
#ifndef FILE_IO_H
 
18
#define FILE_IO_H
 
19
 
 
20
#include "apr_private.h"
 
21
#include "apr_general.h"
 
22
#include "apr_thread_mutex.h"
 
23
#include "apr_file_io.h"
 
24
#include "apr_file_info.h"
 
25
#include "apr_errno.h"
 
26
#include "apr_poll.h"
 
27
 
 
28
/* We have an implementation of mkstemp but it's not very multi-threading 
 
29
 * friendly & is part of the POSIX emulation rather than native so don't
 
30
 * use it.
 
31
 */
 
32
#undef HAVE_MKSTEMP
 
33
 
 
34
#define APR_FILE_BUFSIZE 4096
 
35
 
 
36
struct apr_file_t {
 
37
    apr_pool_t *pool;
 
38
    HFILE filedes;
 
39
    char * fname;
 
40
    int isopen;
 
41
    int buffered;
 
42
    int eof_hit;
 
43
    apr_int32_t flags;
 
44
    int timeout;
 
45
    int pipe;
 
46
    HEV pipeSem;
 
47
    enum { BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;
 
48
 
 
49
    /* Stuff for buffered mode */
 
50
    char *buffer;
 
51
    int bufpos;               // Read/Write position in buffer
 
52
    unsigned long dataRead;   // amount of valid data read into buffer
 
53
    int direction;            // buffer being used for 0 = read, 1 = write
 
54
    unsigned long filePtr;    // position in file of handle
 
55
    apr_thread_mutex_t *mutex;// mutex semaphore, must be owned to access the above fields
 
56
};
 
57
 
 
58
struct apr_dir_t {
 
59
    apr_pool_t *pool;
 
60
    char *dirname;
 
61
    ULONG handle;
 
62
    FILEFINDBUF3 entry;
 
63
    int validentry;
 
64
};
 
65
 
 
66
apr_status_t apr_file_cleanup(void *);
 
67
apr_status_t apr_os2_time_to_apr_time(apr_time_t *result, FDATE os2date, 
 
68
                                      FTIME os2time);
 
69
apr_status_t apr_apr_time_to_os2_time(FDATE *os2date, FTIME *os2time,
 
70
                                      apr_time_t aprtime);
 
71
 
 
72
/* see win32/fileio.h for description of these */
 
73
extern const char c_is_fnchar[256];
 
74
 
 
75
#define IS_FNCHAR(c) c_is_fnchar[(unsigned char)c]
 
76
 
 
77
apr_status_t filepath_root_test(char *path, apr_pool_t *p);
 
78
apr_status_t filepath_drive_get(char **rootpath, char drive, 
 
79
                                apr_int32_t flags, apr_pool_t *p);
 
80
apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p);
 
81
 
 
82
#endif  /* ! FILE_IO_H */
 
83