1/*  pwd.h - Try to approximate UN*X's getuser...() functions under MS-DOS.
2    Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
3
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 1, or (at your option)
7    any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.  */
13
14/* This 'implementation' is conjectured from the use of this functions in
15   the RCS and BASH distributions.  Of course these functions don't do too
16   much useful things under MS-DOS, but using them avoids many "#ifdef
17   MSDOS" in ported UN*X code ...  */
18
19#if 0
20/* This is taken care of in Windows-NT/config.h.  */
21typedef int uid_t;
22#endif
23
24struct passwd
25{
26  /*	...		*/
27  /*    missing stuff	*/
28  /*	...		*/
29  char *pw_name;		/* login user id		*/
30  char *pw_dir;			/* home directory		*/
31  char *pw_shell;		/* login shell			*/
32  int  pw_uid;
33};
34
35struct group
36{
37  /*	...		*/
38  /*    missing stuff	*/
39  /*	...		*/
40  char *gr_name;		/* login user id		*/
41  int  gr_gid;
42};
43
44extern struct passwd *getpwuid (int);
45extern struct passwd *getpwnam (char *);
46extern struct group *getgrgid (int);
47extern struct group *getgrnam (char *);
48extern char *getlogin (void);
49extern char *getgr_name (void);
50extern int getuid (void);
51extern int getgid (void);
52extern int geteuid (void);
53extern int getegid (void);
54
55extern int *groups;
56extern int ngroups;
57extern int getgroups (int, int *);
58
59extern struct passwd *getpwent (void);
60extern void setpwent (void);
61extern void endpwent (void);
62extern void endgrent (void);
63
64/*
65 * Local Variables:
66 * mode:C
67 * ChangeLog:ChangeLog
68 * compile-command:make
69 * End:
70 */
71