diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-07-01 02:12:43 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-07-01 02:12:43 +0000 |
commit | 13ea39a34766fcbecd96ab94bcdf798b08e9bb60 (patch) | |
tree | 1e1463b03838a6f36868a4dafc7e652358a51857 /libshouldbeinlibc/ugids.h | |
parent | 1f8d504f631531c199d7c6154a0dc442d80ea4a7 (diff) | |
parent | 7e15f3d69a83a34ac62cbbee944a0bfbfa92724e (diff) |
Merge branch 'master' into xkb
Conflicts:
config.make.in
configure.in
Diffstat (limited to 'libshouldbeinlibc/ugids.h')
-rw-r--r-- | libshouldbeinlibc/ugids.h | 19 |
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); |