]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/interprocess/test/windows_shared_dir_func.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / interprocess / test / windows_shared_dir_func.cpp
index 135f2460b85d36180cb5e2cf0e7382d88bf24366..081d558d1f719a22576faed932e088ed9b239cad 100644 (file)
@@ -8,12 +8,9 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-#include <boost/interprocess/detail/config_begin.hpp>
-#include <boost/interprocess/detail/workaround.hpp>
+#include <boost/config.hpp>
 
-#ifdef BOOST_INTERPROCESS_WINDOWS
-
-#define BOOST_INTERPROCESS_WINDOWS
+#ifdef BOOST_WINDOWS
 
 //Force user-defined get_shared_dir
 #define BOOST_INTERPROCESS_SHARED_DIR_FUNC
@@ -51,15 +48,17 @@ int main ()
    ipcdetail::get_shared_dir(shared_dir);
 
    std::string shm_path(shared_dir);
+   shm_path += "/";
    shm_path += shm_name;
 
    int ret = 0;
    shared_memory_object::remove(shm_name);
    {
-      shared_memory_object shm(create_only, shm_name, read_write);
+      {
+         shared_memory_object shm(create_only, shm_name, read_write);
+      }
 
-      shm_path += shm_name;
-      int ret = ipcdetail::invalid_file() == ipcdetail::open_existing_file(shm_path.c_str(), read_only) ?
+      ret = ipcdetail::invalid_file() == ipcdetail::open_existing_file(shm_path.c_str(), read_only) ?
                1 : 0;
       if(ret)
       {
@@ -79,6 +78,4 @@ int main()
    return 0;
 }
 
-#endif   //#ifdef BOOST_INTERPROCESS_WINDOWS
-
-#include <boost/interprocess/detail/config_end.hpp>
+#endif   //#ifdef BOOST_WINDOWS