File: pwd.c

package info (click to toggle)
cvs 2%3A1.12.13%2Breal-28%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 18,156 kB
  • sloc: ansic: 100,617; sh: 33,909; asm: 3,281; perl: 2,818; ada: 1,681; makefile: 1,605; yacc: 1,244; pascal: 1,082; cpp: 1,001; lisp: 35
file content (33 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (9)
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
#include "pwd.h"
#include <stdio.h>
#include <unixlib.h>

#ifndef __VMS_VER
#define __VMS_VER 0
#endif
#ifndef __DECC_VER
#define __DECC_VER 0
#endif

#if __VMS_VER < 70200000 || __DECC_VER < 50700000

static struct passwd pw;

/* This is only called from one relevant place, lock.c.  In that context
   the code is really trying to figure out who owns a directory.  Nothing
   which has anything to do with getpwuid or anything of the sort can help
   us on VMS (getuid returns only the group part of the UIC).  */
struct passwd *getpwuid(unsigned int uid)
{
    return NULL;
}

char *getlogin()
{
  static char login[256];
  return cuserid(login);
} 

#else  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
#pragma message disable EMPTYFILE
#endif  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */