summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/ugids.h
diff options
context:
space:
mode:
Diffstat (limited to 'libshouldbeinlibc/ugids.h')
-rw-r--r--libshouldbeinlibc/ugids.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/libshouldbeinlibc/ugids.h b/libshouldbeinlibc/ugids.h
index 8440b608..10e7a242 100644
--- a/libshouldbeinlibc/ugids.h
+++ b/libshouldbeinlibc/ugids.h
@@ -23,9 +23,12 @@
#include <stdlib.h> /* For inline function stuff. */
#include <idvec.h>
+#include <features.h>
-#ifndef UGIDS_EI
-#define UGIDS_EI extern inline
+#ifdef UGIDS_DEFINE_EI
+#define UGIDS_EI
+#else
+#define UGIDS_EI __extern_inline
#endif
/* A structure holding a set of the common various types of ids. */
@@ -47,6 +50,16 @@ struct ugids
/* Return a new ugids structure, or 0 if an allocation error occurs. */
struct ugids *make_ugids ();
+extern void ugids_fini (struct ugids *ugids);
+
+extern void ugids_free (struct ugids *ugids);
+
+extern int ugids_is_empty (const struct ugids *ugids);
+
+extern int ugids_equal (const struct ugids *ugids1, const struct ugids *ugids2);
+
+#if defined(__USE_EXTERN_INLINES) || defined(UGIDS_DEFINE_EI)
+
/* Free all resources used by UGIDS except UGIDS itself. */
UGIDS_EI void
ugids_fini (struct ugids *ugids)
@@ -93,6 +106,8 @@ ugids_equal (const struct ugids *ugids1, const struct ugids *ugids2)
&& idvec_equal (&ugids1->imp_avail_gids, &ugids2->imp_avail_gids);
}
+#endif /* Use extern inlines. */
+
/* Add all ids in NEW to UGIDS. */
error_t ugids_merge (struct ugids *ugids, const struct ugids *new);