libical: 1.0.0 -> 1.0.1

This commit is contained in:
William A. Kennington III
2015-03-26 17:29:57 -07:00
parent 611a4bfc0d
commit 5e790f0e17
2 changed files with 25 additions and 15 deletions
@@ -1,21 +1,19 @@
* Remove /usr/*/zoneinfo from the default search path
* Respect $TZDIR
diff --git a/src/libical/icaltz-util.c b/src/libical/icaltz-util.c
index adf7598..d2fd5c8 100644
index fe984c9..22ba0a1 100644
--- a/src/libical/icaltz-util.c
+++ b/src/libical/icaltz-util.c
@@ -108,7 +108,7 @@ typedef struct
static int r_pos [] = {1, 2, 3, -2, -1};
@@ -107,7 +107,7 @@ typedef struct
char charcnt[4];
} tzinfo;
-static char *search_paths [] = {"/usr/share/zoneinfo","/usr/lib/zoneinfo","/etc/zoneinfo","/usr/share/lib/zoneinfo"};
+static char *search_paths [] = {"/etc/zoneinfo"};
static char *zdir = NULL;
#define NUM_SEARCH_PATHS (sizeof (search_paths)/ sizeof (search_paths [0]))
@@ -195,6 +195,16 @@ set_zonedir (void)
@@ -194,6 +194,16 @@ set_zonedir (void)
const char *fname = ZONES_TAB_SYSTEM_FILENAME;
int i;
unsigned int i;
+ const char *env_tzdir = strdup (getenv ("TZDIR"));
+ if (env_tzdir) {
@@ -27,6 +25,6 @@ index adf7598..d2fd5c8 100644
+ free (env_tzdir);
+ }
+
for (i = 0;i < NUM_SEARCH_PATHS; i++) {
for (i = 0; i < NUM_SEARCH_PATHS; i++) {
sprintf (file_path, "%s/%s", search_paths [i], fname);
if (!access (file_path, F_OK|R_OK)) {