diff options
author | Ken Brown <kbrown@cornell.edu> | 2022-05-22 15:18:48 -0400 |
---|---|---|
committer | Ken Brown <kbrown@cornell.edu> | 2022-05-29 17:45:52 -0400 |
commit | 2d9b48760c48f19b2941f05ee6720f510700823c (patch) | |
tree | 693f2793b34d8aea8a57d8e0f6202d802eb91097 /winsup/cygwin/grp.cc | |
parent | 7c0de0af97d35c8fed5ffbf311e54af85d1c4af3 (diff) | |
download | newlib-2d9b48760c48f19b2941f05ee6720f510700823c.zip newlib-2d9b48760c48f19b2941f05ee6720f510700823c.tar.gz newlib-2d9b48760c48f19b2941f05ee6720f510700823c.tar.bz2 |
Cygwin: simplify some function names
Remove "32" or "64" from each of the following names: acl32,
aclcheck32, aclfrommode32, aclfrompbits32, aclfromtext32, aclsort32,
acltomode32, acltopbits32, acltotext32, facl32, fchown32, fcntl64,
fstat64, _fstat64, _fstat64_r, ftruncate64, getgid32, getgrent32,
getgrgid32, getgrnam32, getgroups32, getpwuid32, getpwuid_r32,
getuid32, getuid32, initgroups32, lseek64, lstat64, mknod32, mmap64,
setegid32, seteuid32, setgid32, setgroups32, setregid32, setreuid32,
setuid32, stat64, _stat64_r, truncate64.
Remove prototypes and macro definitions of these names.
Remove "#ifndef __INSIDE_CYGWIN__" from some headers so that the new
names will be available when compiling Cygwin.
Remove aliases that are no longer needed.
Include <unistd.h> in fhandler_clipboard.cc for the declarations of
geteuid and getegid.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r-- | winsup/cygwin/grp.cc | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 893e4cc..b06ad37 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -300,15 +300,13 @@ getgr_cp (struct group *tempgr) } extern "C" struct group * -getgrgid32 (gid_t gid) +getgrgid (gid_t gid) { struct group *tempgr = internal_getgrgid (gid); pthread_testcancel (); return getgr_cp (tempgr); } -EXPORT_ALIAS (getgrgid32, getgrgid) - extern "C" int getgrnam_r (const char *nam, struct group *grp, char *buffer, size_t bufsize, struct group **result) @@ -340,15 +338,13 @@ getgrnam_r (const char *nam, struct group *grp, char *buffer, } extern "C" struct group * -getgrnam32 (const char *name) +getgrnam (const char *name) { struct group *tempgr = internal_getgrnam (name); pthread_testcancel (); return getgr_cp (tempgr); } -EXPORT_ALIAS (getgrnam32, getgrnam) - /* getgrent functions are not reentrant. */ static gr_ent grent; @@ -459,13 +455,11 @@ setgrent () } extern "C" struct group * -getgrent32 (void) +getgrent (void) { return grent.getgrent (); } -EXPORT_ALIAS (getgrent32, getgrent) - extern "C" void endgrent (void) { @@ -646,15 +640,13 @@ out: } extern "C" int -getgroups32 (int gidsetsize, gid_t *grouplist) +getgroups (int gidsetsize, gid_t *grouplist) { cyg_ldap cldap; return internal_getgroups (gidsetsize, grouplist, &cldap); } -EXPORT_ALIAS (getgroups32, getgroups) - /* Core functionality of initgroups and getgrouplist. */ static void get_groups (const char *user, gid_t gid, cygsidlist &gsids) @@ -673,7 +665,7 @@ get_groups (const char *user, gid_t gid, cygsidlist &gsids) } extern "C" int -initgroups32 (const char *user, gid_t gid) +initgroups (const char *user, gid_t gid) { assert (user != NULL); cygsidlist tmp_gsids (cygsidlist_auto, 12); @@ -687,8 +679,6 @@ initgroups32 (const char *user, gid_t gid) return 0; } -EXPORT_ALIAS (initgroups32, initgroups) - extern "C" int getgrouplist (const char *user, gid_t gid, gid_t *groups, int *ngroups) { @@ -725,11 +715,11 @@ getgrouplist (const char *user, gid_t gid, gid_t *groups, int *ngroups) return ret; } -/* setgroups32: standards? */ +/* setgroups: standards? */ extern "C" int -setgroups32 (int ngroups, const gid_t *grouplist) +setgroups (int ngroups, const gid_t *grouplist) { - syscall_printf ("setgroups32 (%d)", ngroups); + syscall_printf ("setgroups (%d)", ngroups); if (ngroups < 0 || (ngroups > 0 && !grouplist)) { set_errno (EINVAL); @@ -756,5 +746,3 @@ setgroups32 (int ngroups, const gid_t *grouplist) cygheap->user.groups.update_supp (gsids); return 0; } - -EXPORT_ALIAS (setgroups32, setgroups) |