summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorjwoolley <jwoolley@13f79535-47bb-0310-9956-ffa450edef68>2001-06-27 19:40:53 +0000
committerjwoolley <jwoolley@13f79535-47bb-0310-9956-ffa450edef68>2001-06-27 19:40:53 +0000
commit72ca7b58d638167d6cd29066a782212d734bcf35 (patch)
tree9fde80bba271a4ee79734a0809bb5b7223215314 /include
parent556da97ac6014cb611e34e73ae2df2db9d098c00 (diff)
downloadlibapr-72ca7b58d638167d6cd29066a782212d734bcf35.tar.gz
*) Add apr_file_flags_get() which returns the flags that were originally
passed in to apr_file_open(). *) Added APR_HAS_XTHREAD_FILES macro that indicates whether or not the platform handles files opened in APR_XTHREAD mode natively. Currently only Win32 has such native support. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61804 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/apr.h.in1
-rw-r--r--include/apr.hw1
-rw-r--r--include/apr_file_io.h13
-rw-r--r--include/arch/unix/fileio.h2
-rw-r--r--include/arch/win32/fileio.h1
5 files changed, 17 insertions, 1 deletions
diff --git a/include/apr.h.in b/include/apr.h.in
index ae898d3d8..c420e2aec 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -134,6 +134,7 @@
#define APR_HAS_UNICODE_FS 0
#define APR_HAS_USER 1
#define APR_HAS_LARGE_FILES 0
+#define APR_HAS_XTHREAD_FILES 0
/* This macro tells APR that it is safe to make a file masquerade as a
* socket. This is necessary, because some platforms support poll'ing
diff --git a/include/apr.hw b/include/apr.hw
index a5c57ae15..59be81439 100644
--- a/include/apr.hw
+++ b/include/apr.hw
@@ -210,6 +210,7 @@
#define APR_HAS_UNICODE_FS 1
#define APR_HAS_USER 1
#define APR_HAS_LARGE_FILES 1
+#define APR_HAS_XTHREAD_FILES 1
/* Not all platforms have a real INADDR_NONE. This macro replaces INADDR_NONE
* on all platforms.
diff --git a/include/apr_file_io.h b/include/apr_file_io.h
index bb785b474..902f15901 100644
--- a/include/apr_file_io.h
+++ b/include/apr_file_io.h
@@ -136,6 +136,11 @@ typedef struct apr_file_t apr_file_t;
* APR_BUFFERED buffer the data. Default is non-buffered
* APR_EXCL return error if APR_CREATE and file exists
* APR_DELONCLOSE delete the file after closing.
+ * APR_XTHREAD Platform dependent tag to open the file
+ * for use across multiple threads
+ * APR_SHARELOCK Platform dependent support for higher
+ * level locked read/write access to support
+ * writes across process/machines
* </PRE>
* @param perm Access permissions for file.
* @param cont The pool to use.
@@ -550,6 +555,14 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
APR_DECLARE(apr_status_t) apr_file_trunc(apr_file_t *fp, apr_off_t offset);
/**
+ * Retrieve the flags that were passed into apr_file_open()
+ * when the file was opened.
+ * @return apr_int32_t the flags
+ * @deffunc apr_int32_t apr_file_flags_get(apr_file_t *f)
+ */
+APR_DECLARE(apr_int32_t) apr_file_flags_get(apr_file_t *f);
+
+/**
* Get the pool used by the file.
* @return apr_pool_t the pool
* @deffunc apr_pool_t apr_file_pool_get(apr_file_t *f)
diff --git a/include/arch/unix/fileio.h b/include/arch/unix/fileio.h
index 2aff13e40..cd3dd0848 100644
--- a/include/arch/unix/fileio.h
+++ b/include/arch/unix/fileio.h
@@ -122,7 +122,7 @@ struct apr_file_t {
apr_pool_t *cntxt;
int filedes;
char *fname;
- int oflags;
+ apr_int32_t flags;
int eof_hit;
int pipe;
apr_interval_time_t timeout;
diff --git a/include/arch/win32/fileio.h b/include/arch/win32/fileio.h
index e17dc5644..164651fd7 100644
--- a/include/arch/win32/fileio.h
+++ b/include/arch/win32/fileio.h
@@ -172,6 +172,7 @@ struct apr_file_t {
BOOLEAN pipe; // Is this a pipe of a file?
OVERLAPPED *pOverlapped;
apr_interval_time_t timeout;
+ apr_int32_t flags;
/* File specific info */
apr_finfo_t *finfo;