1 /* ************************************************************************** */
2 /* pwd.h simulation for Windows port of GRISBI                                */
3 /* Defines only what GRISBI needs from the original pwd.h features            */
4 /*                                                                            */
5 /*                             pwd.h                                          */
6 /*                                                                            */
7 /*     Copyright (C)	2004- xxxx François Terrot (grisbi@terrot.net)	      */
8 /* 			https://www.grisbi.org				      */
9 /*                                                                            */
10 /*  This program is free software; you can redistribute it and/or modify      */
11 /*  it under the terms of the GNU General Public License as published by      */
12 /*  the Free Software Foundation; either version 2 of the License, or         */
13 /*  (at your option) any later version.                                       */
14 /*                                                                            */
15 /*  This program is distributed in the hope that it will be useful,           */
16 /*  but WITHOUT ANY WARRANTY; without even the implied warranty of            */
17 /*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             */
18 /*  GNU General Public License for more details.                              */
19 /*                                                                            */
20 /*  You should have received a copy of the GNU General Public License         */
21 /*  along with this program; if not, write to the Free Software               */
22 /*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
23 /*                                                                            */
24 /* ************************************************************************** */
25 /* Original pwd.h copyright ... */
26 /*-
27  * Copyright (c) 1989 The Regents of the University of California.
28  * All rights reserved.
29  *
30  * Redistribution and use in source and binary forms, with or without
31  * modification, are permitted provided that the following conditions
32  * are met:
33  * 1. Redistributions of source code must retain the above copyright
34  *    notice, this list of conditions and the following disclaimer.
35  * 2. Redistributions in binary form must reproduce the above copyright
36  *    notice, this list of conditions and the following disclaimer in the
37  *    documentation and/or other materials provided with the distribution.
38  * 3. All advertising materials mentioning features or use of this software
39  *    must display the following acknowledgement:
40  *	This product includes software developed by the University of
41  *	California, Berkeley and its contributors.
42  * 4. Neither the name of the University nor the names of its contributors
43  *    may be used to endorse or promote products derived from this software
44  *    without specific prior written permission.
45  *
46  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
47  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
50  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
51  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
52  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
53  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
54  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
55  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
56  * SUCH DAMAGE.
57  *
58  *	@(#)pwd.h	5.13 (Berkeley) 5/28/91
59  */
60 #ifndef _PWD_H_
61 #define	_PWD_H_
62 
63 #include <sys/types.h>
64 #include <windows.h>
65 #include <glib.h>
66 /*
67  * Definitions of uid_t and getuid is the one found in the cygwin <sys/types.h>
68  */
69 typedef	unsigned short	uid_t;
70 uid_t   getuid(void);
71 
72 /*
73  * The passwd struct is not completly redefined,
74  * only the fields used by GRISBI are declared
75  */
76 struct passwd {
77 	gchar pw_name[MAX_PATH];		/* user name */
78 	gchar pw_gecos[MAX_PATH];		/* Honeywell login info */
79 };
80 
81 struct passwd	*getpwuid (uid_t);
82 
83 #endif
84