* 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:
@@ -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 ;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user