xref: /openbsd-src/gnu/usr.bin/cvs/vms/pwd.c (revision 43c1707e6f6829177cb1974ee6615ce6c1307689)
150bf276cStholo #include "pwd.h"
250bf276cStholo #include <stdio.h>
350bf276cStholo #include <unixlib.h>
450bf276cStholo 
5*43c1707eStholo #ifndef __VMS_VER
6*43c1707eStholo #define __VMS_VER 0
7*43c1707eStholo #endif
8*43c1707eStholo #ifndef __DECC_VER
9*43c1707eStholo #define __DECC_VER 0
10*43c1707eStholo #endif
11*43c1707eStholo 
12*43c1707eStholo #if __VMS_VER < 70200000 || __DECC_VER < 50700000
13*43c1707eStholo 
1450bf276cStholo static struct passwd pw;
1550bf276cStholo 
162286d8edStholo /* This is only called from one relevant place, lock.c.  In that context
172286d8edStholo    the code is really trying to figure out who owns a directory.  Nothing
182286d8edStholo    which has anything to do with getpwuid or anything of the sort can help
192286d8edStholo    us on VMS (getuid returns only the group part of the UIC).  */
getpwuid(unsigned int uid)202286d8edStholo struct passwd *getpwuid(unsigned int uid)
2150bf276cStholo {
222286d8edStholo     return NULL;
2350bf276cStholo }
2450bf276cStholo 
getlogin()2550bf276cStholo char *getlogin()
2650bf276cStholo {
2750bf276cStholo   static char login[256];
2850bf276cStholo   return cuserid(login);
2950bf276cStholo }
30*43c1707eStholo 
31*43c1707eStholo #else  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
32*43c1707eStholo #pragma message disable EMPTYFILE
33*43c1707eStholo #endif  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
34