sflow_agent: Use snprintf() in place of sprintf().
[openvswitch] / lib / util.h
index 5ae0775f1b36491e36b6d720a4ee73456000403a..b2052f364e0f84f8b7405e396e79c463c20202f2 100644 (file)
 #define BUILD_ASSERT_DECL BOOST_STATIC_ASSERT
 #endif /* __cplusplus */
 
+#ifdef __GNUC__
+#define BUILD_ASSERT_GCCONLY(EXPR) BUILD_ASSERT(EXPR)
+#define BUILD_ASSERT_DECL_GCCONLY(EXPR) BUILD_ASSERT_DECL(EXPR)
+#else
+#define BUILD_ASSERT_GCCONLY(EXPR) ((void) 0)
+#define BUILD_ASSERT_DECL_GCCONLY(EXPR) ((void) 0)
+#endif
+
 extern const char *program_name;
 
 /* Returns the number of elements in ARRAY. */
@@ -195,6 +203,7 @@ char *abs_file_name(const char *dir, const char *file_name);
 
 void ignore(bool x OVS_UNUSED);
 int log_2_floor(uint32_t);
+int log_2_ceil(uint32_t);
 int ctz(uint32_t);
 
 bool is_all_zeros(const uint8_t *, size_t);