⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getgroups.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
字号:
/* * POSIX.1 compatible getgroups() routine * This is needed while gid_t is not the same size as int (or whatever the * syscall is using at the time). */#if !defined(lint) && defined(SCCSIDS)static	char sccsid[] = "@(#)getgroups.c 1.1 92/07/30 SMI";#endif#include <sys/types.h>#include <sys/param.h>#include <sys/syscall.h>getgroups(gidsetsize, grouplist)int	gidsetsize;gid_t	grouplist[];{	int	glist[NGROUPS];	/* getgroups() syscall returns ints */	register int	i;	/* loop control */	register int	rc;	/* return code hold area */	rc = syscall(SYS_getgroups, gidsetsize, glist);	if (rc > 0 && gidsetsize != 0)		for (i = 0; i < rc; i++)			grouplist[i] = (gid_t)glist[i];	return (rc);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -