about summary refs log tree commit diff
path: root/timezone/zic.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-04-06 04:05:41 +0000
committerUlrich Drepper <drepper@redhat.com>2002-04-06 04:05:41 +0000
commit3fc2f6c8cb7bf6b5d6f81b0759acd18c383d5c4b (patch)
tree6a62340289c8ee0b53b8f6ddf328cbeb7a238185 /timezone/zic.c
parentc4b4e079e3d3f6d1eb66576d3d6188332eb6619b (diff)
downloadglibc-3fc2f6c8cb7bf6b5d6f81b0759acd18c383d5c4b.tar.gz
glibc-3fc2f6c8cb7bf6b5d6f81b0759acd18c383d5c4b.tar.xz
glibc-3fc2f6c8cb7bf6b5d6f81b0759acd18c383d5c4b.zip
Update.
2002-04-05  Ulrich Drepper  <drepper@redhat.com>

	* timezone/zic.c: Update from tzcode2002c.
	* timezone/asia: Update from tzdata2002c.
	* timezone/backward: Likewise.
	* timezone/europe: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/southamerica: Likewise.
	* timezone/zone.tab: Likewise.
Diffstat (limited to 'timezone/zic.c')
-rw-r--r--timezone/zic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/timezone/zic.c b/timezone/zic.c
index 6fdcfcb66a..64642b39c5 100644
--- a/timezone/zic.c
+++ b/timezone/zic.c
@@ -1,6 +1,6 @@
 #ifndef lint
 #ifndef NOID
-static char	elsieid[] = "@(#)zic.c	7.104";
+static char	elsieid[] = "@(#)zic.c	7.107";
 #endif /* !defined NOID */
 #endif /* !defined lint */
 
@@ -621,9 +621,11 @@ const char * const	tofile;
 
 		result = link(fromname, toname);
 #if (HAVE_SYMLINK - 0)
-		if (result != 0) {
+		if (result != 0 &&
+		    access(fromname, F_OK) == 0 &&
+		    !itsdir(fromname)) {
 		        const char *s = tofile;
-		        register char *symlinkcontents = NULL;
+		        register char * symlinkcontents = NULL;
 		        while ((s = strchr(s+1, '/')) != NULL)
 			        symlinkcontents = ecatalloc(symlinkcontents, "../");
 			symlinkcontents = ecatalloc(symlinkcontents, fromname);