summaryrefslogtreecommitdiff
path: root/vms/pwd.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2005-10-03 13:43:40 +0000
committer <>2014-09-25 11:25:48 +0000
commit10de491ef0bc43827ab8631a4c02860134e620a9 (patch)
tree22e734337cc9aa5d9b1d7c71261d160b6a60634d /vms/pwd.c
downloadcvs-tarball-10de491ef0bc43827ab8631a4c02860134e620a9.tar.gz
Imported from /home/lorry/working-area/delta_cvs-tarball/cvs-1.12.13.tar.bz2.HEADcvs-1.12.13master
Diffstat (limited to 'vms/pwd.c')
-rw-r--r--vms/pwd.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/vms/pwd.c b/vms/pwd.c
new file mode 100644
index 0000000..40c6f5a
--- /dev/null
+++ b/vms/pwd.c
@@ -0,0 +1,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 */