mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Get group name info
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3378 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f41cd654d6
commit
a14ab331e6
4 changed files with 283 additions and 201 deletions
|
@ -75,6 +75,9 @@
|
||||||
/* Define if you have the <pwd.h> header file. */
|
/* Define if you have the <pwd.h> header file. */
|
||||||
#undef HAVE_PWD_H
|
#undef HAVE_PWD_H
|
||||||
|
|
||||||
|
/* Define if you have the <getgrent.h> header file. */
|
||||||
|
#undef HAVE_GRP_H
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
/* Define if you have the <string.h> header file. */
|
||||||
#undef HAVE_STRING_H
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
|
|
@ -109,6 +109,9 @@
|
||||||
#if HAVE_PWD_H
|
#if HAVE_PWD_H
|
||||||
#include <pwd.h> /* For struct passwd */
|
#include <pwd.h> /* For struct passwd */
|
||||||
#endif
|
#endif
|
||||||
|
#if HAVE_GRP_H
|
||||||
|
#include <grp.h> /* For struct group */
|
||||||
|
#endif
|
||||||
#if HAVE_UTIME_H
|
#if HAVE_UTIME_H
|
||||||
# include <utime.h>
|
# include <utime.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -605,7 +608,7 @@ static NSFileManager* defaultManager = nil;
|
||||||
#if HAVE_PWD_H
|
#if HAVE_PWD_H
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_GETGRENT_H
|
#if HAVE_GRP_H
|
||||||
struct group *gp;
|
struct group *gp;
|
||||||
#endif
|
#endif
|
||||||
int mode;
|
int mode;
|
||||||
|
@ -674,7 +677,7 @@ static NSFileManager* defaultManager = nil;
|
||||||
{
|
{
|
||||||
values[10] = @"UnknownUser";
|
values[10] = @"UnknownUser";
|
||||||
}
|
}
|
||||||
#if HAVE_GETGRENT_H
|
#if HAVE_GRP_H
|
||||||
setgrent();
|
setgrent();
|
||||||
while ((gp = getgrent()) != 0)
|
while ((gp = getgrent()) != 0)
|
||||||
if (gp->gr_gid == statbuf.st_uid)
|
if (gp->gr_gid == statbuf.st_uid)
|
||||||
|
|
|
@ -211,7 +211,7 @@ AC_CHECK_HEADERS(values.h)
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Header files and functions for files and filesystems
|
# Header files and functions for files and filesystems
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
AC_CHECK_HEADERS(sys/stat.h sys/vfs.h sys/statfs.h sys/statvfs.h pwd.h)
|
AC_CHECK_HEADERS(sys/stat.h sys/vfs.h sys/statfs.h sys/statvfs.h pwd.h grp.h)
|
||||||
AC_CHECK_FUNCS(statvfs)
|
AC_CHECK_FUNCS(statvfs)
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue