home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntlib16.lzh
/
MNTLIB16
/
GETUID.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
818b
|
39 lines
#include <sys/types.h>
#include <unistd.h>
#include <osbind.h>
#include <mintbind.h>
extern int __mint;
static int __uid, __gid;
uid_t getuid() { return __mint ? Pgetuid() : __uid; }
gid_t getgid() { return __mint ? Pgetgid() : __gid; }
uid_t geteuid() { return getuid(); }
gid_t getegid() { return getgid(); }
int setuid(x) int x; { return __mint ? Psetuid(x) : (__uid = x); }
int setgid(x) int x; { return __mint ? Psetgid(x) : (__gid = x); }
int setreuid(ruid,euid)
int ruid, euid;
{
return setuid(euid);
}
int setregid(rgid,egid)
int rgid, egid;
{
return setgid(egid);
}
/* note: BSD getpgrp takes an argument, but ours doesn't */
int getpgrp() { return __mint ? Pgetpgrp() : 0; }
int setpgrp(pid, grp)
int pid, grp;
{
return __mint ? Psetpgrp(pid, grp) : 0;
}