]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/seastar/include/seastar/core/internal/api-level.hh
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / seastar / include / seastar / core / internal / api-level.hh
index 8b46a7a9302d49f9577bf3f8cbadec962c3effa6..c18e03f8213e2d9b86a0f3097047691abca77e41 100644 (file)
 
 // For IDEs that don't see SEASTAR_API_LEVEL, generate a nice default
 #ifndef SEASTAR_API_LEVEL
-#define SEASTAR_API_LEVEL 2
+#define SEASTAR_API_LEVEL 3
 #endif
 
-#if SEASTAR_API_LEVEL >= 2
+#if SEASTAR_API_LEVEL == 6
+#define SEASTAR_INCLUDE_API_V6 inline
+#else
+#define SEASTAR_INCLUDE_API_V6
+#endif
 
-#define SEASTAR_INCLUDE_API_V2 inline
-#define SEASTAR_INCLUDE_API_V1
+#if SEASTAR_API_LEVEL == 5
+#define SEASTAR_INCLUDE_API_V5 inline
+#else
+#define SEASTAR_INCLUDE_API_V5
+#endif
 
+#if SEASTAR_API_LEVEL == 4
+#define SEASTAR_INCLUDE_API_V4 inline
 #else
+#define SEASTAR_INCLUDE_API_V4
+#endif
 
-#define SEASTAR_INCLUDE_API_V2
-#define SEASTAR_INCLUDE_API_V1 inline
+#if SEASTAR_API_LEVEL == 3
+#define SEASTAR_INCLUDE_API_V3 inline
+#else
+#define SEASTAR_INCLUDE_API_V3
+#endif
 
+#if SEASTAR_API_LEVEL == 2
+#define SEASTAR_INCLUDE_API_V2 inline
+#else
+#define SEASTAR_INCLUDE_API_V2
 #endif
+
+// Declare them here so we don't have to use the macros everywhere
+namespace seastar {
+    SEASTAR_INCLUDE_API_V2 namespace api_v2 {
+    }
+    SEASTAR_INCLUDE_API_V3 namespace api_v3 {
+        inline namespace and_newer {
+        }
+    }
+    SEASTAR_INCLUDE_API_V4 namespace api_v4 {
+        inline namespace and_newer {
+            using namespace api_v3::and_newer;
+        }
+    }
+    SEASTAR_INCLUDE_API_V5 namespace api_v5 {
+        inline namespace and_newer {
+            using namespace api_v4::and_newer;
+        }
+    }
+    SEASTAR_INCLUDE_API_V6 namespace api_v6 {
+        inline namespace and_newer {
+            using namespace api_v5::and_newer;
+        }
+    }
+}