diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-03-30 23:26:46 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-03-30 23:26:46 +0000 |
commit | 12de73c2fa83d5aec88f10c4e272869628846ca3 (patch) | |
tree | 9a02a97c98eeb1e4e152c508a6bec05c1c6eb0e5 /lib/libc/time | |
parent | 6f1a17ed6ef49609a572a31453bd3c5a03edb1a0 (diff) |
Make 'zic -l' actually work. I guess we all just do the symlink
by hand and thus never noticed.
Diffstat (limited to 'lib/libc/time')
-rw-r--r-- | lib/libc/time/zic.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/libc/time/zic.c b/lib/libc/time/zic.c index e385e71c87f..a02252f2698 100644 --- a/lib/libc/time/zic.c +++ b/lib/libc/time/zic.c @@ -1,6 +1,6 @@ #if defined(LIBC_SCCS) && !defined(lint) && !defined(NOID) static char elsieid[] = "@(#)zic.c 7.99"; -static char rcsid[] = "$OpenBSD: zic.c,v 1.10 1999/07/01 23:05:39 d Exp $"; +static char rcsid[] = "$OpenBSD: zic.c,v 1.11 2000/03/30 23:26:45 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include "private.h" @@ -611,20 +611,10 @@ const char * const tofile; if (mkdirs(toname) != 0) (void) exit(EXIT_FAILURE); - result = link(fromname, toname); #if (HAVE_SYMLINK - 0) - if (result != 0) { - char *s = (char *) tofile; - register char * symlinkcontents = NULL; - while ((s = strchr(s+1, '/')) != NULL) - symlinkcontents = ecatalloc(symlinkcontents, "../"); - symlinkcontents = ecatalloc(symlinkcontents, fromfile); - - result = symlink(symlinkcontents, toname); - if (result == 0) -warning(_("hard link failed, symbolic link used")); - ifree(symlinkcontents); - } + result = symlink(fromname, toname); +#else + result = link(fromname, toname); #endif if (result != 0) { const char *e = strerror(errno); |