Re: [gtk-list] Re: More IRIX problems
- From: "David J. Topper" <topper virginia edu>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: More IRIX problems
- Date: Fri, 05 Feb 1999 16:54:30 -0500
Erik Mouw wrote:
>
> If it really annoys you, you can switch the warning off. Go to the
> directory where gcc is installed. If you installed gcc 2.8.1 from Ariel
> Faigon's tardist, it is in /usr/freeware/lib/gcc-lib/mips-sgi-irix6.3/2.8.1,
> otherwise it is in the prefix you gave it when you built it. Edit the
> "specs" file. Go to the "*link:" line. If there is already a "-woff 131"
> argument, change it to "-woff 131,85". If there isn't a "-woff" argument,
> insert one just before "-_SYSTYPE_SVR4".
That would mean I get NO warnings. I'm not that good a programmer ...
:-)
> Well, my O2 has it defined in /usr/include/pwd.h as:
>
> #if _POSIX1C
> extern int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);
> extern int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **);
> #endif
>
> It is also in the C library: (nm /usr/lib32/libc.so | grep getpwuid)
>
> Symbols from /usr/lib32/libc.so:
>
> [Index] Value Size Type Bind Other Shndx Name
>
> [333] | 262456880| 436|FUNC |WEAK |DEFAULT |MIPS_TEXT|_getpwuid
> [334] | 262456880| 436|FUNC |WEAK |DEFAULT |MIPS_TEXT|getpwuid
> [398] | 262523440| 12|FUNC |GLOB |DEFAULT |MIPS_TEXT|__sgi_getpwuid_r
> [399] | 262523440| 12|FUNC |WEAK |DEFAULT |MIPS_TEXT|getpwuid_r
> [2264] | 262513856| 568|FUNC |GLOB |HIDDEN |MIPS_TEXT|__files_getpwuid
> [2404] | 262456880| 436|FUNC |GLOB |DEFAULT |MIPS_TEXT|__sgi_getpwuid
>
> But IMHO the size is actually a bit small, unless it calls getpwuid().
> What's the getpwuid_r() function supposed to do? I don't have a manpage
> for it.
Here's a snippet. I don't know why GTK needs it.
DESCRIPTION
getpwent, getpwuid and getpwnam each returns a pointer to an object
with
the following structure containing the broken-out fields of a line
in the
/etc/passwd file or the NIS passwd maps. Each line in the file
contains
a ``passwd'' structure, declared in the <pwd.h> header file:
struct passwd {
char *pw_name;
char *pw_passwd;
uid_t pw_uid;
gid_t pw_gid;
char *pw_age;
char *pw_comment;
char *pw_gecos;
char *pw_dir;
char *pw_shell;
};
This structure is declared in <pwd.h> so it is not necessary to
redeclare
it.
The fields have meanings described in passwd(4).
getpwent when first called returns a pointer to the first passwd
structure in the file; thereafter, it returns a pointer to the next
passwd structure in the file; so successive calls can be used to
search
the entire file. getpwuid searches from the beginning of the file
until
a numerical user id matching uid is found and returns a pointer to
the
particular structure in which it was found. getpwnam searches from
the
beginning of the file until a login name matching name is found,
and
returns a pointer to the particular structure in which it was
found. If
an end-of-file or an error is encountered on reading, these
functions
return a NULL pointer.
A call to setpwent has the effect of rewinding the password file to
allow
repeated searches. endpwent may be called to close the password
file
when processing is complete.
fgetpwent returns a pointer to the next passwd structure in the
stream f,
which matches the format of /etc/passwd. It does no interpretation
of
any kind, NIS entries are passed back as they exist in f.
DT
--
Technical Director, Virginia Center for Computer Music
Programmer / Analyst, Dean's Office (School of A&S)
http://www.people.virginia.edu/~djt7p
(804) 924-6887
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]