summaryrefslogtreecommitdiff
path: root/contrib/cvs/src/expand_path.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1998-01-26 03:09:57 +0000
committerPeter Wemm <peter@FreeBSD.org>1998-01-26 03:09:57 +0000
commit57e58c3aa7a2477ce7fa56bfea9d927b4eb43ccd (patch)
treea9812ba7ade0fde6f62c1626b45d522ba104c314 /contrib/cvs/src/expand_path.c
parent3398c9be05502e12d986ef6e89739df1dc9ba9e6 (diff)
Notes
Diffstat (limited to 'contrib/cvs/src/expand_path.c')
-rw-r--r--contrib/cvs/src/expand_path.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/contrib/cvs/src/expand_path.c b/contrib/cvs/src/expand_path.c
index 7d0bc39e5abf4..5cf414e35d788 100644
--- a/contrib/cvs/src/expand_path.c
+++ b/contrib/cvs/src/expand_path.c
@@ -184,6 +184,19 @@ expand_path (name, file, line)
t = get_homedir ();
else
{
+#ifdef GETPWNAM_MISSING
+ for (; *p!='/' && *p; p++)
+ ;
+ *p = 0;
+ if (line != 0)
+ error (0, 0,
+ "%s:%d:tilde expansion not supported on this system",
+ file, line);
+ else
+ error (0, 0, "%s:tilde expansion not supported on this system",
+ file);
+ return NULL;
+#else
struct passwd *ps;
for (; *p!='/' && *p; p++)
;
@@ -199,6 +212,7 @@ expand_path (name, file, line)
return NULL;
}
t = ps->pw_dir;
+#endif
}
doff = d - buf;
expand_string (&buf, &buf_size, doff + 1);
@@ -256,8 +270,11 @@ expand_variable (name, file, line)
{
if (strcmp (name, CVSROOT_ENV) == 0)
return CVSroot_original;
- else if (strcmp (name, RCSBIN_ENV) == 0)
- return Rcsbin;
+ else if (strcmp (name, "RCSBIN") == 0)
+ {
+ error (0, 0, "RCSBIN internal variable is no longer supported");
+ return NULL;
+ }
else if (strcmp (name, EDITOR1_ENV) == 0)
return Editor;
else if (strcmp (name, EDITOR2_ENV) == 0)