summaryrefslogtreecommitdiff
path: root/PACE/pace/win32/pwd.inl
blob: 57fc6393638d3218256660726de2679c4d9fb7d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* $Id$ -*- C -*-

 * =============================================================================
 *
 * = LIBRARY
 *    pace
 *
 * = FILENAME
 *    pace/posix/pwd.inl
 *
 * = AUTHOR
 *    Luther Baker
 *
 * ============================================================================= */

PACE_INLINE
struct passwd *
pace_getpwuid (uid_t uid)
{
  return getpwuid (uid);
}

PACE_INLINE
int
pace_getpwuid_r (uid_t uid,
                 struct passwd * pwd,
                 char * buffer,
                 size_t bufsize,
                 struct passwd ** result)
{
# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
  return getpwuid_r (uid, pwd, buffer, bufsize, result);
# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
  PACE_ERRNO_NO_SUPPORT_RETURN (-1);
# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
}

PACE_INLINE
struct passwd *
pace_getpwnam (const char * name)
{
  return getpwnam (name);
}

PACE_INLINE
int
pace_getpwnam_r (const char * name,
                 struct passwd * pwd,
                 char * buffer,
                 size_t bufsize,
                 struct passwd ** result)
{
# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
  return getpwnam_r (name, pwd, buffer, bufsize, result);
# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
  PACE_ERRNO_NO_SUPPORT_RETURN (-1);
# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
}