Date: Wed, 11 Dec 2013 01:18:33 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r336136 - in head/java: openjdk6 openjdk6-jre openjdk6/files Message-ID: <201312110118.rBB1IXZq012955@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Wed Dec 11 01:18:33 2013 New Revision: 336136 URL: http://svnweb.freebsd.org/changeset/ports/336136 Log: If /var/db/zoneinfo exists, use the file to determine timezone rather than iterating over all files under /usr/share/zoneinfo. All supported FreeBSD versions create the file with tzsetup(8). This change usually improves java.util.TimeZone performance because we only need to test just one file. Modified: head/java/openjdk6-jre/Makefile head/java/openjdk6/Makefile head/java/openjdk6/files/patch-set Modified: head/java/openjdk6-jre/Makefile ============================================================================== --- head/java/openjdk6-jre/Makefile Wed Dec 11 01:11:31 2013 (r336135) +++ head/java/openjdk6-jre/Makefile Wed Dec 11 01:18:33 2013 (r336136) @@ -1,6 +1,6 @@ # $FreeBSD$ -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= java devel PKGNAMESUFFIX= -jre Modified: head/java/openjdk6/Makefile ============================================================================== --- head/java/openjdk6/Makefile Wed Dec 11 01:11:31 2013 (r336135) +++ head/java/openjdk6/Makefile Wed Dec 11 01:18:33 2013 (r336136) @@ -3,7 +3,7 @@ PORTNAME= openjdk6 PORTVERSION= b28 -PORTREVISION?= 6 +PORTREVISION?= 7 CATEGORIES= java devel MASTER_SITES= ${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:ant,} \ http://download.java.net/openjdk/jtreg/promoted/4.1/b05/:jtreg \ Modified: head/java/openjdk6/files/patch-set ============================================================================== --- head/java/openjdk6/files/patch-set Wed Dec 11 01:11:31 2013 (r336135) +++ head/java/openjdk6/files/patch-set Wed Dec 11 01:18:33 2013 (r336136) @@ -11783,34 +11783,40 @@ #include <string.h> #include <dirent.h> #include <sys/stat.h> -@@ -49,7 +49,7 @@ +@@ -49,9 +49,13 @@ #define fileclose fclose #endif -#ifdef __linux__ +#if defined(__linux__) || defined(_ALLBSD_SOURCE) ++#ifdef __FreeBSD__ ++static const char *ETC_TIMEZONE_FILE = "/var/db/zoneinfo"; ++#else static const char *ETC_TIMEZONE_FILE = "/etc/timezone"; ++#endif static const char *ZONEINFO_DIR = "/usr/share/zoneinfo"; -@@ -199,7 +199,9 @@ + static const char *DEFAULT_ZONEINFO_FILE = "/etc/localtime"; + +@@ -199,7 +203,9 @@ int fd; char *buf; size_t size; + char zoneinfo_file[PATH_MAX+1]; -+#ifdef __linux__ ++#if defined(__linux__) || defined(__FreeBSD__) /* * Try reading the /etc/timezone file for Debian distros. There's * no spec of the file format available. This parsing assumes that -@@ -223,6 +225,7 @@ +@@ -223,6 +229,7 @@ return tz; } } -+#endif /* __linux__ */ ++#endif /* __linux__ || __FreeBSD__ */ /* * Next, try /etc/localtime to find the zone ID. -@@ -231,6 +234,9 @@ +@@ -231,6 +238,9 @@ return NULL; } @@ -11820,7 +11826,7 @@ /* * If it's a symlink, get the link name and its zone ID part. (The * older versions of timeconfig created a symlink as described in -@@ -239,21 +245,25 @@ +@@ -239,21 +249,25 @@ * from /etc/localtime.) */ if (S_ISLNK(statbuf.st_mode)) { @@ -11851,7 +11857,7 @@ /* * If it's a regular file, we need to find out the same zoneinfo file -@@ -264,7 +274,7 @@ +@@ -264,7 +278,7 @@ if (buf == NULL) { return NULL; } @@ -11860,7 +11866,7 @@ free((void *) buf); return NULL; } -@@ -493,7 +503,7 @@ +@@ -493,7 +507,7 @@ tz = getenv("TZ"); @@ -11869,7 +11875,7 @@ if (tz == NULL) { #else #ifdef __solaris__ -@@ -532,19 +542,32 @@ +@@ -532,19 +546,32 @@ { time_t offset; char sign, buf[16];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312110118.rBB1IXZq012955>