summaryrefslogtreecommitdiff
path: root/file_io
diff options
context:
space:
mode:
authorBradley Nicholes <bnicholes@apache.org>2007-05-15 17:51:34 +0000
committerBradley Nicholes <bnicholes@apache.org>2007-05-15 17:51:34 +0000
commit3b8d0ab45411ac1cb2d76cb3e989744a2dc488da (patch)
treee0dc554c6678ae31fe6e5d74b21d8657aca415e9 /file_io
parentdda6583fe14c863797cb88fd320df5b984a95aa8 (diff)
downloadapr-3b8d0ab45411ac1cb2d76cb3e989744a2dc488da.tar.gz
Add the missing file locking APIs and macros to the NetWare build
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@538266 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r--file_io/netware/filestat.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/file_io/netware/filestat.c b/file_io/netware/filestat.c
index 2996676a9..bf3776208 100644
--- a/file_io/netware/filestat.c
+++ b/file_io/netware/filestat.c
@@ -77,6 +77,28 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info,
*/
}
+apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,
+ apr_file_t *thefile)
+{
+ struct_stat info;
+
+ if (thefile->buffered) {
+ apr_status_t rv = apr_file_flush_locked(thefile);
+ if (rv != APR_SUCCESS)
+ return rv;
+ }
+
+ if (fstat(thefile->filedes, &info) == 0) {
+ finfo->pool = thefile->pool;
+ finfo->fname = thefile->fname;
+ fill_out_finfo(finfo, &info, wanted);
+ return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
+ }
+ else {
+ return errno;
+ }
+}
+
APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
apr_int32_t wanted,
apr_file_t *thefile)