diff options
author | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2007-05-15 21:17:13 +0000 |
---|---|---|
committer | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2007-05-15 21:17:13 +0000 |
commit | b2a63d0c36354ed96a8d02a21f2a6d04d82b71d5 (patch) | |
tree | 47760a5d52e10ab6e182d8be92e1b3d531f20868 /file_io | |
parent | 62170bd0738434ae8a3f28f085ad027a974e8e58 (diff) | |
download | libapr-b2a63d0c36354ed96a8d02a21f2a6d04d82b71d5.tar.gz |
Backport 538266 from the trunk.
Add the missing file locking APIs and macros to the NetWare build.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@538322 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/netware/filestat.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/file_io/netware/filestat.c b/file_io/netware/filestat.c index 4a37cb84e..def63b7e5 100644 --- a/file_io/netware/filestat.c +++ b/file_io/netware/filestat.c @@ -77,6 +77,29 @@ 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) |