+#ifndef EC_COUNT_OF
+#define EC_COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / \
+ ((size_t)(!(sizeof(x) % sizeof(0[x])))))
+#endif
+
+/**
+ * Allocate a new string vector
+ *
+ * The string vector is initialized with the list of const strings
+ * passed as arguments.
+ *
+ * @return
+ * The new strvec object, or NULL on error (errno is set).
+ */
+#define EC_STRVEC(args...) ({ \
+ const char *_arr[] = {args}; \
+ ec_strvec_from_array(_arr, EC_COUNT_OF(_arr)); \
+ })
+/**
+ * Allocate a new string vector
+ *
+ * The string vector is initialized with the array of const strings
+ * passed as arguments.
+ *
+ * @param strarr
+ * The array of const strings.
+ * @param n
+ * The number of strings in the array.
+ * @return
+ * The new strvec object, or NULL on error (errno is set).
+ */
+struct ec_strvec *ec_strvec_from_array(const char * const *strarr,
+ size_t n);
+