ocaml: Combine tests together to reduce number of launches.
[libguestfs.git] / ocaml / guestfs_c.h
index cd1d73b..219dc2f 100644 (file)
@@ -19,6 +19,8 @@
 #ifndef GUESTFS_OCAML_C_H
 #define GUESTFS_OCAML_C_H
 
+#include "guestfs-internal.h"
+
 #define Guestfs_val(v) (*((guestfs_h **)Data_custom_val(v)))
 extern void ocaml_guestfs_raise_error (guestfs_h *g, const char *func)
   Noreturn;
@@ -27,4 +29,14 @@ extern void ocaml_guestfs_raise_closed (const char *func)
 extern char **ocaml_guestfs_strings_val (guestfs_h *g, value sv);
 extern void ocaml_guestfs_free_strings (char **r);
 
+# ifdef __GNUC__
+# ifndef ATTRIBUTE_UNUSED
+#  define ATTRIBUTE_UNUSED __attribute__((__unused__))
+# endif
+#else
+# ifndef ATTRIBUTE_UNUSED
+#  define ATTRIBUTE_UNUSED
+# endif
+#endif
+
 #endif /* GUESTFS_OCAML_C_H */