// D import file generated from '../../../../libphobos/libdruntime/core/sys/posix/grp.d'
module core.sys.posix.grp;
private import core.sys.posix.config;

public import core.sys.posix.sys.types;

version (Posix)
{
	extern (C) nothrow 
	{
		version (linux)
		{
			struct group
			{
				char* gr_name;
				char* gr_passwd;
				gid_t gr_gid;
				char** gr_mem;
			}
		}
		else
		{
			version (OSX)
			{
				struct group
				{
					char* gr_name;
					char* gr_passwd;
					gid_t gr_gid;
					char** gr_mem;
				}
			}
			else
			{
				version (FreeBSD)
				{
					struct group
					{
						char* gr_name;
						char* gr_passwd;
						gid_t gr_gid;
						char** gr_mem;
					}
				}
				else
				{
					static assert(false,"Unsupported platform");
				}
			}
		}
		group* getgrnam(in char*);
		group* getgruid(uid_t);
		version (linux)
		{
			int getgrnam_r(in char*, group*, char*, size_t, group**);
			int getgruid_r(gid_t, group*, char*, size_t, group**);
		}
		else
		{
			version (OSX)
			{
				int getgrnam_r(in char*, group*, char*, size_t, group**);
				int getgruid_r(gid_t, group*, char*, size_t, group**);
			}
			else
			{
				version (FreeBSD)
				{
					int getgrnam_r(in char*, group*, char*, size_t, group**);
					int getgruid_r(gid_t, group*, char*, size_t, group**);
				}
				else
				{
					static assert(false,"Unsupported platform");
				}
			}
		}
		version (linux)
		{
			group* getgrent();
			@trusted void endgrent();

			@trusted void setgrent();

		}
		else
		{
			version (OSX)
			{
				group* getgrent();
				@trusted void endgrent();

				@trusted void setgrent();

			}
			else
			{
				version (FreeBSD)
				{
					group* getgrent();
					@trusted void endgrent();

					@trusted void setgrent();

				}
				else
				{
					static assert(false,"Unsupported platform");
				}
			}
		}
	}

}
