* Fixed timezones directory path.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33607 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-10-16 08:26:56 +00:00
parent 7840f0faf5
commit ec2719329c
2 changed files with 22 additions and 1 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
SubDir HAIKU_TOP src system libroot posix time ;
# for localtime.c strftime.c
SubDirCcFlags -DNOID -DTZDIR='\"/etc/timezones\"' -DUSG_COMPAT -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DPCTS=1 -DSTD_INSPIRED ;
SubDirCcFlags -DNOID -DTZDIR='get_timezones_directory()' -DUSG_COMPAT
-DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DPCTS=1 -DSTD_INSPIRED ;
UsePrivateHeaders [ FDirName libroot time ] ;
UsePrivateSystemHeaders ;
+20
View File
@@ -226,6 +226,26 @@ int daylight = 0;
time_t altzone = 0;
#endif /* defined ALTZONE */
#ifdef __HAIKU__
# include <FindDirectory.h>
static const char*
get_timezones_directory(void)
{
static char path[PATH_MAX];
if (path[0] != '\0')
return path;
if (find_directory(B_SYSTEM_DATA_DIRECTORY, -1, false, path, sizeof(path))
== B_OK) {
strlcat(path, "/timezones", sizeof(path));
} else
strcpy(path, "/boot/system/data/timezones");
return path;
}
#endif
static long
detzcode(codep)
const char * const codep;