[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 2/3] lib/posix-user: Import grp.h from musl



Thank you Costin

Reviewed-by: Mihai Pogonaru <pogonarumihai@xxxxxxxxx>

On Sun, Oct 27, 2019 at 2:06 PM Costin Lupu <costin.lupu@xxxxxxxxx> wrote:
>
> Copied as is from the official musl git mirror
> git://git.musl-libc.org/musl, commit 6fcb440d.
>
> Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
> ---
>  lib/posix-user/musl-imported/include/grp.h | 53 ++++++++++++++++++++++
>  1 file changed, 53 insertions(+)
>  create mode 100644 lib/posix-user/musl-imported/include/grp.h
>
> diff --git a/lib/posix-user/musl-imported/include/grp.h 
> b/lib/posix-user/musl-imported/include/grp.h
> new file mode 100644
> index 00000000..27e8c5e6
> --- /dev/null
> +++ b/lib/posix-user/musl-imported/include/grp.h
> @@ -0,0 +1,53 @@
> +#ifndef        _GRP_H
> +#define        _GRP_H
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <features.h>
> +
> +#define __NEED_size_t
> +#define __NEED_gid_t
> +
> +#ifdef _GNU_SOURCE
> +#define __NEED_FILE
> +#endif
> +
> +#include <bits/alltypes.h>
> +
> +struct group {
> +       char *gr_name;
> +       char *gr_passwd;
> +       gid_t gr_gid;
> +       char **gr_mem;
> +};
> +
> +struct group  *getgrgid(gid_t);
> +struct group  *getgrnam(const char *);
> +
> +int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
> +int getgrnam_r(const char *, struct group *, char *, size_t, struct group 
> **);
> +
> +#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
> +struct group  *getgrent(void);
> +void           endgrent(void);
> +void           setgrent(void);
> +#endif
> +
> +#ifdef _GNU_SOURCE
> +struct group  *fgetgrent(FILE *);
> +int putgrent(const struct group *, FILE *);
> +#endif
> +
> +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
> +int getgrouplist(const char *, gid_t, gid_t *, int *);
> +int setgroups(size_t, const gid_t *);
> +int initgroups(const char *, gid_t);
> +#endif
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
> --
> 2.20.1
>

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.