diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-02-10 13:38:51 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-02-10 13:38:51 +0000 |
commit | de4e0d3001021bb98664c3c23b32fe66c4dc59d0 (patch) | |
tree | 5324c8fc5fd5157ae0adb3ada3218af9accb0528 /winsup/cygwin/grp.cc | |
parent | a505db6554fb96d8eecce221378decbf3edf6b2e (diff) | |
download | cygnal-de4e0d3001021bb98664c3c23b32fe66c4dc59d0.tar.gz cygnal-de4e0d3001021bb98664c3c23b32fe66c4dc59d0.tar.bz2 cygnal-de4e0d3001021bb98664c3c23b32fe66c4dc59d0.zip |
* (child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,
fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h):
Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
off_t to __off32_t throughout. Use INVALID_UID, INVALID_GID and
INVALID_SEEK instead casting -1 to the appropriate type.
* winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
* include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
types. Don't declare acl functions when compiling Cygwin.
* include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
correct types for internal usage.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r-- | winsup/cygwin/grp.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 93af7063e..fdb524c29 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -32,7 +32,7 @@ details. */ on the first call that needs information from it. */ static NO_COPY const char *etc_group = "/etc/group"; -static struct group *group_buf; /* group contents in memory */ +static struct __group16 *group_buf; /* group contents in memory */ static int curr_lines; static int max_lines; @@ -46,7 +46,7 @@ static int grp_pos = 0; static pwdgrp_check group_state; static int -parse_grp (struct group &grp, const char *line) +parse_grp (struct __group16 &grp, const char *line) { int len = strlen(line); char *newline = (char *) malloc (len + 1); @@ -111,7 +111,7 @@ add_grp_line (const char *line) if (curr_lines == max_lines) { max_lines += 10; - group_buf = (struct group *) realloc (group_buf, max_lines * sizeof (struct group)); + group_buf = (struct __group16 *) realloc (group_buf, max_lines * sizeof (struct __group16)); } if (parse_grp (group_buf[curr_lines], line)) curr_lines++; @@ -208,10 +208,10 @@ read_etc_group () } extern "C" -struct group * -getgrgid (gid_t gid) +struct __group16 * +getgrgid (__gid16_t gid) { - struct group * default_grp = NULL; + struct __group16 * default_grp = NULL; if (group_state <= initializing) read_etc_group(); @@ -227,7 +227,7 @@ getgrgid (gid_t gid) } extern "C" -struct group * +struct __group16 * getgrnam (const char *name) { if (group_state <= initializing) @@ -249,7 +249,7 @@ endgrent() } extern "C" -struct group * +struct __group16 * getgrent() { if (group_state <= initializing) @@ -269,7 +269,7 @@ setgrent () } /* Internal function. ONLY USE THIS INTERNALLY, NEVER `getgrent'!!! */ -struct group * +struct __group16 * internal_getgrent (int pos) { if (group_state <= initializing) @@ -281,12 +281,12 @@ internal_getgrent (int pos) } int -getgroups (int gidsetsize, gid_t *grouplist, gid_t gid, const char *username) +getgroups (int gidsetsize, __gid16_t *grouplist, __gid16_t gid, const char *username) { HANDLE hToken = NULL; DWORD size; int cnt = 0; - struct group *gr; + struct __group16 *gr; if (group_state <= initializing) read_etc_group(); @@ -356,14 +356,14 @@ error: extern "C" int -getgroups (int gidsetsize, gid_t *grouplist) +getgroups (int gidsetsize, __gid16_t *grouplist) { return getgroups (gidsetsize, grouplist, myself->gid, cygheap->user.name ()); } extern "C" int -initgroups (const char *, gid_t) +initgroups (const char *, __gid16_t) { return 0; } |