about summary refs log tree commit diff
path: root/timezone/zic.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>1999-03-29 00:19:49 +0000
committerAndreas Schwab <schwab@suse.de>1999-03-29 00:19:49 +0000
commitb9f1792afb7d0aa747cf443d5fb8ac705b9c9d87 (patch)
treefb7af65f9cdc5cfb88c7c5c5c3ccc548e0346f70 /timezone/zic.c
parent3c022f42db2a7fee56733f445e06227b91a657de (diff)
downloadglibc-b9f1792afb7d0aa747cf443d5fb8ac705b9c9d87.tar.gz
glibc-b9f1792afb7d0aa747cf443d5fb8ac705b9c9d87.tar.xz
glibc-b9f1792afb7d0aa747cf443d5fb8ac705b9c9d87.zip
Updated.
1999-03-25  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* timezone/README: Update from tzdata1999c and tzcode1999c.

	* timezone/africa: Update from tzdata1999c.
	* timezone/antarctica: Likewise.
	* timezone/asia: Likewise.
	* timezone/australasia: Likewise.
	* timezone/europe: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/southamerica: Likewise.
	* timezone/zone.tab: Likewise.

	* timezone/zic.c: Update from tzcode1999c.
Diffstat (limited to 'timezone/zic.c')
-rw-r--r--timezone/zic.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/timezone/zic.c b/timezone/zic.c
index 040a6053d2..e37dd7326c 100644
--- a/timezone/zic.c
+++ b/timezone/zic.c
@@ -1,6 +1,6 @@
 #ifndef lint
 #ifndef NOID
-static char	elsieid[] = "@(#)zic.c	7.96";
+static char	elsieid[] = "@(#)zic.c	7.99";
 #endif /* !defined NOID */
 #endif /* !defined lint */
 
@@ -563,12 +563,18 @@ _("%s: More than one -L option specified\n"),
 	/*
 	** Make links.
 	*/
-	for (i = 0; i < nlinks; ++i)
+	for (i = 0; i < nlinks; ++i) {
+		eat(links[i].l_filename, links[i].l_linenum);
 		dolink(links[i].l_from, links[i].l_to);
-	if (lcltime != NULL)
+	}
+	if (lcltime != NULL) {
+		eat("command line", 1);
 		dolink(lcltime, TZDEFAULT);
-	if (psxrules != NULL)
+	}
+	if (psxrules != NULL) {
+		eat("command line", 1);
 		dolink(psxrules, TZDEFRULES);
+	}
 	return (errors == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
@@ -605,12 +611,20 @@ const char * const	tofile;
 
 		if (mkdirs(toname) != 0)
 			(void) exit(EXIT_FAILURE);
+
 		result = link(fromname, toname);
 #if (HAVE_SYMLINK - 0) 
 		if (result != 0) {
-			result = symlink(fromname, toname);
+		        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);
 		}
 #endif
 		if (result != 0) {