diff options
author | tdonovan <tdonovan@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-25 03:21:54 +0000 |
---|---|---|
committer | tdonovan <tdonovan@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-25 03:21:54 +0000 |
commit | 0878ceafa6a7e880ed2b07de8d00c2d2c7a4286d (patch) | |
tree | fded4cd25cd19418ac1f314d7841657f230db218 /file_io/unix | |
parent | 3f2c60077a406fdf0d9bd0a5b8756388da6f563a (diff) | |
download | libapr-0878ceafa6a7e880ed2b07de8d00c2d2c7a4286d.tar.gz |
Moved new apr_file_link() function to open.c for all platforms
Fixed args & return value for Windows. re: PR 44841
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@679652 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/unix')
-rw-r--r-- | file_io/unix/copy.c | 10 | ||||
-rw-r--r-- | file_io/unix/open.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/file_io/unix/copy.c b/file_io/unix/copy.c index d8c1702d7..3a1c59a62 100644 --- a/file_io/unix/copy.c +++ b/file_io/unix/copy.c @@ -116,13 +116,3 @@ APR_DECLARE(apr_status_t) apr_file_append(const char *from_path, perms, pool); } - -APR_DECLARE(apr_status_t) apr_file_link(const char *from_path, - const char *to_path) -{ - if (link(from_path, to_path) == -1) { - return errno; - } - - return APR_SUCCESS; -} diff --git a/file_io/unix/open.c b/file_io/unix/open.c index e84045045..898d7c203 100644 --- a/file_io/unix/open.c +++ b/file_io/unix/open.c @@ -345,3 +345,13 @@ APR_DECLARE(apr_status_t) apr_file_inherit_unset(apr_file_t *thefile) } APR_POOL_IMPLEMENT_ACCESSOR(file) + +APR_DECLARE(apr_status_t) apr_file_link(const char *from_path, + const char *to_path) +{ + if (link(from_path, to_path) == -1) { + return errno; + } + + return APR_SUCCESS; +} |