revert between 56095 -> 55830 in arch
[AROS.git] / compiler / posixc / getpwuid.c
blobb09ff3c96590bdb07507baa035b232be491dd151
1 /*
2 Copyright © 2004-2017, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
8 #include "__posixc_intbase.h"
9 #include "__usergrp.h"
11 /*****************************************************************************
13 NAME */
15 #include <pwd.h>
17 struct passwd *getpwuid(
19 /* SYNOPSIS */
20 uid_t uid)
22 /* FUNCTION
23 Returns the database entry for the user with specified uid.
25 INPUTS
27 RESULT
29 NOTES
30 Function is not re-entrant. Results will be overwritten by
31 subsequent calls.
33 EXAMPLE
35 BUGS
37 SEE ALSO
39 INTERNALS
41 ******************************************************************************/
43 struct PosixCIntBase *PosixCBase =
44 (struct PosixCIntBase *)__aros_getbase_PosixCBase();
46 __fill_passwd(&PosixCBase->pwd, uid);
48 if (PosixCBase->pwd.pw_uid == uid)
49 return &PosixCBase->pwd;
51 return NULL;