Line | |
---|
1 | #include <lib.h>
|
---|
2 | #define getegid _getegid
|
---|
3 | #include <unistd.h>
|
---|
4 |
|
---|
5 | PUBLIC gid_t getegid()
|
---|
6 | {
|
---|
7 | message m;
|
---|
8 |
|
---|
9 | /* POSIX says that this function is always successful and that no
|
---|
10 | * return value is reserved to indicate an error. Minix syscalls
|
---|
11 | * are not always successful and Minix returns the unreserved value
|
---|
12 | * (gid_t) -1 when there is an error.
|
---|
13 | */
|
---|
14 | if (_syscall(MM, GETGID, &m) < 0) return ( (gid_t) -1);
|
---|
15 | return( (gid_t) m.m2_i1);
|
---|
16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.