]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/beast/core/file_posix.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / beast / core / file_posix.hpp
index 65bac2065d855e60609c58ae1ca5c4fee5654ce8..b7a70a54ae63482fc9546bbc6fcadd09e46a8204 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2015-2016 Vinnie Falco (vinnie dot falco at gmail dot com)
+// Copyright (c) 2015-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -10,7 +10,7 @@
 #ifndef BOOST_BEAST_CORE_FILE_POSIX_HPP
 #define BOOST_BEAST_CORE_FILE_POSIX_HPP
 
-#include <boost/config.hpp>
+#include <boost/beast/core/detail/config.hpp>
 
 #if ! defined(BOOST_BEAST_NO_POSIX_FILE)
 # if ! defined(__APPLE__) && ! defined(__linux__)
@@ -37,12 +37,17 @@ namespace beast {
 
 /** An implementation of File for POSIX systems.
 
-    This class implements a @b File using POSIX interfaces.
+    This class implements a <em>File</em> using POSIX interfaces.
 */
 class file_posix
 {
     int fd_ = -1;
 
+    BOOST_BEAST_DECL
+    static
+    int
+    native_close(int& fd);
+
 public:
     /** The type of the underlying file handle.
 
@@ -54,6 +59,7 @@ public:
 
         If the file is open it is first closed.
     */
+    BOOST_BEAST_DECL
     ~file_posix();
 
     /** Constructor
@@ -66,12 +72,14 @@ public:
 
         The moved-from object behaves as if default constructed.
     */
+    BOOST_BEAST_DECL
     file_posix(file_posix&& other);
 
     /** Assignment
 
         The moved-from object behaves as if default constructed.
     */
+    BOOST_BEAST_DECL
     file_posix& operator=(file_posix&& other);
 
     /// Returns the native handle associated with the file.
@@ -87,6 +95,7 @@ public:
 
         @param fd The native file handle to assign.
     */
+    BOOST_BEAST_DECL
     void
     native_handle(native_handle_type fd);
 
@@ -101,6 +110,7 @@ public:
 
         @param ec Set to the error, if any occurred.
     */
+    BOOST_BEAST_DECL
     void
     close(error_code& ec);
 
@@ -112,6 +122,7 @@ public:
 
         @param ec Set to the error, if any occurred
     */
+    BOOST_BEAST_DECL
     void
     open(char const* path, file_mode mode, error_code& ec);
 
@@ -121,6 +132,7 @@ public:
 
         @return The size in bytes
     */
+    BOOST_BEAST_DECL
     std::uint64_t
     size(error_code& ec) const;
 
@@ -130,6 +142,7 @@ public:
 
         @return The offset in bytes from the beginning of the file
     */
+    BOOST_BEAST_DECL
     std::uint64_t
     pos(error_code& ec) const;
 
@@ -139,6 +152,7 @@ public:
 
         @param ec Set to the error, if any occurred
     */
+    BOOST_BEAST_DECL
     void
     seek(std::uint64_t offset, error_code& ec);
 
@@ -150,6 +164,7 @@ public:
 
         @param ec Set to the error, if any occurred
     */
+    BOOST_BEAST_DECL
     std::size_t
     read(void* buffer, std::size_t n, error_code& ec) const;
 
@@ -161,6 +176,7 @@ public:
 
         @param ec Set to the error, if any occurred
     */
+    BOOST_BEAST_DECL
     std::size_t
     write(void const* buffer, std::size_t n, error_code& ec);
 };
@@ -168,7 +184,9 @@ public:
 } // beast
 } // boost
 
+#ifdef BOOST_BEAST_HEADER_ONLY
 #include <boost/beast/core/impl/file_posix.ipp>
+#endif
 
 #endif