mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* names.c (finduname): Don't use HAVE_GETPWUID - it's never
defined. Don't redeclare getpwuid(). (findgname): Don't use HAVE_GETGRGID - it's never defined. Don't redeclare getgrgid().
This commit is contained in:
parent
7dbf6695ff
commit
77e155246d
@ -1,5 +1,10 @@
|
|||||||
2001-08-23 Pavel Roskin <proski@gnu.org>
|
2001-08-23 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* names.c (finduname): Don't use HAVE_GETPWUID - it's never
|
||||||
|
defined. Don't redeclare getpwuid().
|
||||||
|
(findgname): Don't use HAVE_GETGRGID - it's never defined.
|
||||||
|
Don't redeclare getgrgid().
|
||||||
|
|
||||||
* fish.c: Remove useless semicolons after functions.
|
* fish.c: Remove useless semicolons after functions.
|
||||||
|
|
||||||
2001-08-19 Pavel Roskin <proski@gnu.org>
|
2001-08-19 Pavel Roskin <proski@gnu.org>
|
||||||
|
@ -57,16 +57,10 @@ static int my_gid = -993;
|
|||||||
* Look up a user or group name from a uid/gid, maintaining a cache.
|
* Look up a user or group name from a uid/gid, maintaining a cache.
|
||||||
* FIXME, for now it's a one-entry cache.
|
* FIXME, for now it's a one-entry cache.
|
||||||
* FIXME2, the "-993" is to reduce the chance of a hit on the first lookup.
|
* FIXME2, the "-993" is to reduce the chance of a hit on the first lookup.
|
||||||
*
|
|
||||||
* This is ifdef'd because on Suns, it drags in about 38K of "yellow
|
|
||||||
* pages" code, roughly doubling the program size. Thanks guys.
|
|
||||||
*/
|
*/
|
||||||
void finduname (char *uname, int uid)
|
void finduname (char *uname, int uid)
|
||||||
{
|
{
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
#ifndef HAVE_GETPWUID
|
|
||||||
extern struct passwd *getpwuid ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (uid != saveuid) {
|
if (uid != saveuid) {
|
||||||
saveuid = uid;
|
saveuid = uid;
|
||||||
@ -100,9 +94,6 @@ int finduid (char *uname)
|
|||||||
void findgname (char *gname, int gid)
|
void findgname (char *gname, int gid)
|
||||||
{
|
{
|
||||||
struct group *gr;
|
struct group *gr;
|
||||||
#ifndef HAVE_GETGRGID
|
|
||||||
extern struct group *getgrgid ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (gid != savegid) {
|
if (gid != savegid) {
|
||||||
savegid = gid;
|
savegid = gid;
|
||||||
|
Loading…
Reference in New Issue
Block a user